summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2018-07-02 15:28:08 -0400
committerJacob Keeler <jacob.keeler@livioradio.com>2018-07-02 17:46:01 -0400
commit38e54fb36d40e9c8d147c9ab6113d29ca4481b3e (patch)
tree9b8b730b86f530d9d1764cf8459c2b7aed8ef7a6
parent1f3a2e49b0b0a6254ca6e8b003784b43bd1488d0 (diff)
parentba1da7bc2ff3fd37638620f6bea526384646ab0e (diff)
downloadsdl_core-38e54fb36d40e9c8d147c9ab6113d29ca4481b3e.tar.gz
Merge remote-tracking branch 'origin/develop' into feature/handling_VR_help_requests
# Conflicts: # src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc # src/components/application_manager/src/application_manager_impl.cc # src/components/application_manager/test/CMakeLists.txt # src/components/application_manager/test/application_manager_impl_test.cc # src/components/application_manager/test/resumption/resume_ctrl_test.cc # src/components/functional_module/test/include/mock_application.h # src/components/remote_control/test/include/mock_application.h
-rw-r--r--.travis.yml55
-rw-r--r--CMakeLists.txt14
-rw-r--r--README.md2
-rw-r--r--docs/mainpage.dox1
-rw-r--r--src/3rd_party/CMakeLists.txt7
-rw-r--r--src/appMain/CMakeLists.txt8
-rwxr-xr-xsrc/appMain/hmi_capabilities.json18
-rw-r--r--src/appMain/life_cycle.cc16
-rw-r--r--src/appMain/life_cycle.h11
-rw-r--r--src/appMain/sdl_preloaded_pt.json17
-rw-r--r--src/appMain/smartDeviceLink.ini23
-rw-r--r--src/components/CMakeLists.txt7
-rw-r--r--src/components/application_manager/CMakeLists.txt297
-rw-r--r--src/components/application_manager/doc/SDL.SDD.ApplicationManager.dox76
-rw-r--r--src/components/application_manager/include/application_manager/app_extension.h23
-rw-r--r--src/components/application_manager/include/application_manager/application.h55
-rw-r--r--src/components/application_manager/include/application_manager/application_data_impl.h30
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h59
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h399
-rw-r--r--src/components/application_manager/include/application_manager/command_factory.h212
-rw-r--r--src/components/application_manager/include/application_manager/command_holder_impl.h1
-rw-r--r--src/components/application_manager/include/application_manager/commands/command.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_impl.h8
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_notification_from_mobile_impl.h8
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_notification_impl.h5
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h5
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_response_impl.h5
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/basic_communication_on_awake_sdl.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_request.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/dial_number_request.h76
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/dial_number_response.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h83
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_urls.h92
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h91
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_request.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h79
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_request.h85
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h91
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h64
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h60
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h83
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_button_subscription_notification.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h79
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_event_changed_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h78
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h67
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h70
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h75
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h78
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h78
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h75
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_request.h90
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h97
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h89
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/response_to_hmi.h63
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h110
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h67
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h70
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h89
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h89
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h93
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h89
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h75
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h90
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h165
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h93
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h106
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/alert_request.h150
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/alert_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h186
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h270
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h115
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h78
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h89
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h105
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h81
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h91
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/dial_number_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h81
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/generic_response.h69
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h81
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_request.h61
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_response.h60
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h94
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h76
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h87
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h86
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h78
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h76
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h86
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h77
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h83
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h69
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h191
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h241
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h82
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h81
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h223
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h143
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h86
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h84
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_location_request.h96
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h67
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_request.h112
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h81
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h159
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h87
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h82
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h90
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/show_request.h99
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/show_response.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/slider_request.h92
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/slider_response.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/speak_request.h94
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/speak_response.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h99
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h172
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h82
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/system_request.h94
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/system_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h75
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h85
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h127
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h80
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h98
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h74
-rw-r--r--src/components/application_manager/include/application_manager/commands/notification_from_hmi.h67
-rw-r--r--src/components/application_manager/include/application_manager/commands/notification_to_hmi.h63
-rw-r--r--src/components/application_manager/include/application_manager/commands/request_from_hmi.h100
-rw-r--r--src/components/application_manager/include/application_manager/commands/request_to_hmi.h92
-rw-r--r--src/components/application_manager/include/application_manager/commands/response_from_hmi.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/response_to_hmi.h66
-rw-r--r--src/components/application_manager/include/application_manager/core_service.h214
-rw-r--r--src/components/application_manager/include/application_manager/helpers/application_helper.h10
-rw-r--r--src/components/application_manager/include/application_manager/hmi_command_factory.h64
-rw-r--r--src/components/application_manager/include/application_manager/hmi_state.h87
-rw-r--r--src/components/application_manager/include/application_manager/message.h6
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h69
-rw-r--r--src/components/application_manager/include/application_manager/mobile_command_factory.h67
-rw-r--r--src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin.h120
-rw-r--r--src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager.h83
-rw-r--r--src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager_impl.h79
-rw-r--r--src/components/application_manager/include/application_manager/policies/policy_handler.h38
-rw-r--r--src/components/application_manager/include/application_manager/request_info.h2
-rw-r--r--src/components/application_manager/include/application_manager/rpc_handler_impl.h172
-rw-r--r--src/components/application_manager/include/application_manager/rpc_service_impl.h149
-rw-r--r--src/components/application_manager/include/application_manager/service.h183
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h34
-rw-r--r--src/components/application_manager/include/application_manager/state_controller_impl.h77
-rw-r--r--src/components/application_manager/include/application_manager/system_time/system_time_handler_impl.h160
-rw-r--r--src/components/application_manager/rpc_plugins/CMakeLists.txt34
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/CMakeLists.txt80
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h71
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h70
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h72
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h74
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h83
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h70
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h71
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h99
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h98
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h65
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h125
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h172
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h85
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h94
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h233
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h102
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h151
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h210
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc69
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc157
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc299
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc292
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc101
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc365
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc29
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc265
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc68
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc306
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc128
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc417
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt75
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/CMakeLists.txt62
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc319
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc238
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc140
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc163
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc239
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc225
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h72
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc508
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/add_statistics_info_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_request.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_on_awake_sdl.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_request.h72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_request.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_response.h81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h87
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls.h96
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls_response.h72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h95
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_request.h89
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h95
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h89
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_event_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_press_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h85
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_application_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_find_applications.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_policy_update.h71
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_put_file_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ready_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_received_policy_update.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_record_start_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_start_device_discovery.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_status_update_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_context_notification.h81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_error_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_request_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_time_ready_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_update_device_list.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h94
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_request.h114
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_request.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_request.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update.h71
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update_response.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h93
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h93
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_request.h97
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_request_template.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_response_template.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_request_template.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_response_template.h82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h94
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h169
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_request.h97
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_request.h110
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h154
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_request.h191
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h277
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_request.h119
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_request.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h95
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h109
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_request.h95
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_request.h85
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/generic_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_request.h67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_response.h66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_request.h81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_response.h76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_audio_pass_thru_notification.h82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_event_notification.h92
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_press_notification.h91
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_command_notification.h82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_driver_distraction_notification.h84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hash_change_notification.h81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification_from_mobile.h82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_keyboard_input_notification.h83
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_language_change_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_system_request_notification.h93
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_way_point_change_notification.h75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h198
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h244
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_request.h86
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h230
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_response.h84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h149
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_request.h90
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_response.h73
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_request.h88
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_request.h100
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_response.h71
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_request.h116
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_request.h85
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h166
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_request.h91
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h86
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h94
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_request.h103
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_response.h72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_request.h96
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_response.h72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_request.h98
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_response.h72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_request.h103
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_request.h87
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_request.h98
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h85
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_response.h81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_request.h89
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_request.h86
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_request.h102
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/hmi_command_factory.h75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/mobile_command_factory.h75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_command_factory.h73
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h68
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc73
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc58
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc68
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_request.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc93
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls.cc230
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc189
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc59
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc87
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc156
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc189
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc59
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc68
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc69
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc69
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc183
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc124
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc143
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc124
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc125
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc60
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc88
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc69
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc124
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc103
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc69
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc68
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc102
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc59
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc68
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc113
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc101
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc69
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc108
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc294
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc96
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc59
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc121
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_icon_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc103
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc625
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc189
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc291
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc453
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc684
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc451
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc234
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc132
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc168
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc201
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc156
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc100
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc143
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc116
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc60
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc183
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc190
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc87
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc84
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc95
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc135
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc96
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc229
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc96
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc460
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc1013
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc326
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc73
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc1379
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc336
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc163
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc108
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc284
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc296
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc173
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc614
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_request.cc149
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc166
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc292
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc413
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc207
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc184
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc132
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc73
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc123
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc700
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc48
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc112
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc117
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc243
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc1703
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc443
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_command_factory.cc78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc75
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/CMakeLists.txt36
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/activate_app_request_test.cc125
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/add_statistics_info_notification_test.cc85
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/allow_all_apps_response_test.cc76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/allow_app_response_test.cc95
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/basic_communication_get_system_time_request_test.cc72
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/basic_communication_get_system_time_response_test.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc112
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/close_popup_response_test.cc74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc583
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_request_test.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc140
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_response_test.cc90
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc336
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc1886
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/mixing_audio_supported_request_test.cc91
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/mixing_audio_supported_response_test.cc102
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc121
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_is_ready_request_test.cc135
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_is_ready_response_test.cc76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc216
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_response_test.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc120
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_stop_stream_requests_test.cc105
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc163
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_system_time_ready_notification_test.cc80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc177
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc168
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_response_test.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/response_from_hmi_test.cc134
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc500
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_response_test.cc87
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc111
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_status_update_request_test.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc160
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_notifications_test.cc77
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_request_from_hmi_test.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc267
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc325
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_to_hmi_test.cc105
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc125
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc103
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc130
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_response_test.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc314
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc107
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc124
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc199
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_response_test.cc92
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_device_list_request_test.cc173
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc88
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc86
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc108
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc107
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc124
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc182
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_response_test.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc1112
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc158
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_maneuver_request_test.cc256
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_request_test.cc810
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc562
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc826
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc256
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_file_test.cc250
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc296
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc366
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc190
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc315
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/end_audio_pass_thru_request_test.cc120
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/get_way_points_request_test.cc282
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/list_files_request_test.cc145
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc340
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc137
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hash_change_notification_test.cc119
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc284
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_test.cc166
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_keyboard_input_notification_test.cc167
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc273
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_tbt_client_state_notification_test.cc138
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_touch_event_notification_test.cc148
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_audio_pass_thru_test.cc835
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_interaction_test.cc264
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/put_file_test.cc407
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc526
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc576
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc286
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_haptic_data_test.cc164
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_location_request_test.cc406
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_app_icon_test.cc174
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_display_layout_test.cc250
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc1177
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_media_clock_timer_test.cc356
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/show_test.cc921
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc189
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/slider_test.cc342
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/speak_request_test.cc407
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_button_request_test.cc202
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc130
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/system_request_test.cc236
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc118
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_button_request_test.cc150
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc171
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/update_turn_list_request_test.cc292
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/CMakeLists.txt72
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/on_vi_vehicle_data_notification.h81
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h93
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_request.h77
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_response.h77
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h79
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h85
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h79
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h85
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h98
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h88
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h85
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h180
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h134
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h80
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h135
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h70
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_hmi_command_factory.h73
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h73
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h82
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc75
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc89
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc112
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc130
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc119
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc319
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc136
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc134
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc517
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc424
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc126
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc70
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc155
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc143
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc164
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc153
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc169
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/diagnostic_message_request_test.cc185
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_dtcs_request_test.cc142
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc262
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/on_vehicle_data_notification_test.cc114
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc165
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc301
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_response_test.cc114
-rw-r--r--src/components/application_manager/src/application_data_impl.cc80
-rw-r--r--src/components/application_manager/src/application_impl.cc96
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc1218
-rw-r--r--src/components/application_manager/src/application_state.cc1
-rw-r--r--src/components/application_manager/src/command_holder_impl.cc6
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc20
-rw-r--r--src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc15
-rw-r--r--src/components/application_manager/src/commands/command_notification_impl.cc15
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc42
-rw-r--r--src/components/application_manager/src/commands/command_response_impl.cc15
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_request.cc69
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/add_statistics_info_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_app_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_app_response.cc64
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_on_awake_sdl.cc73
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_system_request.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_system_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc68
-rw-r--r--src/components/application_manager/src/commands/hmi/close_popup_request.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/close_popup_response.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/decrypt_certificate_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/decrypt_certificate_response.cc59
-rw-r--r--src/components/application_manager/src/commands/hmi/dial_number_request.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/dial_number_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/get_system_info_request.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/get_system_info_response.cc84
-rw-r--r--src/components/application_manager/src/commands/hmi/get_urls.cc223
-rw-r--r--src/components/application_manager/src/commands/hmi/get_urls_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc180
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_request.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_response.cc50
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc79
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_send_location_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_send_location_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_set_video_config_request.cc147
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_set_video_config_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc180
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc25
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc50
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc59
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/notification_from_hmi.cc101
-rw-r--r--src/components/application_manager/src/commands/hmi/notification_to_hmi.cc65
-rw-r--r--src/components/application_manager/src/commands/hmi/on_allow_sdl_functionality_notification.cc60
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc60
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_permission_changed_notification.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_permission_consent_notification.cc175
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc67
-rw-r--r--src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_event_notification.cc61
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_press_notification.cc63
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_subscription_notification.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/on_device_state_changed_notification.cc115
-rw-r--r--src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc134
-rw-r--r--src/components/application_manager/src/commands/hmi/on_event_changed_notification.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc114
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc113
-rw-r--r--src/components/application_manager/src/commands/hmi/on_file_removed_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_find_applications.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ignition_cycle_over_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/on_policy_update.cc51
-rw-r--r--src/components/application_manager/src/commands/hmi/on_put_file_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ready_notification.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/on_received_policy_update.cc69
-rw-r--r--src/components/application_manager/src/commands/hmi/on_record_start_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_resume_audio_source_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_consent_needed_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_persistence_complete_notification.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_status_update_notification.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_context_notification.cc79
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_error_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_info_changed_notification.cc60
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_request_notification.cc117
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc93
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_reset_timeout_notification.cc29
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc59
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc61
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc92
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc61
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc61
-rw-r--r--src/components/application_manager/src/commands/hmi/on_update_device_list.cc50
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc59
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc66
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc104
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc91
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/rc_get_capabilities_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/rc_get_capabilities_response.cc60
-rw-r--r--src/components/application_manager/src/commands/hmi/rc_is_ready_request.cc99
-rw-r--r--src/components/application_manager/src/commands/hmi/rc_is_ready_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/request_from_hmi.cc108
-rw-r--r--src/components/application_manager/src/commands/hmi/request_to_hmi.cc87
-rw-r--r--src/components/application_manager/src/commands/hmi/response_from_hmi.cc106
-rw-r--r--src/components/application_manager/src/commands/hmi/response_to_hmi.cc63
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc288
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_request.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_status_update_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_status_update_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc87
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_policy_update.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_policy_update_response.cc50
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc63
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_response.cc71
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc63
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc106
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_speak_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_speak_response.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_command_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_command_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_alert_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_alert_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc112
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_response.cc72
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc63
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc106
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_send_haptic_data_request.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_send_haptic_data_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_show_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_show_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_slider_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_slider_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/update_app_list_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/update_app_list_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/update_device_list_request.cc94
-rw-r--r--src/components/application_manager/src/commands/hmi/update_device_list_response.cc52
-rw-r--r--src/components/application_manager/src/commands/hmi/update_sdl_request.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/update_sdl_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc80
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc103
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_read_did_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_read_did_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_add_command_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_add_command_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc56
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_response.cc72
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc63
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc106
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_perform_interaction_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_perform_interaction_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_request.cc616
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc161
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc267
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_request.cc426
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_response.cc58
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_request.cc661
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc442
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc66
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_request.cc224
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_request.cc121
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_response.cc66
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc159
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc75
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc192
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc121
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/dial_number_request.cc147
-rw-r--r--src/components/application_manager/src/commands/mobile/dial_number_response.cc53
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc91
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/generic_response.cc65
-rw-r--r--src/components/application_manager/src/commands/mobile/get_dtcs_request.cc110
-rw-r--r--src/components/application_manager/src/commands/mobile/get_dtcs_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/get_system_capability_request.cc95
-rw-r--r--src/components/application_manager/src/commands/mobile/get_system_capability_response.cc22
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc306
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_request.cc75
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_response.cc22
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_request.cc106
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_response.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc51
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_event_notification.cc174
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_press_notification.cc181
-rw-r--r--src/components/application_manager/src/commands/mobile/on_command_notification.cc78
-rw-r--r--src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc61
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc75
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc77
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc126
-rw-r--r--src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc87
-rw-r--r--src/components/application_manager/src/commands/mobile/on_language_change_notification.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/on_system_request_notification.cc201
-rw-r--r--src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc70
-rw-r--r--src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc87
-rw-r--r--src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc112
-rw-r--r--src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc61
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc433
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_request.cc953
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_request.cc283
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_response.cc64
-rw-r--r--src/components/application_manager/src/commands/mobile/read_did_request.cc125
-rw-r--r--src/components/application_manager/src/commands/mobile/read_did_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc1287
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_response.cc99
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc327
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_request.cc154
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_response.cc63
-rw-r--r--src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc99
-rw-r--r--src/components/application_manager/src/commands/mobile/send_haptic_data_response.cc53
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_request.cc276
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_response.cc57
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_request.cc286
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_request.cc114
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_response.cc55
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_request.cc564
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/set_icon_request.cc140
-rw-r--r--src/components/application_manager/src/commands/mobile/set_icon_response.cc55
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc157
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc285
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc57
-rw-r--r--src/components/application_manager/src/commands/mobile/show_request.cc403
-rw-r--r--src/components/application_manager/src/commands/mobile/show_response.cc57
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_request.cc198
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_request.cc160
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_response.cc57
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_request.cc123
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_response.cc64
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc497
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc82
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc22
-rw-r--r--src/components/application_manager/src/commands/mobile/system_request.cc659
-rw-r--r--src/components/application_manager/src/commands/mobile/system_response.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc64
-rw-r--r--src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc47
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc103
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc65
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc407
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc63
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc76
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc22
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_request.cc234
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_response.cc56
-rw-r--r--src/components/application_manager/src/commands/notification_from_hmi.cc110
-rw-r--r--src/components/application_manager/src/commands/notification_to_hmi.cc74
-rw-r--r--src/components/application_manager/src/commands/request_from_hmi.cc116
-rw-r--r--src/components/application_manager/src/commands/request_to_hmi.cc97
-rw-r--r--src/components/application_manager/src/commands/response_from_hmi.cc113
-rw-r--r--src/components/application_manager/src/commands/response_to_hmi.cc71
-rw-r--r--src/components/application_manager/src/core_service.cc231
-rw-r--r--src/components/application_manager/src/helpers/application_helper.cc28
-rw-r--r--src/components/application_manager/src/hmi_capabilities_impl.cc16
-rw-r--r--src/components/application_manager/src/hmi_command_factory.cc2317
-rw-r--r--src/components/application_manager/src/hmi_interfaces_impl.cc7
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc9
-rw-r--r--src/components/application_manager/src/hmi_state.cc103
-rw-r--r--src/components/application_manager/src/message.cc4
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc306
-rw-r--r--src/components/application_manager/src/mobile_command_factory.cc731
-rw-r--r--src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc110
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc133
-rw-r--r--src/components/application_manager/src/request_controller.cc2
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl_impl.cc16
-rw-r--r--src/components/application_manager/src/resumption/resumption_data.cc13
-rw-r--r--src/components/application_manager/src/rpc_handler_impl.cc369
-rw-r--r--src/components/application_manager/src/rpc_service_impl.cc634
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc35
-rw-r--r--src/components/application_manager/src/state_controller_impl.cc529
-rw-r--r--src/components/application_manager/src/system_time/system_time_handler_impl.cc173
-rwxr-xr-xsrc/components/application_manager/test/CMakeLists.txt16
-rw-r--r--src/components/application_manager/test/application_helper_test.cc21
-rw-r--r--src/components/application_manager/test/application_impl_test.cc16
-rw-r--r--src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc43
-rw-r--r--src/components/application_manager/test/application_manager_impl_test.cc81
-rw-r--r--src/components/application_manager/test/application_state_test.cc2
-rw-r--r--src/components/application_manager/test/command_holder_test.cc21
-rw-r--r--src/components/application_manager/test/commands/CMakeLists.txt30
-rw-r--r--src/components/application_manager/test/commands/command_impl_test.cc11
-rw-r--r--src/components/application_manager/test/commands/command_request_impl_test.cc52
-rw-r--r--src/components/application_manager/test/commands/command_response_impl_test.cc10
-rw-r--r--src/components/application_manager/test/commands/hmi/activate_app_request_test.cc125
-rw-r--r--src/components/application_manager/test/commands/hmi/add_statistics_info_notification_test.cc90
-rw-r--r--src/components/application_manager/test/commands/hmi/allow_all_apps_response_test.cc77
-rw-r--r--src/components/application_manager/test/commands/hmi/allow_app_response_test.cc95
-rw-r--r--src/components/application_manager/test/commands/hmi/button_get_capabilities_response_test.cc116
-rw-r--r--src/components/application_manager/test/commands/hmi/close_popup_response_test.cc73
-rw-r--r--src/components/application_manager/test/commands/hmi/dummy_hmi_commands_test.cc617
-rw-r--r--src/components/application_manager/test/commands/hmi/get_system_info_request_test.cc100
-rw-r--r--src/components/application_manager/test/commands/hmi/get_system_info_response_test.cc153
-rw-r--r--src/components/application_manager/test/commands/hmi/get_urls_response_test.cc91
-rw-r--r--src/components/application_manager/test/commands/hmi/get_urls_test.cc331
-rw-r--r--src/components/application_manager/test/commands/hmi/hmi_notifications/hmi_notifications_test.cc1980
-rw-r--r--src/components/application_manager/test/commands/hmi/mixing_audio_supported_request_test.cc92
-rw-r--r--src/components/application_manager/test/commands/hmi/mixing_audio_supported_response_test.cc106
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_audio_start_stream_request_test.cc120
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_is_ready_request_test.cc138
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_is_ready_response_test.cc76
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_set_video_config_request_test.cc216
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_set_video_config_response_test.cc79
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_start_stream_request_test.cc120
-rw-r--r--src/components/application_manager/test/commands/hmi/navi_stop_stream_requests_test.cc104
-rw-r--r--src/components/application_manager/test/commands/hmi/on_driver_distraction_notification_test.cc161
-rw-r--r--src/components/application_manager/test/commands/hmi/rc_get_capabilities_response_test.cc181
-rw-r--r--src/components/application_manager/test/commands/hmi/rc_is_ready_request_test.cc174
-rw-r--r--src/components/application_manager/test/commands/hmi/rc_is_ready_response_test.cc79
-rw-r--r--src/components/application_manager/test/commands/hmi/response_from_hmi_test.cc137
-rw-r--r--src/components/application_manager/test/commands/hmi/sdl_activate_app_request_test.cc503
-rw-r--r--src/components/application_manager/test/commands/hmi/sdl_activate_app_response_test.cc88
-rw-r--r--src/components/application_manager/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc116
-rw-r--r--src/components/application_manager/test/commands/hmi/sdl_get_status_update_request_test.cc82
-rw-r--r--src/components/application_manager/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc169
-rw-r--r--src/components/application_manager/test/commands/hmi/simple_notifications_test.cc77
-rw-r--r--src/components/application_manager/test/commands/hmi/simple_request_from_hmi_test.cc99
-rw-r--r--src/components/application_manager/test/commands/hmi/simple_requests_to_hmi_test.cc285
-rw-r--r--src/components/application_manager/test/commands/hmi/simple_response_from_hmi_test.cc373
-rw-r--r--src/components/application_manager/test/commands/hmi/simple_response_to_hmi_test.cc107
-rw-r--r--src/components/application_manager/test/commands/hmi/tts_get_capabilities_response_test.cc136
-rw-r--r--src/components/application_manager/test/commands/hmi/tts_get_language_response_test.cc109
-rw-r--r--src/components/application_manager/test/commands/hmi/tts_get_supported_languages_response_test.cc134
-rw-r--r--src/components/application_manager/test/commands/hmi/tts_is_ready_response_test.cc99
-rw-r--r--src/components/application_manager/test/commands/hmi/ui_get_capabilities_response_test.cc346
-rw-r--r--src/components/application_manager/test/commands/hmi/ui_get_language_response_test.cc113
-rw-r--r--src/components/application_manager/test/commands/hmi/ui_get_supported_languages_response_test.cc128
-rw-r--r--src/components/application_manager/test/commands/hmi/ui_is_ready_request_test.cc204
-rw-r--r--src/components/application_manager/test/commands/hmi/ui_is_ready_response_test.cc92
-rw-r--r--src/components/application_manager/test/commands/hmi/update_device_list_request_test.cc175
-rw-r--r--src/components/application_manager/test/commands/hmi/update_sdl_request_test.cc91
-rw-r--r--src/components/application_manager/test/commands/hmi/update_sdl_response_test.cc87
-rw-r--r--src/components/application_manager/test/commands/hmi/vi_get_vehicle_data_response_test.cc156
-rw-r--r--src/components/application_manager/test/commands/hmi/vi_is_ready_request_test.cc175
-rw-r--r--src/components/application_manager/test/commands/hmi/vr_get_capabilities_response_test.cc112
-rw-r--r--src/components/application_manager/test/commands/hmi/vr_get_language_response_test.cc113
-rw-r--r--src/components/application_manager/test/commands/hmi/vr_get_supported_languages_response_test.cc128
-rw-r--r--src/components/application_manager/test/commands/hmi/vr_is_ready_request_test.cc193
-rw-r--r--src/components/application_manager/test/commands/hmi/vr_is_ready_response_test.cc79
-rw-r--r--src/components/application_manager/test/commands/mobile/add_command_request_test.cc1084
-rw-r--r--src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc121
-rw-r--r--src/components/application_manager/test/commands/mobile/alert_maneuver_request_test.cc265
-rw-r--r--src/components/application_manager/test/commands/mobile/alert_request_test.cc771
-rw-r--r--src/components/application_manager/test/commands/mobile/change_registration_test.cc565
-rw-r--r--src/components/application_manager/test/commands/mobile/create_interaction_choice_set_test.cc814
-rw-r--r--src/components/application_manager/test/commands/mobile/delete_command_request_test.cc258
-rw-r--r--src/components/application_manager/test/commands/mobile/delete_file_test.cc246
-rw-r--r--src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc284
-rw-r--r--src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc338
-rw-r--r--src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc185
-rw-r--r--src/components/application_manager/test/commands/mobile/dial_number_request_test.cc187
-rw-r--r--src/components/application_manager/test/commands/mobile/dummy_mobile_commands_test.cc342
-rw-r--r--src/components/application_manager/test/commands/mobile/end_audio_pass_thru_request_test.cc120
-rw-r--r--src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc142
-rw-r--r--src/components/application_manager/test/commands/mobile/get_vehicle_data_request_test.cc254
-rw-r--r--src/components/application_manager/test/commands/mobile/get_way_points_request_test.cc284
-rw-r--r--src/components/application_manager/test/commands/mobile/list_files_request_test.cc145
-rw-r--r--src/components/application_manager/test/commands/mobile/on_button_notification_commands_test.cc355
-rw-r--r--src/components/application_manager/test/commands/mobile/on_command_notification_test.cc137
-rw-r--r--src/components/application_manager/test/commands/mobile/on_hash_change_notification_test.cc117
-rw-r--r--src/components/application_manager/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc282
-rw-r--r--src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc167
-rw-r--r--src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc164
-rw-r--r--src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc206
-rw-r--r--src/components/application_manager/test/commands/mobile/on_tbt_client_state_notification_test.cc140
-rw-r--r--src/components/application_manager/test/commands/mobile/on_touch_event_notification_test.cc149
-rw-r--r--src/components/application_manager/test/commands/mobile/on_vehicle_data_notification_test.cc148
-rw-r--r--src/components/application_manager/test/commands/mobile/on_way_point_change_notification_test.cc116
-rw-r--r--src/components/application_manager/test/commands/mobile/perform_audio_pass_thru_test.cc801
-rw-r--r--src/components/application_manager/test/commands/mobile/perform_interaction_test.cc262
-rw-r--r--src/components/application_manager/test/commands/mobile/put_file_test.cc351
-rw-r--r--src/components/application_manager/test/commands/mobile/read_did_request_test.cc166
-rw-r--r--src/components/application_manager/test/commands/mobile/register_app_interface_request_test.cc522
-rw-r--r--src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc565
-rw-r--r--src/components/application_manager/test/commands/mobile/scrollable_message_test.cc289
-rw-r--r--src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc163
-rw-r--r--src/components/application_manager/test/commands/mobile/send_location_request_test.cc396
-rw-r--r--src/components/application_manager/test/commands/mobile/set_app_icon_test.cc151
-rw-r--r--src/components/application_manager/test/commands/mobile/set_display_layout_test.cc254
-rw-r--r--src/components/application_manager/test/commands/mobile/set_global_properties_test.cc1153
-rw-r--r--src/components/application_manager/test/commands/mobile/set_media_clock_timer_test.cc352
-rw-r--r--src/components/application_manager/test/commands/mobile/show_test.cc937
-rw-r--r--src/components/application_manager/test/commands/mobile/simple_notification_commands_test.cc99
-rw-r--r--src/components/application_manager/test/commands/mobile/simple_response_commands_test.cc199
-rw-r--r--src/components/application_manager/test/commands/mobile/slider_test.cc340
-rw-r--r--src/components/application_manager/test/commands/mobile/speak_request_test.cc398
-rw-r--r--src/components/application_manager/test/commands/mobile/subscribe_button_request_test.cc204
-rw-r--r--src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc129
-rw-r--r--src/components/application_manager/test/commands/mobile/system_request_test.cc135
-rw-r--r--src/components/application_manager/test/commands/mobile/unregister_app_interface_request_test.cc118
-rw-r--r--src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc156
-rw-r--r--src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc287
-rw-r--r--src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_response_test.cc111
-rw-r--r--src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc172
-rw-r--r--src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc305
-rw-r--r--src/components/application_manager/test/hmi_capabilities.json39
-rw-r--r--src/components/application_manager/test/hmi_capabilities_test.cc11
-rw-r--r--src/components/application_manager/test/hmi_language_handler_test.cc21
-rw-r--r--src/components/application_manager/test/include/application_manager/commands/command_request_test.h9
-rw-r--r--src/components/application_manager/test/include/application_manager/commands/commands_test.h24
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_application.h27
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_command_factory.h65
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_hmi_command_factory.h60
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h13
-rw-r--r--src/components/application_manager/test/include/application_manager/resumption_data_test.h22
-rwxr-xr-xsrc/components/application_manager/test/message_helper/CMakeLists.txt7
-rw-r--r--src/components/application_manager/test/message_helper/message_helper_test.cc54
-rw-r--r--src/components/application_manager/test/mock_hmi_command_factory.cc11
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc26
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc48
-rw-r--r--src/components/application_manager/test/rc_policy_handler_test.cc9
-rw-r--r--src/components/application_manager/test/resumption/resume_ctrl_test.cc310
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_db_test.cc28
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_json_test.cc24
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_test.cc21
-rw-r--r--src/components/application_manager/test/resumption_sql_queries_test.cc213
-rw-r--r--src/components/application_manager/test/sdl_preloaded_pt.json13
-rw-r--r--src/components/application_manager/test/sdl_pt_update.json13
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc347
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler_impl.h14
-rw-r--r--src/components/connection_handler/src/connection.cc2
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc21
-rw-r--r--src/components/connection_handler/test/connection_handler_impl_test.cc10
-rw-r--r--src/components/functional_module/CMakeLists.txt58
-rw-r--r--src/components/functional_module/include/functional_module/function_ids.h63
-rw-r--r--src/components/functional_module/include/functional_module/generic_module.h180
-rw-r--r--src/components/functional_module/include/functional_module/module_observer.h54
-rw-r--r--src/components/functional_module/include/functional_module/plugin_manager.h159
-rw-r--r--src/components/functional_module/include/functional_module/timer/module_timer.h246
-rw-r--r--src/components/functional_module/include/functional_module/timer/timer_director.h92
-rw-r--r--src/components/functional_module/src/generic_module.cc54
-rw-r--r--src/components/functional_module/src/plugin_manager.cc396
-rw-r--r--src/components/functional_module/src/timer/timer_director.cc156
-rw-r--r--src/components/functional_module/test/CMakeLists.txt53
-rw-r--r--src/components/functional_module/test/include/driver_generic_module_test.h80
-rw-r--r--src/components/functional_module/test/include/mock_application.h251
-rw-r--r--src/components/functional_module/test/include/mock_module_observer.h50
-rw-r--r--src/components/functional_module/test/include/mock_service.h76
-rw-r--r--src/components/functional_module/test/include/module_timer_test.h56
-rw-r--r--src/components/functional_module/test/plugins/CMakeLists.txt17
-rw-r--r--src/components/functional_module/test/plugins/mock_generic_module.cc23
-rw-r--r--src/components/functional_module/test/plugins/mock_generic_module.h71
-rw-r--r--src/components/functional_module/test/src/generic_module_test.cc106
-rw-r--r--src/components/functional_module/test/src/module_timer_test.cc123
-rw-r--r--src/components/functional_module/test/src/plugin_manager_test.cc148
-rw-r--r--src/components/hmi_message_handler/src/websocket_session.cc2
-rw-r--r--src/components/include/application_manager/application_manager.h67
-rw-r--r--src/components/include/application_manager/policies/policy_handler_interface.h38
-rw-r--r--src/components/include/application_manager/rpc_handler.h60
-rw-r--r--src/components/include/application_manager/rpc_service.h90
-rw-r--r--src/components/include/application_manager/state_controller.h17
-rw-r--r--src/components/include/connection_handler/connection_handler.h15
-rw-r--r--src/components/include/policy/policy_external/policy/policy_listener.h3
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h30
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_listener.h3
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h30
-rw-r--r--src/components/include/protocol_handler/protocol_handler.h6
-rw-r--r--src/components/include/protocol_handler/session_observer.h21
-rw-r--r--src/components/include/security_manager/crypto_manager.h13
-rw-r--r--src/components/include/security_manager/security_manager.h51
-rw-r--r--src/components/include/security_manager/security_manager_listener.h7
-rw-r--r--src/components/include/security_manager/security_manager_settings.h14
-rw-r--r--src/components/include/security_manager/ssl_context.h11
-rw-r--r--src/components/include/test/application_manager/mock_app_extension.h62
-rw-r--r--src/components/include/test/application_manager/mock_application_manager.h55
-rw-r--r--src/components/include/test/application_manager/mock_rpc_plugin.h30
-rw-r--r--src/components/include/test/application_manager/mock_rpc_plugin_manager.h24
-rw-r--r--src/components/include/test/application_manager/mock_rpc_service.h34
-rw-r--r--src/components/include/test/application_manager/mock_state_controller.h17
-rw-r--r--src/components/include/test/application_manager/policies/mock_policy_handler_interface.h14
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_cache_manager.h7
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_policy_listener.h2
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_policy_manager.h11
-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_listener.h2
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h11
-rw-r--r--src/components/include/test/protocol_handler/mock_protocol_handler.h1
-rw-r--r--src/components/include/test/security_manager/mock_crypto_manager.h4
-rw-r--r--src/components/include/test/security_manager/mock_security_manager.h11
-rw-r--r--src/components/include/test/security_manager/mock_security_manager_listener.h1
-rw-r--r--src/components/include/test/security_manager/mock_security_manager_settings.h4
-rw-r--r--src/components/include/test/security_manager/mock_ssl_context.h2
-rw-r--r--src/components/include/test/utils/mock_system_time_handler.h69
-rw-r--r--src/components/include/utils/data_accessor.h15
-rw-r--r--src/components/include/utils/lock.hbin5079 -> 5418 bytes
-rw-r--r--src/components/interfaces/HMI_API.xml248
-rw-r--r--src/components/interfaces/MOBILE_API.xml230
-rw-r--r--src/components/media_manager/CMakeLists.txt2
-rw-r--r--src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h18
-rw-r--r--src/components/media_manager/src/audio/audio_stream_sender_thread.cc50
-rw-r--r--src/components/policy/policy_external/CMakeLists.txt5
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager.h30
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager_interface.h34
-rw-r--r--src/components/policy/policy_external/include/policy/policy_helper.h8
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h33
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/enums.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/policy_types.h8
-rw-r--r--src/components/policy/policy_external/include/policy/sql_pt_queries.h5
-rw-r--r--src/components/policy/policy_external/include/policy/sql_pt_representation.h8
-rw-r--r--src/components/policy/policy_external/src/cache_manager.cc89
-rw-r--r--src/components/policy/policy_external/src/policy_helper.cc66
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc41
-rw-r--r--src/components/policy/policy_external/src/policy_table/enums.cc46
-rw-r--r--src/components/policy/policy_external/src/policy_table/types.cc26
-rw-r--r--src/components/policy/policy_external/src/policy_table/validation.cc34
-rw-r--r--src/components/policy/policy_external/src/sql_pt_ext_representation.cc22
-rw-r--r--src/components/policy/policy_external/src/sql_pt_queries.cc31
-rw-r--r--src/components/policy/policy_external/src/sql_pt_representation.cc115
-rw-r--r--src/components/policy/policy_external/test/CMakeLists.txt6
-rw-r--r--src/components/policy/policy_external/test/json/PTU.json12
-rw-r--r--src/components/policy/policy_external/test/json/PTU2.json12
-rw-r--r--src/components/policy/policy_external/test/json/PTU3.json12
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json12
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json12
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json12
-rw-r--r--src/components/policy/policy_external/test/json/PTU_without_requestType_field.json12
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json12
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json12
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json12
-rw-r--r--src/components/policy/policy_external/test/json/ptu2_requestType.json12
-rw-r--r--src/components/policy/policy_external/test/json/ptu_requestType.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt.json13
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_first_update.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_second_update.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_update.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json12
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json12
-rw-r--r--src/components/policy/policy_external/test/json/valid_sdl_pt_update.json12
-rw-r--r--src/components/policy/policy_external/test/sql_pt_representation_test.cc3
-rw-r--r--src/components/policy/policy_regular/CMakeLists.txt5
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager.h30
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager_interface.h35
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_helper.h4
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h40
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h7
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/types.h11
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_types.h8
-rw-r--r--src/components/policy/policy_regular/include/policy/sql_pt_queries.h5
-rw-r--r--src/components/policy/policy_regular/include/policy/sql_pt_representation.h8
-rw-r--r--src/components/policy/policy_regular/policy_table_interface_ext.xml6
-rw-r--r--src/components/policy/policy_regular/src/cache_manager.cc86
-rw-r--r--src/components/policy/policy_regular/src/policy_helper.cc65
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc79
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc39
-rw-r--r--src/components/policy/policy_regular/src/policy_table/types.cc28
-rw-r--r--src/components/policy/policy_regular/src/policy_table/validation.cc47
-rw-r--r--src/components/policy/policy_regular/src/sql_pt_queries.cc34
-rw-r--r--src/components/policy/policy_regular/src/sql_pt_representation.cc127
-rw-r--r--src/components/policy/policy_regular/test/CMakeLists.txt5
-rw-r--r--src/components/policy/policy_regular/test/PTU.json12
-rw-r--r--src/components/policy/policy_regular/test/PTU2.json12
-rw-r--r--src/components/policy/policy_regular/test/PTU3.json12
-rw-r--r--src/components/policy/policy_regular/test/PTU4.json12
-rw-r--r--src/components/policy/policy_regular/test/policy_manager_impl_test.cc8
-rw-r--r--src/components/policy/policy_regular/test/ptu2_requestType.json12
-rw-r--r--src/components/policy/policy_regular/test/ptu_requestType.json12
-rw-r--r--src/components/policy/policy_regular/test/sdl_preloaded_pt.json13
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_first_update.json12
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_second_update.json12
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_update.json12
-rw-r--r--src/components/policy/policy_regular/test/sql_pt_representation_test.cc10
-rw-r--r--src/components/policy/policy_regular/test/valid_sdl_pt_update.json12
-rw-r--r--src/components/protocol_handler/CMakeLists.txt2
-rw-r--r--src/components/protocol_handler/include/protocol_handler/handshake_handler.h12
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h14
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_packet.h6
-rw-r--r--src/components/protocol_handler/src/handshake_handler.cc38
-rw-r--r--src/components/protocol_handler/src/multiframe_builder.cc2
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc182
-rw-r--r--src/components/protocol_handler/src/protocol_packet.cc24
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc69
-rw-r--r--src/components/remote_control/CMakeLists.txt83
-rw-r--r--src/components/remote_control/include/remote_control/commands/base_command_notification.h110
-rw-r--r--src/components/remote_control/include/remote_control/commands/base_command_request.h293
-rw-r--r--src/components/remote_control/include/remote_control/commands/button_press_request.h104
-rw-r--r--src/components/remote_control/include/remote_control/commands/command.h84
-rw-r--r--src/components/remote_control/include/remote_control/commands/get_interior_vehicle_data_request.h101
-rw-r--r--src/components/remote_control/include/remote_control/commands/on_interior_vehicle_data_notification.h75
-rw-r--r--src/components/remote_control/include/remote_control/commands/on_remote_control_settings_notification.h79
-rw-r--r--src/components/remote_control/include/remote_control/commands/set_interior_vehicle_data_request.h127
-rw-r--r--src/components/remote_control/include/remote_control/event_engine/event.h127
-rw-r--r--src/components/remote_control/include/remote_control/event_engine/event_dispatcher.h203
-rw-r--r--src/components/remote_control/include/remote_control/event_engine/event_observer.h96
-rw-r--r--src/components/remote_control/include/remote_control/message_helper.h122
-rw-r--r--src/components/remote_control/include/remote_control/module_helper.h0
-rw-r--r--src/components/remote_control/include/remote_control/rc_app_extension.h82
-rw-r--r--src/components/remote_control/include/remote_control/rc_command_factory.h66
-rw-r--r--src/components/remote_control/include/remote_control/rc_module_constants.h233
-rw-r--r--src/components/remote_control/include/remote_control/rc_module_timer.h70
-rw-r--r--src/components/remote_control/include/remote_control/remote_control_event.h82
-rw-r--r--src/components/remote_control/include/remote_control/remote_control_plugin.h164
-rw-r--r--src/components/remote_control/include/remote_control/remote_plugin_interface.h118
-rw-r--r--src/components/remote_control/include/remote_control/request_controller.h110
-rw-r--r--src/components/remote_control/include/remote_control/resource_allocation_manager.h115
-rw-r--r--src/components/remote_control/include/remote_control/resource_allocation_manager_impl.h137
-rw-r--r--src/components/remote_control/src/commands/base_command_notification.cc154
-rw-r--r--src/components/remote_control/src/commands/base_command_request.cc564
-rw-r--r--src/components/remote_control/src/commands/button_press_request.cc264
-rw-r--r--src/components/remote_control/src/commands/get_interior_vehicle_data_request.cc224
-rw-r--r--src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc103
-rw-r--r--src/components/remote_control/src/commands/on_remote_control_settings_notification.cc122
-rw-r--r--src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc350
-rw-r--r--src/components/remote_control/src/message_helper.cc154
-rw-r--r--src/components/remote_control/src/module_helper.cc0
-rw-r--r--src/components/remote_control/src/rc_app_extension.cc62
-rw-r--r--src/components/remote_control/src/rc_command_factory.cc86
-rw-r--r--src/components/remote_control/src/remote_control_event.cc56
-rw-r--r--src/components/remote_control/src/remote_control_plugin.cc341
-rw-r--r--src/components/remote_control/src/request_controller.cc96
-rw-r--r--src/components/remote_control/src/resource_allocation_manager_impl.cc377
-rw-r--r--src/components/remote_control/test/CMakeLists.txt67
-rw-r--r--src/components/remote_control/test/commands/CMakeLists.txt62
-rw-r--r--src/components/remote_control/test/commands/button_press_request_test.cc344
-rw-r--r--src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc291
-rw-r--r--src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc182
-rw-r--r--src/components/remote_control/test/commands/on_remote_control_settings_test.cc326
-rw-r--r--src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc433
-rw-r--r--src/components/remote_control/test/include/mock_application.h346
-rw-r--r--src/components/remote_control/test/include/mock_remote_control_plugin.h54
-rw-r--r--src/components/remote_control/test/include/mock_resource_allocation_manager.h40
-rw-r--r--src/components/remote_control/test/src/rc_app_extension_test.cc43
-rw-r--r--src/components/remote_control/test/src/rc_library_test.cc92
-rw-r--r--src/components/remote_control/test/src/rc_module_test.cc263
-rw-r--r--src/components/remote_control/test/src/resource_allocation_manager_impl_test.cc481
-rw-r--r--src/components/security_manager/include/security_manager/crypto_manager_impl.h72
-rw-r--r--src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h29
-rw-r--r--src/components/security_manager/include/security_manager/security_manager_impl.h87
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc295
-rw-r--r--src/components/security_manager/src/security_manager_impl.cc191
-rw-r--r--src/components/security_manager/src/ssl_context_impl.cc134
-rw-r--r--src/components/security_manager/test/crypto_manager_impl_test.cc49
-rw-r--r--src/components/security_manager/test/security_manager_test.cc255
-rw-r--r--src/components/security_manager/test/ssl_certificate_handshake_test.cc349
-rw-r--r--src/components/security_manager/test/ssl_context_test.cc224
-rw-r--r--src/components/smart_objects/include/smart_objects/number_schema_item.h16
-rw-r--r--src/components/smart_objects/src/number_schema_item.cc2
-rw-r--r--src/components/telemetry_monitor/CMakeLists.txt2
-rw-r--r--src/components/test_main.cc4
-rw-r--r--src/components/utils/CMakeLists.txt1
-rw-r--r--src/components/utils/include/utils/optional.h83
-rw-r--r--src/components/utils/include/utils/system_time_handler.h151
-rw-r--r--src/components/utils/src/lock_posix.cc13
-rw-r--r--src/components/utils/src/system_time_handler.cc62
-rw-r--r--src/components/utils/test/conditional_variable_test.cc4
-rw-r--r--src/components/utils/test/data_accessor_test.cc36
-rwxr-xr-xtools/infrastructure/check_style.sh15
2067 files changed, 115318 insertions, 107420 deletions
diff --git a/.travis.yml b/.travis.yml
index 69db195531..73bbfbeb2a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,53 +13,22 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
- packages:
- - gcc-4.9
- - g++-4.9
- - libssl-dev
- - libbluetooth3
- - libbluetooth-dev
- - libudev-dev
- - libusb-1.0
- - cmake
- - html2text
- - clang-format-3.6
- - binutils
+
before_install:
- - sudo apt-get -qq update
- - sudo apt-get -q -y install bluez-tools sqlite3 libsqlite3-dev automake1.11
- - wget http://archive.ubuntu.com/ubuntu/pool/main/l/lcov/lcov_1.11-3_all.deb
- - sudo dpkg -i lcov_1.11-3_all.deb
+ - sudo apt-get update
+ - sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck
+ - sudo apt-get install -f clang-format-3.6
+
script:
- - sudo ln -sf /usr/bin/gcov-4.9 /usr/bin/gcov
- - bash -e tools/infrastructure/check_style.sh
- - echo "Number of processing units available ${PROCESSING_UNITS_COUNT}"
- - mkdir build && cd build && cmake ../ -DBUILD_TESTS=ON -DENABLE_GCOV=ON && make install -j${PROCESSING_UNITS_COUNT}
- - sudo ldconfig
- - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/bin/lib ; make test
- - bash ../tools/infrastructure/show_disabled.sh
- - bash -ex ../tools/infrastructure/collect_coverage.sh ./
+ - cppcheck --force -isrc/3rd_party -isrc/3rd_party-static --quiet --error-exitcode=1 src
+ - ./tools/infrastructure/check_style.sh
+ - mkdir build && cd build
+ - cmake ../ -DBUILD_TESTS=ON
+ - make install && sudo ldconfig
+after_success:
+ - make test
env:
global:
- LC_CTYPE=en_US.UTF-8
- CTEST_OUTPUT_ON_FAILURE=TRUE
- - CMAKE_CXX_COMPILER=g++-4.9
- - CMAKE_C_COMPILER=gcc-4.9
- LD_LIBRARY_PATH=.
- - PROCESSING_UNITS_COUNT=$("nproc")
-after_success:
- - pwd ; bash <(curl -s https://codecov.io/bash) -f ./coverage/coverage.info || echo "Codecov did not collect coverage reports"
-deploy:
- provider: releases
- api-key: "uw8e4USTAS6c9LFhRMYOvw"
- file:
- - "coverage_report.tar.gz"
- skip_cleanup: true
- on:
- tags: true
-notifications:
- email:
- - AKutsan@luxoft.com
- - NSnitsar@luxoft.com
- - MGhiumiusliu@luxoft.com
-
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49959597a9..97bda27c53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,6 @@ option(ENABLE_GCOV "gcov code coverage feature" OFF)
option(ENABLE_SANITIZE "Sanitize tool" OFF)
option(ENABLE_SECURITY "Security Ford protocol protection" ON)
option(ENABLE_HMI_PTU_DECRYPTION "Policy table update parsed by hmi" ON)
-option(REMOTE_CONTROL "Enable Reverse functionality" ON)
option(USE_COTIRE "Use Cotire to speed up build (currently only for commands tests)" ON)
option(USE_GOLD_LD "Use gold linker intead of GNU linker" ON)
option(USE_CCACHE "Turn on ccache usage" ON)
@@ -156,11 +155,6 @@ if (OS_TYPE_OPTION)
endif()
endif()
-if (REMOTE_CONTROL)
- add_definitions(-DSDL_REMOTE_CONTROL)
- message(STATUS "Remote control support is enabled (aka Reverse SDL or SDL-RC)")
-endif()
-
#Jenkins integration section end
#Deliver Build Configuration
@@ -174,12 +168,6 @@ get_property(cValue CACHE EXTENDED_POLICY PROPERTY VALUE)
file(APPEND "${build_config_path}" "//${cHelpString}\n")
file(APPEND "${build_config_path}" "EXTENDED_POLICY:${cType}=${cValue}\n\n")
-get_property(cHelpString CACHE REMOTE_CONTROL PROPERTY HELPSTRING)
-get_property(cType CACHE REMOTE_CONTROL PROPERTY TYPE)
-get_property(cValue CACHE REMOTE_CONTROL PROPERTY VALUE)
-file(APPEND "${build_config_path}" "//${cHelpString}\n")
-file(APPEND "${build_config_path}" "REMOTE_CONTROL:${cType}=${cValue}\n\n")
-
get_property(cHelpString CACHE BUILD_BT_SUPPORT PROPERTY HELPSTRING)
get_property(cType CACHE BUILD_BT_SUPPORT PROPERTY TYPE)
get_property(cValue CACHE BUILD_BT_SUPPORT PROPERTY VALUE)
@@ -503,4 +491,4 @@ find_package(Doxygen)
message(STATUS "sudo apt-get install doxygen graphviz")
message(STATUS "To enable processing of MscGen comments please install mscgen")
message(STATUS "sudo apt-get install mscgen")
-endif() \ No newline at end of file
+endif()
diff --git a/README.md b/README.md
index 4939a2e2fe..e41006cca5 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com)
-
[![codecov.io](https://codecov.io/github/smartdevicelink/sdl_core/coverage.svg?branch=develop)](https://codecov.io/github/smartdevicelink/sdl_core?branch=develop)
+[![Build Status](http://opensdl-jenkins.luxoft.com:8080/buildStatus/icon?job=OpenSDL_Nightly)](http://opensdl-jenkins.luxoft.com:8080/view/All/job/OpenSDL_Nightly/)
# SmartDeviceLink (SDL)
diff --git a/docs/mainpage.dox b/docs/mainpage.dox
index 08ef020594..01b9034151 100644
--- a/docs/mainpage.dox
+++ b/docs/mainpage.dox
@@ -7,5 +7,6 @@
*
* ##Table of contents
* - \ref security_manager
+ * - \ref application_manager
*/
//-----------------------------------------------------------
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt
index b97c05f7f9..6f1e3dc353 100644
--- a/src/3rd_party/CMakeLists.txt
+++ b/src/3rd_party/CMakeLists.txt
@@ -205,6 +205,11 @@ else()
get_filename_component(EMHASHMAP_LIBS_DIRECTORY ${EMHASHMAP_LIB} DIRECTORY)
set(BSON_LIBS_DIRECTORY ${BSON_LIBS_DIRECTORY} CACHE INTERNAL "Installation path of bson libraries" FORCE)
set(EMHASHMAP_LIBS_DIRECTORY ${BSON_LIBS_DIRECTORY} CACHE INTERNAL "Installation path of emashmap libraries" FORCE)
+ add_custom_target(
+ libbson
+ DEPENDS ${BSON_LIBS_DIRECTORY}
+ DEPENDS ${EMHASHMAP_LIBS_DIRECTORY}
+ )
endif()
if (HMIADAPTER STREQUAL "messagebroker")
@@ -227,7 +232,7 @@ if (HMIADAPTER STREQUAL "messagebroker")
SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system --prefix=${3RD_PARTY_INSTALL_PREFIX}
BUILD_COMMAND ./b2
- INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --with-system --prefix=${3RD_PARTY_INSTALL_PREFIX}
+ INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --with-system --prefix=${3RD_PARTY_INSTALL_PREFIX} > boost_install.log
INSTALL_DIR ${3RD_PARTY_INSTALL_PREFIX}
BUILD_IN_SOURCE true
)
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index 2acc0bf3ae..e82d95f904 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -44,7 +44,6 @@ endif()
include_directories(
${COMPONENTS_DIR}/protocol_handler/include
${COMPONENTS_DIR}/application_manager/include
- ${COMPONENTS_DIR}/remote_control/include
${COMPONENTS_DIR}/formatters/include
${COMPONENTS_DIR}/transport_manager/include
${COMPONENTS_DIR}/security_manager/include
@@ -109,13 +108,8 @@ set(LIBRARIES
jsoncpp
ConfigProfile
Resumption
+ SystemTimeLibrary
)
-if(REMOTE_CONTROL)
- SET (LIBRARIES
- ${LIBRARIES}
- FunctionalModule
- )
-endif(REMOTE_CONTROL)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND LIBRARIES pthread)
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index bef4d1e896..50cb479a74 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -7,6 +7,7 @@
],
"displayCapabilities": {
"displayType": "GEN2_8_DMA",
+ "displayName": "GENERIC_DISPLAY",
"textFields": [{
"name": "mainField1",
"characterSet": "TYPE2SET",
@@ -178,7 +179,6 @@
],
"imageFields": [{
"name": "softButtonImage",
- "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -186,7 +186,6 @@
},
{
"name": "choiceImage",
- "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -194,7 +193,6 @@
},
{
"name": "choiceSecondaryImage",
- "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -202,7 +200,6 @@
},
{
"name": "menuIcon",
- "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -210,7 +207,6 @@
},
{
"name": "cmdIcon",
- "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -218,7 +214,6 @@
},
{
"name": "appIcon",
- "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -226,9 +221,13 @@
},
{
"name": "graphic",
- "imageTypeSupported": [
-
- ],
+ "imageResolution": {
+ "resolutionWidth": 35,
+ "resolutionHeight": 35
+ }
+ },
+ {
+ "name": "secondaryGraphic",
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -251,7 +250,6 @@
],
"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",
diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc
index fc8441f28c..e42032a5cb 100644
--- a/src/appMain/life_cycle.cc
+++ b/src/appMain/life_cycle.cc
@@ -34,6 +34,7 @@
#include "utils/signals.h"
#include "utils/make_shared.h"
#include "config_profile/profile.h"
+#include "application_manager/system_time/system_time_handler_impl.h"
#include "resumption/last_state_impl.h"
#ifdef ENABLE_SECURITY
@@ -108,7 +109,7 @@ bool LifeCycle::StartComponents() {
DCHECK(!hmi_handler_);
hmi_handler_ = new hmi_message_handler::HMIMessageHandlerImpl(profile_);
- hmi_handler_->set_message_observer(app_manager_);
+ hmi_handler_->set_message_observer(&(app_manager_->GetRPCHandler()));
app_manager_->set_hmi_message_handler(hmi_handler_);
media_manager_ = new media_manager::MediaManagerImpl(*app_manager_, profile_);
@@ -119,7 +120,11 @@ bool LifeCycle::StartComponents() {
}
#ifdef ENABLE_SECURITY
- security_manager_ = new security_manager::SecurityManagerImpl();
+ auto system_time_handler =
+ std::unique_ptr<application_manager::SystemTimeHandlerImpl>(
+ new application_manager::SystemTimeHandlerImpl(*app_manager_));
+ security_manager_ =
+ new security_manager::SecurityManagerImpl(std::move(system_time_handler));
crypto_manager_ = new security_manager::CryptoManagerImpl(
utils::MakeShared<security_manager::CryptoManagerSettingsImpl>(
profile_, app_manager_->GetPolicyHandler().RetrieveCertificate()));
@@ -131,7 +136,7 @@ bool LifeCycle::StartComponents() {
security_manager_->set_crypto_manager(crypto_manager_);
security_manager_->AddListener(app_manager_);
- app_manager_->AddPolicyObserver(crypto_manager_);
+ app_manager_->AddPolicyObserver(security_manager_);
app_manager_->AddPolicyObserver(protocol_handler_);
if (!crypto_manager_->Init()) {
LOG4CXX_ERROR(logger_, "CryptoManager initialization fail.");
@@ -143,7 +148,7 @@ bool LifeCycle::StartComponents() {
transport_manager_->AddEventListener(connection_handler_);
protocol_handler_->AddProtocolObserver(media_manager_);
- protocol_handler_->AddProtocolObserver(app_manager_);
+ protocol_handler_->AddProtocolObserver(&(app_manager_->GetRPCHandler()));
media_manager_->SetProtocolHandler(protocol_handler_);
@@ -161,7 +166,6 @@ bool LifeCycle::StartComponents() {
// It's important to initialise TM after setting up listener chain
// [TM -> CH -> AM], otherwise some events from TM could arrive at nowhere
app_manager_->set_protocol_handler(protocol_handler_);
-
transport_manager_->Init(*last_state_);
// start transport manager
transport_manager_->Visibility(true);
@@ -250,7 +254,7 @@ void LifeCycle::StopComponents() {
connection_handler_->set_connection_handler_observer(NULL);
DCHECK_OR_RETURN_VOID(protocol_handler_);
- protocol_handler_->RemoveProtocolObserver(app_manager_);
+ protocol_handler_->RemoveProtocolObserver(&(app_manager_->GetRPCHandler()));
DCHECK_OR_RETURN_VOID(app_manager_);
app_manager_->Stop();
diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h
index db18892cd3..69f4b987f5 100644
--- a/src/appMain/life_cycle.h
+++ b/src/appMain/life_cycle.h
@@ -33,8 +33,9 @@
#ifndef SRC_APPMAIN_LIFE_CYCLE_H_
#define SRC_APPMAIN_LIFE_CYCLE_H_
#include <thread>
+#include <unistd.h>
#include "utils/macro.h"
-#include "unistd.h"
+#include "utils/shared_ptr.h"
#include "config_profile/profile.h"
#include "hmi_message_handler/hmi_message_handler_impl.h"
@@ -45,10 +46,6 @@
#include "hmi_message_handler/messagebroker_adapter.h"
#endif // #if ( defined (MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI) )
#include "application_manager/application_manager_impl.h"
-#ifdef SDL_REMOTE_CONTROL
-#include "application_manager/core_service.h"
-#include "functional_module/plugin_manager.h"
-#endif // SDL_REMOTE_CONTROL
#include "connection_handler/connection_handler_impl.h"
#include "protocol_handler/protocol_handler_impl.h"
#include "transport_manager/transport_manager.h"
@@ -65,6 +62,10 @@ class SecurityManagerImpl;
} // namespace security_manager
#endif // ENABLE_SECURITY
+namespace utils {
+class SystemTimeHandler;
+} // namespace utils
+
namespace main_namespace {
class LifeCycle {
public:
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index e5c82418ee..1cf3bf52c1 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -28,6 +28,7 @@
"notifications_per_minute_by_priority": {
"EMERGENCY": 60,
"NAVIGATION": 15,
+ "PROJECTION": 15,
"VOICECOM": 20,
"COMMUNICATION": 6,
"NORMAL": 4,
@@ -397,12 +398,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -414,12 +418,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -431,12 +438,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -447,12 +457,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -2344,7 +2357,9 @@
"steal_focus": false,
"priority": "NONE",
"default_hmi": "NONE",
- "groups": ["Base-4"]
+ "groups": ["Base-4"],
+ "RequestType": [],
+ "RequestSubType": []
},
"device": {
"keep_context": false,
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index d201a0736e..aa15b7c5fe 100644
--- a/src/appMain/smartDeviceLink.ini
+++ b/src/appMain/smartDeviceLink.ini
@@ -27,7 +27,7 @@ VideoStreamingPort = 5050
AudioStreamingPort = 5080
[MAIN]
-; SDL source version
+; SDL source version
; represents as a git commit hash value
SDLVersion = {GIT_COMMIT}
; All logging event could be dropped by setting $LogsEnabled to false
@@ -86,7 +86,9 @@ TimeTestingPort = 8090
ReadDIDRequest = 5, 1
; Limitation for a number of GetVehicleData requests (the 1st value) per (the 2nd value) seconds
GetVehicleDataRequest = 5, 1
-PluginFolder = plugins
+; Limitation for a number of GetInteriorVehicleDataRequest requests (the 1st value) per (the 2nd value) seconds
+GetInteriorVehicleDataRequest = 5, 1
+PluginFolder = ./
; The time used during switch transport procedure
AppTransportChangeTimer = 500
@@ -144,7 +146,7 @@ DeleteFileRequest = 5
ListFilesRequest = 5
[VR COMMANDS]
-; TODO(EZamakhov): delete with APPLINK-15220
+; TODO(EZamakhov): delete with APPLINK-15220
HelpCommand = Help
[AppInfo]
@@ -152,7 +154,8 @@ HelpCommand = Help
AppInfoStorage = app_info.dat
[Security Manager]
-Protocol = TLSv1.2
+;Protocol = TLSv1.2
+Protocol = DTLSv1.0
; Certificate and key path to pem file
CertificatePath = mycert.pem
KeyPath = mykey.pem
@@ -168,7 +171,7 @@ CACertificatePath = .
; Services which can not be started unprotected (could be id's from 0x01 to 0xFF)
;ForceProtectedService = 0x0A, 0x0B
ForceProtectedService = Non
-; Services which can not be started protected or delayed protected
+; Services which can not be started protected or delayed protected
;ForceUnprotectedService = 0x07
ForceUnprotectedService = Non
; The PTU will be triggered in case expiration date of certificate
@@ -231,16 +234,16 @@ AppIconsAmountToRemove = 1
[SDL5]
; Section for features added in protocol version 5
-; Control service packet with payload bigger than this value will be marked as a malformed,
+; Control service packet with payload bigger than this value will be marked as a malformed,
; if not specified, this value will default to MaxPayloadSize
;MaximumControlPayloadSize = 131072
-; RPC service packet with payload bigger than this value will be marked as a malformed,
+; RPC service packet with payload bigger than this value will be marked as a malformed,
; if not specified, this value will default to MaxPayloadSize
;MaximumRpcPayloadSize = 131072
-; Audio service packet with payload bigger than this value will be marked as a malformed,
+; Audio service packet with payload bigger than this value will be marked as a malformed,
; if not specified, this value will default to MaxPayloadSize
;MaximumAudioPayloadSize = 131072
-; Video service packet with payloadbigger than this value will be marked as a malformed,
+; Video service packet with payloadbigger than this value will be marked as a malformed,
; if not specified, this value will default to MaxPayloadSize
;MaximumVideoPayloadSize = 131072
@@ -274,5 +277,5 @@ RemoveBundleIDattempts = 3
MaxNumberOfiOSDevice = 10
; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
WaitTimeBetweenApps = 4000
-; App Launch on iOS devices SDL feature enabler/disabler
+; App Launch on iOS devices SDL feature enabler/disabler
EnableAppLaunchIOS = true
diff --git a/src/components/CMakeLists.txt b/src/components/CMakeLists.txt
index e1071e826f..4f984bb3a8 100644
--- a/src/components/CMakeLists.txt
+++ b/src/components/CMakeLists.txt
@@ -86,12 +86,7 @@ add_subdirectory(./config_profile)
# --- Media Manager
add_subdirectory(./media_manager)
-if(REMOTE_CONTROL)
- # --- CAN Module
- add_subdirectory(./remote_control)
- # --- Functional module
- add_subdirectory(./functional_module)
-endif()
+
# --- Telemetry Monitor
if(TELEMETRY_MONITOR)
add_subdirectory(./telemetry_monitor)
diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt
index e9f2f8ec7b..b7a6d94503 100644
--- a/src/components/application_manager/CMakeLists.txt
+++ b/src/components/application_manager/CMakeLists.txt
@@ -41,7 +41,6 @@ set (AM_MOCK_DIR ${AM_TEST_DIR}/mock)
include_directories (
include/
${COMPONENTS_DIR}
- ${COMPONENTS_DIR}/functional_module/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/formatters/include/
${COMPONENTS_DIR}/protocol_handler/include/
@@ -52,6 +51,7 @@ include_directories (
${COMPONENTS_DIR}/config_profile/include
${COMPONENTS_DIR}/request_watchdog/include
${COMPONENTS_DIR}/resumption/include
+ ${COMPONENTS_DIR}/system_time/
${COMPONENTS_DIR}/rpc_base/include
${COMPONENTS_DIR}/interfaces
${POLICY_PATH}/include/
@@ -85,6 +85,9 @@ set (MESSAGE_HELPER_PATHS
)
collect_sources(MESSAGE_HELPER_SOURCES "${MESSAGE_HELPER_PATHS}")
+set (SYSTEM_TIME_SOURCES
+ ${AM_SOURCE_DIR}/src/system_time/system_time_handler_impl.cc
+)
set (POLICIES_SOURCE_DIR
${AM_SOURCE_DIR}/src/policies
@@ -112,274 +115,8 @@ set (EVENT_ENGINE_PATHS
)
collect_sources(EVENT_ENGINE_SOURCES "${EVENT_ENGINE_PATHS}")
-set (COMMANDS_SOURCE_DIR
- ${AM_SOURCE_DIR}/src/commands
-)
-collect_sources(POLICIES_SOURCES "${POLICIES_PATHS}")
-
-set(MOBILE_COMMANDS_EXCLUDE_PATHS
- ${COMMANDS_SOURCE_DIR}/hmi
-)
-
-set (MOBILE_COMMANDS_PATHS
- ${CMAKE_CURRENT_SOURCE_DIR}/include/application_manager/commands
- ${CMAKE_CURRENT_SOURCE_DIR}/include/application_manager/commands/mobile
- ${COMMANDS_SOURCE_DIR}
- ${COMMANDS_SOURCE_DIR}/mobile
-)
-collect_sources(MOBILE_COMMANDS_SOURCES "${MOBILE_COMMANDS_PATHS}" "${MOBILE_COMMANDS_EXCLUDE_PATHS}")
-
-set (HMI_COMMANDS_SOURCES
- ${COMMANDS_SOURCE_DIR}/hmi/request_to_hmi.cc
- ${COMMANDS_SOURCE_DIR}/hmi/response_from_hmi.cc
- ${COMMANDS_SOURCE_DIR}/hmi/request_from_hmi.cc
- ${COMMANDS_SOURCE_DIR}/hmi/response_to_hmi.cc
- ${COMMANDS_SOURCE_DIR}/hmi/notification_to_hmi.cc
- ${COMMANDS_SOURCE_DIR}/hmi/notification_from_hmi.cc
- ${COMMANDS_SOURCE_DIR}/hmi/allow_all_apps_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/allow_all_apps_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/allow_app_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/allow_app_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/update_sdl_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/update_sdl_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/activate_app_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/activate_app_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/get_system_info_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/get_system_info_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_get_list_of_permissions_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_get_list_of_permissions_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_get_user_friendly_message_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_get_user_friendly_message_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_get_status_update_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_get_status_update_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_status_update_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_activate_app_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_activate_app_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/mixing_audio_supported_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/mixing_audio_supported_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/update_app_list_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/update_app_list_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_update_device_list.cc
- ${COMMANDS_SOURCE_DIR}/hmi/update_device_list_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/update_device_list_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_audio_data_streaming_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_video_data_streaming_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_sdl_consent_needed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_sdl_persistence_complete_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_exit_all_applications_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_exit_application_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_navi_way_point_change_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_start_device_discovery.cc
- ${COMMANDS_SOURCE_DIR}/hmi/close_popup_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/close_popup_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_app_activated_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/button_get_capabilities_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/button_get_capabilities_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_is_ready_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_is_ready_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_add_command_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_add_command_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_delete_command_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_delete_command_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_change_registration_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_change_registration_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_get_supported_languages_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_get_supported_languages_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_get_language_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_get_language_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_get_capabilities_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_get_capabilities_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_is_ready_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_is_ready_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_change_registration_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_change_registration_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_get_language_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_get_language_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_get_supported_languages_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_get_supported_languages_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_stop_speaking_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_stop_speaking_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_speak_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_speak_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_set_global_properties_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_set_global_properties_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_get_capabilities_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/tts_get_capabilities_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_perform_interaction_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vr_perform_interaction_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_add_command_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_add_command_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_delete_command_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_delete_command_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_add_submenu_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_add_submenu_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_delete_submenu_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_delete_submenu_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_get_supported_languages_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_get_supported_languages_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_get_language_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_get_language_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_get_capabilities_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_get_capabilities_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_change_registration_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_change_registration_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_show_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_show_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_alert_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_alert_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_slider_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_scrollable_message_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_scrollable_message_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_global_properties_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_global_properties_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_slider_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_is_ready_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_is_ready_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_perform_audio_pass_thru_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_perform_audio_pass_thru_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_end_audio_pass_thru_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_end_audio_pass_thru_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_perform_interaction_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_perform_interaction_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_app_icon_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_app_icon_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_media_clock_timer_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_media_clock_timer_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_show_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_show_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_is_ready_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_is_ready_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_read_did_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_read_did_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_get_dtcs_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_get_dtcs_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_diagnostic_message_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_diagnostic_message_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_get_vehicle_type_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_get_vehicle_type_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_is_ready_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_is_ready_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_alert_maneuver_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_alert_maneuver_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_update_turn_list_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_update_turn_list_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_show_constant_tbt_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_show_constant_tbt_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_send_location_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_send_location_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_subscribe_way_points_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_subscribe_way_points_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_unsubscribe_way_points_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_unsubscribe_way_points_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ready_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_system_context_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_device_chosen_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_allow_sdl_functionality_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_app_permission_consent_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_app_registered_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_app_permission_changed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_app_unregistered_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_driver_distraction_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ignition_cycle_over_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_system_info_changed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_file_removed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_tts_started_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_tts_stopped_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vr_started_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vr_stopped_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vr_command_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ui_command_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_navi_tbt_client_state_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_app_deactivated_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_tts_language_change_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vr_language_change_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ui_language_change_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_button_event_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_button_press_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_button_subscription_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_find_applications.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ui_keyboard_input_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ui_touch_event_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_ui_reset_timeout_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_start_stream_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_start_stream_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_stop_stream_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_stop_stream_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_audio_start_stream_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_audio_start_stream_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_audio_stop_stream_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_audio_stop_stream_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_get_way_points_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_get_way_points_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_set_video_config_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/navi_set_video_config_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_system_request_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_put_file_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_resume_audio_source_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_sdl_close_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_display_layout_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_display_layout_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_record_start_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/add_statistics_info_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_system_error_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/basic_communication_system_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/basic_communication_system_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/basic_communication_on_awake_sdl.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_policy_update.cc
- ${COMMANDS_SOURCE_DIR}/hmi/sdl_policy_update_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_received_policy_update.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_policy_update.cc
- ${COMMANDS_SOURCE_DIR}/hmi/get_urls.cc
- ${COMMANDS_SOURCE_DIR}/hmi/get_urls_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_device_state_changed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_tts_reset_timeout_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/dial_number_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/dial_number_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_event_changed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/decrypt_certificate_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/decrypt_certificate_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_set_icon_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/rc_is_ready_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/rc_is_ready_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/rc_get_capabilities_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/rc_get_capabilities_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_send_haptic_data_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/ui_send_haptic_data_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_get_vehicle_data_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_get_vehicle_data_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_subscribe_vehicle_data_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_subscribe_vehicle_data_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_unsubscribe_vehicle_data_request.cc
- ${COMMANDS_SOURCE_DIR}/hmi/vi_unsubscribe_vehicle_data_response.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_vehicle_data_notification.cc
-)
-
-set (HMI_COMMANDS_SOURCES_JSON
-)
-set (HMI_COMMANDS_SOURCES_DBUS
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_gps_data_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_speed_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_rpm_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_fuel_level_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_fuel_level_state_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_instant_fuel_consumption_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_external_temperature_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_vin_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_prndl_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_tire_pressure_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_odometer_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_belt_status_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_body_information_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_device_status_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_driver_braking_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_wiper_status_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_head_lamp_status_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_engine_torque_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_acc_pedal_position_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_steering_wheel_angle_notification.cc
- ${COMMANDS_SOURCE_DIR}/hmi/on_vi_my_key_notification.cc
-)
+collect_sources(POLICIES_SOURCES "${POLICIES_PATHS}")
if (${HMI_JSON_API})
set (HMI_COMMANDS_SOURCES ${HMI_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES_JSON})
@@ -388,7 +125,6 @@ endif (${HMI_JSON_API})
set (HMI_COMMANDS_SOURCES ${HMI_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES_DBUS})
set(EXCLUDE_PATHS
- ${COMMANDS_SOURCE_DIR}
${EVENT_ENGINE_SOURCE_DIR}
${MESSAGE_HELPER_SOURCE_DIR}
${POLICIES_SOURCE_DIR}
@@ -400,11 +136,6 @@ set(PATHS
)
collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}")
-if (NOT REMOTE_CONTROL)
- list(REMOVE_ITEM SOURCES
- ${COMPONENTS_DIR}/application_manager/src/core_service.cc)
-endif()
-
set(LIBRARIES
HMI_API
MOBILE_API
@@ -420,12 +151,6 @@ set(LIBRARIES
emhashmap -L${EMHASHMAP_LIBS_DIRECTORY}
)
-if(REMOTE_CONTROL)
- SET (LIBRARIES
- ${LIBRARIES}
- FunctionalModule
- )
-endif(REMOTE_CONTROL)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND LIBRARIES sqlite3)
@@ -441,31 +166,27 @@ target_link_libraries("AMEventEngine" ${LIBRARIES})
add_library("AMPolicyLibrary" ${POLICIES_MANAGER_SOURCES} )
target_link_libraries("AMPolicyLibrary" ${LIBRARIES} AMEventEngine)
-add_library("AMHMICommandsLibrary" ${HMI_COMMANDS_SOURCES})
-target_link_libraries("AMHMICommandsLibrary" ${LIBRARIES} AMEventEngine)
+add_library("SystemTimeLibrary" ${SYSTEM_TIME_SOURCES})
+target_link_libraries("SystemTimeLibrary" ${LIBRARIES} AMEventEngine)
add_library("MessageHelper" ${MESSAGE_HELPER_SOURCES})
target_link_libraries("MessageHelper" ${LIBRARIES})
-add_library("AMMobileCommandsLibrary" ${MOBILE_COMMANDS_SOURCES} )
-target_link_libraries("AMMobileCommandsLibrary" ${LIBRARIES} AMEventEngine)
-
add_library("ApplicationManager" ${SOURCES})
list(APPEND LIBRARIES
AMEventEngine
AMPolicyLibrary
- AMHMICommandsLibrary
- AMMobileCommandsLibrary
)
if(ENABLE_LOG)
list(APPEND LIBRARIES log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
endif()
-add_dependencies("ApplicationManager" libbson)
target_link_libraries("ApplicationManager" ${LIBRARIES})
if(BUILD_TESTS)
add_subdirectory(test)
endif()
+
+add_subdirectory(rpc_plugins)
diff --git a/src/components/application_manager/doc/SDL.SDD.ApplicationManager.dox b/src/components/application_manager/doc/SDL.SDD.ApplicationManager.dox
new file mode 100644
index 0000000000..447da51c55
--- /dev/null
+++ b/src/components/application_manager/doc/SDL.SDD.ApplicationManager.dox
@@ -0,0 +1,76 @@
+/**
+\page application_manager Application Manager Detailed Design
+## Table of contents
+- \subpage application_manager_intoduction
+- \subpage application_manager_detail_design
+ + \ref application_manager_state_controller "2.1 State Controller"
+*/
+//-----------------------------------------------------------
+/**
+\page application_manager_intoduction 1 Introduction
+The document is intended to support software developers,
+maintenance and integration engineers with sufficient,
+detailed information concerning the design, development and
+deployment concepts, to accomplish their respective tasks without reliance on the authors.
+*/
+//-----------------------------------------------------------
+/**
+\page application_manager_detail_design 2 Component Detail Design
+\anchor application_manager_state_controller
+### 2.1 State Controller
+While application activating by HMI service new HMI level assigned to its state.
+The only one application can exist in the same time with HMI level 'FULL'.
+Therefore states of other application with their HMI level should be changed respectively.
+State Controller handles properly states of other applications while one of them changing it state.
+
+The main logic of application HMI Level conflict resolver
+If applied HMI state is FULL:
+ - all NOT audio/video applications becomes BACKGROUND
+ - all audio/video applications with other application type (navi, vc, media, projection) in FULL becomes LIMMITED
+ - all applications with same application type becomes BACKGROUND
+
+If applied HMI state is LIMITED:
+ - all NOT audio/video applications saves their's HMI states
+ - all applications with other application types saves their's HMI states
+ - all applications with same application type becomes BACKGROUND
+
+If applied HMI state is BACKGROUND:
+ - all applications will save their's HMI states
+
+Resolve tables to figure out audio/video streaming state for FULL/LIMITED HMI level.
+For example if applied is 'NAVIGATION' and resolve application is 'PROJECTION' then to resolve becomes 'NOT_STREAMABLE'.
+According to video resolve table the only one application may be 'STREAMABLE' in the same time.
+
+Video app resolve table(S --> STREAMABLE, NS --> NOT_STREAMABLE)
+
+| resolve/applied | NAVIGATION | PROJECTION | Other |
+|-----------------|------------|------------|-------|
+|NAVIGATION | NS | NS | S |
+|PROJECTION | NS | NS | S |
+|Other | NS | NS | NS |
+
+Audio application resolve table(A --> AUDIBLE, NS --> NOT_AUDIBLE)
+
+| resolve/applied | NAVIGATION | COMMUNICATION | IsMediaApp | Other |
+|-----------------|------------|---------------|------------|-------|
+|NAVIGATION | NA | A | A | A |
+|COMMUNICATION | A | NA | A | A |
+|IsMediaApp | A | A | NA | A |
+|Other | NA | NA | NA | NA |
+
+\note
+For instance if applied application is 'PROJECTION' & isMedia=true with applied HMI level 'FULL' (STREAMABLE & AUDIBLE)
+and application to resolve is 'NAVIGATION' with HMI level 'FULL' or 'LIMITED' STREAMABLE & AUDIBLE)
+then to resolve becomes 'LIMITED' (NOT_STREAMABLE & AUDIBLE).
+So, the only one application may stream video in the same time. But audio application such types as 'NAVIGATION', 'COMMUNICATION'
+may stream audio/video in 'LIMITED' level with application of other types.
+
+\note
+If applied application is 'NAVIGATION' (STREAMABLE & AUDIBLE) and application to resolve is same type
+'NAVIGATION' (STREAMABLE & AUDIBLE) then to resolve application becomes BACKGROUND (NOT_STREAMABLE & NOT_AUDIBLE).
+
+\note
+When a 'NAVIGATION' application does not start audio streaming service, media application is AUDIBLE,
+When the 'NAVIGATION' application starts streaming service, media application is ATTENUATED if system supports mixing,
+otherwise media application is NOT_AUDIBLE
+*/ \ No newline at end of file
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 221601a307..ee7eca190c 100644
--- a/src/components/application_manager/include/application_manager/app_extension.h
+++ b/src/components/application_manager/include/application_manager/app_extension.h
@@ -35,6 +35,12 @@
#include "utils/shared_ptr.h"
+namespace NsSmartDeviceLink {
+namespace NsSmartObjects {
+class SmartObject;
+}
+}
+
namespace application_manager {
typedef int AppExtensionUID;
@@ -47,6 +53,23 @@ class AppExtension {
return kUid_;
}
+ /**
+ * @brief SaveResumptionData method called by SDL when it saves resumption
+ * data.
+ * @param resumption_data data reference to data, that will be appended by
+ * plugin
+ */
+ virtual void SaveResumptionData(
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) = 0;
+
+ /**
+ * @brief ProcessResumption Method called by SDL during resumption.
+ * @param resumption_data list of resumption data
+ */
+ virtual void ProcessResumption(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject&
+ 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 fa6f18e9c2..ae0466326c 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -161,11 +161,6 @@ typedef std::map<uint32_t, PerformChoice> PerformChoiceSetMap;
typedef std::set<uint32_t> SoftButtonID;
/**
- * @brief Defines set of vehicle info types
- */
-typedef std::set<mobile_apis::VehicleDataType::eType> VehicleInfoSubscriptions;
-
-/**
* @brief Defines set of buttons subscription
*/
typedef std::set<mobile_apis::ButtonName::eType> ButtonSubscriptions;
@@ -186,10 +181,12 @@ class DynamicApplicationData {
virtual const smart_objects::SmartObject* show_command() const = 0;
virtual const smart_objects::SmartObject* tbt_show_command() const = 0;
virtual DataAccessor<ButtonSubscriptions> SubscribedButtons() const = 0;
- virtual DataAccessor<VehicleInfoSubscriptions> SubscribedIVI() const = 0;
virtual const smart_objects::SmartObject* keyboard_props() const = 0;
virtual const smart_objects::SmartObject* menu_title() const = 0;
virtual const smart_objects::SmartObject* menu_icon() const = 0;
+ virtual const smart_objects::SmartObject* day_color_scheme() const = 0;
+ virtual const smart_objects::SmartObject* night_color_scheme() const = 0;
+ virtual const std::string& display_layout() const = 0;
virtual void load_global_properties(const smart_objects::SmartObject& so) = 0;
virtual void set_help_prompt(
@@ -221,6 +218,12 @@ class DynamicApplicationData {
virtual void set_video_stream_retry_number(
const uint32_t& video_stream_retry_number) = 0;
+ virtual void set_day_color_scheme(
+ const smart_objects::SmartObject& color_scheme) = 0;
+ virtual void set_night_color_scheme(
+ const smart_objects::SmartObject& color_scheme) = 0;
+
+ virtual void set_display_layout(const std::string& layout) = 0;
/**
* @brief Checks if application is media, voice communication or navigation
* @return true if application is media, voice communication or navigation,
@@ -449,6 +452,20 @@ class Application : public virtual InitialApplicationData,
virtual bool is_navi() const = 0;
virtual void set_is_navi(bool allow) = 0;
+ /**
+ * @brief Returns is_remote_control_supported_
+ * @return true if app supports remote control, else false
+ */
+ virtual bool is_remote_control_supported() const = 0;
+
+ /**
+ * @brief Sets remote control supported,
+ * which is used to determine app with remote control
+ * @param allow, if true - remote control is supported,
+ * else remote control is disable
+ */
+ virtual void set_remote_control_supported(const bool allow) = 0;
+
virtual void set_mobile_projection_enabled(bool option) = 0;
virtual bool mobile_projection_enabled() const = 0;
@@ -531,6 +548,8 @@ class Application : public virtual InitialApplicationData,
virtual const mobile_api::SystemContext::eType system_context() const = 0;
virtual const mobile_api::AudioStreamingState::eType audio_streaming_state()
const = 0;
+ virtual const mobile_api::VideoStreamingState::eType video_streaming_state()
+ const = 0;
virtual const std::string& app_icon_path() const = 0;
virtual connection_handler::DeviceHandle device() const = 0;
@@ -601,10 +620,6 @@ class Application : public virtual InitialApplicationData,
virtual bool UnsubscribeFromButton(
mobile_apis::ButtonName::eType btn_name) = 0;
- virtual bool SubscribeToIVI(uint32_t vehicle_info_type) = 0;
- virtual bool IsSubscribedToIVI(uint32_t vehicle_info_type) const = 0;
- virtual bool UnsubscribeFromIVI(uint32_t vehicle_info_type) = 0;
-
/**
* @brief ResetDataInNone reset data counters in NONE
*/
@@ -727,6 +742,13 @@ class Application : public virtual InitialApplicationData,
virtual bool IsAudioApplication() const = 0;
/**
+ * @brief Check's if it is projection or navigation application
+ *
+ * @return true if application is projection or navigation
+ */
+ virtual bool IsVideoApplication() const = 0;
+
+ /**
* DEPRECATED
* @brief GetDeviceId allows to obtain device id which posseses
* by this application.
@@ -835,7 +857,6 @@ class Application : public virtual InitialApplicationData,
*/
virtual void SwapMobileMessageQueue(MobileMessageQueue& mobile_messages) = 0;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief set_system_context Set system context for application
* @param system_context Current context
@@ -878,16 +899,10 @@ class Application : public virtual InitialApplicationData,
virtual bool RemoveExtension(AppExtensionUID uid) = 0;
/**
- * @brief Removes all extensions
- */
- virtual void RemoveExtensions() = 0;
-
- /**
- * @brief Get list of subscriptions to vehicle info notifications
- * @return list of subscriptions to vehicle info notifications
+ * @brief Get list of available application extensions
+ * @return application extensions
*/
- virtual const VehicleInfoSubscriptions& SubscribesIVI() const = 0;
-#endif // SDL_REMOTE_CONTROL
+ virtual const std::list<AppExtensionPtr>& Extensions() const = 0;
protected:
mutable sync_primitives::Lock hmi_states_lock_;
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 64b5f8780b..8da8dec8f1 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
@@ -55,6 +55,7 @@ class InitialApplicationDataImpl : public virtual Application {
const smart_objects::SmartObject* ngn_media_screen_name() const;
const mobile_api::Language::eType& language() const;
const mobile_api::Language::eType& ui_language() const;
+
void set_app_types(const smart_objects::SmartObject& app_types);
void set_vr_synonyms(const smart_objects::SmartObject& vr_synonyms);
void set_mobile_app_id(const std::string& policy_app_id);
@@ -95,6 +96,9 @@ class DynamicApplicationDataImpl : public virtual Application {
const smart_objects::SmartObject* keyboard_props() const;
const smart_objects::SmartObject* menu_title() const;
const smart_objects::SmartObject* menu_icon() const;
+ const smart_objects::SmartObject* day_color_scheme() const;
+ const smart_objects::SmartObject* night_color_scheme() const;
+ const std::string& display_layout() const;
void load_global_properties(const smart_objects::SmartObject& properties_so);
void set_help_prompt(const smart_objects::SmartObject& help_prompt);
@@ -109,6 +113,9 @@ class DynamicApplicationDataImpl : public virtual Application {
void set_keyboard_props(const smart_objects::SmartObject& keyboard_props);
void set_menu_title(const smart_objects::SmartObject& menu_title);
void set_menu_icon(const smart_objects::SmartObject& menu_icon);
+ void set_day_color_scheme(const smart_objects::SmartObject& color_scheme);
+ void set_night_color_scheme(const smart_objects::SmartObject& color_scheme);
+ void set_display_layout(const std::string& layout);
/*
* @brief Adds a command to the in application menu
*/
@@ -263,15 +270,19 @@ class DynamicApplicationDataImpl : public virtual Application {
smart_objects::SmartObject* menu_title_;
smart_objects::SmartObject* menu_icon_;
smart_objects::SmartObject* tbt_show_command_;
+ smart_objects::SmartObject* day_color_scheme_;
+ smart_objects::SmartObject* night_color_scheme_;
+ std::string display_layout_;
CommandsMap commands_;
- mutable sync_primitives::Lock commands_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock> commands_lock_ptr_;
SubMenuMap sub_menu_;
- mutable sync_primitives::Lock sub_menu_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock> sub_menu_lock_ptr_;
ChoiceSetMap choice_set_map_;
- mutable sync_primitives::Lock choice_set_map_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock> choice_set_map_lock_ptr_;
PerformChoiceSetMap performinteraction_choice_set_map_;
- mutable sync_primitives::Lock performinteraction_choice_set_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock>
+ performinteraction_choice_set_lock_ptr_;
uint32_t is_perform_interaction_active_;
bool is_reset_global_properties_active_;
int32_t perform_interaction_mode_;
@@ -285,21 +296,22 @@ class DynamicApplicationDataImpl : public virtual Application {
};
DataAccessor<CommandsMap> DynamicApplicationDataImpl::commands_map() const {
- return DataAccessor<CommandsMap>(commands_, commands_lock_);
+ return DataAccessor<CommandsMap>(commands_, commands_lock_ptr_);
}
DataAccessor<SubMenuMap> DynamicApplicationDataImpl::sub_menu_map() const {
- return DataAccessor<SubMenuMap>(sub_menu_, sub_menu_lock_);
+ return DataAccessor<SubMenuMap>(sub_menu_, sub_menu_lock_ptr_);
}
DataAccessor<ChoiceSetMap> DynamicApplicationDataImpl::choice_set_map() const {
- return DataAccessor<ChoiceSetMap>(choice_set_map_, choice_set_map_lock_);
+ return DataAccessor<ChoiceSetMap>(choice_set_map_, choice_set_map_lock_ptr_);
}
DataAccessor<PerformChoiceSetMap>
DynamicApplicationDataImpl::performinteraction_choice_set_map() const {
- return DataAccessor<PerformChoiceSetMap>(performinteraction_choice_set_map_,
- performinteraction_choice_set_lock_);
+ return DataAccessor<PerformChoiceSetMap>(
+ performinteraction_choice_set_map_,
+ performinteraction_choice_set_lock_ptr_);
}
uint32_t DynamicApplicationDataImpl::is_perform_interaction_active() const {
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 2a7ea112d4..377a97b2b9 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -122,6 +122,10 @@ class ApplicationImpl : public virtual Application,
}
void set_is_navi(bool allow);
+ virtual bool is_remote_control_supported() const;
+
+ void set_remote_control_supported(const bool allow);
+
void set_mobile_projection_enabled(bool option);
bool mobile_projection_enabled() const;
@@ -168,6 +172,8 @@ class ApplicationImpl : public virtual Application,
const mobile_api::SystemContext::eType system_context() const;
inline const mobile_apis::AudioStreamingState::eType audio_streaming_state()
const;
+ inline const mobile_apis::VideoStreamingState::eType video_streaming_state()
+ const;
const std::string& app_icon_path() const;
connection_handler::DeviceHandle device() const;
const std::string& mac_address() const OVERRIDE;
@@ -208,10 +214,6 @@ class ApplicationImpl : public virtual Application,
bool IsSubscribedToButton(mobile_apis::ButtonName::eType btn_name);
bool UnsubscribeFromButton(mobile_apis::ButtonName::eType btn_name);
- bool SubscribeToIVI(uint32_t vehicle_info_type) OVERRIDE;
- bool IsSubscribedToIVI(uint32_t vehicle_info_type) const OVERRIDE;
- bool UnsubscribeFromIVI(uint32_t vehicle_info_type) OVERRIDE;
- DataAccessor<VehicleInfoSubscriptions> SubscribedIVI() const OVERRIDE;
inline bool IsRegistered() const OVERRIDE;
/**
@@ -269,7 +271,14 @@ class ApplicationImpl : public virtual Application,
*
* @return true if application is media, voice communication or navigation
*/
- virtual bool IsAudioApplication() const;
+ bool IsAudioApplication() const OVERRIDE;
+
+ /**
+ * @brief Checks whether the application is navigation or projection
+ *
+ * @return true if application is navigation or projection
+ */
+ bool IsVideoApplication() const OVERRIDE;
/**
* @brief SetInitialState sets initial HMI state for application on
@@ -355,7 +364,6 @@ class ApplicationImpl : public virtual Application,
*/
uint32_t GetAvailableDiskSpace() OVERRIDE;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Sets current system context
* @param system_context new system context
@@ -374,20 +382,6 @@ class ApplicationImpl : public virtual Application,
*/
void set_hmi_level(const mobile_api::HMILevel::eType& hmi_level) OVERRIDE;
- /**
- * @brief Get list of subscriptions to vehicle info notifications
- * @return list of subscriptions to vehicle info notifications
- */
- const VehicleInfoSubscriptions& SubscribesIVI() const OVERRIDE;
-
- /**
- * @brief Return pointer to extension by uid
- * @param uid uid of extension
- * @return Pointer to extension, if extension was initialized, otherwise NULL
- */
- AppExtensionPtr QueryInterface(AppExtensionUID uid) OVERRIDE;
-#endif
-
void PushMobileMessage(
smart_objects::SmartObjectSPtr mobile_message) OVERRIDE;
@@ -422,7 +416,8 @@ class ApplicationImpl : public virtual Application,
*/
void OnAudioStreamSuspend();
-#ifdef SDL_REMOTE_CONTROL
+ AppExtensionPtr QueryInterface(AppExtensionUID uid) OVERRIDE;
+
/**
* @brief Add extension to application
* @param extension pointer to extension
@@ -437,11 +432,7 @@ class ApplicationImpl : public virtual Application,
*/
bool RemoveExtension(AppExtensionUID uid) OVERRIDE;
- /**
- * @brief Removes all extensions
- */
- void RemoveExtensions() OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
+ const std::list<AppExtensionPtr>& Extensions() const OVERRIDE;
std::string hash_val_;
uint32_t grammar_id_;
@@ -453,6 +444,7 @@ class ApplicationImpl : public virtual Application,
smart_objects::SmartObject* active_message_;
bool is_media_;
bool is_navi_;
+ bool is_remote_control_supported_;
bool mobile_projection_enabled_;
bool video_streaming_approved_;
@@ -479,7 +471,6 @@ class ApplicationImpl : public virtual Application,
std::string bundle_id_;
AppFilesMap app_files_;
std::set<mobile_apis::ButtonName::eType> subscribed_buttons_;
- VehicleInfoSubscriptions subscribed_vehicle_info_;
UsageStatistics usage_report_;
HelpPromptManagerImpl help_prompt_manager_impl_;
protocol_handler::MajorProtocolVersion protocol_version_;
@@ -494,9 +485,7 @@ class ApplicationImpl : public virtual Application,
Timer video_stream_suspend_timer_;
Timer audio_stream_suspend_timer_;
-#ifdef SDL_REMOTE_CONTROL
std::list<AppExtensionPtr> extensions_;
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Defines number per time in seconds limits
@@ -517,8 +506,8 @@ class ApplicationImpl : public virtual Application,
CommandSoftButtonID cmd_softbuttonid_;
// Lock for command soft button id
sync_primitives::Lock cmd_softbuttonid_lock_;
- mutable sync_primitives::Lock vi_lock_;
- sync_primitives::Lock button_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock> vi_lock_ptr_;
+ mutable std::shared_ptr<sync_primitives::Lock> button_lock_ptr_;
std::string folder_name_;
ApplicationManager& application_manager_;
@@ -549,6 +538,14 @@ ApplicationImpl::audio_streaming_state() const {
: AudioStreamingState::INVALID_ENUM;
}
+const mobile_api::VideoStreamingState::eType
+ApplicationImpl::video_streaming_state() const {
+ using namespace mobile_apis;
+ const HmiStatePtr hmi_state = CurrentHmiState();
+ return hmi_state ? hmi_state->video_streaming_state()
+ : VideoStreamingState::INVALID_ENUM;
+}
+
bool ApplicationImpl::app_allowed() const {
return is_app_allowed_;
}
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 286ad87018..7433a5560f 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
@@ -41,7 +41,6 @@
#include <algorithm>
#include <memory>
-#include "application_manager/hmi_command_factory.h"
#include "application_manager/application_manager.h"
#include "application_manager/hmi_capabilities.h"
#include "application_manager/message.h"
@@ -54,6 +53,9 @@
#include "application_manager/event_engine/event_dispatcher_impl.h"
#include "application_manager/hmi_interfaces_impl.h"
#include "application_manager/command_holder.h"
+#include "application_manager/command_factory.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/rpc_handler.h"
#include "protocol_handler/protocol_observer.h"
#include "protocol_handler/protocol_handler.h"
@@ -115,97 +117,17 @@ struct CommandParametersPermissions;
typedef std::map<std::string, hmi_apis::Common_TransportType::eType>
DeviceTypes;
-namespace impl {
-using namespace threads;
-
-/*
- * These dummy classes are here to locally impose strong typing on different
- * kinds of messages
- * Currently there is no type difference between incoming and outgoing messages
- * And due to ApplicationManagerImpl works as message router it has to
- * distinguish
- * messages passed from it's different connection points
- * TODO(ik): replace these with globally defined message types
- * when we have them.
- */
-struct MessageFromMobile : public utils::SharedPtr<Message> {
- MessageFromMobile() {}
- explicit MessageFromMobile(const utils::SharedPtr<Message>& message)
- : utils::SharedPtr<Message>(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const {
- return (*this)->Priority().OrderingValue();
- }
-};
-
-struct MessageToMobile : public utils::SharedPtr<Message> {
- MessageToMobile() : is_final(false) {}
- explicit MessageToMobile(const utils::SharedPtr<Message>& message,
- bool final_message)
- : utils::SharedPtr<Message>(message), is_final(final_message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const {
- return (*this)->Priority().OrderingValue();
- }
- // Signals if connection to mobile must be closed after sending this message
- bool is_final;
-};
-
-struct MessageFromHmi : public utils::SharedPtr<Message> {
- MessageFromHmi() {}
- explicit MessageFromHmi(const utils::SharedPtr<Message>& message)
- : utils::SharedPtr<Message>(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const {
- return (*this)->Priority().OrderingValue();
- }
-};
-
-struct MessageToHmi : public utils::SharedPtr<Message> {
- MessageToHmi() {}
- explicit MessageToHmi(const utils::SharedPtr<Message>& message)
- : utils::SharedPtr<Message>(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const {
- return (*this)->Priority().OrderingValue();
- }
-};
-
-// Short type names for prioritized message queues
-typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromMobile> >
- FromMobileQueue;
-typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToMobile> >
- ToMobileQueue;
-typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromHmi> >
- FromHmiQueue;
-typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToHmi> >
- ToHmiQueue;
-
-// AudioPassThru
-typedef struct {
- std::vector<uint8_t> binary_data;
- int32_t session_key;
-} AudioData;
-typedef std::queue<AudioData> RawAudioDataQueue;
-typedef threads::MessageLoopThread<RawAudioDataQueue> AudioPassThruQueue;
-}
CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
typedef utils::SharedPtr<timer::Timer> TimerSPtr;
class ApplicationManagerImpl
: public ApplicationManager,
- public hmi_message_handler::HMIMessageObserver,
- public protocol_handler::ProtocolObserver,
public connection_handler::ConnectionHandlerObserver,
- public policy::PolicyHandlerObserver,
+ public policy::PolicyHandlerObserver
#ifdef ENABLE_SECURITY
- public security_manager::SecurityManagerListener,
+ ,
+ public security_manager::SecurityManagerListener
#endif // ENABLE_SECURITY
- public impl::FromMobileQueue::Handler,
- public impl::ToMobileQueue::Handler,
- public impl::FromHmiQueue::Handler,
- public impl::ToHmiQueue::Handler,
- public impl::AudioPassThruQueue::Handler
#ifdef TELEMETRY_MONITOR
,
public telemetry_monitor::TelemetryObservable<AMTelemetryObserver>
@@ -266,7 +188,6 @@ class ApplicationManagerImpl
void SendHMIStatusNotification(
const utils::SharedPtr<Application> app) OVERRIDE;
-#ifdef SDL_REMOTE_CONTROL
ApplicationSharedPtr application(
const std::string& device_id,
const std::string& policy_app_id) const OVERRIDE;
@@ -281,24 +202,14 @@ class ApplicationManagerImpl
*/
void ChangeAppsHMILevel(uint32_t app_id, mobile_apis::HMILevel::eType level);
- void Erase(ApplicationSharedPtr app_to_remove) {
- DCHECK(app_to_remove);
- app_to_remove->RemoveExtensions();
- applications_.erase(app_to_remove);
- }
-
- virtual functional_modules::PluginManager& GetPluginManager() OVERRIDE {
- return plugin_manager_;
+ virtual plugin_manager::RPCPluginManager& GetPluginManager() OVERRIDE {
+ DCHECK(plugin_manager_);
+ return *plugin_manager_;
}
std::vector<std::string> devices(
const std::string& policy_app_id) const OVERRIDE;
- virtual void SendPostMessageToMobile(const MessagePtr& message) OVERRIDE;
-
- virtual void SendPostMessageToHMI(const MessagePtr& message) OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
-
/**
* @brief Checks if application with the same HMI type
* (media, voice communication or navi) exists
@@ -372,8 +283,8 @@ class ApplicationManagerImpl
* @param vehicle_info Enum value of type of vehicle data
* @param new value (for integer values currently) of vehicle data
*/
- std::vector<ApplicationSharedPtr> IviInfoUpdated(
- mobile_apis::VehicleDataType::eType vehicle_info, int value) OVERRIDE;
+ void IviInfoUpdated(mobile_apis::VehicleDataType::eType vehicle_info,
+ int value) OVERRIDE;
void OnApplicationRegistered(ApplicationSharedPtr app) OVERRIDE;
@@ -565,6 +476,7 @@ class ApplicationManagerImpl
utils::SharedPtr<Application> app,
mobile_apis::HMILevel::eType hmi_level,
mobile_apis::AudioStreamingState::eType audio_state,
+ mobile_apis::VideoStreamingState::eType video_state,
mobile_apis::SystemContext::eType system_context) const OVERRIDE;
/**
@@ -583,39 +495,6 @@ class ApplicationManagerImpl
mobile_apis::SystemContext::eType system_context) const OVERRIDE;
/**
- * @brief SetState set regular audio state
- * @param app_id applicatio id
- * @param audio_state aaudio streaming state
- */
- void SetState(uint32_t app_id,
- mobile_apis::AudioStreamingState::eType audio_state) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, audio_state);
- }
-
- /**
- * @brief SetState setup regular hmi state, that will appear if no
- * specific events are active
- * @param app appication to setup regular State
- * @param state state of new regular state
- */
- template <bool SendActivateApp>
- void SetState(uint32_t app_id, HmiStatePtr new_state) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, new_state, SendActivateApp);
- }
-
- /**
* @brief Checks, if given RPC is allowed at current HMI level for specific
* application in policy table
* @param app Application
@@ -677,117 +556,6 @@ class ApplicationManagerImpl
ApplicationConstSharedPtr waiting_app(const uint32_t hmi_id) const;
/**
- * @brief SetState Change regular audio state
- * @param app appication to setup regular State
- * @param audio_state of new regular state
- */
- template <bool SendActivateApp>
- void SetState(uint32_t app_id, mobile_apis::HMILevel::eType hmi_level) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, hmi_level, SendActivateApp);
- }
-
- /**
- * @brief SetState Change regular hmi level and audio state
- * @param app appication to setup regular State
- * @param hmi_level of new regular state
- * @param audio_state of new regular state
- * @param SendActivateApp: if true, ActivateAppRequest will be sent on HMI
- */
- template <bool SendActivateApp>
- void SetState(uint32_t app_id,
- mobile_apis::HMILevel::eType hmi_level,
- mobile_apis::AudioStreamingState::eType audio_state) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, hmi_level, audio_state, SendActivateApp);
- }
-
- /**
- * @brief SetState Change regular hmi level and audio state
- * @param app appication to setup regular State
- * @param hmi_level of new regular state
- * @param audio_state of new regular state
- * @param SendActivateApp: if true, ActivateAppRequest will be sent on HMI
- */
- template <bool SendActivateApp>
- void SetState(uint32_t app_id,
- mobile_apis::HMILevel::eType hmi_level,
- mobile_apis::AudioStreamingState::eType audio_state,
- mobile_apis::SystemContext::eType system_context) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(
- app, hmi_level, audio_state, system_context, SendActivateApp);
- }
-
- /**
- * @brief SetState Change regular system context
- * @param app appication to setup regular State
- * @param system_context of new regular state
- */
- void SetState(uint32_t app_id,
- mobile_apis::SystemContext::eType system_context) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, system_context);
- }
-
- /**
- * @brief SetState Change regular hmi level
- * @param app appication to setup regular State
- * @param hmi_level hmi level of new regular state
- */
- void SetHmiState(uint32_t app_id, mobile_apis::HMILevel::eType hmi_level) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, hmi_level);
- }
-
- /**
- * @brief SetState Change regular hmi state
- * @param app appication to setup regular State
- * @param state new regular hmi state
- */
- void SetState(uint32_t app_id, HmiStatePtr state) {
- ApplicationSharedPtr app = application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
- return;
- }
- state_ctrl_.SetRegularState(app, state);
- }
-
- /**
- * @brief Checks, if particular state is active
- * @param state_id State
- * @return True, if state is active, otherwise - false
- */
- bool IsStateActive(HmiState::StateID state_id) const;
-
- /**
* @brief Notification from PolicyHandler about PTU.
* Compares AppHMIType between saved in app and received from PTU. If they are
* different method sends:
@@ -832,18 +600,6 @@ class ApplicationManagerImpl
*/
void StopAudioPassThru(int32_t application_key) OVERRIDE;
- /*
- * @brief Creates AudioPassThru data chunk and inserts it
- * to audio_pass_thru_messages_
- *
- * @param session_key Id of application for which
- * audio pass thru should be sent
- *
- * @param binary_data AudioPassThru data chunk
- */
- void SendAudioPassThroughNotification(
- uint32_t session_key, std::vector<uint8_t>& binary_data) OVERRIDE;
-
std::string GetDeviceName(connection_handler::DeviceHandle handle);
/*
@@ -863,20 +619,8 @@ class ApplicationManagerImpl
void StartDevicesDiscovery();
- // Put message to the queue to be sent to mobile.
- // if |final_message| parameter is set connection to mobile will be closed
- // after processing this message
- void SendMessageToMobile(const commands::MessageSharedPtr message,
- bool final_message = false) OVERRIDE;
-
- void SendMessageToHMI(const commands::MessageSharedPtr message) OVERRIDE;
-
void RemoveHMIFakeParameters(
- application_manager::MessagePtr& message) OVERRIDE;
-
- bool ManageMobileCommand(const commands::MessageSharedPtr message,
- commands::Command::CommandOrigin origin) OVERRIDE;
- bool ManageHMICommand(const commands::MessageSharedPtr message) OVERRIDE;
+ application_manager::commands::MessageSharedPtr& message) OVERRIDE;
/**
* @brief TerminateRequest forces termination of request
@@ -887,17 +631,6 @@ class ApplicationManagerImpl
void TerminateRequest(const uint32_t connection_key,
const uint32_t corr_id,
const int32_t function_id) OVERRIDE;
- // Overriden ProtocolObserver method
- void OnMessageReceived(
- const ::protocol_handler::RawMessagePtr message) OVERRIDE;
- void OnMobileMessageSent(
- const ::protocol_handler::RawMessagePtr message) OVERRIDE;
-
- // Overriden HMIMessageObserver method
- void OnMessageReceived(
- hmi_message_handler::MessageSharedPointer message) OVERRIDE;
- void OnErrorSending(
- hmi_message_handler::MessageSharedPointer message) OVERRIDE;
// Overriden ConnectionHandlerObserver method
void OnDeviceListUpdated(
@@ -958,6 +691,12 @@ class ApplicationManagerImpl
security_manager::SSLContext::HandshakeResult result) OVERRIDE;
/**
+ * @brief Notification about handshake failure
+ * @return true on success notification handling or false otherwise
+ */
+ bool OnHandshakeFailed() OVERRIDE;
+
+ /**
* @brief Notification that certificate update is required.
*/
void OnCertificateUpdateRequired() OVERRIDE;
@@ -1189,15 +928,29 @@ class ApplicationManagerImpl
connection_handler::ConnectionHandler& connection_handler() const OVERRIDE;
protocol_handler::ProtocolHandler& protocol_handler() const OVERRIDE;
- virtual policy::PolicyHandlerInterface& GetPolicyHandler() OVERRIDE {
+ policy::PolicyHandlerInterface& GetPolicyHandler() OVERRIDE {
return *policy_handler_;
}
- virtual const policy::PolicyHandlerInterface& GetPolicyHandler()
- const OVERRIDE {
+ const policy::PolicyHandlerInterface& GetPolicyHandler() const OVERRIDE {
return *policy_handler_;
}
+ rpc_service::RPCService& GetRPCService() const OVERRIDE {
+ return *rpc_service_;
+ }
+
+ rpc_handler::RPCHandler& GetRPCHandler() const OVERRIDE {
+ return *rpc_handler_;
+ }
+
+ void SetRPCService(std::unique_ptr<rpc_service::RPCService>& rpc_service) {
+ rpc_service_ = std::move(rpc_service);
+ }
+
+ bool is_stopping() const OVERRIDE;
+
+ bool is_audio_pass_thru_active() const OVERRIDE;
/*
* @brief Function Should be called when Low Voltage is occured
*/
@@ -1357,6 +1110,15 @@ class ApplicationManagerImpl
app_launch::AppLaunchCtrl& app_launch_ctrl() OVERRIDE;
+ bool IsSOStructValid(const hmi_apis::StructIdentifiers::eType struct_id,
+ const smart_objects::SmartObject& display_capabilities);
+
+ /**
+ * @brief Function returns supported SDL Protocol Version
+ * @return protocol version depends on parameters from smartDeviceLink.ini.
+ */
+ protocol_handler::MajorProtocolVersion SupportedSDLVersion() const OVERRIDE;
+
private:
/**
* @brief PullLanguagesInfo allows to pull information about languages.
@@ -1389,40 +1151,9 @@ class ApplicationManagerImpl
hmi_apis::HMI_API& hmi_so_factory();
mobile_apis::MOBILE_API& mobile_so_factory();
- bool ConvertMessageToSO(const Message& message,
- smart_objects::SmartObject& output);
bool ConvertSOtoMessage(const smart_objects::SmartObject& message,
Message& output);
- MessageValidationResult ValidateMessageBySchema(
- const Message& message) OVERRIDE;
-
- utils::SharedPtr<Message> ConvertRawMsgToMessage(
- const ::protocol_handler::RawMessagePtr message);
-
- void ProcessMessageFromMobile(const utils::SharedPtr<Message> message);
- void ProcessMessageFromHMI(const utils::SharedPtr<Message> message);
-
- // threads::MessageLoopThread<*>::Handler implementations
- /*
- * @brief Handles for threads pumping different types
- * of messages. Beware, each is called on different thread!
- */
- // CALLED ON messages_from_mobile_ thread!
- void Handle(const impl::MessageFromMobile message) OVERRIDE;
-
- // CALLED ON messages_to_mobile_ thread!
- void Handle(const impl::MessageToMobile message) OVERRIDE;
-
- // CALLED ON messages_from_hmi_ thread!
- void Handle(const impl::MessageFromHmi message) OVERRIDE;
-
- // CALLED ON messages_to_hmi_ thread!
- void Handle(const impl::MessageToHmi message) OVERRIDE;
-
- // CALLED ON audio_pass_thru_messages_ thread!
- void Handle(const impl::AudioData message) OVERRIDE;
-
template <typename ApplicationList>
void PrepareApplicationListSO(ApplicationList app_list,
smart_objects::SmartObject& applications,
@@ -1594,12 +1325,6 @@ class ApplicationManagerImpl
void DisallowStreaming(uint32_t app_id);
/**
- * @brief Function returns supported SDL Protocol Version
- * @return protocol version depends on parameters from smartDeviceLink.ini.
- */
- protocol_handler::MajorProtocolVersion SupportedSDLVersion() const;
-
- /**
* @brief Checks if driver distraction state is valid, creates message
* and puts it to postponed message.
* @param application contains registered application.
@@ -1698,8 +1423,9 @@ class ApplicationManagerImpl
ForbiddenApps forbidden_applications;
// Lock for applications list
- mutable sync_primitives::Lock applications_list_lock_;
- mutable sync_primitives::Lock apps_to_register_list_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock> applications_list_lock_ptr_;
+ mutable std::shared_ptr<sync_primitives::Lock>
+ apps_to_register_list_lock_ptr_;
mutable sync_primitives::Lock subscribed_way_points_apps_lock_;
/**
@@ -1735,9 +1461,7 @@ class ApplicationManagerImpl
std::auto_ptr<policy::PolicyHandlerInterface> policy_handler_;
protocol_handler::ProtocolHandler* protocol_handler_;
request_controller::RequestController request_ctrl_;
-
-#ifdef SDL_REMOTE_CONTROL
- functional_modules::PluginManager plugin_manager_;
+ std::unique_ptr<plugin_manager::RPCPluginManager> plugin_manager_;
/**
* @brief Map contains apps with HMI state before incoming call
@@ -1756,7 +1480,6 @@ class ApplicationManagerImpl
mobile_apis::AudioStreamingState::eType audio_streaming_state;
mobile_apis::SystemContext::eType system_context;
};
-#endif // SDL_REMOTE_CONTROL
hmi_apis::HMI_API* hmi_so_factory_;
mobile_apis::MOBILE_API* mobile_so_factory_;
@@ -1764,19 +1487,6 @@ class ApplicationManagerImpl
static uint32_t corelation_id_;
static const uint32_t max_corelation_id_;
- // Construct message threads when everything is already created
-
- // Thread that pumps messages coming from mobile side.
- impl::FromMobileQueue messages_from_mobile_;
- // Thread that pumps messages being passed to mobile side.
- impl::ToMobileQueue messages_to_mobile_;
- // Thread that pumps messages coming from HMI.
- impl::FromHmiQueue messages_from_hmi_;
- // Thread that pumps messages being passed to HMI.
- impl::ToHmiQueue messages_to_hmi_;
- // Thread that pumps messages audio pass thru to mobile.
- impl::AudioPassThruQueue audio_pass_thru_messages_;
-
std::auto_ptr<HMICapabilities> hmi_capabilities_;
// The reason of HU shutdown
mobile_api::AppInterfaceUnregisteredReason::eType unregister_reason_;
@@ -1799,7 +1509,7 @@ class ApplicationManagerImpl
std::vector<TimerSPtr> timer_pool_;
sync_primitives::Lock timer_pool_lock_;
- sync_primitives::Lock stopping_application_mng_lock_;
+ mutable sync_primitives::Lock stopping_application_mng_lock_;
StateControllerImpl state_ctrl_;
std::auto_ptr<app_launch::AppLaunchData> app_launch_dto_;
std::auto_ptr<app_launch::AppLaunchCtrl> app_launch_ctrl_;
@@ -1829,6 +1539,9 @@ class ApplicationManagerImpl
std::unique_ptr<CommandHolder> commands_holder_;
+ std::unique_ptr<rpc_service::RPCService> rpc_service_;
+ std::unique_ptr<rpc_handler::RPCHandler> rpc_handler_;
+
#ifdef BUILD_TESTS
public:
/**
@@ -1845,6 +1558,12 @@ class ApplicationManagerImpl
*/
void SetMockMediaManager(media_manager::MediaManager* mock_media_manager);
+ virtual void SetPluginManager(
+ std::unique_ptr<plugin_manager::RPCPluginManager>& plugin_manager)
+ OVERRIDE {
+ plugin_manager_.reset(plugin_manager.release());
+ }
+
private:
#endif
diff --git a/src/components/application_manager/include/application_manager/command_factory.h b/src/components/application_manager/include/application_manager/command_factory.h
new file mode 100644
index 0000000000..ce2706f9a0
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/command_factory.h
@@ -0,0 +1,212 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMAND_FACTORY_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMAND_FACTORY_H
+
+#include "application_manager/commands/command.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "utils/macro.h"
+
+namespace application_manager {
+using rpc_service::RPCService;
+using policy::PolicyHandlerInterface;
+typedef utils::SharedPtr<commands::Command> CommandSharedPtr;
+
+/**
+ * @brief Factory class for command creation
+ **/
+class CommandFactory {
+ public:
+ /**
+ * @brief Create command object and return pointer to it
+ *
+ * @param message SmartObject shared pointer.
+ * @return Pointer to created command object.
+ **/
+ virtual CommandSharedPtr CreateCommand(
+ const commands::MessageSharedPtr& message,
+ commands::Command::CommandSource source) = 0;
+ /**
+ * @param int32_t command id
+ * @param CommandSource source
+ * @return return true if command can be create, else return false
+ **/
+ virtual bool IsAbleToProcess(
+ const int32_t,
+ const application_manager::commands::Command::CommandSource source)
+ const = 0;
+};
+
+/**
+ * @brief Command creator interface for create commands
+ **/
+class CommandCreator {
+ public:
+ /**
+ * @brief ~CommandCreator destructor
+ **/
+ virtual ~CommandCreator() {}
+ /**
+ * @return return true if command can be create, else return false
+ **/
+ virtual bool CanBeCreated() const = 0;
+ /**
+ * @brief Create command object and return pointer to it
+ * @param message SmartObject shared pointer.
+ * @return Pointer to created command object.
+ **/
+ virtual CommandSharedPtr create(
+ const commands::MessageSharedPtr& message) const = 0;
+};
+
+/**
+ * @brief DefaultCommandCreator concrete command creator
+ **/
+template <typename CommandType>
+class DefaultCommandCreator : public CommandCreator {
+ public:
+ /**
+ * @brief DefaultCommandCreator constructor
+ * @param application_manager ApplicationManager.
+ * @param rpc_service RPCService.
+ * @param hmi_capabilities HMICapabilities.
+ * @param policy_handler PolicyHandlerInterface.
+ */
+ DefaultCommandCreator(ApplicationManager& application_manager,
+ RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ PolicyHandlerInterface& policy_handler)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {}
+
+ private:
+ /**
+ * @return return true
+ **/
+ bool CanBeCreated() const override {
+ return true;
+ }
+
+ /**
+ * @brief Create command object and return pointer to it
+ * @param message SmartObject shared pointer.
+ * @return Pointer to created command object.
+ **/
+ CommandSharedPtr create(
+ const commands::MessageSharedPtr& message) const override {
+ CommandSharedPtr command(new CommandType(message,
+ application_manager_,
+ rpc_service_,
+ hmi_capabilities_,
+ policy_handler_));
+ return command;
+ }
+
+ ApplicationManager& application_manager_;
+ RPCService& rpc_service_;
+ HMICapabilities& hmi_capabilities_;
+ PolicyHandlerInterface& policy_handler_;
+};
+
+struct InvalidCommand {};
+
+/**
+ * @brief DefaultCommandCreator<InvalidCommand> creator for invalid commands
+ **/
+template <>
+class DefaultCommandCreator<InvalidCommand> : public CommandCreator {
+ public:
+ /**
+ * @brief DefaultCommandCreator constructor
+ * @param application_manager ApplicationManager.
+ * @param rpc_service RPCService.
+ * @param hmi_capabilities HMICapabilities.
+ * @param policy_handler PolicyHandlerInterface.
+ */
+ DefaultCommandCreator(ApplicationManager& application_manager,
+ RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ PolicyHandlerInterface& policy_handler) {
+ UNUSED(application_manager);
+ UNUSED(rpc_service);
+ UNUSED(hmi_capabilities);
+ UNUSED(policy_handler);
+ }
+
+ private:
+ /**
+ * @return return false
+ **/
+ bool CanBeCreated() const override {
+ return false;
+ }
+ /**
+ * @brief Create command object and return pointer to it
+ * @param message SmartObject shared pointer.
+ * @return Pointer to created empty command object.
+ **/
+ CommandSharedPtr create(
+ const commands::MessageSharedPtr& message) const override {
+ UNUSED(message);
+ return CommandSharedPtr();
+ }
+};
+
+struct CommandCreatorFactory {
+ CommandCreatorFactory(ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ PolicyHandlerInterface& policy_handler)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {}
+
+ template <typename CommandType>
+ CommandCreator& GetCreator() {
+ static DefaultCommandCreator<CommandType> res(
+ application_manager_, rpc_service_, hmi_capabilities_, policy_handler_);
+ return res;
+ }
+ ApplicationManager& application_manager_;
+ RPCService& rpc_service_;
+ HMICapabilities& hmi_capabilities_;
+ PolicyHandlerInterface& policy_handler_;
+};
+
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMAND_FACTORY_H
diff --git a/src/components/application_manager/include/application_manager/command_holder_impl.h b/src/components/application_manager/include/application_manager/command_holder_impl.h
index ed5f6baa62..c15506ac75 100644
--- a/src/components/application_manager/include/application_manager/command_holder_impl.h
+++ b/src/components/application_manager/include/application_manager/command_holder_impl.h
@@ -39,6 +39,7 @@
#include <vector>
#include <map>
#include "application_manager/application.h"
+#include "application_manager/rpc_service.h"
#include "smart_objects/smart_object.h"
#include "utils/lock.h"
#include "utils/shared_ptr.h"
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 cc090defa0..6524799f45 100644
--- a/src/components/application_manager/include/application_manager/commands/command.h
+++ b/src/components/application_manager/include/application_manager/commands/command.h
@@ -113,7 +113,7 @@ class Command {
*/
virtual void SetAllowedToTerminate(const bool allowed) = 0;
- enum CommandOrigin { ORIGIN_SDL, ORIGIN_MOBILE };
+ enum CommandSource { SOURCE_SDL, SOURCE_MOBILE, SOURCE_HMI };
};
typedef smart_objects::SmartObjectSPtr MessageSharedPtr;
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 5fee7500ce..be79d9e8d1 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
@@ -63,7 +63,10 @@ class CommandImpl : public Command {
* @param message Incoming SmartObject message
**/
CommandImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
/**
* @brief CommandImpl class destructor
@@ -173,6 +176,9 @@ class CommandImpl : public Command {
uint32_t default_timeout_;
bool allowed_to_terminate_;
ApplicationManager& application_manager_;
+ rpc_service::RPCService& rpc_service_;
+ HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
#ifdef ENABLE_LOG
static log4cxx::LoggerPtr logger_;
diff --git a/src/components/application_manager/include/application_manager/commands/command_notification_from_mobile_impl.h b/src/components/application_manager/include/application_manager/commands/command_notification_from_mobile_impl.h
index e8a0399c9d..8741dae540 100644
--- a/src/components/application_manager/include/application_manager/commands/command_notification_from_mobile_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_notification_from_mobile_impl.h
@@ -42,8 +42,12 @@ namespace commands {
class CommandNotificationFromMobileImpl : public CommandImpl {
public:
- CommandNotificationFromMobileImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
+ CommandNotificationFromMobileImpl(
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
virtual ~CommandNotificationFromMobileImpl();
virtual bool Init();
virtual bool CleanUp();
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 dabbe4fe31..2274bc5f3b 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
@@ -43,7 +43,10 @@ namespace commands {
class CommandNotificationImpl : public CommandImpl {
public:
CommandNotificationImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
virtual ~CommandNotificationImpl();
virtual bool Init();
virtual bool CleanUp();
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 74a884a223..e790fc9af6 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
@@ -110,7 +110,10 @@ class CommandRequestImpl : public CommandImpl,
enum HashUpdateMode { kSkipHashUpdate, kDoHashUpdate };
CommandRequestImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
~CommandRequestImpl();
diff --git a/src/components/application_manager/include/application_manager/commands/command_response_impl.h b/src/components/application_manager/include/application_manager/commands/command_response_impl.h
index 44c58a8102..06e73db191 100644
--- a/src/components/application_manager/include/application_manager/commands/command_response_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_response_impl.h
@@ -44,7 +44,10 @@ namespace commands {
class CommandResponseImpl : public CommandImpl {
public:
CommandResponseImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
virtual ~CommandResponseImpl();
virtual bool Init();
virtual bool CleanUp();
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h b/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
deleted file mode 100644
index fd4cc12468..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ActivateAppRequest command class
- **/
-class ActivateAppRequest : public RequestToHMI {
- public:
- /**
- * @brief ActivateAppRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ActivateAppRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ActivateAppRequest class destructor
- **/
- virtual ~ActivateAppRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ActivateAppRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h b/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
deleted file mode 100644
index 1470bf8651..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ActivateAppResponse command class
- **/
-class ActivateAppResponse : public ResponseFromHMI {
- public:
- /**
- * @brief ActivateAppResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ActivateAppResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ActivateAppResponse class destructor
- **/
- virtual ~ActivateAppResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ActivateAppResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h
deleted file mode 100644
index 3e0f81f167..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ADD_STATISTICS_INFO_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ADD_STATISTICS_INFO_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddStatisticsInfoNotification command class
- **/
-class AddStatisticsInfoNotification : public NotificationFromHMI {
- public:
- /**
- * @brief AddStatisticsInfoNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AddStatisticsInfoNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AddStatisticsInfoNotification class destructor
- **/
- virtual ~AddStatisticsInfoNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AddStatisticsInfoNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ADD_STATISTICS_INFO_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
deleted file mode 100644
index c1c5b36e5b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAllAppsRequest command class
- **/
-class AllowAllAppsRequest : public RequestToHMI {
- public:
- /**
- * @brief AllowAllAppsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AllowAllAppsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AllowAllAppsRequest class destructor
- **/
- virtual ~AllowAllAppsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAllAppsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
deleted file mode 100644
index 711825cfab..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAllAppsResponse command class
- **/
-class AllowAllAppsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AllowAllAppsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AllowAllAppsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AllowAllAppsResponse class destructor
- **/
- virtual ~AllowAllAppsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAllAppsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
deleted file mode 100644
index 10424a2661..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAppRequest command class
- **/
-class AllowAppRequest : public RequestToHMI {
- public:
- /**
- * @brief AllowAppRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AllowAppRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AllowAppRequest class destructor
- **/
- virtual ~AllowAppRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAppRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
deleted file mode 100644
index 4f2642f550..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAppResponse command class
- **/
-class AllowAppResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AllowAppResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AllowAppResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AllowAppResponse class destructor
- **/
- virtual ~AllowAppResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAppResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_on_awake_sdl.h b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_on_awake_sdl.h
deleted file mode 100644
index daa71e68b5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_on_awake_sdl.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2017, 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_COMMANDS_HMI_BASIC_COMMUNICATION_ON_AWAKE_SDL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_ON_AWAKE_SDL_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAwakeSDLNotification command class
- **/
-class OnAwakeSDLNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAwakeSDLNotification class constructor
- * @param message Incoming SmartObject message
- * @param application_manager reference to ApplicationManager instance
- **/
- OnAwakeSDLNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAwakeSDLNotification class destructor
- **/
- virtual ~OnAwakeSDLNotification();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAwakeSDLNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_ON_AWAKE_SDL_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h
deleted file mode 100644
index bdfdfffd66..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief BasicCommunicationSystemRequest command class
- **/
-class BasicCommunicationSystemRequest : public RequestToHMI {
- public:
- /**
- * @brief BasicCommunicationSystemRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- BasicCommunicationSystemRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief BasicCommunicationSystemRequest class destructor
- **/
- virtual ~BasicCommunicationSystemRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BasicCommunicationSystemRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h
deleted file mode 100644
index de433568b1..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief BasicCommunicationSystemResponse command class
- **/
-class BasicCommunicationSystemResponse : public ResponseFromHMI {
- public:
- /**
- * @brief BasicCommunicationSystemResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- BasicCommunicationSystemResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief BasicCommunicationSystemResponse class destructor
- **/
- virtual ~BasicCommunicationSystemResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BasicCommunicationSystemResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
deleted file mode 100644
index 45dc690c6c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ButtonGetCapabilitiesRequest command class
- **/
-class ButtonGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief ButtonGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ButtonGetCapabilitiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ButtonGetCapabilitiesRequest class destructor
- **/
- virtual ~ButtonGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
deleted file mode 100644
index 4efa576079..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ButtonGetCapabilitiesResponse command class
- **/
-class ButtonGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief ButtonGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ButtonGetCapabilitiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ButtonGetCapabilitiesResponse class destructor
- **/
- virtual ~ButtonGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h b/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
deleted file mode 100644
index d7d4d18d97..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ClosePopupRequest command class
- **/
-class ClosePopupRequest : public RequestToHMI {
- public:
- /**
- * @brief ClosePopupRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ClosePopupRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ClosePopupRequest class destructor
- **/
- virtual ~ClosePopupRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ClosePopupRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h b/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
deleted file mode 100644
index fdba83d3b6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ClosePopupResponse command class
- **/
-class ClosePopupResponse : public ResponseFromHMI {
- public:
- /**
- * @brief ClosePopupResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ClosePopupResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ClosePopupResponse class destructor
- **/
- virtual ~ClosePopupResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ClosePopupResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_request.h b/src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_request.h
deleted file mode 100644
index 8688698883..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_request.h
+++ /dev/null
@@ -1,68 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DECRYPT_CERTIFICATE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DECRYPT_CERTIFICATE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DecryptCertificateRequest command class
- **/
-class DecryptCertificateRequest : public RequestToHMI {
- public:
- /**
- * @brief DecryptCertificateRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DecryptCertificateRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DecryptCertificateRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DECRYPT_CERTIFICATE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_response.h b/src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_response.h
deleted file mode 100644
index 45c2258489..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/decrypt_certificate_response.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DECRYPT_CERTIFICATE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DECRYPT_CERTIFICATE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DecryptCertificateResponse command class
- **/
-class DecryptCertificateResponse : public ResponseFromHMI {
- public:
- /**
- * @brief DecryptCertificateResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DecryptCertificateResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DecryptCertificateResponse class destructor
- **/
- virtual ~DecryptCertificateResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DecryptCertificateResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DECRYPT_CERTIFICATE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/dial_number_request.h b/src/components/application_manager/include/application_manager/commands/hmi/dial_number_request.h
deleted file mode 100644
index 2b002c31dd..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/dial_number_request.h
+++ /dev/null
@@ -1,76 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DIAL_NUMBER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DIAL_NUMBER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-/**
- * @brief DialNumberRequest command class
- **/
-class DialNumberRequest : public RequestToHMI {
- public:
- /**
- * @brief DialNumberRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DialNumberRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DialNumberRequest class destructor
- **/
- virtual ~DialNumberRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DialNumberRequest);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DIAL_NUMBER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/dial_number_response.h b/src/components/application_manager/include/application_manager/commands/hmi/dial_number_response.h
deleted file mode 100644
index 1fbef15307..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/dial_number_response.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DIAL_NUMBER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DIAL_NUMBER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief DialNumberResponse command class
- **/
-class DialNumberResponse : public ResponseFromHMI {
- public:
- /**
- * @brief DialNumberResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DialNumberResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DialNumberResponse class destructor
- **/
- virtual ~DialNumberResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DialNumberResponse);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_DIAL_NUMBER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h b/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h
deleted file mode 100644
index 0e0c271eef..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_SYSTEM_INFO_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_SYSTEM_INFO_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetSystemInfoRequest command class
- **/
-class GetSystemInfoRequest : public RequestToHMI {
- public:
- /**
- * @brief GetSystemInfoRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetSystemInfoRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetSystemInfoRequest class destructor
- **/
- virtual ~GetSystemInfoRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetSystemInfoRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_SYSTEM_INFO_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h b/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h
deleted file mode 100644
index 10e28a839e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h
+++ /dev/null
@@ -1,83 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_SYSTEM_INFO_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_SYSTEM_INFO_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-struct SystemInfo {
- std::string ccpu_version;
- std::string wers_country_code;
- std::string language;
-};
-
-/**
- * @brief GetSystemInfoResponse command class
- **/
-class GetSystemInfoResponse : public ResponseFromHMI {
- public:
- /**
- * @brief GetSystemInfoResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetSystemInfoResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetSystemInfoResponse class destructor
- **/
- virtual ~GetSystemInfoResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- const SystemInfo GetSystemInfo(
- const hmi_apis::Common_Result::eType code) const;
-
- DISALLOW_COPY_AND_ASSIGN(GetSystemInfoResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_SYSTEM_INFO_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h b/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h
deleted file mode 100644
index 1fcc1e626a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h
+++ /dev/null
@@ -1,92 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_URLS_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_URLS_H_
-
-#include "application_manager/commands/hmi/request_from_hmi.h"
-#include "policy/policy_types.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief GetUrls command class
- **/
-class GetUrls : public RequestFromHMI {
- public:
- /**
- * @brief GetUrls class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetUrls(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetUrls class destructor
- **/
- virtual ~GetUrls();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
-#ifdef PROPRIETARY_MODE
- /**
- * @brief Processes URLs collecting for policy service
- * @param endpoints Endpoints section of policy table
- */
- void ProcessPolicyServiceURLs(const policy::EndpointUrls& endpoints);
-#endif // PROPRIETARY_MODE
-
- /**
- * @brief Process URLs collecting for service
- * @param endpoints Endpoints section of policy table
- */
- void ProcessServiceURLs(const policy::EndpointUrls& endpoints);
-
- /**
- * @brief Sends response to HMI
- * @param result Result code
- */
- void SendResponseToHMI(hmi_apis::Common_Result::eType result);
-
- DISALLOW_COPY_AND_ASSIGN(GetUrls);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_URLS_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h b/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h
deleted file mode 100644
index ba058a0ec9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_URLS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_URLS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-class GetUrlsResponse : public ResponseToHMI {
- public:
- /**
- * @brief GetUrlsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetUrlsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetUrlsResponse class destructor
- **/
- virtual ~GetUrlsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetUrlsResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_URLS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h b/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
deleted file mode 100644
index 4989208f7a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief MixingAudioSupportedRequest command class
- **/
-class MixingAudioSupportedRequest : public RequestToHMI {
- public:
- /**
- * @brief MixingAudioSupportedRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- MixingAudioSupportedRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief MixingAudioSupportedRequest class destructor
- **/
- virtual ~MixingAudioSupportedRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MixingAudioSupportedRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h b/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
deleted file mode 100644
index a0cf89f558..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief MixingAudioSupportedResponse command class
- **/
-class MixingAudioSupportedResponse : public ResponseFromHMI {
- public:
- /**
- * @brief MixingAudioSupportedResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- MixingAudioSupportedResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief MixingAudioSupportedResponse class destructor
- **/
- virtual ~MixingAudioSupportedResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MixingAudioSupportedResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
deleted file mode 100644
index 123c0ab0d6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviAlertManeuverRequest command class
- **/
-class NaviAlertManeuverRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviAlertManeuverRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviAlertManeuverRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviAlertManeuverRequest class destructor
- **/
- virtual ~NaviAlertManeuverRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviAlertManeuverRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
deleted file mode 100644
index d4a57e9e2f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviAlertManeuverResponse command class
- **/
-class NaviAlertManeuverResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviAlertManeuverResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviAlertManeuverResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviAlertManeuverResponse class destructor
- **/
- virtual ~NaviAlertManeuverResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviAlertManeuverResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
deleted file mode 100644
index d6f4fd36e2..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
+++ /dev/null
@@ -1,91 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AudioStartStreamRequest command class
- **/
-class AudioStartStreamRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief AudioStartStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AudioStartStreamRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnNaviStartStreamRequest class destructor
- **/
- virtual ~AudioStartStreamRequest();
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- virtual void onTimeOut();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief On event callback
- **/
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @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);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_response.h
deleted file mode 100644
index 485b510bf2..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_response.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AudioStartStreamResponse command class
- **/
-class AudioStartStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AudioStartStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AudioStartStreamResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AudioStartStreamResponse class destructor
- **/
- virtual ~AudioStartStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStartStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_request.h
deleted file mode 100644
index 3a21e3e827..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_request.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AudioStopStreamRequest command class
- **/
-class AudioStopStreamRequest : public RequestToHMI {
- public:
- /**
- * @brief AudioStopStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AudioStopStreamRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviStopStreamRequest class destructor
- **/
- virtual ~AudioStopStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStopStreamRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_response.h
deleted file mode 100644
index ce32d5b627..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_stop_stream_response.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStopStreamResponse command class
- **/
-class AudioStopStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AudioStopStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AudioStopStreamResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnNaviStopStreamResponse class destructor
- **/
- virtual ~AudioStopStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStopStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h
deleted file mode 100644
index 33c5dfe2db..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h
+++ /dev/null
@@ -1,71 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviGetWayPointsRequest command class
- **/
-class NaviGetWayPointsRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviGetWayPointsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviGetWayPointsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- /**
- * @brief NaviGetWayPointsRequest class destructor
- **/
- virtual ~NaviGetWayPointsRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviGetWayPointsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h
deleted file mode 100644
index 633d927715..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviGetWaypoints command class
- **/
-class NaviGetWayPointsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviGetWaypoints class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviGetWayPointsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviGetWaypoints class destructor
- **/
- virtual ~NaviGetWayPointsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviGetWayPointsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
deleted file mode 100644
index 08826743cc..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
+++ /dev/null
@@ -1,79 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviIsReadyRequest command class
- **/
-class NaviIsReadyRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief NaviIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviIsReadyRequest class destructor
- **/
- virtual ~NaviIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
deleted file mode 100644
index 72c001b863..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviIsReadyResponse command class
- **/
-class NaviIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviIsReadyResponse class destructor
- **/
- virtual ~NaviIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h
deleted file mode 100644
index 56a9594c0b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SEND_LOCATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SEND_LOCATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSendLocationRequest command class
- */
-class NaviSendLocationRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviSendLocationRequest class constructor
- *
- * @param message Incoming SmartObject message
- */
- NaviSendLocationRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviSendLocationRequest class destructor
- */
- virtual ~NaviSendLocationRequest();
-
- /**
- * @brief Execute command
- */
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviSendLocationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SEND_LOCATION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h
deleted file mode 100644
index ec3392642a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SEND_LOCATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SEND_LOCATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSendLocationResponse command class
- */
-class NaviSendLocationResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviSendLocationResponse class constructor
- *
- * @param message Incoming SmartObject message
- */
- NaviSendLocationResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviSendLocationResponse class destructor
- */
- virtual ~NaviSendLocationResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviSendLocationResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SEND_LOCATION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_request.h
deleted file mode 100644
index 0788a5595e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_request.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 names of the copyright holders 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_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSetVideoConfigRequest command class
- **/
-class NaviSetVideoConfigRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief NaviSetVideoConfigRequest class constructor
- *
- * @param message Incoming SmartObject message
- * @param application_manager Reference of application manager
- **/
- NaviSetVideoConfigRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviSetVideoConfigRequest class destructor
- **/
- virtual ~NaviSetVideoConfigRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- /**
- * @brief onTimeOut callback
- */
- void onTimeOut() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviSetVideoConfigRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_response.h
deleted file mode 100644
index 3c53687a93..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_set_video_config_response.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 names of the copyright holders 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_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSetVideoConfigResponse command class
- **/
-class NaviSetVideoConfigResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviSetVideoConfigResponse class constructor
- *
- * @param message Incoming SmartObject message
- * @param application_manager Reference of application manager
- **/
- NaviSetVideoConfigResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviSetVideoConfigResponse class destructor
- **/
- virtual ~NaviSetVideoConfigResponse();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviSetVideoConfigResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
deleted file mode 100644
index 4cb8ddd7f7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviShowConstantTBTRequest command class
- **/
-class NaviShowConstantTBTRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviShowConstantTBTRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviShowConstantTBTRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviShowConstantTBTRequest class destructor
- **/
- virtual ~NaviShowConstantTBTRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviShowConstantTBTRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
deleted file mode 100644
index d9e7b1d234..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviShowConstantTBTResponse command class
- **/
-class NaviShowConstantTBTResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviShowConstantTBTResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviShowConstantTBTResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviShowConstantTBTResponse class destructor
- **/
- virtual ~NaviShowConstantTBTResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviShowConstantTBTResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
deleted file mode 100644
index 6fcb3f3267..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
+++ /dev/null
@@ -1,91 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStartStreamRequest command class
- **/
-class NaviStartStreamRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief NaviStartStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviStartStreamRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnNaviStartStreamRequest class destructor
- **/
- virtual ~NaviStartStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief On event callback
- **/
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- virtual void onTimeOut();
-
- /**
- * @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);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h
deleted file mode 100644
index 3e18767194..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStartStreamResponse command class
- **/
-class NaviStartStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviStartStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviStartStreamResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviStartStreamResponse class destructor
- **/
- virtual ~NaviStartStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStartStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h
deleted file mode 100644
index d6952d0305..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStopStreamRequest command class
- **/
-class NaviStopStreamRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviStopStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviStopStreamRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviStopStreamRequest class destructor
- **/
- virtual ~NaviStopStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStopStreamRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h
deleted file mode 100644
index b3107b5e61..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStopStreamResponse command class
- **/
-class NaviStopStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviStopStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviStopStreamResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnNaviStopStreamResponse class destructor
- **/
- virtual ~NaviStopStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStopStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h
deleted file mode 100644
index 33a2077918..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h
+++ /dev/null
@@ -1,71 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSubscribeWayPointsRequest command class
- **/
-class NaviSubscribeWayPointsRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviSubscribeWayPointsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviSubscribeWayPointsRequest(const MessageSharedPtr& messag,
- ApplicationManager& application_manager);
- /**
- * @brief NaviSubscribeWayPointsRequest class destructor
- **/
- virtual ~NaviSubscribeWayPointsRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h
deleted file mode 100644
index eff2b281f2..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSubscribeWaypoints command class
- **/
-class NaviSubscribeWayPointsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviSubscribeWaypoints class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviSubscribeWayPointsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviSubscribeWaypoints class destructor
- **/
- virtual ~NaviSubscribeWayPointsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h
deleted file mode 100644
index 607bb1ef26..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h
+++ /dev/null
@@ -1,71 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviSubscribeWayPointsRequest command class
- **/
-class NaviUnSubscribeWayPointsRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviUnSubscribeWayPointsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviUnSubscribeWayPointsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- /**
- * @brief NaviUnSubscribeWayPointsRequest class destructor
- **/
- virtual ~NaviUnSubscribeWayPointsRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviUnSubscribeWayPointsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h
deleted file mode 100644
index 936814f2fe..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h
+++ /dev/null
@@ -1,72 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviUnSubscribeWaypoints command class
- **/
-class NaviUnsubscribeWayPointsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviUnSubscribeWaypoints class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviUnsubscribeWayPointsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviUnSubscribeWaypoints class destructor
- **/
- virtual ~NaviUnsubscribeWayPointsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviUnsubscribeWayPointsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
deleted file mode 100644
index 830e9358ec..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviUpdateTurnListRequest command class
- **/
-class NaviUpdateTurnListRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviUpdateTurnListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviUpdateTurnListRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviUpdateTurnListRequest class destructor
- **/
- virtual ~NaviUpdateTurnListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviUpdateTurnListRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
deleted file mode 100644
index 93c714b4f4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviUpdateTurnListResponse command class
- **/
-class NaviUpdateTurnListResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviUpdateTurnListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- NaviUpdateTurnListResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief NaviUpdateTurnListResponse class destructor
- **/
- virtual ~NaviUpdateTurnListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviUpdateTurnListResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h
deleted file mode 100644
index ccf3e6d7f3..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h
+++ /dev/null
@@ -1,64 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/HMI_API.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class NotificationFromHMI : public CommandImpl {
- public:
- NotificationFromHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- virtual ~NotificationFromHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendNotificationToMobile(const MessageSharedPtr& message);
- void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject& msg_params) const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NotificationFromHMI);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h
deleted file mode 100644
index dd2db8804a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h
+++ /dev/null
@@ -1,60 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class NotificationToHMI : public CommandImpl {
- public:
- NotificationToHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- virtual ~NotificationToHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendNotification();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NotificationToHMI);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
deleted file mode 100644
index 8d8d2d8eb0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_ALLOW_SDL_FUNCTIONALITY_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_ALLOW_SDL_FUNCTIONALITY_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAllowSDLFunctionalityNotification command class
- **/
-class OnAllowSDLFunctionalityNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAllowSDLFunctionalityNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAllowSDLFunctionalityNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAllowSDLFunctionalityNotification class destructor
- **/
- virtual ~OnAllowSDLFunctionalityNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAllowSDLFunctionalityNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_ALLOW_SDL_FUNCTIONALITY_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
deleted file mode 100644
index 6772d49781..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppActivatedNotification command class
- **/
-class OnAppActivatedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAppActivatedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppActivatedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAppActivatedNotification class destructor
- **/
- virtual ~OnAppActivatedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppActivatedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
deleted file mode 100644
index 687d492a01..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppDeactivatedNotification command class
- **/
-class OnAppDeactivatedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAppDeactivatedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppDeactivatedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAppDeactivatedNotification class destructor
- **/
- virtual ~OnAppDeactivatedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppDeactivatedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
deleted file mode 100644
index 236e1b5071..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_PERMISSION_CHANGED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_PERMISSION_CHANGED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppPermissionChangedNotification command class
- **/
-class OnAppPermissionChangedNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnAppPermissionChangedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppPermissionChangedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAppPermissionChangedNotification class destructor
- **/
- virtual ~OnAppPermissionChangedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppPermissionChangedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_PERMISSION_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
deleted file mode 100644
index 21f96fc055..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_PERMISSION_CONSENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_PERMISSION_CONSENT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppPermissionConsentNotification command class
- **/
-class OnAppPermissionConsentNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAppPermissionConsentNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppPermissionConsentNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAppPermissionConsentNotification class destructor
- **/
- virtual ~OnAppPermissionConsentNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppPermissionConsentNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_PERMISSION_CONSENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
deleted file mode 100644
index 58e92a977a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppRegisteredNotification command class
- **/
-class OnAppRegisteredNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnAppRegisteredNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppRegisteredNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAppRegisteredNotification class destructor
- **/
- virtual ~OnAppRegisteredNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppRegisteredNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
deleted file mode 100644
index f49dac071f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
+++ /dev/null
@@ -1,83 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppUnregisteredNotification command class
- **/
-class OnAppUnregisteredNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnAppUnregisteredNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppUnregisteredNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAppUnregisteredNotification class destructor
- **/
- ~OnAppUnregisteredNotification() FINAL;
-
- /**
- * @brief Init overrides and skips replacement of app id with hmi id since
- * 1) at the moment this notification is being sent there is no application
- * registered in application manager
- * 2) hmi id is already used whenever this message is being constructed, so
- * its already there
- * @return True in any case
- */
- bool Init() FINAL;
-
- /**
- * @brief Execute command
- **/
- virtual void Run() FINAL;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppUnregisteredNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h
deleted file mode 100644
index 13fa41ac22..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAudioDataStreamingNotification command class
- **/
-class OnAudioDataStreamingNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnAudioDataStreamingNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAudioDataStreamingNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAudioDataStreamingNotification class destructor
- **/
- virtual ~OnAudioDataStreamingNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAudioDataStreamingNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
deleted file mode 100644
index f294bce2c8..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnButtonEventNotification command class
- **/
-class OnButtonEventNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnButtonEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnButtonEventNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnButtonEventNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
deleted file mode 100644
index 8936ed8a0f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnButtonPressNotification command class
- **/
-class OnButtonPressNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnButtonPressNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnButtonPressNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnButtonPressNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_button_subscription_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_button_subscription_notification.h
deleted file mode 100644
index d98ba3a90b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_button_subscription_notification.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_SUBSCRIPTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_SUBSCRIPTION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnButtonSubscriptionNotification command class
- **/
-class OnButtonSubscriptionNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnButtonSubscriptionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnButtonSubscriptionNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnButtonSubscriptionNotification class destructor
- **/
- virtual ~OnButtonSubscriptionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnButtonSubscriptionNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_SUBSCRIPTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
deleted file mode 100644
index 5345135583..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnDeviceChosenNotification command class
- **/
-class OnDeviceChosenNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnDeviceChosenNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnDeviceChosenNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnDeviceChosenNotification class destructor
- **/
- virtual ~OnDeviceChosenNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDeviceChosenNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h
deleted file mode 100644
index 62a87f4599..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_STATE_CHANGED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_STATE_CHANGED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnDeviceStateChangedNotification command class
- **/
-class OnDeviceStateChangedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnDeviceStateChangedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnDeviceStateChangedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnDeviceStateChangedNotification class destructor
- **/
- virtual ~OnDeviceStateChangedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDeviceStateChangedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_STATE_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
deleted file mode 100644
index 69d1707bf7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
+++ /dev/null
@@ -1,79 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnDriverDistractionNotification command class
- **/
-class OnDriverDistractionNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnDriverDistractionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnDriverDistractionNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnDriverDistractionNotification class destructor
- **/
- virtual ~OnDriverDistractionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDriverDistractionNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_event_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_event_changed_notification.h
deleted file mode 100644
index cbe301179d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_event_changed_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EVENT_CHANGED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EVENT_CHANGED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnEventChangedNotification command class
- **/
-class OnEventChangedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnEventChangedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnEventChangedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnEventChangedNotification class destructor
- **/
- virtual ~OnEventChangedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnEventChangedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EVENT_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
deleted file mode 100644
index 92ef97a4aa..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
+++ /dev/null
@@ -1,78 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EXIT_ALL_APPLICATIONS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EXIT_ALL_APPLICATIONS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnExitAllApplicationsNotification command class
- **/
-class OnExitAllApplicationsNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnExitAllApplicationsNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnExitAllApplicationsNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnExitAllApplicationsNotification class destructor
- **/
- virtual ~OnExitAllApplicationsNotification();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- private:
- /**
- * @brief Notify's HMI that SDL stored all data required for resumption
- **/
- void SendOnSDLPersistenceComplete();
-
- DISALLOW_COPY_AND_ASSIGN(OnExitAllApplicationsNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EXIT_ALL_APPLICATIONS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
deleted file mode 100644
index bb96a4f14e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EXIT_APPLICATION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EXIT_APPLICATION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnExitApplicationNotification command class
- **/
-class OnExitApplicationNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnExitApplicationNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnExitApplicationNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnExitApplicationNotification class destructor
- **/
- virtual ~OnExitApplicationNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnExitApplicationNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_EXIT_APPLICATION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h
deleted file mode 100644
index 3f1ac17fc4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_FILE_REMOVED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_FILE_REMOVED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnFileRemovedNotification command class
- **/
-class OnFileRemovedNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnFileRemovedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnFileRemovedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnFileRemovedNotification class destructor
- **/
- virtual ~OnFileRemovedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnFileRemovedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_FILE_REMOVED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h b/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
deleted file mode 100644
index 70347cc44f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_FIND_APPLICATIONS_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_FIND_APPLICATIONS_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnFindApplications command class
- **/
-class OnFindApplications : public NotificationFromHMI {
- public:
- /**
- * @brief OnFindApplications class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnFindApplications(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnFindApplications class destructor
- **/
- virtual ~OnFindApplications();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnFindApplications);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_FIND_APPLICATIONS_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
deleted file mode 100644
index acb1ff31ac..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_IGNITION_CYCLE_OVER_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_IGNITION_CYCLE_OVER_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnIgnitionCycleOverNotification command class
- **/
-class OnIgnitionCycleOverNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnIgnitionCycleOverNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnIgnitionCycleOverNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnIgnitionCycleOverNotification class destructor
- **/
- virtual ~OnIgnitionCycleOverNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnIgnitionCycleOverNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_IGNITION_CYCLE_OVER_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
deleted file mode 100644
index 0150853546..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnNaviTBTClientStateNotification command class
- **/
-class OnNaviTBTClientStateNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnNaviTBTClientStateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnNaviTBTClientStateNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnNaviTBTClientStateNotification class destructor
- **/
- virtual ~OnNaviTBTClientStateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnNaviTBTClientStateNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h
deleted file mode 100644
index d304685008..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnNaviWayPointChangeNotification command class
- **/
-class OnNaviWayPointChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnNaviWayPointChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnNaviWayPointChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& app_man);
-
- /**
- * @brief OnNaviWayPointChangeNotification class destructor
- **/
- virtual ~OnNaviWayPointChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnNaviWayPointChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h b/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h
deleted file mode 100644
index 5569131c2b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h
+++ /dev/null
@@ -1,67 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_POLICY_UPDATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_POLICY_UPDATE_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-class OnPolicyUpdate : public NotificationFromHMI {
- public:
- /**
- * @brief OnPolicyUpdate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnPolicyUpdate(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnPolicyUpdate class destructor
- **/
- virtual ~OnPolicyUpdate();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnPolicyUpdate);
-};
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_POLICY_UPDATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h
deleted file mode 100644
index 809623fda0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_PUT_FILE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_PUT_FILE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnPutFileNotification command class
- **/
-class OnPutFileNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnPutFileNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnPutFileNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnPutFileNotification class destructor
- **/
- virtual ~OnPutFileNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnPutFileNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_PUT_FILE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
deleted file mode 100644
index 7df1bf5ac0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnReadyNotification command class
- **/
-class OnReadyNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnReadyNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnReadyNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnReadyNotification class destructor
- **/
- virtual ~OnReadyNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnReadyNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h b/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h
deleted file mode 100644
index cec707b44f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h
+++ /dev/null
@@ -1,70 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RECEIVED_POLICY_UPDATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RECEIVED_POLICY_UPDATE_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class OnReceivedPolicyUpdate : public NotificationFromHMI {
- public:
- /**
- * @brief OnReceivedPolicyUpdate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnReceivedPolicyUpdate(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnReceivedPolicyUpdate class destructor
- **/
- ~OnReceivedPolicyUpdate() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnReceivedPolicyUpdate);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RECEIVED_POLICY_UPDATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h
deleted file mode 100644
index fbb8a0522a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RECORD_START_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RECORD_START_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnRecordStartdNotification command class
- **/
-class OnRecordStartdNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnRecordStartdNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnRecordStartdNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnRecordStartdNotification class destructor
- **/
- virtual ~OnRecordStartdNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnRecordStartdNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RECORD_START_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
deleted file mode 100644
index 764ee6d180..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
+++ /dev/null
@@ -1,74 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RESUME_AUDIO_SOURCE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RESUME_AUDIO_SOURCE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnResumeAudioSourceNotification command class
- **/
-class OnResumeAudioSourceNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnResumeAudioSourceNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnResumeAudioSourceNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnResumeAudioSourceNotification class destructor
- **/
- virtual ~OnResumeAudioSourceNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnResumeAudioSourceNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_RESUME_AUDIO_SOURCE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
deleted file mode 100644
index ef1d289ca7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSDLCloseNotification command class
- **/
-class OnSDLCloseNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnSDLCloseNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSDLCloseNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSdlCloseNotification class destructor
- **/
- virtual ~OnSDLCloseNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSDLCloseNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
deleted file mode 100644
index 5b0f4a1667..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CONSENT_NEEDED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CONSENT_NEEDED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSDLConsentNeededNotification command class
- **/
-class OnSDLConsentNeededNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnSDLConsentNeededNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSDLConsentNeededNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSDLConsentNeededNotification class destructor
- **/
- virtual ~OnSDLConsentNeededNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSDLConsentNeededNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CONSENT_NEEDED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
deleted file mode 100644
index 1d91faece6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_PERSISTENCE_COMPLETE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_PERSISTENCE_COMPLETE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSDLPersistenceCompleteNotification command class
- **/
-class OnSDLPersistenceCompleteNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnSDLPersistenceCompleteNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSDLPersistenceCompleteNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSDLPersistenceCompleteNotification class destructor
- **/
- virtual ~OnSDLPersistenceCompleteNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSDLPersistenceCompleteNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_PERSISTENCE_COMPLETE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h b/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
deleted file mode 100644
index 2e523924db..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_START_DEVICE_DISCOVERY_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_START_DEVICE_DISCOVERY_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnStartDeviceDiscovery command class
- **/
-class OnStartDeviceDiscovery : public NotificationFromHMI {
- public:
- /**
- * @brief OnStartDeviceDiscovery class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnStartDeviceDiscovery(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnStartDeviceDiscovery class destructor
- **/
- virtual ~OnStartDeviceDiscovery();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnStartDeviceDiscovery);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_START_DEVICE_DISCOVERY_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h
deleted file mode 100644
index 05cb5a4931..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_STATUS_UPDATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_STATUS_UPDATE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnGetStatusUpdateNotification command class
- **/
-class OnStatusUpdateNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnGetStatusUpdateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnStatusUpdateNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnGetStatusUpdateNotification class destructor
- **/
- virtual ~OnStatusUpdateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnStatusUpdateNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_STATUS_UPDATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
deleted file mode 100644
index 9008a20cc9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
+++ /dev/null
@@ -1,75 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile_api = mobile_apis;
-/**
- * @brief OnSystemContextNotification command class
- **/
-class OnSystemContextNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnSystemContextNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSystemContextNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSystemContextNotification class destructor
- **/
- virtual ~OnSystemContextNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSystemContextNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h
deleted file mode 100644
index 1e65b15c20..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_ERROR_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_ERROR_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSystemErrorNotification command class
- **/
-class OnSystemErrorNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnSystemErrorNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSystemErrorNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSystemErrorNotification class destructor
- **/
- virtual ~OnSystemErrorNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSystemErrorNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_ERROR_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h
deleted file mode 100644
index 1c2bf0266f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_INFO_CHANGED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_INFO_CHANGED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSystemInfoChangedNotification command class
- **/
-class OnSystemInfoChangedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnSystemInfoChangedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSystemInfoChangedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSystemInfoChangedNotification class destructor
- **/
- virtual ~OnSystemInfoChangedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSystemInfoChangedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_INFO_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
deleted file mode 100644
index 8e4db24822..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSystemRequestNotification command class
- **/
-class OnSystemRequestNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnSystemRequestNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSystemRequestNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSystemRequestNotification class destructor
- **/
- virtual ~OnSystemRequestNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSystemRequestNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
deleted file mode 100644
index 245dc32386..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTTSLanguageChangeNotification command class
- **/
-class OnTTSLanguageChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSLanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnTTSLanguageChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnTTSLanguageChangeNotification class destructor
- **/
- virtual ~OnTTSLanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSLanguageChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
deleted file mode 100644
index be84a93215..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_RESET_TIMEOUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_RESET_TIMEOUT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnTTSResetTimeoutNotification command class
- **/
-class OnTTSResetTimeoutNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSResetTimeoutNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnTTSResetTimeoutNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnTTSResetTimeoutNotification class destructor
- **/
- virtual ~OnTTSResetTimeoutNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSResetTimeoutNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_RESET_TIMEOUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
deleted file mode 100644
index 234d8036eb..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTTSStartedNotification command class
- **/
-class OnTTSStartedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSStartedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnTTSStartedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnTTSStartedNotification class destructor
- **/
- virtual ~OnTTSStartedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSStartedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
deleted file mode 100644
index 4e058fde64..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTTSStoppedNotification command class
- **/
-class OnTTSStoppedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSStoppedNotification class constructor
- *
- * @param message Incoming SmartObject OnTTSStartedNotificationmessage
- **/
- OnTTSStoppedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnTTSStoppedNotification class destructor
- **/
- virtual ~OnTTSStoppedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSStoppedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
deleted file mode 100644
index 618bc13017..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnUICommandNotification command class
- **/
-class OnUICommandNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUICommandNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnUICommandNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnUICommandNotification class destructor
- **/
- virtual ~OnUICommandNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUICommandNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
deleted file mode 100644
index 6e881dc94a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
+++ /dev/null
@@ -1,78 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnUIKeyBoardInputNotification command class
- **/
-class OnUIKeyBoardInputNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUIKeyBoardInputNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnUIKeyBoardInputNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnUIKeyBoardInputNotification class destructor
- **/
- virtual ~OnUIKeyBoardInputNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUIKeyBoardInputNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
deleted file mode 100644
index cc8cd1eb0e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnUILanguageChangeNotification command class
- **/
-class OnUILanguageChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUILanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnUILanguageChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnUILanguageChangeNotification class destructor
- **/
- virtual ~OnUILanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUILanguageChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
deleted file mode 100644
index f5dd173998..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnUIResetTimeoutNotification command class
- **/
-class OnUIResetTimeoutNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUIResetTimeoutNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnUIResetTimeoutNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnUIResetTimeoutNotification class destructor
- **/
- virtual ~OnUIResetTimeoutNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUIResetTimeoutNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
deleted file mode 100644
index 9e9384fffe..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
+++ /dev/null
@@ -1,78 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnUITouchEventNotification command class
- **/
-class OnUITouchEventNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUITouchEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnUITouchEventNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnUITouchEventNotification class destructor
- **/
- virtual ~OnUITouchEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUITouchEventNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h b/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
deleted file mode 100644
index ee53445606..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UPDATE_DEVICE_LIST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UPDATE_DEVICE_LIST_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnUpdateDeviceList command class
- **/
-class OnUpdateDeviceList : public NotificationFromHMI {
- public:
- /**
- * @brief OnUpdateDeviceList class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnUpdateDeviceList(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnUpdateDeviceList class destructor
- **/
- virtual ~OnUpdateDeviceList();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUpdateDeviceList);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UPDATE_DEVICE_LIST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
deleted file mode 100644
index 9c5a8cd955..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIAccPedalPositionNotification command class
- **/
-class OnVIAccPedalPositionNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIAccPedalPositionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIAccPedalPositionNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIAccPedalPositionNotification class destructor
- **/
- virtual ~OnVIAccPedalPositionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIAccPedalPositionNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
deleted file mode 100644
index c4f92269bb..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIBeltStatusNotification command class
- **/
-class OnVIBeltStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIBeltStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIBeltStatusNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIBeltStatusNotification class destructor
- **/
- virtual ~OnVIBeltStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIBeltStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
deleted file mode 100644
index 9d9854c50b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIBodyInformationNotification command class
- **/
-class OnVIBodyInformationNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIBodyInformationNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIBodyInformationNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIBodyInformationNotification class destructor
- **/
- virtual ~OnVIBodyInformationNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIBodyInformationNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
deleted file mode 100644
index c31ee1f209..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIDeviceStatusNotification command class
- **/
-class OnVIDeviceStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIDeviceStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIDeviceStatusNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIDeviceStatusNotification class destructor
- **/
- virtual ~OnVIDeviceStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIDeviceStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
deleted file mode 100644
index 108f02b5a4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIDriverBrakingNotification command class
- **/
-class OnVIDriverBrakingNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIDriverBrakingNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIDriverBrakingNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIDriverBrakingNotification class destructor
- **/
- virtual ~OnVIDriverBrakingNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIDriverBrakingNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
deleted file mode 100644
index bbd13963aa..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIEngineTorqueNotification command class
- **/
-class OnVIEngineTorqueNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIEngineTorqueNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIEngineTorqueNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIEngineTorqueNotification class destructor
- **/
- virtual ~OnVIEngineTorqueNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIEngineTorqueNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
deleted file mode 100644
index b996febacf..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIExternalTemperatureNotification command class
- **/
-class OnVIExternalTemperatureNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIExternalTemperatureNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIExternalTemperatureNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIExternalTemperatureNotification class destructor
- **/
- virtual ~OnVIExternalTemperatureNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIExternalTemperatureNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
deleted file mode 100644
index 9c30b6c32c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIFuelLevelNotification command class
- **/
-class OnVIFuelLevelNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIFuelLevelNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIFuelLevelNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIFuelLevelNotification class destructor
- **/
- virtual ~OnVIFuelLevelNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIFuelLevelNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
deleted file mode 100644
index 53b6ea209f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIFuelLevelStateNotification command class
- **/
-class OnVIFuelLevelStateNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIFuelLevelStateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIFuelLevelStateNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIFuelLevelStateNotification class destructor
- **/
- virtual ~OnVIFuelLevelStateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIFuelLevelStateNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
deleted file mode 100644
index 579344b538..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIGpsDataNotification command class
- **/
-class OnVIGpsDataNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIGpsDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIGpsDataNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIGpsDataNotification class destructor
- **/
- virtual ~OnVIGpsDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIGpsDataNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
deleted file mode 100644
index 5fd3be85a4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIHeadLampStatusNotification command class
- **/
-class OnVIHeadLampStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIHeadLampStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIHeadLampStatusNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIHeadLampStatusNotification class destructor
- **/
- virtual ~OnVIHeadLampStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIHeadLampStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
deleted file mode 100644
index ee82b1397f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIInstantFuelConsumptionNotification command class
- **/
-class OnVIInstantFuelConsumptionNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIInstantFuelConsumptionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIInstantFuelConsumptionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager);
-
- /**
- * @brief OnVIInstantFuelConsumptionNotification class destructor
- **/
- virtual ~OnVIInstantFuelConsumptionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIInstantFuelConsumptionNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
deleted file mode 100644
index 364e42081c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIMyKeyNotification command class
- **/
-class OnVIMyKeyNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIMyKeyNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIMyKeyNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIMyKeyNotification class destructor
- **/
- virtual ~OnVIMyKeyNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIMyKeyNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
deleted file mode 100644
index 7d93530f04..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIOdometerNotification command class
- **/
-class OnVIOdometerNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIOdometerNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIOdometerNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIOdometerNotification class destructor
- **/
- virtual ~OnVIOdometerNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIOdometerNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
deleted file mode 100644
index c09220d2a6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIPrndlNotification command class
- **/
-class OnVIPrndlNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIPrndlNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIPrndlNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIPrndlNotification class destructor
- **/
- virtual ~OnVIPrndlNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIPrndlNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
deleted file mode 100644
index d05e1221df..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIRpmNotification command class
- **/
-class OnVIRpmNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIRpmNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIRpmNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIRpmNotification class destructor
- **/
- virtual ~OnVIRpmNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIRpmNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
deleted file mode 100644
index b1908cde28..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVISpeedNotification command class
- **/
-class OnVISpeedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVISpeedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVISpeedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVISpeedNotification class destructor
- **/
- virtual ~OnVISpeedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVISpeedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
deleted file mode 100644
index 28f78ac4d5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVISteeringWheelAngleNotification command class
- **/
-class OnVISteeringWheelAngleNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVISteeringWheelAngleNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVISteeringWheelAngleNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVISteeringWheelAngleNotification class destructor
- **/
- virtual ~OnVISteeringWheelAngleNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVISteeringWheelAngleNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
deleted file mode 100644
index eef4f0e4a4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVITirePressureNotification command class
- **/
-class OnVITirePressureNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVITirePressureNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVITirePressureNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVITirePressureNotification class destructor
- **/
- virtual ~OnVITirePressureNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVITirePressureNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
deleted file mode 100644
index 2422c47813..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
+++ /dev/null
@@ -1,75 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIVehicleDataNotification command class
- * Sent by HMI for the periodic and non periodic vehicle data
- **/
-class OnVIVehicleDataNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIVehicleDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIVehicleDataNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIVehicleDataNotification class destructor
- **/
- virtual ~OnVIVehicleDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIVehicleDataNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
deleted file mode 100644
index 4ea04fbb0d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIVinNotification command class
- **/
-class OnVIVinNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIVinNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIVinNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIVinNotification class destructor
- **/
- virtual ~OnVIVinNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIVinNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
deleted file mode 100644
index 2b57ef1dd3..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIWiperStatusNotification command class
- **/
-class OnVIWiperStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIWiperStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVIWiperStatusNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVIWiperStatusNotification class destructor
- **/
- virtual ~OnVIWiperStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIWiperStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h
deleted file mode 100644
index 81493a0a33..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVideoDataStreamingNotification command class
- **/
-class OnVideoDataStreamingNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnVideoDataStreamingNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVideoDataStreamingNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVideoDataStreamingNotification class destructor
- **/
- virtual ~OnVideoDataStreamingNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVideoDataStreamingNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
deleted file mode 100644
index fa85ba8468..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRCommandNotification command class
- **/
-class OnVRCommandNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRCommandNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVRCommandNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVRCommandNotification class destructor
- **/
- virtual ~OnVRCommandNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRCommandNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
deleted file mode 100644
index d0f86e5f83..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRLanguageChangeNotification command class
- **/
-class OnVRLanguageChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRLanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVRLanguageChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVRLanguageChangeNotification class destructor
- **/
- virtual ~OnVRLanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRLanguageChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
deleted file mode 100644
index f142fcc25c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRStartedNotification command class
- **/
-class OnVRStartedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRStartedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVRStartedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVRStartedNotification class destructor
- **/
- virtual ~OnVRStartedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRStartedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
deleted file mode 100644
index d1dbcc91cd..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRStoppedNotification command class
- **/
-class OnVRStoppedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRStoppedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVRStoppedNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVRStoppedNotification class destructor
- **/
- virtual ~OnVRStoppedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRStoppedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_request.h
deleted file mode 100644
index 58654d81d9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief RCGetCapabilitiesRequest command class
- **/
-class RCGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief RCGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- RCGetCapabilitiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief RCGetCapabilitiesRequest class destructor
- **/
- virtual ~RCGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RCGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_response.h
deleted file mode 100644
index 006f38cbb5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/rc_get_capabilities_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief RCGetCapabilitiesResponse command class
- **/
-class RCGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief RCGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- RCGetCapabilitiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief RCGetCapabilitiesResponse class destructor
- **/
- virtual ~RCGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RCGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_GET_CAPABILITIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_request.h
deleted file mode 100644
index 40e05c2b1f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_request.h
+++ /dev/null
@@ -1,90 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief RCIsReadyRequest command class
- **/
-class RCIsReadyRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief RCIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- RCIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief RCIsReadyRequest class destructor
- **/
- virtual ~RCIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- void onTimeOut() OVERRIDE;
-
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RCIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_response.h
deleted file mode 100644
index 547b89a30d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/rc_is_ready_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief RCIsReadyResponse command class
- **/
-class RCIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief RCIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- RCIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief RCIsReadyResponse class destructor
- **/
- virtual ~RCIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RCIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RC_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h
deleted file mode 100644
index 628d3257d9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h
+++ /dev/null
@@ -1,97 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_FROM_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_FROM_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/HMI_API.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
-
-class RequestFromHMI : public CommandImpl, public event_engine::EventObserver {
- public:
- RequestFromHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- virtual ~RequestFromHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- virtual void on_event(const event_engine::Event& event);
- /**
- * @brief SendResponse allows to send response to hmi
- * @param correlation_id the correlation id for the rfesponse.
- * @param function_id the function id for which response will be sent
- * @param result_code the result code.
- */
- void SendResponse(const bool success,
- const uint32_t correlation_id,
- const hmi_apis::FunctionID::eType function_id,
- const hmi_apis::Common_Result::eType result_code);
-
- /**
- * @brief SendResponse allows to send error response to hmi
- * @param correlation_id the correlation id for the response.
- * @param function_id the function id for which response will be sent
- * @param result_code the result code.
- * @param error_message info message for error.
- */
- void SendErrorResponse(const uint32_t correlation_id,
- const hmi_apis::FunctionID::eType function_id,
- const hmi_apis::Common_Result::eType result_code,
- const std::string error_message);
-
- private:
- /**
- * @brief Fills common parameters for SO
- * @param message Contains SO for filling
- * @param correlation_id the correlation id for the response.
- * @param function_id the function id for which response will be sent
- */
- void FillCommonParametersOfSO(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& message,
- const uint32_t correlation_id,
- const hmi_apis::FunctionID::eType function_id);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RequestFromHMI);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_FROM_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
deleted file mode 100644
index b30044fd26..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
+++ /dev/null
@@ -1,89 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_TO_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_TO_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Check if HMI's interface is available.
- * @param application_manager contains application manager component
- * @param interface contains name of HMI's interface
- * @return true if interface is available otherwise return fasle.
- */
-bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
- HmiInterfaces::InterfaceID interface);
-
-/**
- * @brief Change interface state
- * @param application_manager contains ApplicationManager instance
- * @param response_from_hmi contains response from HMI
- * @param interface contanins InterfaceID whose state is changed.
- * @return true if field available exist and contains true in response params
- * otherwise return false.
- */
-bool ChangeInterfaceState(ApplicationManager& application_manager,
- const smart_objects::SmartObject& response_from_hmi,
- HmiInterfaces::InterfaceID interface);
-
-class RequestToHMI : public CommandImpl {
- public:
- RequestToHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- virtual ~RequestToHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendRequest();
-
- /*
- * @brief Retrieves application ID
- */
- inline uint32_t application_id() const {
- return (*message_)[strings::msg_params][strings::app_id].asUInt();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RequestToHMI);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_TO_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
deleted file mode 100644
index 05fd23adf0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
+++ /dev/null
@@ -1,72 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_FROM_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_FROM_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/application_manager.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class ResponseFromHMI : public CommandImpl {
- public:
- ResponseFromHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- virtual ~ResponseFromHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendResponseToMobile(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /*
- * @brief Creates HMI request
- *
- * @param function_id HMI request ID
- * @param msg_params HMI request msg params
- */
- void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject& msg_params) const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResponseFromHMI);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_FROM_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/response_to_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/response_to_hmi.h
deleted file mode 100644
index 1dd0657815..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/response_to_hmi.h
+++ /dev/null
@@ -1,63 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_TO_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_TO_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/HMI_API.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
-
-class ResponseToHMI : public CommandImpl {
- public:
- ResponseToHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
- virtual ~ResponseToHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResponseToHMI);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_TO_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h
deleted file mode 100644
index 9ce15a0970..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h
+++ /dev/null
@@ -1,110 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_ACTIVATE_APP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_ACTIVATE_APP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLActivateAppRequest command class
- **/
-class SDLActivateAppRequest : public RequestFromHMI {
- public:
- /**
- * @brief Applications registered over protocol v4
- */
- typedef std::vector<application_manager::ApplicationSharedPtr> V4ProtoApps;
-
- /**
- * @brief SDLActivateAppRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLActivateAppRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLActivateAppRequest class destructor
- **/
- ~SDLActivateAppRequest() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief onTimeOut allows to process case when timeout has appeared
- * during request execution.
- */
- void onTimeOut() OVERRIDE;
-
- /**
- * @brief on_event allows to handle events
- *
- * @param event event type that current request subscribed on.
- */
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- private:
- uint32_t app_id() const;
- uint32_t hmi_app_id(const smart_objects::SmartObject& so) const;
-
- /**
- * @brief Retrieves all v4 protocol applications for particular device
- * @param handle Device handle
- * @return List of applications registered over v4 protocol
- */
- V4ProtoApps get_v4_proto_apps(
- const connection_handler::DeviceHandle handle) const;
-
- /**
- * @brief Get v4 protocol application reported as forgrounded on device
- * @param handle Device
- * @return Pointer to application or empty pointer
- */
- ApplicationSharedPtr get_foreground_app(
- const connection_handler::DeviceHandle handle) const;
-
- DISALLOW_COPY_AND_ASSIGN(SDLActivateAppRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_ACTIVATE_APP_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h
deleted file mode 100644
index 50bc319569..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_ACTIVATE_APP_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_ACTIVATE_APP_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLActivateAppResponse command class
- **/
-class SDLActivateAppResponse : public ResponseToHMI {
- public:
- /**
- * @brief SDLActivateAppResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLActivateAppResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLActivateAppResponse class destructor
- **/
- virtual ~SDLActivateAppResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLActivateAppResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_ACTIVATE_APP_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
deleted file mode 100644
index 69e4ec227c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLGetListOfPermissionsRequest command class
- **/
-class SDLGetListOfPermissionsRequest : public RequestFromHMI {
- public:
- /**
- * @brief SDLGetListOfPermissionsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLGetListOfPermissionsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLGetListOfPermissionsRequest class destructor
- **/
- virtual ~SDLGetListOfPermissionsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLGetListOfPermissionsRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
deleted file mode 100644
index b82f16e113..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLGetListOfPermissionsResponse command class
- **/
-class SDLGetListOfPermissionsResponse : public ResponseToHMI {
- public:
- /**
- * @brief SDLGetListOfPermissionsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLGetListOfPermissionsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLGetListOfPermissionsResponse class destructor
- **/
- virtual ~SDLGetListOfPermissionsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLGetListOfPermissionsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h
deleted file mode 100644
index 4f5ce887bd..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLGetStatusUpdateRequest command class
- **/
-class SDLGetStatusUpdateRequest : public RequestFromHMI {
- public:
- /**
- * @brief SDLGetStatusUpdateRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLGetStatusUpdateRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLGetStatusUpdateRequest class destructor
- **/
- virtual ~SDLGetStatusUpdateRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLGetStatusUpdateRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h
deleted file mode 100644
index f8aeb6135f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLGetStatusUpdateResponse command class
- **/
-class SDLGetStatusUpdateResponse : public ResponseToHMI {
- public:
- /**
- * @brief SDLGetStatusUpdateResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLGetStatusUpdateResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLGetStatusUpdateResponse class destructor
- **/
- virtual ~SDLGetStatusUpdateResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLGetStatusUpdateResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
deleted file mode 100644
index 9837e6af09..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLGetUserFriendlyMessageRequest command class
- **/
-class SDLGetUserFriendlyMessageRequest : public RequestFromHMI {
- public:
- /**
- * @brief SDLGetUserFriendlyMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLGetUserFriendlyMessageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLGetUserFriendlyMessageRequest class destructor
- **/
- virtual ~SDLGetUserFriendlyMessageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLGetUserFriendlyMessageRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
deleted file mode 100644
index bb2fba8433..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SDLGetUserFriendlyMessageResponse command class
- **/
-class SDLGetUserFriendlyMessageResponse : public ResponseToHMI {
- public:
- /**
- * @brief SDLGetUserFriendlyMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLGetUserFriendlyMessageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLGetUserFriendlyMessageResponse class destructor
- **/
- virtual ~SDLGetUserFriendlyMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLGetUserFriendlyMessageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h
deleted file mode 100644
index 99b627431c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h
+++ /dev/null
@@ -1,67 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_POLICY_UPDATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_POLICY_UPDATE_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class SDLPolicyUpdate : public RequestToHMI {
- public:
- /**
- * @brief SDLPolicyUpdate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLPolicyUpdate(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- ~SDLPolicyUpdate() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLPolicyUpdate);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_POLICY_UPDATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h
deleted file mode 100644
index 12850f4b8a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h
+++ /dev/null
@@ -1,70 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_POLICY_UPDATE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_POLICY_UPDATE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class SDLPolicyUpdateResponse : public ResponseFromHMI {
- public:
- /**
- * @brief SDLPolicyUpdateResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SDLPolicyUpdateResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SDLPolicyUpdateResponse class destructor
- **/
- virtual ~SDLPolicyUpdateResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SDLPolicyUpdateResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_SDL_POLICY_UPDATE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
deleted file mode 100644
index 0f36e82b44..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSChangeRegistrationRequest command class
- **/
-class TTSChangeRegistrationRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSChangeRegistrationRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSChangeRegistrationRequest class destructor
- **/
- virtual ~TTSChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSChangeRegistrationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
deleted file mode 100644
index ca9c114156..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSChangeRegistratioResponse command class
- **/
-class TTSChangeRegistratioResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSChangeRegistratioResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSChangeRegistratioResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSChangeRegistratioResponse class destructor
- **/
- virtual ~TTSChangeRegistratioResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSChangeRegistratioResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
deleted file mode 100644
index bea41b7371..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetCapabilitiesRequest command class
- **/
-class TTSGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSGetCapabilitiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSGetCapabilitiesRequest class destructor
- **/
- virtual ~TTSGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
deleted file mode 100644
index a70ee2b33b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetCapabilitiesResponse command class
- **/
-class TTSGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSGetCapabilitiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSGetCapabilitiesResponse class destructor
- **/
- virtual ~TTSGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
deleted file mode 100644
index 627cf3da06..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetLanguageRequest command class
- **/
-class TTSGetLanguageRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSGetLanguageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSGetLanguageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSGetLanguageRequest class destructor
- **/
- virtual ~TTSGetLanguageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
deleted file mode 100644
index f44492a6ed..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetLanguageResponse command class
- **/
-class TTSGetLanguageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSGetLanguageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSGetLanguageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSGetLanguageResponse class destructor
- **/
- virtual ~TTSGetLanguageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
deleted file mode 100644
index 9500d54eea..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetSupportedLanguagesRequest command class
- **/
-class TTSGetSupportedLanguagesRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSGetSupportedLanguagesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSGetSupportedLanguagesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSGetSupportedLanguagesRequest class destructor
- **/
- virtual ~TTSGetSupportedLanguagesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
deleted file mode 100644
index 1bc569ebb8..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetSupportedLanguagesResponse command class
- **/
-class TTSGetSupportedLanguagesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSGetSupportedLanguagesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSGetSupportedLanguagesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSGetSupportedLanguagesResponse class destructor
- **/
- virtual ~TTSGetSupportedLanguagesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
deleted file mode 100644
index 340a00d294..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
+++ /dev/null
@@ -1,89 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSIsReadyRequest command class
- **/
-class TTSIsReadyRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief TTSIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSIsReadyRequest class destructor
- **/
- virtual ~TTSIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- void onTimeOut() OVERRIDE;
-
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
deleted file mode 100644
index 833d3d0a82..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSIsReadyResponse command class
- **/
-class TTSIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSIsReadyResponse class destructor
- **/
- virtual ~TTSIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
deleted file mode 100644
index b18e372b3e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSetGlobalPropertiesRequest command class
- **/
-class TTSSetGlobalPropertiesRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSSetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSSetGlobalPropertiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSSetGlobalPropertiesRequest class destructor
- **/
- virtual ~TTSSetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
deleted file mode 100644
index aa7c85eece..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSetGlobalPropertiesResponse command class
- **/
-class TTSSetGlobalPropertiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSSetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSSetGlobalPropertiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSSetGlobalPropertiesResponse class destructor
- **/
- virtual ~TTSSetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
deleted file mode 100644
index 87384beedf..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSpeakRequest command class
- **/
-class TTSSpeakRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSSpeakRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSSpeakRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSSpeakRequest class destructor
- **/
- virtual ~TTSSpeakRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSpeakRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
deleted file mode 100644
index 9f15afb33b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSpeakResponse command class
- **/
-class TTSSpeakResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSSpeakResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSSpeakResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSSpeakResponse class destructor
- **/
- virtual ~TTSSpeakResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSpeakResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
deleted file mode 100644
index c51daee84d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSStopSpeakingRequest command class
- **/
-class TTSStopSpeakingRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSStopSpeakingRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSStopSpeakingRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSStopSpeakingRequest class destructor
- **/
- virtual ~TTSStopSpeakingRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSStopSpeakingRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
deleted file mode 100644
index a23889a733..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSStopSpeakingResponse command class
- **/
-class TTSStopSpeakingResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSStopSpeakingResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- TTSStopSpeakingResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSStopSpeakingResponse class destructor
- **/
- virtual ~TTSStopSpeakingResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSStopSpeakingResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
deleted file mode 100644
index 294fd11912..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddCommandRequest command class
- **/
-class UIAddCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief UIAddCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIAddCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIAddCommandRequest class destructor
- **/
- virtual ~UIAddCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
deleted file mode 100644
index ed48e13322..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddCommandResponse command class
- **/
-class UIAddCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIAddCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIAddCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIAddCommandResponse class destructor
- **/
- virtual ~UIAddCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
deleted file mode 100644
index 96fa0557ae..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddSubmenuRequest command class
- **/
-class UIAddSubmenuRequest : public RequestToHMI {
- public:
- /**
- * @brief UIAddSubmenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIAddSubmenuRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIAddSubmenuRequest class destructor
- **/
- virtual ~UIAddSubmenuRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
deleted file mode 100644
index 62abf10b60..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddSubmenuResponse command class
- **/
-class UIAddSubmenuResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIAddSubmenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIAddSubmenuResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIAddSubmenuResponse class destructor
- **/
- virtual ~UIAddSubmenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
deleted file mode 100644
index 123246e596..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAlertRequest command class
- **/
-class UIAlertRequest : public RequestToHMI {
- public:
- /**
- * @brief UIAlertRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIAlertRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIAlertRequest class destructor
- **/
- virtual ~UIAlertRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAlertRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
deleted file mode 100644
index db48699a23..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAlertResponse command class
- **/
-class UIAlertResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIAlertResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIAlertResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIAlertResponse class destructor
- **/
- virtual ~UIAlertResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAlertResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
deleted file mode 100644
index 744ed82cad..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIChangeRegistrationRequest command class
- **/
-class UIChangeRegistrationRequest : public RequestToHMI {
- public:
- /**
- * @brief UIChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIChangeRegistrationRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIChangeRegistrationRequest class destructor
- **/
- virtual ~UIChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIChangeRegistrationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
deleted file mode 100644
index 57814b9acf..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIChangeRegistratioResponse command class
- **/
-class UIChangeRegistratioResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIChangeRegistratioResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIChangeRegistratioResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIChangeRegistratioResponse class destructor
- **/
- virtual ~UIChangeRegistratioResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIChangeRegistratioResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
deleted file mode 100644
index 21a4c6dd42..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIDeleteCommandRequest command class
- **/
-class UIDeleteCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief UIDeleteCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIDeleteCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIDeleteCommandRequest class destructor
- **/
- virtual ~UIDeleteCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
deleted file mode 100644
index c9baba728f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIDeleteCommandResponse command class
- **/
-class UIDeleteCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIDeleteCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIDeleteCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIDeleteCommandResponse class destructor
- **/
- virtual ~UIDeleteCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
deleted file mode 100644
index d238e39a10..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddSubmenuRequest command class
- **/
-class UIDeleteSubmenuRequest : public RequestToHMI {
- public:
- /**
- * @brief UIDeleteSubmenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIDeleteSubmenuRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIDeleteSubmenuRequest class destructor
- **/
- virtual ~UIDeleteSubmenuRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteSubmenuRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
deleted file mode 100644
index 36d7bee528..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIDeleteSubmenuResponse command class
- **/
-class UIDeleteSubmenuResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIDeleteSubmenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIDeleteSubmenuResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIDeleteSubmenuResponse class destructor
- **/
- virtual ~UIDeleteSubmenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteSubmenuResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
deleted file mode 100644
index d8bd10a9ca..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIEndAudioPassThruRequest command class
- * When this request is invoked, the audio capture stops
- **/
-class UIEndAudioPassThruRequest : public RequestToHMI {
- public:
- /**
- * @brief UIEndAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIEndAudioPassThruRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIEndAudioPassThruRequest class destructor
- **/
- virtual ~UIEndAudioPassThruRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIEndAudioPassThruRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
deleted file mode 100644
index c2a373d8c0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIEndAudioPassThruResponse command class
- **/
-class UIEndAudioPassThruResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIEndAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIEndAudioPassThruResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIEndAudioPassThruResponse class destructor
- **/
- virtual ~UIEndAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIEndAudioPassThruResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
deleted file mode 100644
index cffba5ca42..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetCapabilitiesRequest command class
- **/
-class UIGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief UIGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIGetCapabilitiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIGetCapabilitiesRequest class destructor
- **/
- virtual ~UIGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
deleted file mode 100644
index 525dd7ad9d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetCapabilitiesResponse command class
- **/
-class UIGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIGetCapabilitiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIGetCapabilitiesResponse class destructor
- **/
- virtual ~UIGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
deleted file mode 100644
index 4bf8e11d7e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetLanguageRequest command class
- **/
-class UIGetLanguageRequest : public RequestToHMI {
- public:
- /**
- * @brief UIGetLanguageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIGetLanguageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIGetLanguageRequest class destructor
- **/
- virtual ~UIGetLanguageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetLanguageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
deleted file mode 100644
index 29bbba85ff..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetLanguageResponse command class
- **/
-class UIGetLanguageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIGetLanguageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIGetLanguageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIGetLanguageResponse class destructor
- **/
- virtual ~UIGetLanguageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetLanguageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
deleted file mode 100644
index 94c197b7bc..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetSupportedLanguagesRequest command class
- **/
-class UIGetSupportedLanguagesRequest : public RequestToHMI {
- public:
- /**
- * @brief UIGetSupportedLanguagesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIGetSupportedLanguagesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIGetSupportedLanguagesRequest class destructor
- **/
- virtual ~UIGetSupportedLanguagesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
deleted file mode 100644
index 8962b77833..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetSupportedLanguagesResponse command class
- **/
-class UIGetSupportedLanguagesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIGetSupportedLanguagesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIGetSupportedLanguagesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIGetSupportedLanguagesResponse class destructor
- **/
- virtual ~UIGetSupportedLanguagesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
deleted file mode 100644
index 49942d81a7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
+++ /dev/null
@@ -1,89 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIIsReadyRequest command class
- **/
-class UIIsReadyRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief UIIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIIsReadyRequest class destructor
- **/
- virtual ~UIIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- virtual void onTimeOut() OVERRIDE;
-
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
deleted file mode 100644
index 93b2d9a569..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIIsReadyResponse command class
- **/
-class UIIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIIsReadyResponse class destructor
- **/
- virtual ~UIIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
deleted file mode 100644
index 4cec5a5600..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformAudioPassThruRequest command class
- **/
-class UIPerformAudioPassThruRequest : public RequestToHMI {
- public:
- /**
- * @brief UIPerformAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIPerformAudioPassThruRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIPerformAudioPassThruRequest class destructor
- **/
- virtual ~UIPerformAudioPassThruRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformAudioPassThruRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
deleted file mode 100644
index 9fb502233f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformAudioPassThruResponse command class
- **/
-class UIPerformAudioPassThruResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIPerformAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIPerformAudioPassThruResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIPerformAudioPassThruResponse class destructor
- **/
- virtual ~UIPerformAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformAudioPassThruResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
deleted file mode 100644
index 8232043395..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformInteractionRequest command class
- **/
-class UIPerformInteractionRequest : public RequestToHMI {
- public:
- /**
- * @brief UIPerformInteractionRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIPerformInteractionRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIPerformInteractionRequest class destructor
- **/
- virtual ~UIPerformInteractionRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformInteractionRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
deleted file mode 100644
index 4db471bbae..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformInteractionResponse command class
- **/
-class UIPerformInteractionResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIPerformInteractionResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIPerformInteractionResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIPerformInteractionResponse class destructor
- **/
- virtual ~UIPerformInteractionResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformInteractionResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
deleted file mode 100644
index 8ba828a25e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIScrollableMessageRequest command class
- **/
-class UIScrollableMessageRequest : public RequestToHMI {
- public:
- /**
- * @brief UIScrollableMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIScrollableMessageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIScrollableMessageRequest class destructor
- **/
- virtual ~UIScrollableMessageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIScrollableMessageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
deleted file mode 100644
index 4ae432d658..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIScrollableMessageResponse command class
- **/
-class UIScrollableMessageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIScrollableMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIScrollableMessageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIScrollableMessageResponse class destructor
- **/
- virtual ~UIScrollableMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIScrollableMessageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h
deleted file mode 100644
index b697176a36..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISendHapticDataRequest command class
- **/
-class UISendHapticDataRequest : public RequestToHMI {
- public:
- /**
- * @brief UISendHapticDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- * @param application_manager Reference of application manager
- **/
- UISendHapticDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISendHapticDataRequest class destructor
- **/
- ~UISendHapticDataRequest() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISendHapticDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h
deleted file mode 100644
index 96abe4665d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISendHapticDataResponse command class
- **/
-class UISendHapticDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISendHapticDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- * @param application_manager Reference of application manager
- **/
- UISendHapticDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISendHapticDataResponse class destructor
- **/
- ~UISendHapticDataResponse() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISendHapticDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_request.h
deleted file mode 100644
index b1025035d6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_APP_ICON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_APP_ICON_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetIconRequest command class
- **/
-class UISetAppIconRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetIconRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetAppIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISetIconRequest class destructor
- **/
- virtual ~UISetAppIconRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetAppIconRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_APP_ICON_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_response.h
deleted file mode 100644
index 6ad80bc9fe..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_app_icon_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_APP_ICON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_APP_ICON_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetIconResponse command class
- **/
-class UISetAppIconResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetIconResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetAppIconResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISetIconResponse class destructor
- **/
- virtual ~UISetAppIconResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetAppIconResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_APP_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h
deleted file mode 100644
index 573e9351b1..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UiSetDisplayLayoutRequest command class
- **/
-class UiSetDisplayLayoutRequest : public RequestToHMI {
- public:
- /**
- * @brief UiSetDisplayLayoutRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UiSetDisplayLayoutRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UiSetDisplayLayoutRequest class destructor
- **/
- virtual ~UiSetDisplayLayoutRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UiSetDisplayLayoutRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
deleted file mode 100644
index 595ee93c30..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UiSetDisplayLayoutResponse command class
- **/
-class UiSetDisplayLayoutResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UiSetDisplayLayoutResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UiSetDisplayLayoutResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UiSetDisplayLayoutResponse class destructor
- **/
- virtual ~UiSetDisplayLayoutResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UiSetDisplayLayoutResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
deleted file mode 100644
index 83bf11e2e1..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetGlobalPropertiesRequest command class
- **/
-class UISetGlobalPropertiesRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetGlobalPropertiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIShowRequest class destructor
- **/
- virtual ~UISetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
deleted file mode 100644
index 91de5e6df7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetGlobalPropertiesResponse command class
- **/
-class UISetGlobalPropertiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetGlobalPropertiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISetGlobalPropertiesResponse class destructor
- **/
- virtual ~UISetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
deleted file mode 100644
index b7d759916e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
+++ /dev/null
@@ -1,73 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetIconRequest command class
- **/
-class UISetIconRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetIconRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISetIconRequest class destructor
- **/
- virtual ~UISetIconRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetIconRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
deleted file mode 100644
index a9739bc802..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
+++ /dev/null
@@ -1,72 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetIconResponse command class
- **/
-class UISetIconResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetIconResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetIconResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UISetIconResponse class destructor
- **/
- virtual ~UISetIconResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetIconResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
deleted file mode 100644
index 92565e6f02..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetMediaClockTimerRequest command class
- **/
-class UISetMediaClockTimerRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetMediaClockTimerRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetMediaClockTimerRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISetMediaClockTimerRequest class destructor
- **/
- virtual ~UISetMediaClockTimerRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetMediaClockTimerRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
deleted file mode 100644
index 0d71ff00f0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetMediaClockTimerResponse command class
- **/
-class UISetMediaClockTimerResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetMediaClockTimerResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISetMediaClockTimerResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISetMediaClockTimerResponse class destructor
- **/
- virtual ~UISetMediaClockTimerResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetMediaClockTimerResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
deleted file mode 100644
index 80348de63b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIShowRequest command class
- **/
-class UIShowRequest : public RequestToHMI {
- public:
- /**
- * @brief UIShowRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIShowRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIShowRequest class destructor
- **/
- virtual ~UIShowRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIShowRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
deleted file mode 100644
index d696d2b9f8..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIShowResponse command class
- **/
-class UIShowResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIShowResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UIShowResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UIShowResponse class destructor
- **/
- virtual ~UIShowResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIShowResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
deleted file mode 100644
index 583f52084d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ButtonGetCapabilitiesRequest command class
- **/
-class UISliderRequest : public RequestToHMI {
- public:
- /**
- * @brief UISliderRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISliderRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISliderRequest class destructor
- **/
- virtual ~UISliderRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISliderRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
deleted file mode 100644
index cabb54f6cb..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISliderResponse command class
- **/
-class UISliderResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISliderResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UISliderResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UISliderResponse class destructor
- **/
- virtual ~UISliderResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISliderResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h b/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
deleted file mode 100644
index 61be04d04f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_APP_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_APP_LIST_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateAppListRequest command class
- **/
-class UpdateAppListRequest : public RequestToHMI {
- public:
- /**
- * @brief UpdateAppListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateAppListRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateAppListRequest class destructor
- **/
- virtual ~UpdateAppListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateAppListRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_APP_LIST_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h b/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
deleted file mode 100644
index 5ff8948393..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_APP_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_APP_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateAppListResponse command class
- **/
-class UpdateAppListResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UpdateAppListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateAppListResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateAppListResponse class destructor
- **/
- virtual ~UpdateAppListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateAppListResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_APP_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h b/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
deleted file mode 100644
index f304f404a1..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
+++ /dev/null
@@ -1,93 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/event_engine/event_observer.h"
-#include "utils/lock.h"
-#include "utils/conditional_variable.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateDeviceListRequest command class
- **/
-class UpdateDeviceListRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief UpdateDeviceListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateDeviceListRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateDeviceListRequest class destructor
- **/
- ~UpdateDeviceListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- * Need to observe OnHMIReady event, to send UpdateDeviceListRequest
- * when HMI will be ready
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Need to stop execution StopMethod if HMI did not started
- */
- virtual bool CleanUp();
-
- private:
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::ConditionalVariable termination_condition_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateDeviceListRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h b/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
deleted file mode 100644
index 9320de1387..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateDeviceListResponse command class
- **/
-class UpdateDeviceListResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UpdateDeviceListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateDeviceListResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateDeviceListResponse class destructor
- **/
- virtual ~UpdateDeviceListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateDeviceListResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h b/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h
deleted file mode 100644
index d8be10da2e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_SDL_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_SDL_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateSDLRequest command class
- **/
-class UpdateSDLRequest : public RequestToHMI {
- public:
- /**
- * @brief UpdateSDLRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateSDLRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateSDLRequest class destructor
- **/
- virtual ~UpdateSDLRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateSDLRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_SDL_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h b/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h
deleted file mode 100644
index bc0375d5fa..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_SDL_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_SDL_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateSDLResponse command class
- **/
-class UpdateSDLResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UpdateSDLResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateSDLResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateSDLResponse class destructor
- **/
- virtual ~UpdateSDLResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateSDLResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_SDL_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
deleted file mode 100644
index 099f27b734..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIDiagnosticMessageRequest command class
- **/
-class VIDiagnosticMessageRequest : public RequestToHMI {
- public:
- /**
- * @brief VIDiagnosticMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIDiagnosticMessageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIDiagnosticMessageRequest class destructor
- **/
- virtual ~VIDiagnosticMessageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIDiagnosticMessageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
deleted file mode 100644
index f0ae76ccb7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIDiagnosticMessageResponse command class
- **/
-class VIDiagnosticMessageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIDiagnosticMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIDiagnosticMessageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIDiagnosticMessageResponse class destructor
- **/
- virtual ~VIDiagnosticMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIDiagnosticMessageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
deleted file mode 100644
index 3b7e502a57..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetDTCsRequest command class
- **/
-class VIGetDTCsRequest : public RequestToHMI {
- public:
- /**
- * @brief VIGetDTCsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetDTCsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIGetDTCsRequest class destructor
- **/
- virtual ~VIGetDTCsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetDTCsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
deleted file mode 100644
index 7b7dab567b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetDTCsResponse command class
- **/
-class VIGetDTCsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetDTCsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetDTCsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIGetDTCsResponse class destructor
- **/
- virtual ~VIGetDTCsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetDTCsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
deleted file mode 100644
index 006f18e864..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataRequest command class
- **/
-class VIGetVehicleDataRequest : public RequestToHMI {
- public:
- /**
- * @brief VIGetVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetVehicleDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIGetVehicleDataRequest class destructor
- **/
- virtual ~VIGetVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
deleted file mode 100644
index 6e90656600..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataRequestTemplate command class
- *
- * Template class for sending 1 subscribe thin request
- **/
-template <event_engine::Event::EventID eventID>
-class VIGetVehicleDataRequestTemplate : public RequestToHMI {
- public:
- /**
- * @brief VIGetVehicleDataRequestTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetVehicleDataRequestTemplate(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
- /**
- * @brief Execute command with sending DBus thin request to HMI
- **/
- virtual void Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataRequestTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
deleted file mode 100644
index ef19072bb0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataResponse command class
- **/
-class VIGetVehicleDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetVehicleDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIGetVehicleDataResponse class destructor
- **/
- virtual ~VIGetVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
deleted file mode 100644
index 557c33df13..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataResponseTemplate command class
- **/
-template <event_engine::Event::EventID eventID>
-class VIGetVehicleDataResponseTemplate : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetVehicleDataResponseTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetVehicleDataResponseTemplate(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(eventID);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataResponseTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
deleted file mode 100644
index cd70c3349b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleTypeRequest command class
- **/
-class VIGetVehicleTypeRequest : public RequestToHMI {
- public:
- /**
- * @brief VIGetVehicleTypeRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetVehicleTypeRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIGetVehicleTypeRequest class destructor
- **/
- virtual ~VIGetVehicleTypeRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
deleted file mode 100644
index 0ef35dd7fc..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleTypeResponse command class
- **/
-class VIGetVehicleTypeResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetVehicleTypeResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIGetVehicleTypeResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIGetVehicleTypeResponse class destructor
- **/
- virtual ~VIGetVehicleTypeResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
deleted file mode 100644
index 07ab9df605..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
+++ /dev/null
@@ -1,89 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIIsReadyRequest command class
- **/
-class VIIsReadyRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief VIIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIIsReadyRequest class destructor
- **/
- virtual ~VIIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- void onTimeOut() OVERRIDE;
-
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
deleted file mode 100644
index a7866a1e73..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIIsReadyResponse command class
- **/
-class VIIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIIsReadyResponse class destructor
- **/
- virtual ~VIIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
deleted file mode 100644
index cdbdb45a8b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIReadDIDRequest command class
- **/
-class VIReadDIDRequest : public RequestToHMI {
- public:
- /**
- * @brief VIReadDIDRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIReadDIDRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIReadDIDRequest class destructor
- **/
- virtual ~VIReadDIDRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIReadDIDRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
deleted file mode 100644
index acb8760c5b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIReadDIDResponse command class
- **/
-class VIReadDIDResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIReadDIDResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIReadDIDResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIReadDIDResponse class destructor
- **/
- virtual ~VIReadDIDResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIReadDIDResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
deleted file mode 100644
index 58d4984f8d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VISubscribeVehicleDataRequest command class
- **/
-class VISubscribeVehicleDataRequest : public RequestToHMI {
- public:
- /**
- * @brief VISubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VISubscribeVehicleDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VISubscribeVehicleDataRequest class destructor
- **/
- virtual ~VISubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
deleted file mode 100644
index 76245af0f9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VISubscriveVehicleDataRequestTemplate command class
- *
- * Template class for sending 1 subscribe thin request
- **/
-template <event_engine::Event::EventID eventID>
-class VISubscribeVehicleDataRequestTemplate : public RequestToHMI {
- public:
- /**
- * @brief VISubscriveVehicleDataRequestTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VISubscribeVehicleDataRequestTemplate(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
- /**
- * @brief Execute command with sending DBus thin request to HMI
- **/
- virtual void Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataRequestTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
deleted file mode 100644
index 8f038bf941..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VISubscribeVehicleDataResponse command class
- **/
-class VISubscribeVehicleDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VISubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VISubscribeVehicleDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VISubscribeVehicleDataResponse class destructor
- **/
- virtual ~VISubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
deleted file mode 100644
index e8272971e2..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief VISubscriveVehicleDataResponseTemplate command class
- **/
-template <event_engine::Event::EventID eventID>
-class VISubscribeVehicleDataResponseTemplate : public ResponseFromHMI {
- public:
- /**
- * @brief VISubscriveVehicleDataResponseTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VISubscribeVehicleDataResponseTemplate(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(eventID);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataResponseTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
deleted file mode 100644
index b99eee47e7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIUnsubscribeVehicleDataRequest command class
- **/
-class VIUnsubscribeVehicleDataRequest : public RequestToHMI {
- public:
- /**
- * @brief VIUnsubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIUnsubscribeVehicleDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIUnsubscribeVehicleDataRequest class destructor
- **/
- virtual ~VIUnsubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
deleted file mode 100644
index 2014896f11..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIUnsubscriveVehicleDataRequestTemplate command class
- *
- * Template class for sending 1 unsubscribe thin request
- **/
-template <event_engine::Event::EventID eventID>
-class VIUnsubscribeVehicleDataRequestTemplate : public RequestToHMI {
- public:
- /**
- * @brief VIUnsubscriveVehicleDataRequestTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIUnsubscribeVehicleDataRequestTemplate(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
- /**
- * @brief Execute command with sending DBus thin request to HMI
- **/
- virtual void Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataRequestTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
deleted file mode 100644
index 3f930b5a5b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIUnsubscribeVehicleDataResponse command class
- **/
-class VIUnsubscribeVehicleDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIUnsubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIUnsubscribeVehicleDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VIUnsubscribeVehicleDataResponse class destructor
- **/
- virtual ~VIUnsubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
deleted file mode 100644
index 0817ca90af..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
+++ /dev/null
@@ -1,75 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIUnsubscriveVehicleDataResponseTemplate command class
- **/
-template <event_engine::Event::EventID eventID>
-class VIUnsubscribeVehicleDataResponseTemplate : public ResponseFromHMI {
- public:
- /**
- * @brief VISubscriveVehicleDataResponseTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VIUnsubscribeVehicleDataResponseTemplate(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(eventID);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataResponseTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
deleted file mode 100644
index 1ef4125c89..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRAddCommandRequest command class
- **/
-class VRAddCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief VRAddCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRAddCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRAddCommandRequest class destructor
- **/
- virtual ~VRAddCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRAddCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
deleted file mode 100644
index 1b419ed6ec..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRAddCommandResponse command class
- **/
-class VRAddCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRAddCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRAddCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRAddCommandResponse class destructor
- **/
- virtual ~VRAddCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRAddCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
deleted file mode 100644
index 642319e8d6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRChangeRegistrationRequest command class
- **/
-class VRChangeRegistrationRequest : public RequestToHMI {
- public:
- /**
- * @brief VRChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRChangeRegistrationRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRChangeRegistrationRequest class destructor
- **/
- virtual ~VRChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRChangeRegistrationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
deleted file mode 100644
index 8dc5e96729..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRChangeRegistrationResponse command class
- **/
-class VRChangeRegistrationResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRChangeRegistrationResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRChangeRegistrationResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRChangeRegistrationResponse class destructor
- **/
- virtual ~VRChangeRegistrationResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRChangeRegistrationResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
deleted file mode 100644
index bc5c24a350..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRDeleteCommandRequest command class
- **/
-class VRDeleteCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief VRDeleteCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRDeleteCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRDeleteCommandRequest class destructor
- **/
- virtual ~VRDeleteCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRDeleteCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
deleted file mode 100644
index 526c296321..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRDeleteCommandResponse command class
- **/
-class VRDeleteCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRDeleteCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRDeleteCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRDeleteCommandResponse class destructor
- **/
- virtual ~VRDeleteCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRDeleteCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
deleted file mode 100644
index 8dcc240e9b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetCapabilitiesRequest command class
- **/
-class VRGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief VRGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRGetCapabilitiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRGetCapabilitiesRequest class destructor
- **/
- virtual ~VRGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
deleted file mode 100644
index b6c8e081f5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetCapabilitiesResponse command class
- **/
-class VRGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRGetCapabilitiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRGetCapabilitiesResponse class destructor
- **/
- virtual ~VRGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
deleted file mode 100644
index 05373784f3..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetLanguageRequest command class
- **/
-class VRGetLanguageRequest : public RequestToHMI {
- public:
- /**
- * @brief VRGetLanguageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRGetLanguageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRGetLanguageRequest class destructor
- **/
- virtual ~VRGetLanguageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetLanguageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
deleted file mode 100644
index fad2f219df..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetLanguageResponse command class
- **/
-class VRGetLanguageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRGetLanguageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRGetLanguageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRGetLanguageResponse class destructor
- **/
- virtual ~VRGetLanguageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetLanguageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
deleted file mode 100644
index 6ed56ebd32..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetSupportedLanguagesRequest command class
- **/
-class VRGetSupportedLanguagesRequest : public RequestToHMI {
- public:
- /**
- * @brief VRGetSupportedLanguagesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRGetSupportedLanguagesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRGetSupportedLanguagesRequest class destructor
- **/
- virtual ~VRGetSupportedLanguagesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
deleted file mode 100644
index c4e742ecd0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetSupportedLanguagesResponse command class
- **/
-class VRGetSupportedLanguagesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRGetSupportedLanguagesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRGetSupportedLanguagesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRGetSupportedLanguagesResponse class destructor
- **/
- virtual ~VRGetSupportedLanguagesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
deleted file mode 100644
index 55a2101e1a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
+++ /dev/null
@@ -1,90 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRIsReadyRequest command class
- **/
-class VRIsReadyRequest : public RequestToHMI,
- public event_engine::EventObserver {
- public:
- /**
- * @brief VRIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRIsReadyRequest class destructor
- **/
- virtual ~VRIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief On event callback
- **/
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- /**
- * @brief onTimeOut from requrst Controller
- */
- void onTimeOut() OVERRIDE;
-
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
deleted file mode 100644
index 474b3373a3..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRIsReadyResponse command class
- **/
-class VRIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRIsReadyResponse class destructor
- **/
- virtual ~VRIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h
deleted file mode 100644
index 1f54d29beb..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_PERFORM_INTERACTION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_PERFORM_INTERACTION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRPerformInteractionRequest command class
- **/
-class VRPerformInteractionRequest : public RequestToHMI {
- public:
- /**
- * @brief VRPerformInteractionRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRPerformInteractionRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief VRPerformInteractionRequest class destructor
- **/
- virtual ~VRPerformInteractionRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRPerformInteractionRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_PERFORM_INTERACTION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h
deleted file mode 100644
index 7c445416ce..0000000000
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_PERFORM_INTERACTION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_PERFORM_INTERACTION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSPerformInteractionResponse command class
- **/
-class VRPerformInteractionResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSPerformInteractionResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- VRPerformInteractionResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief TTSPerformInteractionResponse class destructor
- **/
- virtual ~VRPerformInteractionResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRPerformInteractionResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h b/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h
deleted file mode 100644
index 2aed94c448..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h
+++ /dev/null
@@ -1,165 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_COMMAND_REQUEST_H_
-
-#include <string>
-
-#include "application_manager/application.h"
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddCommandRequest command class
- **/
-class AddCommandRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AddCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AddCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AddCommandRequest class destructor
- **/
- ~AddCommandRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Function is called by RequestController when request execution time
- * has exceed it's limit
- */
- void onTimeOut() FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /*
- * @brief Check if command name doesn't exist in application
- * Please see SDLAQ-CRS-407 for more information
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandName(ApplicationConstSharedPtr app);
-
- /*
- * @brief Check if command VR synonyms doesn't exist in application commands
- * Please see SDLAQ-CRS-407 for more information
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandVRSynonym(ApplicationConstSharedPtr app);
-
- /*
- * @brief Check if command parent ID exists in submenu map
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandParentId(ApplicationConstSharedPtr app);
-
- /**
- * @brief Removes command from list when HMI sends negative response or
- * HMI does not answer on addCommand request.
- */
- void RemoveCommand();
-
- DISALLOW_COPY_AND_ASSIGN(AddCommandRequest);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- /**
- * @brief Checks add command param
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if add command contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- inline bool BothSend() const;
-
- /**
- * @brief GenerateMobileResponseInfo generated info for mobile response
- * depends from UI and VR responses
- * @return info for mobile response
- */
- const std::string GenerateMobileResponseInfo();
- bool send_ui_;
- bool send_vr_;
-
- bool is_ui_received_;
- bool is_vr_received_;
-
- std::string ui_info_;
- std::string vr_info_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType vr_result_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h b/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h
deleted file mode 100644
index b385b3bc5c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddCommandResponse command class
- **/
-class AddCommandResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AddCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AddCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AddCommandResponse class destructor
- **/
- virtual ~AddCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AddCommandResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h b/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h
deleted file mode 100644
index 36b0b38464..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h
+++ /dev/null
@@ -1,93 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_SUB_MENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_SUB_MENU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddSubMenuRequest command class
- **/
-class AddSubMenuRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AddSubMenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AddSubMenuRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AddSubMenuRequest class destructor
- **/
- ~AddSubMenuRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /*
- * @brief Check if submenu name is valid
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckSubMenuName();
-
- DISALLOW_COPY_AND_ASSIGN(AddSubMenuRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_SUB_MENU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h b/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h
deleted file mode 100644
index b09254369f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_SUB_MENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_SUB_MENU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddSubMenuResponse command class
- **/
-class AddSubMenuResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AddSubMenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AddSubMenuResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AddSubMenuResponse class destructor
- **/
- virtual ~AddSubMenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AddSubMenuResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ADD_SUB_MENU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h b/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h
deleted file mode 100644
index 17ad75b7a6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h
+++ /dev/null
@@ -1,106 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_MANEUVER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_MANEUVER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/commands/pending.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertManeuverRequest command class
- **/
-class AlertManeuverRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AlertManeuverRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AlertManeuverRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AlertManeuverRequest class destructor
- **/
- virtual ~AlertManeuverRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief Prepare parameters for sending to mobile application
- * @param result_code contains result code for sending to mobile application
- * @param return_info contains resulting info for sending to mobile
- * application
- * @return result for sending to mobile application.
- */
- bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
- std::string& return_info);
- /**
- * @brief Checks alert maneuver params(ttsChunks, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if alert maneuver contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- hmi_apis::Common_Result::eType tts_speak_result_code_;
- hmi_apis::Common_Result::eType navi_alert_maneuver_result_code_;
- std::string info_navi_;
- std::string info_tts_;
- Pending pending_requests_;
-
- DISALLOW_COPY_AND_ASSIGN(AlertManeuverRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_MANEUVER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h b/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h
deleted file mode 100644
index 2d45435a8b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_MANEUVER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_MANEUVER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertManeuverResponse command class
- **/
-class AlertManeuverResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AlertManeuverResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AlertManeuverResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AlertManeuverResponse class destructor
- **/
- virtual ~AlertManeuverResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AlertManeuverResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_MANEUVER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h b/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
deleted file mode 100644
index 01b9782662..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
+++ /dev/null
@@ -1,150 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_REQUEST_H_
-
-#include <string>
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertRequest command class
- **/
-class AlertRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AlertRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AlertRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AlertRequest class destructor
- **/
- virtual ~AlertRequest();
-
- /**
- * @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 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 Alert request
- *
- * @param app_id Id of application requested this RPC
- */
- void SendAlertRequest(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 CheckStringsOfAlertRequest();
-
- /*
- * @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_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_;
- hmi_apis::Common_Result::eType tts_speak_result_;
- std::string ui_response_info_;
- std::string tts_response_info_;
-
- DISALLOW_COPY_AND_ASSIGN(AlertRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h b/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h
deleted file mode 100644
index e03dad7564..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertResponse command class
- **/
-class AlertResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AlertResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- AlertResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief AlertResponse class destructor
- **/
- virtual ~AlertResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AlertResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ALERT_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h b/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
deleted file mode 100644
index 2cd8e386e0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
+++ /dev/null
@@ -1,186 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
-
-#include <strings.h>
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/commands/pending.h"
-#include "utils/macro.h"
-#include "utils/custom_string.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-/**
- * @brief ChangeRegistrationRequest command class
- **/
-class ChangeRegistrationRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ChangeRegistrationRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ChangeRegistrationRequest class destructor
- **/
- virtual ~ChangeRegistrationRequest();
-
- /**
- * @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 event_engine::Event& event);
-
- private:
- /*
- * @brief Search for requested language in HMI UI supported languages
- *
- * @return true if language supported by UI, otherwise false
- */
- bool IsLanguageSupportedByUI(const int32_t& hmi_display_lang);
-
- /*
- * @brief Search for requested language in HMI VR supported languages
- *
- * @return true if language supported by VR, otherwise false
- */
- bool IsLanguageSupportedByVR(const int32_t& hmi_display_lang);
-
- /*
- * @brief Search for requested language in HMI TTS supported languages
- *
- * @return true if language supported by TTS, otherwise false
- */
- bool IsLanguageSupportedByTTS(const int32_t& hmi_display_lang);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- /**
- * @brief Checks change_registration params(ttsName, appname,
- * ngnMediaScreenAppName, vrSynonyms) on invalid characters.
- *
- * @return true if command contains \t\n \\t \\n of whitespace otherwise
- * returns false.
- */
- bool IsWhiteSpaceExist();
-
- /**
- * @brief Check parameters (name, vr) for
- * coincidence with already known parameters of registered applications
- *
- * @return SUCCESS if there is no coincidence of app.name/VR synonyms,
- * otherwise appropriate error code returns
- */
- mobile_apis::Result::eType CheckCoincidence();
-
- /**
- * @brief Checks if requested name is allowed by policy
- * @param app_name Application name
- * @return true, if allowed, otherwise - false
- */
- bool IsNicknameAllowed(const custom_str::CustomString& app_name) const;
-
- /**
- * @brief Prepare result code and result for sending to mobile application
- * @param result_code contains result code for sending to mobile application
- * @param response_info contains info for sending to mobile application
- * @return result for sending to mobile application.
- */
- bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
- std::string& ResponseInfo);
-
- /**
- * @brief Predicate for using with CheckCoincidence method to compare with VR
- * synonym SO
- *
- * @return TRUE if there is coincidence of VR, otherwise FALSE
- */
- struct CoincidencePredicateVR {
- CoincidencePredicateVR(const custom_str::CustomString& newItem)
- : newItem_(newItem){};
-
- bool operator()(const smart_objects::SmartObject& obj) const {
- const custom_str::CustomString& vr_synonym = obj.asCustomString();
- return newItem_.CompareIgnoreCase(vr_synonym);
- };
-
- const custom_str::CustomString& newItem_;
- };
-
- Pending pending_requests_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType vr_result_;
- hmi_apis::Common_Result::eType tts_result_;
- std::string ui_response_info_;
- std::string vr_response_info_;
- std::string tts_response_info_;
-
- void SendVRRequest(ApplicationSharedPtr app,
- smart_objects::SmartObject& msg_params);
-
- void SendTTSRequest(ApplicationSharedPtr app,
- smart_objects::SmartObject& msg_params);
-
- void SendUIRequest(ApplicationSharedPtr app,
- smart_objects::SmartObject& msg_params,
- const int32_t hmi_language);
-
- DISALLOW_COPY_AND_ASSIGN(ChangeRegistrationRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h b/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h
deleted file mode 100644
index 995764a15f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ChangeRegistrationResponse command class
- **/
-class ChangeRegistrationResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ChangeRegistrationResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ChangeRegistrationResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ChangeRegistrationResponse class destructor
- **/
- virtual ~ChangeRegistrationResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChangeRegistrationResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h b/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h
deleted file mode 100644
index c00d310e7d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h
+++ /dev/null
@@ -1,270 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
-#include <map>
-#include <string>
-
-#include "application_manager/application.h"
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/event_engine/event_observer.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief CreateInteractionChoiceSetRequest command class
- **/
-class CreateInteractionChoiceSetRequest : public CommandRequestImpl {
- public:
- /**
- * @brief CreateInteractionChoiceSetRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- CreateInteractionChoiceSetRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief CreateInteractionChoiceSetRequest class destructor
- **/
- ~CreateInteractionChoiceSetRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Function is called by RequestController when request execution time
- * has exceed it's limit
- */
- void onTimeOut() FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /**
- * @brief DeleteChoices allows to walk through the sent commands collection
- * in order to sent appropriate DeleteCommand request.
- */
- void DeleteChoices();
-
- /**
- * @brief Calls after all responses from HMI were received.
- * Terminates request and sends successful response to mobile
- * if all responses were SUCCESS or calls DeleteChoices in other case.
- */
- void OnAllHMIResponsesReceived();
-
- /**
- * @brief The VRCommand struct
- * Collect minimum information about sent VR commands, for correctly
- * processing deleting sent commands if error from HMI received
- */
- struct VRCommandInfo {
- VRCommandInfo() : cmd_id_(0), succesful_response_received_(false) {}
- VRCommandInfo(uint32_t cmd_id)
- : cmd_id_(cmd_id), succesful_response_received_(false) {}
- uint32_t cmd_id_;
- bool succesful_response_received_;
- };
-
- typedef std::map<uint32_t, VRCommandInfo> SentCommandsMap;
- SentCommandsMap sent_commands_map_;
-
- int32_t choice_set_id_;
- size_t expected_chs_count_;
- size_t received_chs_count_;
-
- /**
- * @brief Flag for stop sending VR commands to HMI, in case one of responses
- * failed
- */
- volatile bool error_from_hmi_;
- sync_primitives::Lock error_from_hmi_lock_;
-
- /**
- * @brief Flag shows if request already was expired by timeout
- */
- volatile bool is_timed_out_;
- sync_primitives::Lock is_timed_out_lock_;
-
- sync_primitives::Lock vr_commands_lock_;
- /*
- * @brief Sends VR AddCommand request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendVRAddCommandRequests(ApplicationSharedPtr const app);
-
- /*
- * @brief Checks incoming choiseSet params.
- * @param app Registred mobile application
- *
- * @return Mobile result code
- */
- mobile_apis::Result::eType CheckChoiceSet(ApplicationConstSharedPtr app);
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare choice ID
- *param
- *
- * return TRUE if there is coincidence of choice ID, otherwise FALSE
- */
- struct CoincidencePredicateChoiceID {
- CoincidencePredicateChoiceID(const uint32_t newItem) : newItem_(newItem) {}
-
- bool operator()(smart_objects::SmartObject obj) {
- return obj[strings::choice_id].asUInt() == newItem_;
- }
-
- const uint32_t newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare menu name
- *param
- *
- * return TRUE if there is coincidence of menu name, otherwise FALSE
- */
- struct CoincidencePredicateMenuName {
- CoincidencePredicateMenuName(const std::string& newItem)
- : newItem_(newItem){};
-
- bool operator()(smart_objects::SmartObject obj) {
- return obj[strings::menu_name].asString() == newItem_;
- }
-
- const std::string& newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare VR commands
- *param
- *
- * return TRUE if there is coincidence of VR commands, otherwise FALSE
- */
- struct CoincidencePredicateVRCommands {
- CoincidencePredicateVRCommands(const smart_objects::SmartObject& newItem)
- : newItem_(newItem) {}
-
- bool operator()(smart_objects::SmartObject obj) {
- return compareStr(obj, newItem_);
- }
-
- const smart_objects::SmartObject& newItem_;
- };
-
- /*
- * @brief Checks if incoming choice set doesn't has similar VR synonyms.
- *
- * @param choice1 Choice to compare
- * @param choice2 Choice to compare
- *
- * return Return TRUE if there are similar VR synonyms in choice set,
- * otherwise FALSE
- */
- bool compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2);
-
- /*
- * @brief Checks VR synonyms ignoring differences in case.
- *
- * @param str1 VR synonym to compare
- * @param str2 VR synonym to compare
- *
- * return Return TRUE if there are similar VR synonyms in choice set,
- * otherwise FALSE
- */
- static bool compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2);
-
- /**
- * @brief Checks choice set params(menuName, tertiaryText, ...)
- * When type is String there is a check on the contents \t\n \\t \\n
- * @param choice_set which must check
- * @return if choice_set contains \t\n \\t \\n return TRUE, FALSE otherwise
- */
- bool IsWhiteSpaceExist(const smart_objects::SmartObject& choice_set);
-
- /**
- * @brief ProcessHmiError process received error from HMI.
- * This function id not thread safe. It should be protected with
- * vr_commands_lock_
- * @param vr_result ERROR type
- */
- void ProcessHmiError(const hmi_apis::Common_Result::eType vr_result);
-
- /**
- * @brief ProcessSuccesfulHMIResponse process succesful response from HMI\
- * This function id not thread safe. It should be protected with
- * vr_commands_lock_
- * @param corr_id correlation id of received response
- * @return true if resuest with corr_itd was sent on HMI, false otherwise
- */
- bool ProcessSuccesfulHMIResponse(const uint32_t corr_id);
-
- /**
- * @brief CountReceivedVRResponses counts received HMI responses. Updated
- * request timeout if not all responses received
- * Send response to mobile if all responses received.
- */
- void CountReceivedVRResponses();
-
- DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h b/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h
deleted file mode 100644
index bb2083e0b5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief CreateInteractionChoiceSetResponse command class
- **/
-class CreateInteractionChoiceSetResponse : public CommandResponseImpl {
- public:
- /**
- * @brief CreateInteractionChoiceSetResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- CreateInteractionChoiceSetResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief CreateInteractionChoiceSetResponse class destructor
- **/
- virtual ~CreateInteractionChoiceSetResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h
deleted file mode 100644
index afb2e226f6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h
+++ /dev/null
@@ -1,115 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_COMMAND_REQUEST_H_
-
-#include <string>
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteCommandRequest command class
- **/
-class DeleteCommandRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteCommandRequest class destructor
- **/
- ~DeleteCommandRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteCommandRequest);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- /*
- * @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 is_ui_send_;
- bool is_vr_send_;
-
- bool is_ui_received_;
- bool is_vr_received_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType vr_result_;
- std::string ui_info_;
- std::string vr_info_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h
deleted file mode 100644
index a6a25f9cd5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteCommandResponse command class
- **/
-class DeleteCommandResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteCommandResponse class destructor
- **/
- virtual ~DeleteCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteCommandResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h
deleted file mode 100644
index beb8ae73cd..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h
+++ /dev/null
@@ -1,78 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_FILE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_FILE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-struct AppFile;
-
-namespace commands {
-
-/**
- * @brief DeleteFileRequest command class
- **/
-class DeleteFileRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteFileRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteFileRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteFileRequest class destructor
- **/
- virtual ~DeleteFileRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteFileRequest);
-
- void SendFileRemovedNotification(const AppFile* file) const;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_FILE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h
deleted file mode 100644
index 08f734ec13..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_FILE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_FILE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteFileResponse command class
- **/
-class DeleteFileResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteFileResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteFileResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteFileResponse class destructor
- **/
- virtual ~DeleteFileResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteFileResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_FILE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h
deleted file mode 100644
index ead60be1af..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h
+++ /dev/null
@@ -1,89 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteInteractionChoiceSetRequest command class
- **/
-class DeleteInteractionChoiceSetRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteInteractionChoiceSetRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteInteractionChoiceSetRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteInteractionChoiceSetRequest class destructor
- **/
- ~DeleteInteractionChoiceSetRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /*
- * @brief Check if requested choice set ID in use by perform interaction
- *
- * @param app mobile application
- */
- bool ChoiceSetInUse(ApplicationConstSharedPtr app);
-
- void SendVrDeleteCommand(ApplicationSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h
deleted file mode 100644
index 7a926399ee..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteInteractionChoiceSetResponse command class
- **/
-class DeleteInteractionChoiceSetResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteInteractionChoiceSetResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteInteractionChoiceSetResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteInteractionChoiceSetResponse class destructor
- **/
- virtual ~DeleteInteractionChoiceSetResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h
deleted file mode 100644
index 37863598ac..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h
+++ /dev/null
@@ -1,105 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_SUB_MENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_SUB_MENU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteSubMenuRequest command class
- **/
-class DeleteSubMenuRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteSubMenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteSubMenuRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteSubMenuRequest class destructor
- **/
- ~DeleteSubMenuRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /*
- * @brief Deletes VR commands from SDL for corresponding submenu ID
- *
- * @param app_id Application ID
- *
- * @return TRUE on success, otherwise FALSE
- */
- void DeleteSubMenuVRCommands(ApplicationConstSharedPtr app);
-
- /*
- * @brief Deletes UI commands from SDL for corresponding submenu ID
- *
- * @param app_id Application ID
- *
- * @return TRUE on success, otherwise FALSE
- */
- void DeleteSubMenuUICommands(ApplicationSharedPtr const app);
-
- DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_SUB_MENU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h b/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h
deleted file mode 100644
index 4319d88ea0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_SUB_MENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_SUB_MENU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ResetGlobalPropertiesResponse command class
- **/
-class DeleteSubMenuResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteSubMenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DeleteSubMenuResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DeleteSubMenuResponse class destructor
- **/
- virtual ~DeleteSubMenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DELETE_SUB_MENU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h b/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h
deleted file mode 100644
index d55bce6613..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h
+++ /dev/null
@@ -1,81 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DiagnosticMessageRequest command class
- **/
-class DiagnosticMessageRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DiagnosticMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DiagnosticMessageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DiagnosticMessageRequest class destructor
- **/
- virtual ~DiagnosticMessageRequest();
-
- /**
- * @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 event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticMessageRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h b/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h
deleted file mode 100644
index 7ac810eabf..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DiagnosticMessageResponse command class
- **/
-class DiagnosticMessageResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DiagnosticMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DiagnosticMessageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DiagnosticMessageResponse class destructor
- **/
- virtual ~DiagnosticMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticMessageResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h b/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h
deleted file mode 100644
index c8ae2b2cd9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h
+++ /dev/null
@@ -1,91 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAL_NUMBER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAL_NUMBER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DialNumber request command class
- **/
-class DialNumberRequest : public CommandRequestImpl {
- public:
- /**
- * \brief DialNumberRequest class constructor
- **/
- DialNumberRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief DialNumberRequest class destructor
- **/
- ~DialNumberRequest() OVERRIDE;
-
- /**
- * @brief Initialize request params
- **/
- bool Init() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief Removes from number param all characters
- * except the + character and digits.
- *
- */
- void StripNumberParam(std::string& number);
-
- DISALLOW_COPY_AND_ASSIGN(DialNumberRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAL_NUMBER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/dial_number_response.h b/src/components/application_manager/include/application_manager/commands/mobile/dial_number_response.h
deleted file mode 100644
index 688c9a7207..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/dial_number_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAL_NUMBER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAL_NUMBER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DialNumberResponse command class
- **/
-class DialNumberResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DialNumberResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- DialNumberResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief DialNumberResponse class destructor
- **/
- virtual ~DialNumberResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DialNumberResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_DIAL_NUMBER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h
deleted file mode 100644
index 04f4fa53ab..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h
+++ /dev/null
@@ -1,81 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief EndAudioPassThruRequest command class
- **/
-class EndAudioPassThruRequest : public CommandRequestImpl {
- public:
- /**
- * @brief EndAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- EndAudioPassThruRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief EndAudioPassThruRequest class destructor
- **/
- virtual ~EndAudioPassThruRequest();
-
- /**
- * @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 event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EndAudioPassThruRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h b/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h
deleted file mode 100644
index ca756cf5d7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief EndAudioPassThruResponse command class
- **/
-class EndAudioPassThruResponse : public CommandResponseImpl {
- public:
- /**
- * @brief EndAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- EndAudioPassThruResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief EndAudioPassThruResponse class destructor
- **/
- virtual ~EndAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EndAudioPassThruResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h b/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
deleted file mode 100644
index 6cfc6e5891..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
+++ /dev/null
@@ -1,69 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GENERIC_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GENERIC_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class GenericResponse : public CommandResponseImpl {
- public:
- /**
- * \brief GenericResponse class constructor
- **/
- GenericResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
- /**
- * \brief GenericResponse class destructor
- **/
- virtual ~GenericResponse() {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GenericResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GENERIC_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h b/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h
deleted file mode 100644
index b70c04bcca..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h
+++ /dev/null
@@ -1,81 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_DTCS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_DTCS_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetDTCsRequest command class
- **/
-class GetDTCsRequest : public CommandRequestImpl {
- public:
- /**
- * @brief GetDTCsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetDTCsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetDTCsRequest class destructor
- **/
- virtual ~GetDTCsRequest();
-
- /**
- * @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 event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetDTCsRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_DTCS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h b/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h
deleted file mode 100644
index 10d0d0f86d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_DTCS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_DTCS_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetDTCsResponse command class
- **/
-class GetDTCsResponse : public CommandResponseImpl {
- public:
- /**
- * @brief GetDTCsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetDTCsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetDTCsResponse class destructor
- **/
- virtual ~GetDTCsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetDTCsResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_DTCS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_request.h b/src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_request.h
deleted file mode 100644
index ba55a6b4cd..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_request.h
+++ /dev/null
@@ -1,61 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class GetSystemCapabilityRequest : public CommandRequestImpl {
- public:
- GetSystemCapabilityRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- virtual ~GetSystemCapabilityRequest();
-
- virtual void Run() OVERRIDE;
-
- virtual void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetSystemCapabilityRequest);
-
-}; // GetSystemCapabilityRequest
-} // commands
-} // application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_REQUEST_H_ \ No newline at end of file
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_response.h b/src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_response.h
deleted file mode 100644
index 9fa6f9b5bb..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_system_capability_response.h
+++ /dev/null
@@ -1,60 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class GetSystemCapabilityResponse : public CommandResponseImpl {
- public:
- GetSystemCapabilityResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- virtual ~GetSystemCapabilityResponse();
-
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetSystemCapabilityResponse);
-
-}; // GetSystemCapabilityResponse
-} // commands
-} // application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_RESPONSE_H_ \ No newline at end of file
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h
deleted file mode 100644
index 030a3afedc..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h
+++ /dev/null
@@ -1,94 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class SmartObject;
-
-namespace commands {
-
-/**
- * @brief GetVehicleDataRequest command class
- **/
-class GetVehicleDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief GetVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetVehicleDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetVehicleDataRequest class destructor
- **/
- virtual ~GetVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- protected:
- virtual void on_event(const event_engine::Event& event);
-
-#ifdef HMI_DBUS_API
- private:
- void SendRequestsToHmi(const int32_t app_id);
-
- struct HmiRequest {
- hmi_apis::Common_Result::eType status;
- bool complete;
- smart_objects::SmartObject value;
- const char* str;
- hmi_apis::FunctionID::eType func_id;
- };
-
- typedef std::vector<HmiRequest> HmiRequests;
- HmiRequests hmi_requests_;
-#endif // #ifdef HMI_DBUS_API
-
- DISALLOW_COPY_AND_ASSIGN(GetVehicleDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h
deleted file mode 100644
index 11691d1f84..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetVehicleDataResponse command class
- **/
-class GetVehicleDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief GetVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- GetVehicleDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief GetVehicleDataResponse class destructor
- **/
- virtual ~GetVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetVehicleDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h b/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h
deleted file mode 100644
index bf23121177..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h
+++ /dev/null
@@ -1,77 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetWayPointsRequest command class
- **/
-class GetWayPointsRequest : public CommandRequestImpl {
- public:
- /**
- * \brief GetWayPointsRequest class constructor
- **/
- GetWayPointsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief GetWayPointsRequest class destructor
- **/
- virtual ~GetWayPointsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetWayPointsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h b/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h
deleted file mode 100644
index cb4f840763..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h
+++ /dev/null
@@ -1,72 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetWayPointsResponse command class
- **/
-class GetWayPointsResponse : public CommandResponseImpl {
- public:
- /**
- * \brief GetWayPointsResponse class constructor
- **/
- GetWayPointsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief GetWayPointsResponse class destructor
- **/
- virtual ~GetWayPointsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetWayPointsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h b/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h
deleted file mode 100644
index f1e9204eea..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_LIST_FILES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_LIST_FILES_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ListFilesRequest command class
- **/
-class ListFilesRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ListFilesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ListFilesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ListFilesRequest class destructor
- **/
- virtual ~ListFilesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ListFilesRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_LIST_FILES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h b/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h
deleted file mode 100644
index 81165c9bc4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_LIST_FILES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_LIST_FILES_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ListFilesResponse command class
- **/
-class ListFilesResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ListFilesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ListFilesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ListFilesResponse class destructor
- **/
- virtual ~ListFilesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ListFilesResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_LIST_FILES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h
deleted file mode 100644
index 758fdaf760..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppInterfaceUnregisteredNotification class
- **/
-class OnAppInterfaceUnregisteredNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnAppInterfaceUnregisteredNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAppInterfaceUnregisteredNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager);
-
- /**
- * @brief OnAppInterfaceUnregisteredNotification class destructor
- **/
- virtual ~OnAppInterfaceUnregisteredNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppInterfaceUnregisteredNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h
deleted file mode 100644
index 68e1d4f548..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h
+++ /dev/null
@@ -1,76 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAudioPassThruNotification class used to send notification with
- *binary data written from
- * microphone to mobile device while PerformAudioPassThru is active.
- **/
-class OnAudioPassThruNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnAudioPassThruNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnAudioPassThruNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnAudioPassThruNotification class destructor
- **/
- virtual ~OnAudioPassThruNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAudioPassThruNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h
deleted file mode 100644
index d6a15caf4b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h
+++ /dev/null
@@ -1,87 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_BUTTON_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_BUTTON_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnButtonEventNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
- **/
-class OnButtonEventNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnButtonEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnButtonEventNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnButtonEventNotification class destructor
- **/
- virtual ~OnButtonEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Sends button event notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendButtonEvent(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(OnButtonEventNotification);
-};
-
-} // namespace mobile
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_BUTTON_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h
deleted file mode 100644
index 9acd31f8da..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h
+++ /dev/null
@@ -1,86 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_BUTTON_PRESS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_BUTTON_PRESS_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnButtonPressNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
- **/
-class OnButtonPressNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnButtonPressNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnButtonPressNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnButtonEventCommand class destructor
- **/
- virtual ~OnButtonPressNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Sends button press notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendButtonPress(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(OnButtonPressNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_BUTTON_PRESS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h
deleted file mode 100644
index e2faf9b05c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief OnCommandNotification class is used to send notification
- * to mobile device.
- **/
-class OnCommandNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnCommandNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnCommandNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnCommandNotification class destructor
- **/
- virtual ~OnCommandNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnCommandNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h
deleted file mode 100644
index 1f9ee4ed8c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h
+++ /dev/null
@@ -1,78 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnDriverDistractionNotification class
- **/
-class OnDriverDistractionNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnDriverDistractionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnDriverDistractionNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnDriverDistractionNotification class destructor
- **/
- virtual ~OnDriverDistractionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDriverDistractionNotification);
-};
-
-} // namespace mobile
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h
deleted file mode 100644
index 07544c573f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h
+++ /dev/null
@@ -1,76 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HASH_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HASH_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-namespace mobile {
-
-/**
- * @brief OnHashChangeNotification class
- **/
-class OnHashChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnHashChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnHashChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnHashChangeNotification class destructor
- **/
- virtual ~OnHashChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnHashChangeNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HASH_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h
deleted file mode 100644
index 58659cbc4b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnHMIStatusNotification class
- **/
-class OnHMIStatusNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnHMIStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnHMIStatusNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnHMIStatusNotification class destructor
- **/
- virtual ~OnHMIStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnHMIStatusNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h b/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h
deleted file mode 100644
index b2802e9fe9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_FROM_MOBILE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_FROM_MOBILE_H_
-
-#include "application_manager/commands/command_notification_from_mobile_impl.h"
-#include "application_manager/application_manager.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnHMIStatusNotificationFromMobile class
- **/
-class OnHMIStatusNotificationFromMobile
- : public CommandNotificationFromMobileImpl {
- public:
- /**
- * @brief OnHMIStatusNotificationFromMobile class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnHMIStatusNotificationFromMobile(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnHMIStatusNotificationFromMobile class destructor
- **/
- virtual ~OnHMIStatusNotificationFromMobile();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnHMIStatusNotificationFromMobile);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_FROM_MOBILE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h
deleted file mode 100644
index 911ca70cdf..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnKeyBoardInputNotification class
- **/
-class OnKeyBoardInputNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnKeyBoardInputNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnKeyBoardInputNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnKeyBoardInputNotification class destructor
- **/
- virtual ~OnKeyBoardInputNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnKeyBoardInputNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h
deleted file mode 100644
index bbd7679a6b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnLanguageChangeNotification class
- **/
-class OnLanguageChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnLanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnLanguageChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnLanguageChangeNotification class destructor
- **/
- virtual ~OnLanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnLanguageChangeNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h
deleted file mode 100644
index 9fd2832218..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnPermissionsChangeNotification class
- **/
-class OnPermissionsChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnPermissionsChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnPermissionsChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnPermissionsChangeNotification class destructor
- **/
- virtual ~OnPermissionsChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnPermissionsChangeNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h
deleted file mode 100644
index d42e42649a..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h
+++ /dev/null
@@ -1,86 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include <vector>
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnSystemRequestNotification class
- **/
-class OnSystemRequestNotification : public CommandNotificationImpl {
- public:
- typedef std::vector<uint8_t> BinaryMessage;
- /**
- * @brief OnSystemRequestNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnSystemRequestNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnSystemRequestNotification class destructor
- **/
- ~OnSystemRequestNotification() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
-#ifdef PROPRIETARY_MODE
- /**
- * @brief Adds HTTP header to message
- * @param message Message
- */
- void AddHeader(BinaryMessage& message) const;
- size_t ParsePTString(std::string& pt_string) const;
-#endif // PROPRIETARY_MODE
-
- DISALLOW_COPY_AND_ASSIGN(OnSystemRequestNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_SYSTEM_REQUEST_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h
deleted file mode 100644
index 42a81043f9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTBTClientStateNotification class
- **/
-class OnTBTClientStateNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnTBTClientStateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnTBTClientStateNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnTBTClientStateNotification class destructor
- **/
- virtual ~OnTBTClientStateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTBTClientStateNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h
deleted file mode 100644
index abbf6787db..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h
+++ /dev/null
@@ -1,77 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnTouchEventNotification class
- **/
-class OnTouchEventNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnTouchEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnTouchEventNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnTouchEventNotification class destructor
- **/
- virtual ~OnTouchEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTouchEventNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h
deleted file mode 100644
index efe2ce8c55..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h
+++ /dev/null
@@ -1,83 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_VEHICLE_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_VEHICLE_DATA_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVehicleDataNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
- **/
-class OnVehicleDataNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnVehicleDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnVehicleDataNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnVehicleDataNotification class destructor
- **/
- virtual ~OnVehicleDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Sends vehicle data notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendVehicleData(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(OnVehicleDataNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h
deleted file mode 100644
index e33de74fd8..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h
+++ /dev/null
@@ -1,69 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class OnWayPointChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnWayPointChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- OnWayPointChangeNotification(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief OnWayPointChangeNotification class destructor
- **/
- virtual ~OnWayPointChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnWayPointChangeNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
deleted file mode 100644
index efe1f107f3..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
+++ /dev/null
@@ -1,191 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PerformAudioPassThruRequest command class
- **/
-class PerformAudioPassThruRequest : public CommandRequestImpl {
- public:
- /**
- * @brief PerformAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- PerformAudioPassThruRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief PerformAudioPassThruRequest class destructor
- **/
- virtual ~PerformAudioPassThruRequest();
-
- /**
- * @brief Function is called by RequestController when request execution time
- * has exceed it's limit
- *
- */
- virtual void onTimeOut();
-
- /**
- * @brief Init required by command resources
- **/
- 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 event_engine::Event& event);
-
- private:
- /**
- * @brief Prepare result code, result and info for sending to mobile
- * @brief Response params
- * success for sending to mobile application
- * result code for sending to mobile application
- * info for sending to mobile application
- */
- struct ResponseParams {
- bool success;
- mobile_apis::Result::eType result_code;
- std::string info;
- ResponseParams()
- : success(false), result_code(mobile_apis::Result::INVALID_ENUM) {}
- };
-
- ResponseParams response_params_;
-
- /**
- * @brief Prepare result code, result and info for sending to mobile
- * application
- * @param result_code contains result code for sending to mobile application
- * @return result for sending to mobile application.
- * @deprecated
- */
- DEPRECATED bool PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& info);
- /**
- * @brief Prepare result code, 'success' result and info for sending
- * to mobile application
- * @param result_code contains result code for sending to mobile application
- * @return result for sending to mobile application.
- */
- const ResponseParams& PrepareResponseParameters();
-
- /**
- * @brief Sends TTS Speak request
- */
- void SendSpeakRequest();
-
- /**
- * @brief Sends UI PerformAudioPassThru request
- */
- void SendPerformAudioPassThruRequest();
-
- /**
- * @brief Sends UI RecordStart notification after TTS Speak response received.
- * Indicates that capturing mic data should be started
- */
- void SendRecordStartNotification();
-
- /**
- * @brief Starts microphone recording
- */
- void StartMicrophoneRecording();
-
- /**
- * @brief Checks perform audio pass thru params(initialPrompt, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if perform audio pass thru contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- /**
- * @brief If is_active_tts_speak_ TRUE - set up to FALSE and send request
- * TTS_StopSpeaking to HMI
- */
- void FinishTTSSpeak();
-
- /*
- * @brief Tells if there are sent requests without responses
- */
- bool IsWaitingHMIResponse();
-
- /**
- * @brief Pair of result_code and success for mobile app
- */
- typedef std::pair<mobile_apis::Result::eType, bool> AudioPassThruResults;
-
- /**
- * @brief Checks result code from HMI for splitted RPC
- * and returns parameter for sending to mobile app in
- * audioPassThru communication.
- * @param ui_response contains result_code from UI
- * @param tts_response contains result_code from TTS
- * @return pair of result code (UI error code has precedence than TTS's,
- * error_code from TTS is turned to WARNINGS) and
- * result for mobile app
- */
- AudioPassThruResults PrepareAudioPassThruResultCodeForResponse(
- const ResponseInfo& ui_response, const ResponseInfo& tts_response);
-
- hmi_apis::Common_Result::eType result_tts_speak_;
- hmi_apis::Common_Result::eType result_ui_;
- std::string ui_info_;
- std::string tts_info_;
-
- DISALLOW_COPY_AND_ASSIGN(PerformAudioPassThruRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h b/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h
deleted file mode 100644
index 29005d7b01..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PerformAudioPassThruResponse command class
- **/
-class PerformAudioPassThruResponse : public CommandResponseImpl {
- public:
- /**
- * @brief PerformAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- PerformAudioPassThruResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief PerformAudioPassThruResponse class destructor
- **/
- virtual ~PerformAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PerformAudioPassThruResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h b/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h
deleted file mode 100644
index c482e2d548..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h
+++ /dev/null
@@ -1,241 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_INTERACTION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_INTERACTION_REQUEST_H_
-
-#include <string>
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief PerformInteractionRequest command class
- **/
-class PerformInteractionRequest : public CommandRequestImpl {
- public:
- /**
- * @brief PerformInteractionRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- PerformInteractionRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief PerformInteractionRequest class destructor
- **/
- virtual ~PerformInteractionRequest();
-
- /**
- * @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
- */
- virtual void on_event(const event_engine::Event& event);
-
- /*
- * @brief Function is called by RequestController when request execution time
- * has exceed it's limit
- *
- */
- virtual void onTimeOut();
-
- private:
- /**
- * @brief Function will be called when VR_OnCommand event
- * comes
- * @param message which should send to mobile side
- * @return true if send response to mobile application otherwise
- * return false.
- */
- bool ProcessVRResponse(const smart_objects::SmartObject& message,
- smart_objects::SmartObject& msg_params);
-
- /**
- * @brief Sends PerformInteraction response to mobile side
- * @param message which should send to mobile side
- */
- void ProcessUIResponse(const smart_objects::SmartObject& message,
- smart_objects::SmartObject& msg_params);
-
- /*
- * @brief Sends UI PerformInteraction request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendUIPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sends TTS PerformInteraction request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendVRPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sends UI Show VR help request to HMI
- *
- * @param app_id Application ID
- */
- void SendUIShowVRHelpRequest(ApplicationSharedPtr const app);
-
- /*
- * @brief Checks if incoming choice set doesn't has similar menu names.
- *
- * @param app_id Application ID
- *
- * return Return TRUE if there are no similar menu names in choice set,
- * otherwise FALSE
- */
- bool CheckChoiceSetMenuNames(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Checks if incoming choice set doesn't has similar VR synonyms.
- *
- * @param app_id Application ID
- *
- * return Return TRUE if there are no similar VR synonyms in choice set,
- * otherwise FALSE
- */
- bool CheckChoiceSetVRSynonyms(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Checks if request with non-sequential positions of vrHelpItems
- * SDLAQ-CRS-466
- *
- * @param app_id Application ID
- *
- * @return TRUE if vrHelpItems positions are sequential,
- * otherwise FALSE
- */
- bool CheckVrHelpItemPositions(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Disable PerformInteraction state in application and
- * delete VR commands from HMI
- */
- void DisablePerformInteraction();
-
- /**
- * @brief Checks perform interaction params(initialText, initialPrompt, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if perform interaction contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- /**
- * @brief Send HMI close PopUp and call DisablePerformInteraction
- */
- void TerminatePerformInteraction();
-
- /**
- * @brief Checks parameter ChoiceID from response.
- * @param app contains pointer to application
- * @param choice_id contains ChoiceID from response.
- * @return if ChoiceID from response is correct method returns TRUE
- * otherwise returns FALSE.
- */
- bool CheckChoiceIDFromResponse(ApplicationSharedPtr app, int32_t choice_id);
-
- /**
- * @brief Checks for a match of choice ID, in
- * choice sets.
- * @param app contains pointer to application.
- * @param choice_set_id_list_length contains amount
- * of choice set ids.
- * @param choice_set_id_list array of choice set ids
- * @return If request contains several choice sets with
- * same choice id returns false, otherwise returns
- * true.
- */
- bool CheckChoiceIDFromRequest(
- ApplicationSharedPtr app,
- const size_t choice_set_id_list_length,
- const smart_objects::SmartObject& choice_set_id_list) const;
-
- /**
- * @brief Tells if there are sent requests without responses
- * @return If there is request without response method returns TRUE
- * otherwise returns FALSE
- */
- const bool HasHMIResponsesToWait() const;
-
- /**
- * @brief Check UI & VR result codes, send response to mobile
- * @param msg_param Message params to send
- */
- void SendBothModeResponse(const smart_objects::SmartObject& msg_param);
-
- mobile_apis::InteractionMode::eType interaction_mode_;
- bool ui_response_received_;
- bool vr_response_received_;
- bool app_pi_was_active_before_;
- static uint32_t pi_requests_count_;
- hmi_apis::Common_Result::eType vr_result_code_;
- hmi_apis::Common_Result::eType ui_result_code_;
- std::string ui_info_;
- std::string vr_info_;
-
- DISALLOW_COPY_AND_ASSIGN(PerformInteractionRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_INTERACTION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h b/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h
deleted file mode 100644
index 209b469d0d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_INTERACTION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_INTERACTION_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PerformInteractionResponse command class
- **/
-class PerformInteractionResponse : public CommandResponseImpl {
- public:
- /**
- * @brief PerformInteractionResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- PerformInteractionResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief PerformInteractionResponse class destructor
- **/
- virtual ~PerformInteractionResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PerformInteractionResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h b/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h
deleted file mode 100644
index ad13f0ee52..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h
+++ /dev/null
@@ -1,82 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PUT_FILE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PUT_FILE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PutFileRequest command class
- **/
-class PutFileRequest : public CommandRequestImpl {
- public:
- /**
- * @brief PutFileRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- PutFileRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief PutFileRequest class destructor
- **/
- virtual ~PutFileRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- int64_t offset_;
- std::string sync_file_name_;
- int64_t length_;
- mobile_apis::FileType::eType file_type_;
- bool is_persistent_file_;
-
- void SendOnPutFileNotification();
- DISALLOW_COPY_AND_ASSIGN(PutFileRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PUT_FILE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h b/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h
deleted file mode 100644
index aa407c8d83..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PUT_FILE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PUT_FILE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PutFileResponse command class
- **/
-class PutFileResponse : public CommandResponseImpl {
- public:
- /**
- * @brief PutFileResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- PutFileResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief PutFileResponse class destructor
- **/
- virtual ~PutFileResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PutFileResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_PUT_FILE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h b/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h
deleted file mode 100644
index c88f16dab0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h
+++ /dev/null
@@ -1,81 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ReadDIDRequest command class
- **/
-class ReadDIDRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ReadDIDRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ReadDIDRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ReadDIDRequest class destructor
- **/
- virtual ~ReadDIDRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ReadDIDRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h b/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h
deleted file mode 100644
index 2e493fa0ec..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ReadDIDResponse command class
- **/
-class ReadDIDResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ReadDIDResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ReadDIDResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ReadDIDResponse class destructor
- **/
- virtual ~ReadDIDResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ReadDIDResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h b/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
deleted file mode 100644
index 5713e2e814..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
+++ /dev/null
@@ -1,223 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "utils/macro.h"
-#include "utils/custom_string.h"
-
-namespace policy {
-struct DeviceInfo;
-}
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-/**
- * @brief Register app interface request command class
- **/
-class RegisterAppInterfaceRequest : public CommandRequestImpl {
- public:
- /**
- * \brief RegisterAppInterfaceRequest class constructor
- **/
- RegisterAppInterfaceRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief RegisterAppInterfaceRequest class destructor
- **/
- virtual ~RegisterAppInterfaceRequest();
-
- /**
- * @brief Init required by command resources
- **/
- virtual bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Prepares and sends RegisterAppInterface response to mobile
- * considering application type
- **/
- void SendRegisterAppInterfaceResponseToMobile();
-
- private:
- /**
- * @brief The AppicationType enum defines whether application is newly
- * registered or existing and being switched over another transport
- */
- enum class ApplicationType {
- kNewApplication,
- kSwitchedApplicationHashOk,
- kSwitchedApplicationWrongHashId
- };
-
- /**
- * @brief Prepares and sends RegisterAppInterface response to mobile
- * considering application type
- * @param app_type Type of application
- **/
- void SendRegisterAppInterfaceResponseToMobile(ApplicationType app_type);
-
- smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification(
- const uint32_t connection_key, ApplicationSharedPtr app);
-
- /**
- * @brief SendChangeRegistration send ChangeRegistration on HMI
- * @param function_id interface specific ChangeRegistration
- * @param language language of registration
- * @param app_id application to change registration
- */
- void SendChangeRegistration(const hmi_apis::FunctionID::eType function_id,
- const int32_t language,
- const uint32_t app_id);
-
- /**
- * @brief SendChangeRegistrationOnHMI send required SendChangeRegistration
- * HMI
- * @param app application to change registration
- */
- void SendChangeRegistrationOnHMI(ApplicationConstSharedPtr app);
-
- /**
- * @brief Sends OnAppRegistered notification to HMI
- *
- *@param application_impl application with changed HMI status
- *
- **/
- void SendOnAppRegisteredNotificationToHMI(const Application& application_impl,
- bool resumption = false,
- bool need_restore_vr = false);
- /*
- * @brief Check new ID along with known mobile application ID
- *
- * return TRUE if ID is known already, otherwise - FALSE
- */
- bool IsApplicationWithSameAppIdRegistered();
-
- /*
- * @brief Check new application parameters (name, tts, vr) for
- * coincidence with already known parameters of registered applications
- *
- * return SUCCESS if there is no coincidence of app.name/TTS/VR synonyms,
- * otherwise appropriate error code returns
- */
- mobile_apis::Result::eType CheckCoincidence();
-
- /*
- * @brief Predicate for using with CheckCoincidence method to compare with VR
- * synonym SO
- *
- * return TRUE if there is coincidence of VR, otherwise FALSE
- */
- struct CoincidencePredicateVR {
- CoincidencePredicateVR(const custom_str::CustomString& newItem)
- : newItem_(newItem) {}
-
- bool operator()(const smart_objects::SmartObject& obj) {
- const custom_str::CustomString& vr_synonym = obj.asCustomString();
- return newItem_.CompareIgnoreCase(vr_synonym);
- }
- const custom_str::CustomString& newItem_;
- };
-
- /**
- * @brief Check request parameters against policy table data
- * @return SUCCESS if check ok, otherwise return appropriate error code
- */
- mobile_apis::Result::eType CheckWithPolicyData();
-
- /**
- * @brief Fill DeviceInfo struct with data from request, if any
- * @param device_info Struct for device params from request
- */
- void FillDeviceInfo(policy::DeviceInfo* device_info);
-
- /**
- * @brief Checks register app interface params(ttsName, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if register app interface contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- /**
- * @brief Checks vehicle type params (model, year etc.) and in case of absense
- * replaces with policy table backup values
- * @param vehicle_type VehicleType struct
- * @param param Vehicle param
- * @param backup_value Backup value
- */
- void CheckResponseVehicleTypeParam(smart_objects::SmartObject& vehicle_type,
- const std::string& param,
- const std::string& backup_value);
- /**
- * @brief Sends ButtonSubscription notification at start up
- * to notify HMI that app subscribed on the custom button by default.
- */
- void SendSubscribeCustomButtonNotification();
-
- /**
- * @brief IsApplicationSwitched checks whether application is switched from
- * another transport. If application id is found, but not in reconnection
- * list, returns 'already registered' code. Otherwise - proceed with
- * switching.
- * @return True if application is detected as switched, otherwise false.
- */
- bool IsApplicationSwitched();
-
- private:
- std::string response_info_;
- mobile_apis::Result::eType result_checking_app_hmi_type_;
-
- policy::PolicyHandlerInterface& GetPolicyHandler();
- DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h b/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h
deleted file mode 100644
index b125cc7c55..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief Register app interface request command class
- **/
-class RegisterAppInterfaceResponse : public CommandResponseImpl {
- public:
- /**
- * \brief RegisterAppInterfaceResponse class constructor
- **/
- RegisterAppInterfaceResponse(const MessageSharedPtr& response,
- ApplicationManager& application_manager)
- : CommandResponseImpl(response, application_manager) {}
-
- /**
- * \brief RegisterAppInterfaceResponse class destructor
- **/
- virtual ~RegisterAppInterfaceResponse() {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- void SetHeartBeatTimeout(uint32_t connection_key,
- const std::string& mobile_app_id);
-
- DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h b/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h
deleted file mode 100644
index c16a014c9f..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h
+++ /dev/null
@@ -1,143 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ResetGlobalPropertiesRequest command class
- **/
-class ResetGlobalPropertiesRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ResetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ResetGlobalPropertiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ResetGlobalPropertiesRequest class destructor
- **/
- ~ResetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- 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(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
- * @param out_response_info contains info for sending to mobile applicaion
- * @return result for sending to mobile application.
- */
- bool PrepareResponseParameters(mobile_apis::Result::eType& out_result_code,
- std::string& out_response_info);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- DISALLOW_COPY_AND_ASSIGN(ResetGlobalPropertiesRequest);
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType tts_result_;
- std::string ui_response_info_;
- std::string tts_response_info_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h b/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h
deleted file mode 100644
index 39e28486d4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ResetGlobalPropertiesResponse command class
- **/
-class ResetGlobalPropertiesResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ResetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ResetGlobalPropertiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ResetGlobalPropertiesResponse class destructor
- **/
- virtual ~ResetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h b/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h
deleted file mode 100644
index b3058c9a26..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h
+++ /dev/null
@@ -1,86 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief scrollable message request command class
- **/
-class ScrollableMessageRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ScrollableMessageRequest class constructor
- **/
- ScrollableMessageRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SliderCommand class destructor
- **/
- virtual ~ScrollableMessageRequest();
-
- /**
- * @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
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScrollableMessageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h b/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
deleted file mode 100644
index aa0ac01e9d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class ScrollableMessageResponse : public CommandResponseImpl {
- public:
- /**
- * \brief ScrollableMessageResponse class constructor
- **/
- ScrollableMessageResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SpeakResponseCommand class destructor
- **/
- virtual ~ScrollableMessageResponse() {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScrollableMessageResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h b/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h
deleted file mode 100644
index 13ed06cce6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
-
-#include <string>
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/event_engine/event.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SendHapticDataRequest command class
- **/
-class SendHapticDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SendHapticDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- * @param application_manager Reference of application manager
- **/
- SendHapticDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SendHapticDataRequest class destructor
- **/
- ~SendHapticDataRequest() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SendHapticDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h b/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h
deleted file mode 100644
index 2a60746c61..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SendHapticDataResponse command class
- **/
-class SendHapticDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SendHapticDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- * @param application_manager Reference of application manager
- **/
- SendHapticDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SendHapticDataResponse class destructor
- **/
- ~SendHapticDataResponse() OVERRIDE;
-
- /**
- * @brief Execute command
- **/
- void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SendHapticDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_location_request.h b/src/components/application_manager/include/application_manager/commands/mobile/send_location_request.h
deleted file mode 100644
index 570e70d007..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/send_location_request.h
+++ /dev/null
@@ -1,96 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_LOCATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_LOCATION_REQUEST_H_
-
-#include <list>
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief send location request command class
- */
-class SendLocationRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SendLocationRquest class constructor
- */
- SendLocationRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SendLocationRquest class destructor
- */
- virtual ~SendLocationRequest();
-
- /**
- * @brief Execute command
- */
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief CheckFieldsCompatibility checks if fields are compatible with each
- * other.
- * @return true if compatible, otherwise return false
- */
- bool CheckFieldsCompatibility();
-
- /**
- * @brief Checks sendlocation params(locationName, locationDescription, ...).
- * Checks string if it contains \t\n \\t \\n or whitespace
- * @return true if string contains invalid characters, otherwise returns false
- */
- bool IsWhiteSpaceExist();
-
- bool CheckHMICapabilities(
- std::vector<hmi_apis::Common_TextFieldName::eType>& fields_names);
- DISALLOW_COPY_AND_ASSIGN(SendLocationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_LOCATION_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h b/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h
deleted file mode 100644
index 0be0be8ca3..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h
+++ /dev/null
@@ -1,67 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_LOCATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_LOCATION_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-
-namespace application_manager {
-namespace commands {
-
-class SendLocationResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SendLocationResponse class constructor
- */
- SendLocationResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SendLocationResponse class destructor
- */
- virtual ~SendLocationResponse();
-
- /**
- * @brief Execute command
- */
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SendLocationResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_LOCATION_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_request.h b/src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_request.h
deleted file mode 100644
index 4735d89fb0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_request.h
+++ /dev/null
@@ -1,112 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_APP_ICON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_APP_ICON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetIconRequest command class
- **/
-class SetAppIconRequest : public CommandRequestImpl {
- public:
- /**
- * @brief Contains information about the type of image
- */
- typedef enum { STATIC = 0, DYNAMIC } ImageType;
-
- /**
- * @brief SetIconRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetAppIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetIconRequest class destructor
- **/
- virtual ~SetAppIconRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /**
- * @brief Copies file to icon storage
- * @param path_to_file Path to icon
- */
- void CopyToIconStorage(const std::string& path_to_file) const;
-
- /**
- * @brief Remove oldest icons
- * @param storage Path to icons storage
- * @param icons_amount Amount of icons to be deleted
- */
- void RemoveOldestIcons(const std::string& storage,
- const uint32_t icons_amount) const;
-
- /**
- * @brief Checks, if there enough space in storage for icon copy
- * @param file_size File size
- * @return true, if enough, otherwise - false
- */
- bool IsEnoughSpaceForIcon(const uint64_t icon_size) const;
- DISALLOW_COPY_AND_ASSIGN(SetAppIconRequest);
-
- private:
- /**
- * @brief Checks, if icons saving to configured folder is enabled
- */
- bool is_icons_saving_enabled_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_APP_ICON_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_response.h b/src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_response.h
deleted file mode 100644
index 742332742b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_app_icon_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_APP_ICON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_APP_ICON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetIconResponse command class
- **/
-class SetAppIconResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetIconResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetAppIconResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetIconResponse class destructor
- **/
- virtual ~SetAppIconResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetAppIconResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_APP_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h b/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h
deleted file mode 100644
index 06e8d70f79..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h
+++ /dev/null
@@ -1,81 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetDisplayLayoutRequest command class
- **/
-class SetDisplayLayoutRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SetDisplayLayoutRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetDisplayLayoutRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetDisplayLayoutRequest class destructor
- **/
- virtual ~SetDisplayLayoutRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- **/
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetDisplayLayoutRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h b/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h
deleted file mode 100644
index a2040307b0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetDisplayLayoutResponse command class
- **/
-class SetDisplayLayoutResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetDisplayLayoutResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetDisplayLayoutResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetDisplayLayoutResponse class destructor
- **/
- virtual ~SetDisplayLayoutResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetDisplayLayoutResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h b/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h
deleted file mode 100644
index da28d33de8..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h
+++ /dev/null
@@ -1,159 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#include <string>
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-#include "application_manager/application.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Register app interface request command class
- **/
-class SetGlobalPropertiesRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetGlobalPropertiesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetGlobalPropertiesRequest class destructor
- **/
- ~SetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- // Verify correctness VrHelptitle value
- static bool ValidateVRHelpTitle(
- const smart_objects::SmartObject* const vr_help_so_ptr);
-
- // prepare UI sending data (VrHelps, Menus, Keyboard) to SmartObject
- static void PrepareUIRequestVRHelpData(
- const ApplicationSharedPtr app,
- const smart_objects::SmartObject& msg_params,
- smart_objects::SmartObject& out_params);
-
- static bool PrepareUIRequestDefaultVRHelpData(
- const ApplicationSharedPtr app, smart_objects::SmartObject& out_params);
-
- static void PrepareUIRequestMenuAndKeyboardData(
- const ApplicationSharedPtr app,
- const smart_objects::SmartObject& msg_params,
- smart_objects::SmartObject& out_params);
-
- // Send TTS request to HMI
- void SendTTSRequest(const smart_objects::SmartObject& params,
- bool use_events);
-
- // Send UI request to HMI
- void SendUIRequest(const smart_objects::SmartObject& params, bool use_events);
-
- // VRHelp shall contain sequential positions and start from 1
- static bool CheckVrHelpItemsOrder(const smart_objects::SmartObject& vr_help);
-
- /**
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- /**
- * @brief Checks if request has at least one parameter
- *
- * @param params request parameters
- *
- * @returns true if at least one parameter is present in object
- */
- static bool ValidateConditionalMandatoryParameters(
- const smart_objects::SmartObject& params);
-
- /**
- * @brief Checks set global properties params(helpPrompt, timeoutPrompt, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if set global properties contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- /*
- * @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 sending to mobile applicaion
- * @return result for sending to mobile application.
- */
- bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
- std::string& info);
-
- bool is_ui_send_;
- bool is_tts_send_;
-
- bool is_ui_received_;
- bool is_tts_received_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType tts_result_;
- std::string ui_response_info_;
- std::string tts_response_info_;
-
- DISALLOW_COPY_AND_ASSIGN(SetGlobalPropertiesRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h b/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h
deleted file mode 100644
index c5beda084d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Register app interface request command class
- **/
-class SetGlobalPropertiesResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetGlobalPropertiesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetGlobalPropertiesResponse class destructor
- **/
- virtual ~SetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h b/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h
deleted file mode 100644
index 96d4ac6f1e..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h
+++ /dev/null
@@ -1,87 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application_manager.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetIconRequest command class
- **/
-class SetIconRequest : public CommandRequestImpl {
- public:
- /**
- * @brief Contains information about the type of image
- */
- typedef enum { STATIC = 0, DYNAMIC } ImageType;
-
- /**
- * @brief SetIconRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SetIconRequest class destructor
- **/
- virtual ~SetIconRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetIconRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h b/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h
deleted file mode 100644
index 83be0d4a4b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/application_manager.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetIconResponse command class
- **/
-class SetIconResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetIconResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SetIconResponse(const MessageSharedPtr& message, ApplicationManager& app_man);
-
- /**
- * @brief SetIconResponse class destructor
- **/
- virtual ~SetIconResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetIconResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h b/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h
deleted file mode 100644
index 283dd41622..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h
+++ /dev/null
@@ -1,82 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetMediaClockRequest request command class
- **/
-class SetMediaClockRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SetMediaClockRequest class constructor
- **/
- SetMediaClockRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief ShowCommand class destructor
- **/
- virtual ~SetMediaClockRequest();
-
- /**
- * @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 event_engine::Event& event);
-
- private:
- bool isDataValid();
-
- DISALLOW_COPY_AND_ASSIGN(SetMediaClockRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h b/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
deleted file mode 100644
index 3f41ae2dab..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SetMediaClockTimerResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SetMediaClockTimerResponse class constructor
- **/
- SetMediaClockTimerResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SetMediaClockTimerResponse class destructor
- **/
- virtual ~SetMediaClockTimerResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetMediaClockTimerResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h b/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h
deleted file mode 100644
index f015d740df..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h
+++ /dev/null
@@ -1,90 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ShowConstantTBTRequest command class
- **/
-class ShowConstantTBTRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ShowConstantTBTRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ShowConstantTBTRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ShowConstantTBTRequest class destructor
- **/
- virtual ~ShowConstantTBTRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief Checks show constant TBT params(turnIcon, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if show constant TBT contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- DISALLOW_COPY_AND_ASSIGN(ShowConstantTBTRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h b/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h
deleted file mode 100644
index 73aad5de89..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ShowConstantTBTResponse command class
- **/
-class ShowConstantTBTResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ShowConstantTBTResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- ShowConstantTBTResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief ShowConstantTBTResponse class destructor
- **/
- virtual ~ShowConstantTBTResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShowConstantTBTResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/show_request.h b/src/components/application_manager/include/application_manager/commands/mobile/show_request.h
deleted file mode 100644
index a10997bacd..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/show_request.h
+++ /dev/null
@@ -1,99 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief show request command class
- **/
-class ShowRequest : public CommandRequestImpl {
- public:
- /**
- * \brief ShowRequest class constructor
- **/
- ShowRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief ShowRequest class destructor
- **/
- virtual ~ShowRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Check if all strings have valid syntax in request
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckStringsOfShowRequest();
-
- /**
- * @brief Handle the conversion of metadata information from the incoming
- * mobile json message format to the outgoing hmi json message format
- */
- void HandleMetadata(const char* field_id,
- int32_t field_index,
- smart_objects::SmartObject& msg_params);
-
- mobile_apis::Result::eType core_result_code_;
- std::string core_response_info_;
-
- DISALLOW_COPY_AND_ASSIGN(ShowRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/show_response.h b/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
deleted file mode 100644
index 0a54fb9cde..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class ShowResponse : public CommandResponseImpl {
- public:
- /**
- * \brief ShowResponse class constructor
- **/
- ShowResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief ShowResponse class destructor
- **/
- virtual ~ShowResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShowResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h b/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h
deleted file mode 100644
index 2446c9ff20..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h
+++ /dev/null
@@ -1,92 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief slider request command class
- **/
-class SliderRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SliderRequest class constructor
- **/
- SliderRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SliderRequest class destructor
- **/
- virtual ~SliderRequest();
-
- /**
- * @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
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief Checks slider params(sliderHeader, sliderFooter, ...).
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if slider contains \t\n \\t \\n return TRUE, FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- DISALLOW_COPY_AND_ASSIGN(SliderRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h b/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
deleted file mode 100644
index bc0efaadd0..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SliderResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SliderResponse class constructor
- **/
- SliderResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SpeakResponseCommand class destructor
- **/
- virtual ~SliderResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SliderResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h b/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h
deleted file mode 100644
index dc22652b27..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h
+++ /dev/null
@@ -1,94 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief speak request command class
- **/
-class SpeakRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SpeakRequest class constructor
- **/
- SpeakRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SpeakRequest class destructor
- **/
- virtual ~SpeakRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Sends Speak response to mobile side
- *
- * @param message which should send to mobile side
- *
- */
- void ProcessTTSSpeakResponse(const smart_objects::SmartObject& message);
-
- /**
- * @brief Checks speak param ttsChunks on the contents \t\n \\t \\n
- * @return if speak contains \t\n \\t \\n return TRUE, FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- DISALLOW_COPY_AND_ASSIGN(SpeakRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h b/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
deleted file mode 100644
index 2808526603..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SpeakResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SpeakResponse class constructor
- **/
- SpeakResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SpeakResponse class destructor
- **/
- virtual ~SpeakResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SpeakResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h
deleted file mode 100644
index cf65e2a6a4..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h
+++ /dev/null
@@ -1,99 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeButtonRequest command class
- **/
-class SubscribeButtonRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SubscribeButtonRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SubscribeButtonRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SubscribeButtonRequest class destructor
- **/
- ~SubscribeButtonRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /**
- * @brief Checks if button subscription allowed. In case non-media
- * application trying to subscribe on buttons(tune, seek) negative result will
- * be returned
- *
- * @param app Application requested subscription
- * @param btn_id Button to be subscribe
- *
- * @return TRUE on success, otherwise false
- **/
- bool IsSubscriptionAllowed(ApplicationSharedPtr app,
- const mobile_apis::ButtonName::eType btn_id);
-
- /**
- * @brief Sends ButtonSubscription notification
- * to notify HMI that app subscribed on the button.
- */
- void SendSubscribeButtonNotification();
-
- DISALLOW_COPY_AND_ASSIGN(SubscribeButtonRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h
deleted file mode 100644
index 38e0dd2dc6..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeButtonResponse command class
- **/
-class SubscribeButtonResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SubscribeButtonResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SubscribeButtonResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SubscribeButtonResponse class destructor
- **/
- virtual ~SubscribeButtonResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeButtonResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h
deleted file mode 100644
index 719c514729..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Copyright (c) 2017, Livio, Inc.
- 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_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeVehicleDataRequest command class
- **/
-class SubscribeVehicleDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SubscribeVehicleDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SubscribeButtonCommandRequest class destructor
- **/
- ~SubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
-#ifdef HMI_DBUS_API
- private:
- struct HmiRequest {
- hmi_apis::Common_Result::eType status;
- bool complete;
- smart_objects::SmartObject value;
- const char* str;
- hmi_apis::FunctionID::eType func_id;
- };
-
- typedef std::vector<HmiRequest> HmiRequests;
- HmiRequests hmi_requests_;
-#endif // #ifdef HMI_DBUS_API
-
- private:
- /**
- * @brief Checks, if any app is subscribed for particular VI parameter
- * @param param_id VI parameter id
- * @return true, if there are registered apps subscribed for VI parameter,
- * otherwise - false
- */
- bool IsSomeoneSubscribedFor(const uint32_t param_id) const;
-
- /**
- * @brief Adds VI parameters being subscribed by another or the same app to
- * response with appropriate results
- * @param msg_params 'message_params' response section reference
- */
- void AddAlreadySubscribedVI(smart_objects::SmartObject& msg_params) const;
-
- /**
- * @brief Removes subscription for VI parameters which subsription attempt
- * returned an error
- * @param app Pointer to application sent subscribe request
- * @param msg_params 'message_parameters' response section reference
- */
- void UnsubscribeFailedSubscriptions(
- ApplicationSharedPtr app,
- const smart_objects::SmartObject& msg_params) const;
-
- DEPRECATED void CheckVISubscribtions(
- ApplicationSharedPtr app,
- std::string& out_info,
- mobile_apis::Result::eType& out_result_code,
- smart_objects::SmartObject& out_response_params,
- smart_objects::SmartObject& out_request_params,
- bool& out_result);
- /**
- * @brief Checks if current application and other applications
- * were subscribed to VI, prepare data that need to send to mobile app
- * or HMI.
- * @param app contains application
- * @param out_info contains resulting info for sending to mobile app
- * @param out_result_code contains result code for sending to mobile app
- * @param out_response_params contains parameters that SDL sends to
- * mobile application
- * @param out_request_params contains parameters that SDL sends to
- * HMI
- * @param result contains result that SDL sends to mobile app.
- */
- void CheckVISubscriptions(ApplicationSharedPtr app,
- std::string& out_info,
- mobile_apis::Result::eType& out_result_code,
- smart_objects::SmartObject& out_response_params,
- smart_objects::SmartObject& out_request_params,
- bool& out_result);
-
- /**
- * @brief VI parameters which had been already subscribed by another apps
- * befor particular app subscribed for these parameters
- */
- VehicleInfoSubscriptions vi_already_subscribed_by_another_apps_;
-
- /**
- * @brief VI parameters which had been subscribed already by particular app
- */
- VehicleInfoSubscriptions vi_already_subscribed_by_this_app_;
-
- /**
- * @brief VI parameters which wait for subscribe after HMI respond
- */
- VehicleInfoSubscriptions vi_waiting_for_subscribe_;
-
- DISALLOW_COPY_AND_ASSIGN(SubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h
deleted file mode 100644
index 7e3cffc387..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeVehicleDataResponse command class
- **/
-class SubscribeVehicleDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SubscribeVehicleDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UnsubscribeVehicleDataCommandRequest class destructor
- **/
- virtual ~SubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h
deleted file mode 100644
index f392dd6dd1..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h
+++ /dev/null
@@ -1,82 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubsribeWayPointsRequest command class
- **/
-class SubscribeWayPointsRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SubscribeWayPointsRequest class constructor
- **/
- SubscribeWayPointsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SubscribeWayPointsRequest class destructor
- **/
- ~SubscribeWayPointsRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeWayPointsRequest);
-};
-
-} // commands
-
-} // application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h
deleted file mode 100644
index cfdc0eede7..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h
+++ /dev/null
@@ -1,72 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeWayPointsResponse command class
- **/
-class SubscribeWayPointsResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SubscribeWayPointsResponse class constructor
- **/
- SubscribeWayPointsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief SubscribeWayPointsResponse class destructor
- **/
- virtual ~SubscribeWayPointsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeWayPointsResponse);
-};
-
-} // commands
-
-} // application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/system_request.h b/src/components/application_manager/include/application_manager/commands/mobile/system_request.h
deleted file mode 100644
index 1d163b6cd8..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/system_request.h
+++ /dev/null
@@ -1,94 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYSTEM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYSTEM_REQUEST_H_
-
-#include <string>
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/event_engine/event.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SystemRequest command class
- **/
-class SystemRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SystemRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SystemRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SystemRequest class destructor
- **/
- virtual ~SystemRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief Validates data coming within QueryApps response
- * @param data Data
- * @return true, if data is valid, otherwise - false
- */
- bool ValidateQueryAppData(smart_objects::SmartObject& data) const;
-
- private:
- static uint32_t index;
- std::string processing_file_;
- DISALLOW_COPY_AND_ASSIGN(SystemRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYSTEM_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/system_response.h b/src/components/application_manager/include/application_manager/commands/mobile/system_response.h
deleted file mode 100644
index efee210b7b..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/system_response.h
+++ /dev/null
@@ -1,73 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYSTEM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYSTEM_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SystemResponse command class
- **/
-class SystemResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SystemResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- SystemResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief SystemResponse class destructor
- **/
- virtual ~SystemResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SystemResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYSTEM_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h b/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h
deleted file mode 100644
index acc7374e18..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h
+++ /dev/null
@@ -1,75 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Unregister app interface request command class
- **/
-class UnregisterAppInterfaceRequest : public CommandRequestImpl {
- public:
- /**
- * \brief UnregisterAppInterfaceRequest class constructor
- **/
- UnregisterAppInterfaceRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
- /**
- * \brief UnregisterAppInterfaceRequest class destructor
- **/
- virtual ~UnregisterAppInterfaceRequest() {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
- // virtual void cleanUp() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnregisterAppInterfaceRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h b/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h
deleted file mode 100644
index 1a459e109c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h
+++ /dev/null
@@ -1,71 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief Unregister app interface request command class
- **/
-class UnregisterAppInterfaceResponse : public CommandResponseImpl {
- public:
- /**
- * \brief UnregisterAppInterfaceResponse class constructor
- **/
- UnregisterAppInterfaceResponse(const MessageSharedPtr& response,
- ApplicationManager& application_manager)
- : CommandResponseImpl(response, application_manager) {}
-
- /**
- * \brief UnregisterAppInterfaceResponse class destructor
- **/
- virtual ~UnregisterAppInterfaceResponse() {}
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnregisterAppInterfaceResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h
deleted file mode 100644
index b0206c4407..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h
+++ /dev/null
@@ -1,85 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeButtonRequest command class
- **/
-class UnsubscribeButtonRequest : public CommandRequestImpl {
- public:
- /**
- * @brief UnsubscribeButtonRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UnsubscribeButtonRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UnsubscribeButtonRequest class destructor
- **/
- ~UnsubscribeButtonRequest() FINAL;
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- /**
- * @brief Sends ButtonSubscription notification
- * to notify HMI that app unsubscribed from the button.
- */
- void SendUnsubscribeButtonNotification();
-
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeButtonRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h
deleted file mode 100644
index 06dbe84578..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeButtonResponse command class
- **/
-class UnsubscribeButtonResponse : public CommandResponseImpl {
- public:
- /**
- * @brief UnsubscribeButtonResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UnsubscribeButtonResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UnsubscribeButtonResponse class destructor
- **/
- virtual ~UnsubscribeButtonResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeButtonResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h
deleted file mode 100644
index 1c7d80797d..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,127 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeVehicleDataRequest command class
- **/
-class UnsubscribeVehicleDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief UnsubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UnsubscribeVehicleDataRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UnsubscribeVehicleDataRequest class destructor
- **/
- ~UnsubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
-#ifdef HMI_DBUS_API
- private:
- struct HmiRequest {
- hmi_apis::Common_Result::eType status;
- bool complete;
- smart_objects::SmartObject value;
- const char* str;
- hmi_apis::FunctionID::eType func_id;
- };
-
- typedef std::vector<HmiRequest> HmiRequests;
- HmiRequests hmi_requests_;
-#endif // #ifdef HMI_DBUS_API
-
- private:
- /**
- * @brief Checks, if any app is subscribed for particular VI parameter
- * @param param_id VI parameter id
- * @return true, if there are registered apps subscribed for VI parameter,
- * otherwise - false
- */
- bool IsSomeoneSubscribedFor(const uint32_t param_id) const;
-
- /**
- * @brief Adds VI parameters being unsubscribed by another or the same app to
- * response with appropriate results
- * @param msg_params 'message_params' response section reference
- */
- void AddAlreadyUnsubscribedVI(smart_objects::SmartObject& response) const;
-
- /**
- * @brief VI parameters which still being subscribed by another apps after
- * particular app had been unsubscribed from these parameters
- */
- VehicleInfoSubscriptions vi_still_subscribed_by_another_apps_;
-
- /**
- * @brief VI parameters which had been unsubscribed already by particular app
- */
- VehicleInfoSubscriptions vi_already_unsubscribed_by_this_app_;
-
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h
deleted file mode 100644
index a34a36688c..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeVehicleDataResponse command class
- **/
-class UnsubscribeVehicleDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief UnsubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UnsubscribeVehicleDataResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UnsubscribeVehicleDataResponse class destructor
- **/
- virtual ~UnsubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h
deleted file mode 100644
index 0b5462b7b5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h
+++ /dev/null
@@ -1,80 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class UnSubscribeWayPointsRequest : public CommandRequestImpl {
- public:
- /**
- * \brief UnSubscribeWayPointsRequest class constructor
- **/
- UnSubscribeWayPointsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief UnSubscribeWayPointsRequest class destructor
- **/
- ~UnSubscribeWayPointsRequest();
-
- /**
- * @brief Execute command
- **/
- void Run() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event) FINAL;
-
- /**
- * @brief Init sets hash update mode for request
- */
- bool Init() FINAL;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnSubscribeWayPointsRequest);
-};
-
-} // commands
-
-} // application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h
deleted file mode 100644
index 70211330a9..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h
+++ /dev/null
@@ -1,72 +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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeWayPointsResponse command class
- **/
-class UnsubscribeWayPointsResponse : public CommandResponseImpl {
- public:
- /**
- * \brief UnsubscribeWayPointsResponse class constructor
- **/
- UnsubscribeWayPointsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * \brief UnsubscribeWayPointsResponse class destructor
- **/
- virtual ~UnsubscribeWayPointsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeWayPointsResponse);
-};
-
-} // commands
-
-} // application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h b/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h
deleted file mode 100644
index e15e81caf5..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h
+++ /dev/null
@@ -1,98 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateTurnListRequest command class
- **/
-class UpdateTurnListRequest : public CommandRequestImpl {
- public:
- /**
- * @brief UpdateTurnListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateTurnListRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateTurnListRequest class destructor
- **/
- virtual ~UpdateTurnListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief check correct parameter turnList
- *
- * @return TRUE if turnList is correct,
- * otherwise FALSE
- */
- bool CheckTurnListArray();
-
- /**
- * @brief Checks update turn list param
- * When type is String there is a check on the contents \t\n \\t \\n
- * @return if update turn list contains \t\n \\t \\n return TRUE,
- * FALSE otherwise
- */
- bool IsWhiteSpaceExist();
-
- DISALLOW_COPY_AND_ASSIGN(UpdateTurnListRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h b/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h
deleted file mode 100644
index 481ad9f219..0000000000
--- a/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h
+++ /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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateTurnListResponse command class
- **/
-class UpdateTurnListResponse : public CommandResponseImpl {
- public:
- /**
- * @brief UpdateTurnListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- UpdateTurnListResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- /**
- * @brief UpdateTurnListResponse class destructor
- **/
- virtual ~UpdateTurnListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateTurnListResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/notification_from_hmi.h b/src/components/application_manager/include/application_manager/commands/notification_from_hmi.h
new file mode 100644
index 0000000000..8bbbd0e3de
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/notification_from_hmi.h
@@ -0,0 +1,67 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
+
+#include "application_manager/commands/command_impl.h"
+#include "interfaces/HMI_API.h"
+#include "smart_objects/smart_object.h"
+
+namespace application_manager {
+
+namespace commands {
+
+class NotificationFromHMI : public CommandImpl {
+ public:
+ NotificationFromHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+ virtual ~NotificationFromHMI();
+ virtual bool Init();
+ virtual bool CleanUp();
+ virtual void Run();
+ void SendNotificationToMobile(const MessageSharedPtr& message);
+ void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id,
+ const smart_objects::SmartObject& msg_params) const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NotificationFromHMI);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/notification_to_hmi.h b/src/components/application_manager/include/application_manager/commands/notification_to_hmi.h
new file mode 100644
index 0000000000..96a8cdf1aa
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/notification_to_hmi.h
@@ -0,0 +1,63 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
+
+#include "application_manager/commands/command_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+class NotificationToHMI : public CommandImpl {
+ public:
+ NotificationToHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+ virtual ~NotificationToHMI();
+ virtual bool Init();
+ virtual bool CleanUp();
+ virtual void Run();
+ void SendNotification();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NotificationToHMI);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/request_from_hmi.h b/src/components/application_manager/include/application_manager/commands/request_from_hmi.h
new file mode 100644
index 0000000000..11cd602b8e
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/request_from_hmi.h
@@ -0,0 +1,100 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_REQUEST_FROM_HMI_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_REQUEST_FROM_HMI_H_
+
+#include "application_manager/commands/command_impl.h"
+#include "interfaces/HMI_API.h"
+#include "smart_objects/smart_object.h"
+
+namespace application_manager {
+
+namespace commands {
+
+namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
+
+class RequestFromHMI : public CommandImpl, public event_engine::EventObserver {
+ public:
+ RequestFromHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+ virtual ~RequestFromHMI();
+ virtual bool Init();
+ virtual bool CleanUp();
+ virtual void Run();
+ virtual void on_event(const event_engine::Event& event);
+ /**
+ * @brief SendResponse allows to send response to hmi
+ * @param correlation_id the correlation id for the rfesponse.
+ * @param function_id the function id for which response will be sent
+ * @param result_code the result code.
+ */
+ void SendResponse(const bool success,
+ const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const hmi_apis::Common_Result::eType result_code);
+
+ /**
+ * @brief SendResponse allows to send error response to hmi
+ * @param correlation_id the correlation id for the response.
+ * @param function_id the function id for which response will be sent
+ * @param result_code the result code.
+ * @param error_message info message for error.
+ */
+ void SendErrorResponse(const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const hmi_apis::Common_Result::eType result_code,
+ const std::string error_message);
+
+ private:
+ /**
+ * @brief Fills common parameters for SO
+ * @param message Contains SO for filling
+ * @param correlation_id the correlation id for the response.
+ * @param function_id the function id for which response will be sent
+ */
+ void FillCommonParametersOfSO(
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& message,
+ const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RequestFromHMI);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_REQUEST_FROM_HMI_H_
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
new file mode 100644
index 0000000000..91586a74ce
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/request_to_hmi.h
@@ -0,0 +1,92 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_REQUEST_TO_HMI_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_REQUEST_TO_HMI_H_
+
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/application_manager.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief Check if HMI's interface is available.
+ * @param application_manager contains application manager component
+ * @param interface contains name of HMI's interface
+ * @return true if interface is available otherwise return fasle.
+ */
+bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
+ HmiInterfaces::InterfaceID interface);
+
+/**
+ * @brief Change interface state
+ * @param application_manager contains ApplicationManager instance
+ * @param response_from_hmi contains response from HMI
+ * @param interface contanins InterfaceID whose state is changed.
+ * @return true if field available exist and contains true in response params
+ * otherwise return false.
+ */
+bool ChangeInterfaceState(ApplicationManager& application_manager,
+ const smart_objects::SmartObject& response_from_hmi,
+ HmiInterfaces::InterfaceID interface);
+
+class RequestToHMI : public CommandImpl {
+ public:
+ RequestToHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+ virtual ~RequestToHMI();
+ virtual bool Init();
+ virtual bool CleanUp();
+ virtual void Run();
+ void SendRequest();
+
+ /*
+ * @brief Retrieves application ID
+ */
+ inline uint32_t application_id() const {
+ return (*message_)[strings::msg_params][strings::app_id].asUInt();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RequestToHMI);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_REQUEST_TO_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/response_from_hmi.h b/src/components/application_manager/include/application_manager/commands/response_from_hmi.h
new file mode 100644
index 0000000000..605d04067e
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/response_from_hmi.h
@@ -0,0 +1,73 @@
+/*
+* 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.
+*/
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_RESPONSE_FROM_HMI_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_RESPONSE_FROM_HMI_H_
+
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/application_manager.h"
+#include "interfaces/HMI_API.h"
+
+namespace application_manager {
+namespace commands {
+
+class ResponseFromHMI : public CommandImpl {
+ public:
+ ResponseFromHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+ virtual ~ResponseFromHMI();
+ virtual bool Init();
+ virtual bool CleanUp();
+ virtual void Run();
+ void SendResponseToMobile(const MessageSharedPtr& message,
+ ApplicationManager& application_manager);
+
+ /*
+ * @brief Creates HMI request
+ *
+ * @param function_id HMI request ID
+ * @param msg_params HMI request msg params
+ */
+ void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id,
+ const smart_objects::SmartObject& msg_params) const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ResponseFromHMI);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_RESPONSE_FROM_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/commands/response_to_hmi.h b/src/components/application_manager/include/application_manager/commands/response_to_hmi.h
new file mode 100644
index 0000000000..c8f5e90d4e
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/response_to_hmi.h
@@ -0,0 +1,66 @@
+
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_TO_HMI_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_TO_HMI_H_
+
+#include "application_manager/commands/command_impl.h"
+#include "interfaces/HMI_API.h"
+#include "smart_objects/smart_object.h"
+
+namespace application_manager {
+
+namespace commands {
+
+namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
+
+class ResponseToHMI : public CommandImpl {
+ public:
+ ResponseToHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+ virtual ~ResponseToHMI();
+ virtual bool Init();
+ virtual bool CleanUp();
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ResponseToHMI);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_TO_HMI_H_
diff --git a/src/components/application_manager/include/application_manager/core_service.h b/src/components/application_manager/include/application_manager/core_service.h
deleted file mode 100644
index 5e95ecd245..0000000000
--- a/src/components/application_manager/include/application_manager/core_service.h
+++ /dev/null
@@ -1,214 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_CORE_SERVICE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_CORE_SERVICE_H_
-
-#include <string>
-#include <vector>
-#include "application_manager/service.h"
-#include "application_manager/application.h"
-#include "policy/policy_types.h"
-
-namespace Json {
-class Value;
-}
-
-namespace application_manager {
-
-struct CommandParametersPermissions;
-
-/**
- * @brief Class through which the plug-in can interact with the core
- */
-class CoreService : public Service {
- public:
- /**
- * @brief CoreService class destructor
- */
- explicit CoreService(ApplicationManager& application_manager);
-
- /**
- * @brief CoreService class destructor
- */
- virtual ~CoreService();
-
- /**
- * @brief Checks message permissions and cuts parameters according
- * to policy table permissions
- * @param msg message to cut disallowed parameters
- * @return result according by mobile API
- */
- mobile_apis::Result::eType CheckPolicyPermissions(MessagePtr msg) FINAL;
-
- /**
- * Checks if module for application is present in policy table
- * @param app_id id of application
- * @param module type
- * @return true if module is present, otherwise - false
- */
- bool CheckModule(const ApplicationId& app_id,
- const std::string& module) FINAL;
-
- /**
- * Checks if application has remote control functions
- * @param app application
- * @return true if application has remote control functions
- */
- bool IsRemoteControlApplication(ApplicationSharedPtr app) const FINAL;
-
- /**
- * @brief Gets current state of the specified interface
- * @param interface which state to get
- * @return true if specified interface available otherwise false
- */
- bool IsInterfaceAvailable(
- const HmiInterfaces::InterfaceID interface) const FINAL;
-
- /**
- * Removes fake parameters from request to HMI
- * @param message message to handle
- */
- void RemoveHMIFakeParameters(application_manager::MessagePtr& message) FINAL;
-
- /**
- * @brief Get pointer to application by application id
- * @param app_id application id
- * return pointer to application
- */
- ApplicationSharedPtr GetApplication(ApplicationId app_id) FINAL;
-
- /**
- * @brief Send message to HMI
- * @param message Message to HMI
- */
- void SendMessageToHMI(const MessagePtr& message) FINAL;
-
- /**
- * @brief Send message to mobile device
- * @param message Message to mobile
- */
- void SendMessageToMobile(const MessagePtr& message) FINAL;
-
- /**
- * @brief Returns unique correlation ID for next HMI request
- *
- * @return Unique correlation ID
- */
- uint32_t GetNextCorrelationID() FINAL;
-
- /**
- * @brief Returns all applications
- *
- * @return List with shared pointers to applications
- */
- std::vector<ApplicationSharedPtr> GetApplications(AppExtensionUID uid) FINAL;
-
- /**
- * @brief Change hmi level of app and notify it
- * @param app Application to be changed and notified
- * @param level New HMI level of app
- */
- void ChangeNotifyHMILevel(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level) FINAL;
-
- const smart_objects::SmartObject* GetRCCapabilities() const FINAL;
- /**
- * @brief Notify HMI about app changing HMI Level
- * only NONE, BACKGROUND and LIMITED levels are sent
- * @param app Application to be changed and notified
- * @param level New HMI level of app
- */
- void NotifyHMIAboutHMILevel(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level) FINAL;
-
- /**
- * Gets all allowed module types
- * @param app_id unique identifier of application
- * @param list of allowed module types
- * @return true if application has allowed modules
- */
- bool GetModuleTypes(const std::string& policy_app_id,
- std::vector<std::string>* modules) const FINAL;
-
- /**
- * @brief ValidateMessageBySchema Checks whether message is valid according
- * to API
- * @param message Message to check
- * @return Check result
- */
- MessageValidationResult ValidateMessageBySchema(const Message& message) FINAL;
-
- /**
- * @brief Gets application manager settings structure
- * @return reference to application manager settings structure
- */
- const ApplicationManagerSettings& GetSettings() const FINAL;
-
- private:
- /**
- * @brief AreParametersAllowed Checks message parameters across current policy
- * permissions
- * @param msg Message having parameters
- * @param params Parameters sorted by permissions
- * @return True if allowed, otherwise - false
- */
- bool AreParametersAllowed(MessagePtr msg,
- const CommandParametersPermissions& params);
-
- /**
- * @brief CheckParams Checks object params with allowed parameters received
- * from policy
- * @param object Message object
- * @param allowed_params Parameters allowed by policy
- * @return True if all parameters allowed, otherwise - false
- */
- bool CheckParams(const Json::Value& object,
- const policy::RPCParams& allowed_params);
-
- /**
- * @brief IsAllowed Checks particular parameter among allowed list
- * @param name Parameter name
- * @param allowed_params List of allowed parameters
- * @return True if found, otherwise - false
- */
- bool IsAllowed(const std::string& name,
- const policy::RPCParams& allowed_params);
-
- ApplicationManager& application_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(CoreService);
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_CORE_SERVICE_H_
diff --git a/src/components/application_manager/include/application_manager/helpers/application_helper.h b/src/components/application_manager/include/application_manager/helpers/application_helper.h
index cecda0cd6f..145bef659e 100644
--- a/src/components/application_manager/include/application_manager/helpers/application_helper.h
+++ b/src/components/application_manager/include/application_manager/helpers/application_helper.h
@@ -75,16 +75,6 @@ std::vector<ApplicationSharedPtr> FindAllApps(
}
/**
- * @brief The SubscribedToIVIPredicate is predicate for lookup within
- * applications list for apps subscribed for specific vehicle data
- */
-struct SubscribedToIVIPredicate {
- uint32_t vehicle_info_;
- explicit SubscribedToIVIPredicate(uint32_t vehicle_info);
- bool operator()(const ApplicationSharedPtr app) const;
-};
-
-/**
* @brief RecallApplicationData cleans up data within application instance to
* its initial state and notifies HMI to delete same data on its side
* @param app Application to clean its data
diff --git a/src/components/application_manager/include/application_manager/hmi_command_factory.h b/src/components/application_manager/include/application_manager/hmi_command_factory.h
deleted file mode 100644
index 6603563c6d..0000000000
--- a/src/components/application_manager/include/application_manager/hmi_command_factory.h
+++ /dev/null
@@ -1,64 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_COMMAND_FACTORY_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_COMMAND_FACTORY_H_
-
-#include "application_manager/commands/command.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-typedef utils::SharedPtr<commands::Command> CommandSharedPtr;
-class ApplicationManager;
-/**
- * @brief Factory class for command creation
- **/
-class HMICommandFactory {
- public:
- /**
- * @brief Create command object and return pointer to it
- *
- * @param smartObject SmartObject shared pointer.
- * @return Pointer to created command object.
- **/
- static CommandSharedPtr CreateCommand(
- const commands::MessageSharedPtr& message,
- ApplicationManager& application_manager);
-
- private:
- HMICommandFactory();
- DISALLOW_COPY_AND_ASSIGN(HMICommandFactory);
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_COMMAND_FACTORY_H_
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 f2d665d998..a22d32920a 100644
--- a/src/components/application_manager/include/application_manager/hmi_state.h
+++ b/src/components/application_manager/include/application_manager/hmi_state.h
@@ -33,6 +33,7 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_STATE_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_STATE_H_
+#include <iosfwd>
#include <list>
#include "interfaces/MOBILE_API.h"
#include "utils/shared_ptr.h"
@@ -53,10 +54,12 @@ typedef utils::SharedPtr<HmiState> HmiStatePtr;
*
*/
class HmiState {
+ friend std::ostream& operator<<(std::ostream& os, const HmiState& src);
+
public:
/**
* @brief The StateID enum describes state of application
- * If no events occured STATE_ID_DEFAULT shuld be presented
+ * If no events occurred STATE_ID_DEFAULT should be presented
*/
enum StateID {
STATE_ID_CURRENT,
@@ -66,6 +69,7 @@ class HmiState {
STATE_ID_SAFETY_MODE,
STATE_ID_VR_SESSION,
STATE_ID_TTS_SESSION,
+ STATE_ID_VIDEO_STREAMING,
STATE_ID_NAVI_STREAMING,
STATE_ID_DEACTIVATE_HMI,
STATE_ID_AUDIO_SOURCE,
@@ -154,6 +158,28 @@ class HmiState {
}
return audio_streaming_state_;
}
+
+ /**
+ * @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();
+ }
+ return video_streaming_state_;
+ }
+
+ /**
+ * @brief set_video_streaming_state set set_video_streaming_state member
+ * @param video_state video_state to setup
+ */
+ virtual void set_video_streaming_state(
+ mobile_apis::VideoStreamingState::eType video_state) {
+ video_streaming_state_ = video_state;
+ }
+
/**
* @brief set_audio_streaming_state set audio_streaming_state member
* @param audio_state audio_state to setup
@@ -195,7 +221,7 @@ class HmiState {
* @brief set_state_id sets state id
* @param state_id state id to setup
*/
- virtual void set_state_id(StateID state_id) {
+ void set_state_id(StateID state_id) {
state_id_ = state_id;
}
@@ -206,6 +232,7 @@ class HmiState {
HmiStatePtr parent_;
mobile_apis::HMILevel::eType hmi_level_;
mobile_apis::AudioStreamingState::eType audio_streaming_state_;
+ mobile_apis::VideoStreamingState::eType video_streaming_state_;
mobile_apis::SystemContext::eType system_context_;
protected:
@@ -266,17 +293,27 @@ class TTSHmiState : public HmiState {
};
/**
- * @brief The NaviStreamingState class implements logic of NaviStreaming
+ * @brief The VideoStreamingState class implements logic of video streaming
* temporary state
*/
-class NaviStreamingHmiState : public HmiState {
+class VideoStreamingHmiState : public HmiState {
+ public:
+ VideoStreamingHmiState(utils::SharedPtr<Application> app,
+ const ApplicationManager& app_mngr);
+
+ mobile_apis::VideoStreamingState::eType video_streaming_state()
+ const OVERRIDE;
+};
+
+/**
+ * @brief The NaviStreamingHmiState class implements logic of navigation
+ * streaming temporary state that is more specific than VideoStreamingHmiState
+ */
+class NaviStreamingHmiState : public VideoStreamingHmiState {
public:
NaviStreamingHmiState(utils::SharedPtr<Application> app,
const ApplicationManager& app_mngr);
- DEPRECATED NaviStreamingHmiState(uint32_t app_id,
- const ApplicationManager& app_mngr);
-
mobile_apis::AudioStreamingState::eType audio_streaming_state()
const OVERRIDE;
};
@@ -316,6 +353,10 @@ class SafetyModeHmiState : public HmiState {
const OVERRIDE {
return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
}
+ mobile_apis::VideoStreamingState::eType video_streaming_state()
+ const OVERRIDE {
+ return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+ }
};
/**
@@ -334,6 +375,10 @@ class DeactivateHMI : public HmiState {
const OVERRIDE {
return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
}
+ mobile_apis::VideoStreamingState::eType video_streaming_state()
+ const OVERRIDE {
+ return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+ }
};
/**
@@ -352,6 +397,10 @@ class AudioSource : public HmiState {
const OVERRIDE {
return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
}
+ mobile_apis::VideoStreamingState::eType video_streaming_state()
+ const OVERRIDE {
+ return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+ }
};
/**
@@ -371,6 +420,28 @@ class EmbeddedNavi : public HmiState {
const OVERRIDE {
return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
}
+ mobile_apis::VideoStreamingState::eType video_streaming_state()
+ const OVERRIDE {
+ return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+ }
};
-}
+
+/**
+ * @brief Outputs StateID to ostream in human readable format
+ * @param os output stream to insert data to
+ * @param src StateID value to output
+ * @return os
+ */
+std::ostream& operator<<(std::ostream& os, const HmiState::StateID src);
+
+/**
+ * @brief Outputs HmiState to ostream in human readable format
+ * @param os output stream to insert data to
+ * @param src HmiState value to output
+ * @return os
+ */
+std::ostream& operator<<(std::ostream& os, const HmiState& src);
+
+} // namespace application_manager
+
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_STATE_H_
diff --git a/src/components/application_manager/include/application_manager/message.h b/src/components/application_manager/include/application_manager/message.h
index f399da6870..7ca3e59f09 100644
--- a/src/components/application_manager/include/application_manager/message.h
+++ b/src/components/application_manager/include/application_manager/message.h
@@ -68,9 +68,7 @@ class Message {
//! --------------------------------------------------------------------------
int32_t function_id() const;
-#ifdef SDL_REMOTE_CONTROL
std::string function_name() const;
-#endif // SDL_REMOTE_CONTROL
int32_t correlation_id() const;
int32_t connection_key() const;
@@ -87,9 +85,7 @@ class Message {
//!
//--------------------------------------------------------------------------.
void set_function_id(int32_t id);
-#ifdef SDL_REMOTE_CONTROL
void set_function_name(const std::string& name);
-#endif // SDL_REMOTE_CONTROL
void set_correlation_id(int32_t id);
void set_connection_key(int32_t key);
void set_message_type(MessageType type);
@@ -113,9 +109,7 @@ class Message {
int32_t function_id_; // @remark protocol V2.
int32_t correlation_id_; // @remark protocol V2.
MessageType type_; // @remark protocol V2.
-#ifdef SDL_REMOTE_CONTROL
std::string function_name_;
-#endif // SDL_REMOTE_CONTROL
// Pre-calculated message priority, higher priority messages are
// Processed first
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 b94609c01b..6590098a01 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -107,6 +107,15 @@ class MessageHelper {
static void SendDecryptCertificateToHMI(const std::string& file_name,
ApplicationManager& app_mngr);
+ /**
+ * @brief SendGetSystemTimeRequest sends mentioned request to HMI.
+ * @param correlation_id the message correlation id, required for proper
+ * response processing.
+ * @param app_mngr
+ */
+ static void SendGetSystemTimeRequest(const uint32_t correlation_id,
+ ApplicationManager& app_mngr);
+
/*
* @brief Retrieve vehicle data map for param name in mobile request
* to VehicleDataType
@@ -217,20 +226,6 @@ class MessageHelper {
static smart_objects::SmartObjectSPtr CreateSetAppIcon(
const std::string& path_to_icon, uint32_t app_id);
- DEPRECATED static bool SendIVISubscribtions(const uint32_t app_id,
- ApplicationManager& app_mngr);
- /**
- * @brief Sends IVI subscription requests
- */
- static bool SendIVISubscriptions(const uint32_t app_id,
- ApplicationManager& app_mngr);
-
- /**
- * @brief Returns IVI subscription requests
- */
- static smart_objects::SmartObjectList GetIVISubscriptionRequests(
- ApplicationSharedPtr app, ApplicationManager& app_mngr);
-
/**
* @brief Sends button subscription notification
*/
@@ -549,6 +544,37 @@ class MessageHelper {
int32_t result_code);
/**
+ * @brief Get the full file path of an app file
+ *
+ * @param file_name The relative path of an application file
+ * @param app Current application
+ * @param app_mngr Application manager
+ *
+ * @return The full file path of the application file if valid,
+ * empty string otherwise
+ */
+ static std::string GetAppFilePath(std::string file_name,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr);
+
+ /**
+ * @brief Verify that all ttsChunks with FILE type
+ * in an array include an existing file and set full path
+ *
+ * @param tts_chunks SmartObject with an array of TTSChunks
+ * @param app Current application
+ * @param app_mngr Application manager
+ *
+ * @return FILE_NOT_FOUND if one of the TTSChunks
+ * included a file which wasn't present on disk,
+ * SUCCESS otherwise
+ */
+ static mobile_apis::Result::eType VerifyTtsFiles(
+ smart_objects::SmartObject& tts_chunks,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr);
+
+ /**
* @brief Verify image and add image file full path
* and add path, although the image doesn't exist
* @param SmartObject with image
@@ -763,18 +789,6 @@ class MessageHelper {
ApplicationManager& app_mngr);
/**
- * @brief SendUnsubscribeIVIRequest sends request to HMI to remove vehicle
- * data subscription for application
- * @param ivi_id Vehicle data item id
- * @param application Application to unsubscribe
- * @param app_mngr Application manager
- */
- static void SendUnsubscribeIVIRequest(int32_t ivi_id,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr);
-
-#ifdef SDL_REMOTE_CONTROL
- /**
* @brief Sends HMI status notification to mobile
* @param application_impl application with changed HMI status
**/
@@ -796,9 +810,7 @@ class MessageHelper {
ApplicationManager& application_manager,
hmi_apis::Common_HMILevel::eType level = hmi_apis::Common_HMILevel::FULL,
bool send_policy_priority = true);
-#endif // SDL_REMOTE_CONTROL
- private:
/**
* @brief CreateMessageForHMI Creates HMI message with prepared header
* acccoring to message type
@@ -809,6 +821,7 @@ class MessageHelper {
static smart_objects::SmartObjectSPtr CreateMessageForHMI(
hmi_apis::messageType::eType message_type, const uint32_t correlation_id);
+ private:
/**
* @brief Allows to fill SO according to the current permissions.
* @param permissions application permissions.
diff --git a/src/components/application_manager/include/application_manager/mobile_command_factory.h b/src/components/application_manager/include/application_manager/mobile_command_factory.h
deleted file mode 100644
index 1f270b28db..0000000000
--- a/src/components/application_manager/include/application_manager/mobile_command_factory.h
+++ /dev/null
@@ -1,67 +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.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_COMMAND_FACTORY_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_COMMAND_FACTORY_H_
-
-#include "application_manager/commands/command.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-typedef utils::SharedPtr<commands::Command> CommandSharedPtr;
-class ApplicationManager;
-
-/**
- * @brief Factory class for command creation
- **/
-class MobileCommandFactory {
- public:
- /**
- * @brief Create command object and return pointer to it
- *
- * @param smartObject SmartObject shared pointer.
- * @return Pointer to created command object.
- **/
- static CommandSharedPtr CreateCommand(
- const commands::MessageSharedPtr& message,
- commands::Command::CommandOrigin origin,
- ApplicationManager& application_manager);
-
- private:
- MobileCommandFactory();
- DISALLOW_COPY_AND_ASSIGN(MobileCommandFactory);
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_COMMAND_FACTORY_H_
diff --git a/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin.h b/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin.h
new file mode 100644
index 0000000000..c9a34a75d6
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin.h
@@ -0,0 +1,120 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_H
+#include <memory>
+#include "utils/macro.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/application.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/hmi_capabilities.h"
+#include "application_manager/policies/policy_handler_interface.h"
+
+namespace application_manager {
+class CommandFactory;
+
+namespace plugin_manager {
+
+/**
+ * @brief The PolicyEvent enum defines events related to policy
+ */
+enum PolicyEvent { kApplicationPolicyUpdated = 0, kApplicationsDisabled };
+
+/**
+ * @brief The ApplicationEvent enum defines events related to single application
+ */
+enum ApplicationEvent {
+ kApplicationExit = 0,
+ kApplicationRegistered,
+ kApplicationUnregistered,
+ kDeleteApplicationData
+};
+
+class RPCPlugin {
+ public:
+ /**
+ * @brief Command initialization function
+ * @param app_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handler PolicyHandlerInterface
+ * @return true in case initialization was succesful, false otherwise.
+ **/
+ virtual bool Init(ApplicationManager& app_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) = 0;
+ /**
+ * @brief IsAbleToProcess check if plugin is able to process function
+ * @param function_id RPC identifier
+ * @param message_source source of message to process (from HMI from mobile
+ * ...)
+ * @return true if plugin is able to process this RPC, false if not
+ */
+ virtual bool IsAbleToProcess(
+ const int32_t function_id,
+ const commands::Command::CommandSource message_source) = 0;
+
+ /**
+ * @brief PluginName plugin name
+ * @return plugin name
+ */
+ virtual std::string PluginName() = 0;
+
+ /**
+ * @brief GetCommandFactory get that is able to generate command
+ * from message
+ * @return plugins command factory
+ */
+ virtual CommandFactory& GetCommandFactory() = 0;
+ /**
+ * @brief OnPolicyEvent Notifies modules on certain events from policy
+ * @param event Policy event
+ */
+ virtual void OnPolicyEvent(PolicyEvent event) = 0;
+
+ /**
+ * @brief OnApplicationEvent Processes application related events
+ * @param event Event
+ * @param application Pointer to application struct
+ */
+ virtual void OnApplicationEvent(
+ ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application) = 0;
+};
+typedef std::unique_ptr<RPCPlugin> RPCPluginPtr;
+
+} // namespace plugin_manager
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_H
diff --git a/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager.h b/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager.h
new file mode 100644
index 0000000000..692d296607
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager.h
@@ -0,0 +1,83 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_H
+#include <cstdint>
+#include <string>
+#include <memory>
+#include <vector>
+#include <functional>
+
+#include "application_manager/plugin_manager/rpc_plugin.h"
+#include "utils/optional.h"
+namespace application_manager {
+namespace plugin_manager {
+
+class RPCPluginManager {
+ public:
+ virtual ~RPCPluginManager() {}
+ /**
+ * @brief LoadPlugins load plugins from plugin folder.
+ * Already loaded plugins should continue be loaded.
+ *
+ * @param plugin_folder folder to search for plugins
+ * @return amount of loaded plugins
+ */
+ virtual uint32_t LoadPlugins(const std::string& plugins_path) = 0;
+
+ /**
+ * @brief GetPlugins get list of plugins
+ * @return list of loaded plugins
+ */
+ virtual std::vector<RPCPluginPtr>& GetPlugins() = 0;
+
+ /**
+ * @brief FindPluginToProcess find plugin to process message
+ * @param function_id RPC identifier to process
+ * @param message_source message_source source of message to process
+ * @return plugin that is able to process the message
+ */
+ virtual utils::Optional<RPCPlugin> FindPluginToProcess(
+ const int32_t function_id,
+ const commands::Command::CommandSource message_source) = 0;
+
+ /**
+ * @brief OnPolicyEvent Notifies modules on certain events from policy
+ * @param event Policy event
+ */
+ virtual void ForEachPlugin(std::function<void(RPCPlugin&)> functor) = 0;
+};
+} // namespace plugin_manager
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_H
diff --git a/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager_impl.h b/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager_impl.h
new file mode 100644
index 0000000000..5f85d45b6e
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/plugin_manager/rpc_plugin_manager_impl.h
@@ -0,0 +1,79 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_IMPL_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_IMPL_H
+#include "application_manager/plugin_manager/rpc_plugin_manager.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/hmi_capabilities.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "utils/optional.h"
+
+namespace application_manager {
+namespace plugin_manager {
+
+class RPCPluginManagerImpl : public RPCPluginManager {
+ // RPCPluginManager interface
+ public:
+ /**
+ * @brief RPCPluginManagerImpl class constructor
+ * @param app_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handler PolicyHandlerInterface
+ **/
+ RPCPluginManagerImpl(ApplicationManager& app_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ uint32_t LoadPlugins(const std::string& plugins_path) OVERRIDE;
+ std::vector<RPCPluginPtr>& GetPlugins() OVERRIDE;
+ utils::Optional<RPCPlugin> FindPluginToProcess(
+ const int32_t function_id,
+ const commands::Command::CommandSource message_source) OVERRIDE;
+
+ private:
+ std::vector<RPCPluginPtr> loaded_plugins_;
+ ApplicationManager& app_manager_;
+ rpc_service::RPCService& rpc_service_;
+ HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
+
+ // RPCPluginManager interface
+ public:
+ void ForEachPlugin(std::function<void(RPCPlugin&)> functor) OVERRIDE;
+};
+} // namespace plugin_manager
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_IMPL_H
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 b4653c6cb2..8d019784fc 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
@@ -113,7 +113,6 @@ class PolicyHandler : public PolicyHandlerInterface,
virtual DeviceConsent GetUserConsentForDevice(
const std::string& device_id) const OVERRIDE;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Sets HMI default type for specified application
* @param application_id ID application
@@ -177,7 +176,6 @@ class PolicyHandler : public PolicyHandlerInterface,
*/
bool GetModuleTypes(const std::string& policy_app_id,
std::vector<std::string>* modules) const OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
bool GetDefaultHmi(const std::string& policy_app_id,
std::string* default_hmi) const OVERRIDE;
@@ -487,6 +485,32 @@ class PolicyHandler : public PolicyHandlerInterface,
mobile_apis::RequestType::eType type) const OVERRIDE;
/**
+ * @brief Checks if certain request subtype is allowed for application
+ * @param policy_app_id Unique applicaion id
+ * @param request_subtype Request subtype
+ * @return true, if allowed, otherwise - false
+ */
+ bool IsRequestSubTypeAllowed(
+ const std::string& policy_app_id,
+ const std::string& request_subtype) const OVERRIDE;
+
+ /**
+ * @brief Gets application request types state
+ * @param policy_app_id Unique application id
+ * @return request types state
+ */
+ RequestType::State GetAppRequestTypeState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
+ * @brief Gets application request subtypes state
+ * @param policy_app_id Unique application id
+ * @return request subtypes state
+ */
+ RequestSubType::State GetAppRequestSubTypeState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Gets application request types
* @param policy_app_id Unique application id
* @return request types
@@ -495,6 +519,14 @@ class PolicyHandler : public PolicyHandlerInterface,
const std::string& policy_app_id) const OVERRIDE;
/**
+ * @brief Gets application request subtypes
+ * @param policy_app_id Unique application id
+ * @return app request subtypes
+ */
+ const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Gets vehicle information
* @return Structure with vehicle information
*/
@@ -593,7 +625,6 @@ class PolicyHandler : public PolicyHandlerInterface,
PermissionConsent& out_permissions) OVERRIDE;
#endif
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Updates HMI level for specified application and send notification
* @param app application where HMI level was changed
@@ -603,7 +634,6 @@ class PolicyHandler : public PolicyHandlerInterface,
mobile_apis::HMILevel::eType level);
std::vector<std::string> GetDevicesIds(
const std::string& policy_app_id) OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Sets days after epoch on successful policy update
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 5ebcac71f8..95585279ca 100644
--- a/src/components/application_manager/include/application_manager/request_info.h
+++ b/src/components/application_manager/include/application_manager/request_info.h
@@ -40,7 +40,7 @@
#include <set>
#include "application_manager/commands/command_request_impl.h"
-#include "commands/hmi/request_to_hmi.h"
+#include "commands/request_to_hmi.h"
#include "utils/date_time.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
new file mode 100644
index 0000000000..5e891608c6
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/rpc_handler_impl.h
@@ -0,0 +1,172 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RPC_HANDLER_IMPL_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RPC_HANDLER_IMPL_H
+
+#include "application_manager/application_manager.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/rpc_handler.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/mobile_message_handler.h"
+#include "application_manager/policies/policy_handler_observer.h"
+
+#include "protocol_handler/protocol_observer.h"
+#include "hmi_message_handler/hmi_message_observer.h"
+#include "hmi_message_handler/hmi_message_sender.h"
+
+#include "formatters/formatter_json_rpc.h"
+#include "formatters/CFormatterJsonSDLRPCv2.h"
+#include "formatters/CFormatterJsonSDLRPCv1.h"
+#include "interfaces/HMI_API_schema.h"
+#include "interfaces/MOBILE_API_schema.h"
+#ifdef TELEMETRY_MONITOR
+#include "telemetry_observer.h"
+#endif // TELEMETRY_MONITOR
+
+#include "interfaces/v4_protocol_v1_2_no_extra.h"
+#include "interfaces/v4_protocol_v1_2_no_extra_schema.h"
+
+#include "utils/threads/message_loop_thread.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+
+namespace application_manager {
+namespace rpc_handler {
+
+namespace impl {
+struct MessageFromMobile : public utils::SharedPtr<Message> {
+ MessageFromMobile() {}
+ explicit MessageFromMobile(const utils::SharedPtr<Message>& message)
+ : utils::SharedPtr<Message>(message) {}
+ // PrioritizedQueue requires this method to decide which priority to assign
+ size_t PriorityOrder() const {
+ return (*this)->Priority().OrderingValue();
+ }
+};
+struct MessageFromHmi : public utils::SharedPtr<Message> {
+ MessageFromHmi() {}
+ explicit MessageFromHmi(const utils::SharedPtr<Message>& message)
+ : utils::SharedPtr<Message>(message) {}
+ // PrioritizedQueue requires this method to decide which priority to assign
+ size_t PriorityOrder() const {
+ return (*this)->Priority().OrderingValue();
+ }
+};
+
+// Short type names for prioritized message queues
+typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromMobile> >
+ FromMobileQueue;
+typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromHmi> >
+ FromHmiQueue;
+}
+
+class RPCHandlerImpl : public RPCHandler,
+ public impl::FromMobileQueue::Handler,
+ public impl::FromHmiQueue::Handler {
+ public:
+ RPCHandlerImpl(ApplicationManager& app_manager);
+ ~RPCHandlerImpl();
+
+ // CALLED ON messages_from_mobile_ thread!
+ void Handle(const impl::MessageFromMobile message) OVERRIDE;
+ // CALLED ON messages_from_hmi_ thread!
+ void Handle(const impl::MessageFromHmi message) OVERRIDE;
+
+ // Overriden HMIMessageObserver method
+ /**
+ * @brief OnMessageReceived overriden HMIMessageObserver method,
+ * process message from HMI
+ * @param message pointer to received message
+ */
+ void OnMessageReceived(
+ hmi_message_handler::MessageSharedPointer message) OVERRIDE;
+
+ /**
+ * @brief OnErrorSending overriden HMIMessageObserver method
+ * @param message pointer to received message
+ */
+ void OnErrorSending(
+ hmi_message_handler::MessageSharedPointer message) OVERRIDE;
+
+ // Overriden ProtocolObserver method
+ /**
+ * @brief OnMessageReceived overriden ProtocolObserver method,
+ * process message from mobile
+ * @param message pointer to received message
+ */
+ void OnMessageReceived(
+ const ::protocol_handler::RawMessagePtr message) OVERRIDE;
+
+ /**
+ * @brief OnMobileMessageSent overriden ProtocolObserver method,
+ * post message to mobile
+ * @param message pointer to received message
+ */
+ void OnMobileMessageSent(
+ const ::protocol_handler::RawMessagePtr message) OVERRIDE;
+
+#ifdef TELEMETRY_MONITOR
+ /**
+ * @brief Setup observer for time metric.
+ *
+ * @param observer - pointer to observer
+ */
+ void SetTelemetryObserver(AMTelemetryObserver* observer) OVERRIDE;
+#endif // TELEMETRY_MONITOR
+
+ private:
+ void ProcessMessageFromMobile(const utils::SharedPtr<Message> message);
+ void ProcessMessageFromHMI(const utils::SharedPtr<Message> message);
+ bool ConvertMessageToSO(const Message& message,
+ smart_objects::SmartObject& output);
+ utils::SharedPtr<Message> ConvertRawMsgToMessage(
+ const ::protocol_handler::RawMessagePtr message);
+ hmi_apis::HMI_API& hmi_so_factory();
+ mobile_apis::MOBILE_API& mobile_so_factory();
+
+ ApplicationManager& app_manager_;
+ // Thread that pumps messages coming from mobile side.
+ impl::FromMobileQueue messages_from_mobile_;
+ // Thread that pumps messages coming from HMI.
+ impl::FromHmiQueue messages_from_hmi_;
+
+ hmi_apis::HMI_API hmi_so_factory_;
+ mobile_apis::MOBILE_API mobile_so_factory_;
+#ifdef TELEMETRY_MONITOR
+ AMTelemetryObserver* metric_observer_;
+#endif // TELEMETRY_MONITOR
+};
+
+} // namespace rpc_handler
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RPC_HANDLER_IMPL_H
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
new file mode 100644
index 0000000000..6f39e11592
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/rpc_service_impl.h
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RPC_SERVICE_IMPL_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RPC_SERVICE_IMPL_H
+
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/request_controller.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/usage_statistics.h"
+#include "application_manager/mobile_message_handler.h"
+#include "application_manager/command_holder_impl.h"
+
+#include "formatters/formatter_json_rpc.h"
+#include "formatters/CFormatterJsonSDLRPCv2.h"
+#include "formatters/CFormatterJsonSDLRPCv1.h"
+#include "interfaces/HMI_API_schema.h"
+#include "interfaces/MOBILE_API_schema.h"
+
+#include "interfaces/v4_protocol_v1_2_no_extra.h"
+#include "interfaces/v4_protocol_v1_2_no_extra_schema.h"
+
+#include "utils/threads/message_loop_thread.h"
+#include "utils/logger.h"
+
+namespace application_manager {
+namespace rpc_service {
+
+namespace impl {
+
+struct MessageToMobile : public utils::SharedPtr<Message> {
+ MessageToMobile() : is_final(false) {}
+ explicit MessageToMobile(const utils::SharedPtr<Message>& message,
+ bool final_message)
+ : utils::SharedPtr<Message>(message), is_final(final_message) {}
+ // PrioritizedQueue requires this method to decide which priority to assign
+ size_t PriorityOrder() const {
+ return (*this)->Priority().OrderingValue();
+ }
+ // Signals if connection to mobile must be closed after sending this message
+ bool is_final;
+};
+
+struct MessageToHmi : public utils::SharedPtr<Message> {
+ MessageToHmi() {}
+ explicit MessageToHmi(const utils::SharedPtr<Message>& message)
+ : utils::SharedPtr<Message>(message) {}
+ // PrioritizedQueue requires this method to decide which priority to assign
+ size_t PriorityOrder() const {
+ return (*this)->Priority().OrderingValue();
+ }
+};
+
+typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToMobile> >
+ ToMobileQueue;
+typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToHmi> >
+ ToHmiQueue;
+}
+
+class RPCServiceImpl : public RPCService,
+ public impl::ToMobileQueue::Handler,
+ public impl::ToHmiQueue::Handler {
+ public:
+ /**
+ * @brief RPCServiceImpl class constructor
+ * @param app_manager ApplicationManager
+ * @param request_ctrl RequestController
+ * @param protocol_handler ProtocolHandler
+ * @param hmi_handler HMIMessageHandler
+ * @param commands_holder CommandHolder
+ **/
+ RPCServiceImpl(ApplicationManager& app_manager,
+ request_controller::RequestController& request_ctrl,
+ protocol_handler::ProtocolHandler* protocol_handler,
+ hmi_message_handler::HMIMessageHandler* hmi_handler,
+ CommandHolder& commands_holder);
+ ~RPCServiceImpl();
+
+ bool ManageMobileCommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source) OVERRIDE;
+ bool ManageHMICommand(const commands::MessageSharedPtr message) OVERRIDE;
+
+ // CALLED ON messages_to_hmi_ thread!
+ void Handle(const impl::MessageToHmi message) OVERRIDE;
+ // CALLED ON messages_to_mobile_ thread!
+ void Handle(const impl::MessageToMobile message) OVERRIDE;
+
+ void SendMessageToMobile(const commands::MessageSharedPtr message,
+ bool final_message = false) OVERRIDE;
+ void SendMessageToHMI(const commands::MessageSharedPtr message) OVERRIDE;
+
+ void set_protocol_handler(
+ protocol_handler::ProtocolHandler* handler) OVERRIDE;
+ void set_hmi_message_handler(
+ hmi_message_handler::HMIMessageHandler* handler) OVERRIDE;
+
+ private:
+ bool ConvertSOtoMessage(const smart_objects::SmartObject& message,
+ Message& output);
+ hmi_apis::HMI_API& hmi_so_factory();
+ mobile_apis::MOBILE_API& mobile_so_factory();
+
+ ApplicationManager& app_manager_;
+ request_controller::RequestController& request_ctrl_;
+ protocol_handler::ProtocolHandler* protocol_handler_;
+ hmi_message_handler::HMIMessageHandler* hmi_handler_;
+ CommandHolder& commands_holder_;
+ // Thread that pumps messages being passed to mobile side.
+ impl::ToMobileQueue messages_to_mobile_;
+ // Thread that pumps messages being passed to HMI.
+ impl::ToHmiQueue messages_to_hmi_;
+
+ hmi_apis::HMI_API hmi_so_factory_;
+ mobile_apis::MOBILE_API mobile_so_factory_;
+};
+} // namespace rpc_service
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RPC_SERVICE_IMPL_H
diff --git a/src/components/application_manager/include/application_manager/service.h b/src/components/application_manager/include/application_manager/service.h
deleted file mode 100644
index da08957afa..0000000000
--- a/src/components/application_manager/include/application_manager/service.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2017, 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_SERVICE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SERVICE_H_
-
-#include <string>
-#include <sstream>
-#include <vector>
-#include "application_manager/application.h"
-#include "application_manager/application_manager_settings.h"
-#include "application_manager/message.h"
-#include "application_manager/hmi_interfaces.h"
-
-namespace application_manager {
-
-enum TypeAccess { kDisallowed, kAllowed };
-
-enum MessageValidationResult {
- SUCCESS = 0,
- INVALID_JSON,
- INVALID_METADATA,
- SCHEMA_MISMATCH,
- UNSUPPORTED_PROTOCOL
-};
-
-typedef std::string PluginFunctionID;
-
-/**
- * @brief Interface to core service
- */
-class Service {
- public:
- virtual ~Service() {}
-
- /**
- * @brief Checks message permissions and cuts parameters according
- * to policy table permissions
- * @param msg message to cut disallowed parameters
- * @return result according by mobile API
- */
- virtual mobile_apis::Result::eType CheckPolicyPermissions(MessagePtr msg) = 0;
-
- /**
- * Checks if module for application is present in policy table
- * @param app_id id of application
- * @param module type
- * @return true if module is present, otherwise - false
- */
- virtual bool CheckModule(const ApplicationId& app_id,
- const std::string& module) = 0;
-
- /**
- * @brief Get pointer to application by application id
- * @param app_id application id
- * return pointer to application
- */
- virtual ApplicationSharedPtr GetApplication(ApplicationId app_id) = 0;
-
- /**
- * Removes parameters not listed in HMI API from HMI request
- * @param message message to handle
- */
- virtual void RemoveHMIFakeParameters(
- application_manager::MessagePtr& message) = 0;
- /**
- * @brief Send message to HMI
- * @param message Message to HMI
- */
- virtual void SendMessageToHMI(const MessagePtr& message) = 0;
-
- /**
- * @brief Send message to mobile device
- * @param message Message to mobile
- */
- virtual void SendMessageToMobile(const MessagePtr& message) = 0;
-
- /**
- * @brief Returns unique correlation ID for next HMI request
- *
- * @return Unique correlation ID
- */
- virtual uint32_t GetNextCorrelationID() = 0;
-
- /**
- * @brief Returns all applications related to plugin
- * @param uid ID provided by plugin to its extension to app.
- * @return List with shared pointers to applications
- */
- virtual std::vector<ApplicationSharedPtr> GetApplications(
- AppExtensionUID uid) = 0;
-
- /**
- * @brief Change hmi level of app and notify it
- * @param app Application to be changed and notified
- * @param level New HMI level of app
- */
- virtual void ChangeNotifyHMILevel(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level) = 0;
-
- /**
- * @brief Notify HMI about app changing HMI Level
- * only NONE, BACKGROUND and LIMITED levels are sent
- * @param app Application to be changed and notified
- * @param level New HMI level of app
- */
- virtual void NotifyHMIAboutHMILevel(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level) = 0;
-
- virtual const smart_objects::SmartObject* GetRCCapabilities() const = 0;
- /**
- * Checks if application has remote control functions
- * @param app application
- * @return true if application has remote control functions
- */
- virtual bool IsRemoteControlApplication(ApplicationSharedPtr app) const = 0;
-
- /**
- * @brief Gets current state of the specified interface
- * @param interface which state to get
- * @return true if specified interface available otherwise false
- */
- virtual bool IsInterfaceAvailable(
- const HmiInterfaces::InterfaceID interface) const = 0;
-
- /**
- * Gets all allowed module types
- * @param app_id unique identifier of application
- * @param list of allowed module types
- * @return true if application has allowed modules
- */
- virtual bool GetModuleTypes(const std::string& policy_app_id,
- std::vector<std::string>* modules) const = 0;
-
- /**
- * @brief ValidateMessageBySchema validates message by xml schema
- * @param message message for validation
- * @return true if message is valid according to schema, otherwise false
- */
- virtual MessageValidationResult ValidateMessageBySchema(
- const Message& message) = 0;
-
- /**
- * @brief Gets application manager settings structure
- * @return reference to application manager settings structure
- */
- virtual const ApplicationManagerSettings& GetSettings() const = 0;
-};
-
-typedef utils::SharedPtr<Service> ServicePtr;
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SERVICE_H_
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 32a2315f23..80e475a680 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
@@ -164,6 +164,7 @@ extern const char* trigger_source;
extern const char* hmi_level;
extern const char* activate_app_hmi_level;
extern const char* audio_streaming_state;
+extern const char* video_streaming_state;
extern const char* system_context;
extern const char* speech_capabilities;
extern const char* vr_capabilities;
@@ -178,17 +179,30 @@ extern const char* navigation_capability;
extern const char* phone_capability;
extern const char* video_streaming_capability;
extern const char* rc_capability;
+extern const char* day_color_scheme;
+extern const char* night_color_scheme;
+extern const char* primary_color;
+extern const char* secondary_color;
+extern const char* background_color;
+extern const char* red;
+extern const char* green;
+extern const char* blue;
+extern const char* display_layout;
+extern const char* icon_resumed;
// PutFile
extern const char* sync_file_name;
extern const char* file_name;
extern const char* file_type;
extern const char* file_size;
+extern const char* crc32_check_sum;
extern const char* request_type;
+extern const char* request_subtype;
extern const char* persistent_file;
extern const char* file_data;
extern const char* space_available;
extern const char* image_type;
+extern const char* is_template;
extern const char* image;
extern const char* type;
extern const char* system_file;
@@ -238,7 +252,9 @@ extern const char* rpm;
extern const char* fuel_level;
extern const char* fuel_level_state;
extern const char* instant_fuel_consumption;
+extern const char* fuel_range;
extern const char* external_temp;
+extern const char* turn_signal;
extern const char* vin;
extern const char* prndl;
extern const char* tire_pressure;
@@ -274,6 +290,7 @@ extern const char* remote_control;
extern const char* sdl_version;
extern const char* system_software_version;
extern const char* priority;
+extern const char* engine_oil_life;
// resuming
extern const char* application_commands;
@@ -406,7 +423,19 @@ extern const char* kFull;
extern const char* kLimited;
extern const char* kBackground;
extern const char* kNone;
-}
+} // namespace hmi_levels
+
+namespace time_keys {
+extern const char* millisecond;
+extern const char* second;
+extern const char* minute;
+extern const char* hour;
+extern const char* day;
+extern const char* month;
+extern const char* year;
+extern const char* tz_hour;
+extern const char* tz_minute;
+} // namespace time_keys
namespace hmi_request {
extern const char* parent_id;
@@ -468,6 +497,7 @@ extern const char* dtc;
extern const char* ecu_header;
extern const char* image_capabilities;
extern const char* display_type;
+extern const char* display_name;
extern const char* text_fields;
extern const char* media_clock_formats;
extern const char* graphic_supported;
@@ -478,7 +508,7 @@ extern const char* num_custom_presets_available;
extern const char* urls;
extern const char* policy_app_id;
extern const char* enabled;
-
+extern const char* system_time;
} // namespace hmi_response
namespace hmi_notification {
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 1b2033f5a8..58747fdd6e 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
@@ -32,8 +32,9 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_STATE_CONTROLLER_IMPL_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_STATE_CONTROLLER_IMPL_H_
-#include <list>
+#include <list>
+#include <map>
#include "application_manager/hmi_state.h"
#include "application_manager/application.h"
#include "application_manager/application_manager.h"
@@ -67,12 +68,14 @@ class StateControllerImpl : public event_engine::EventObserver,
* @param app appication to setup regular State
* @param hmi_level of new regular state
* @param audio_state of new regular state
+ * @paran video_state of new regular state
* @param SendActivateApp: if true, ActivateAppRequest will be sent on HMI */
virtual void SetRegularState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const bool SendActivateApp);
/**
@@ -91,6 +94,7 @@ class StateControllerImpl : public event_engine::EventObserver,
* @param app appication to setup regular State
* @param hmi_level of new regular state
* @param audio_state of new regular state
+ * @param video_state of new regular state
* @param system_context of new regular state
* @param SendActivateApp: if true, ActivateAppRequest will be sent on HMI */
@@ -98,6 +102,7 @@ class StateControllerImpl : public event_engine::EventObserver,
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const mobile_apis::SystemContext::eType system_context,
const bool SendActivateApp);
@@ -114,10 +119,12 @@ class StateControllerImpl : public event_engine::EventObserver,
* @brief SetRegularState Change regular audio state
* @param app appication to setup regular State
* @param audio_state of new regular state
+ * @param video_state of new regular state
*/
virtual void SetRegularState(
ApplicationSharedPtr app,
- const mobile_apis::AudioStreamingState::eType audio_state);
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state);
/**
* @brief SetRegularState Change regular system context
@@ -149,17 +156,19 @@ class StateControllerImpl : public event_engine::EventObserver,
const mobile_apis::HMILevel::eType default_level);
/**
- * @brief OnNaviStreamingStarted process Navi streaming started
+ * @brief OnVideoStreamingStarted process video streaming started
+ * @param app projection or navigation application starting streaming
*/
- virtual void OnNaviStreamingStarted();
+ virtual void OnVideoStreamingStarted(ApplicationConstSharedPtr app);
/**
- * @brief OnNaviStreamingStopped process Navi streaming stopped
+ * @brief OnVideoStreamingStopped process video streaming stopped
+ * @param app projection or navigation application stopping streaming
*/
- virtual void OnNaviStreamingStopped();
+ virtual void OnVideoStreamingStopped(ApplicationConstSharedPtr app);
/**
- * @brief OnStateChanged send HMIStatusNotification if neded
+ * @brief OnStateChanged send HMIStatusNotification if needed
* @param app application
* @param old_state state before change
* @param new_state state after change
@@ -184,11 +193,11 @@ class StateControllerImpl : public event_engine::EventObserver,
* Move other application to HmiStates if applied moved to FULL or LIMITED
*/
struct HmiLevelConflictResolver {
- ApplicationSharedPtr applied_;
- HmiStatePtr state_;
+ const ApplicationSharedPtr applied_;
+ const HmiStatePtr state_;
StateControllerImpl* state_ctrl_;
- HmiLevelConflictResolver(ApplicationSharedPtr app,
- HmiStatePtr state,
+ HmiLevelConflictResolver(const ApplicationSharedPtr app,
+ const HmiStatePtr state,
StateControllerImpl* state_ctrl)
: applied_(app), state_(state), state_ctrl_(state_ctrl) {}
void operator()(ApplicationSharedPtr to_resolve);
@@ -330,6 +339,7 @@ class StateControllerImpl : public event_engine::EventObserver,
DCHECK_OR_RETURN_VOID(old_hmi_state);
old_hmi_state->set_hmi_level(cur->hmi_level());
old_hmi_state->set_audio_streaming_state(cur->audio_streaming_state());
+ old_hmi_state->set_video_streaming_state(cur->video_streaming_state());
old_hmi_state->set_system_context(cur->system_context());
app->RemoveHMIState(ID);
HmiStatePtr new_hmi_state = app->CurrentHmiState();
@@ -353,39 +363,18 @@ class StateControllerImpl : public event_engine::EventObserver,
void SetupRegularHmiState(ApplicationSharedPtr app, HmiStatePtr state);
/**
- * @brief IsSameAppType checks if apps has same types
- * @param app1
- * @param app2
- * @return true if aps have same types, otherwise return false
- */
- bool IsSameAppType(ApplicationConstSharedPtr app1,
- ApplicationConstSharedPtr app2);
-
- /**
* @brief SetupRegularHmiState set regular HMI State without
* resolving conflicts and ActivateApp request
* @param app application
* @param hmi_level of new regular state
* @param audio_state of new regular state
- * @param system_context of new regular state
+ * @param video_state of new regular state
*/
void SetupRegularHmiState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
- const mobile_apis::SystemContext::eType system_context);
-
- /**
- * @brief SetupRegularHmiState set regular HMI State without
- * resolving conflicts and ActivateApp request
- * @param app application
- * @param hmi_level of new regular state
- * @param audio_state of new regular state
- */
- void SetupRegularHmiState(
- ApplicationSharedPtr app,
- const mobile_apis::HMILevel::eType hmi_level,
- const mobile_apis::AudioStreamingState::eType audio_state);
+ const mobile_apis::VideoStreamingState::eType video_state);
/**
* @brief OnActivateAppResponse calback for activate app response
@@ -434,14 +423,32 @@ class StateControllerImpl : public event_engine::EventObserver,
HmiStatePtr CreateHmiState(utils::SharedPtr<Application> app,
HmiState::StateID state_id) const;
+ /**
+ * @brief Determines AudioStreamingState value
+ * for application with HMI level specified.
+ * @param app an application to calculate for
+ * @param hmi_level HMI level
+ * @return AudioStreamingState value
+ */
mobile_apis::AudioStreamingState::eType CalcAudioState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level) const;
+ /**
+ * @brief Determines VideoStreamingState value
+ * for application with HMI level specified.
+ * @param app an application to calculate for
+ * @param hmi_level HMI level
+ * @return VideoStreamingState value
+ */
+ mobile_apis::VideoStreamingState::eType CalcVideoState(
+ ApplicationSharedPtr app,
+ const mobile_apis::HMILevel::eType hmi_level) const;
+
typedef std::list<HmiState::StateID> StateIDList;
StateIDList active_states_;
mutable sync_primitives::Lock active_states_lock_;
- std::map<uint32_t, HmiStatePtr> waiting_for_activate;
+ std::map<uint32_t, HmiStatePtr> waiting_for_activate_;
ApplicationManager& app_mngr_;
};
}
diff --git a/src/components/application_manager/include/application_manager/system_time/system_time_handler_impl.h b/src/components/application_manager/include/application_manager/system_time/system_time_handler_impl.h
new file mode 100644
index 0000000000..add440ad80
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/system_time/system_time_handler_impl.h
@@ -0,0 +1,160 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SYSTEM_TIME_SYSTEM_TIME_HANDLER_IMPL_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SYSTEM_TIME_SYSTEM_TIME_HANDLER_IMPL_H_
+
+#include <time.h>
+#include <vector>
+
+#include "utils/lock.h"
+#include "utils/macro.h"
+#include "utils/system_time_handler.h"
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/event_engine/event_observer.h"
+
+namespace application_manager {
+
+/**
+ * @brief The SystemTimeHandlerImpl class.
+ * Responsible for the system time notification. It keeps the list
+ * of system time listeners, sends appropriate request to the system
+ * and notifies the listeners with new time right after response has appeared.
+ */
+class SystemTimeHandlerImpl : public utils::SystemTimeHandler,
+ public event_engine::EventObserver {
+ public:
+ /**
+ * @brief SystemTimeHandlerImpl creates the instance of the class.
+ */
+ explicit SystemTimeHandlerImpl(ApplicationManager& application_manager);
+
+ /**
+ * @brief ~SystemTimeHandlerImpl
+ */
+ ~SystemTimeHandlerImpl();
+
+ private:
+ /**
+ * @brief on_event allows to process certain events from the system.
+ * Event which are handles within this methods are: OnSystemTimeReady
+ * in order to send system time query and GetSystemTimeResponse in order
+ * to retrieve utc time and notify all the listeners with new time value.
+ */
+ void on_event(const application_manager::event_engine::Event& event) FINAL;
+
+ /**
+ * @brief DoSystemTimeQuery sends the appropriate request to the system
+ * and subscribes the class to the response. This is asynchronous request
+ * thus it won't block until the system respond and returns immediately.
+ */
+ void DoSystemTimeQuery() FINAL;
+
+ /**
+ * @brief DoSubscribe allows to subscribe certain listener for
+ * SystemTime. This certain implementation does not maintain
+ * listeners collection instead it save the pointer to listener.
+ * @note the class is not reponsible for the pointer's lifecycle.
+ * So consider to explicitly unsibsscribe from event when listener
+ * is going to be destroyed.
+ * @param listener the listener which will be notified
+ * in case of SystemTime appeared.
+ */
+ void DoSubscribe(utils::SystemTimeListener* listener) FINAL;
+
+ /**
+ * @brief DoUnsubscribe assigns the pointer to listener to NULL.
+ * This certain implementation ignores passed parameter.
+ * @param listener pointer to the object which should be
+ * unsubscribed from events.
+ */
+ void DoUnsubscribe(utils::SystemTimeListener* listener) FINAL;
+
+ /**
+ * @brief FetchSystemTime this method allows to obtain
+ * recently received utc time.
+ * @note it is up to user to check whether the returned
+ * argument is valid
+ * @return the time value returned by system.
+ */
+ time_t FetchSystemTime() FINAL;
+
+ /**
+ * @brief SendTimeRequest sends the request to the system
+ * and subscribes for response.
+ */
+ void SendTimeRequest();
+
+ /**
+ * @brief ProcessSystemTimeResponse allows to process GetSystemTimeResponse
+ * @param event contains response parameters aka "systemTime".
+ */
+ void ProcessSystemTimeResponse(
+ const application_manager::event_engine::Event& event);
+
+ /**
+ * @brief ProcessSystemTimeReadyNotification allows to process
+ * OnSystemTimeready notification
+ * from HMI. It unsubscribes from the mentioned notification and sends
+ * GetSystemTimeRequest to HMI in order to obtain system time
+ */
+ void ProcessSystemTimeReadyNotification();
+
+ /**
+ * @brief Checks if UTC time is ready to provided by HMI
+ * and can be requested by GetSystemTime request
+ * @return True if HMI is ready to provide UTC time
+ * otherwise False
+ */
+ bool utc_time_can_be_received() const FINAL;
+
+ mutable sync_primitives::Lock state_lock_;
+ // Variable means HMI readiness to provide system time by request
+ volatile bool utc_time_can_be_received_;
+
+ /**
+ * @brief Flag used to control that only GetSystemTime request at time could
+ * be sent to HMI
+ */
+ volatile bool awaiting_get_system_time_;
+
+ // Varible used to store result for GetSystemTime request
+ time_t last_time_;
+
+ sync_primitives::Lock system_time_listener_lock_;
+ utils::SystemTimeListener* system_time_listener_;
+ ApplicationManager& app_manager_;
+};
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SYSTEM_TIME_SYSTEM_TIME_HANDLER_IMPL_H_
diff --git a/src/components/application_manager/rpc_plugins/CMakeLists.txt b/src/components/application_manager/rpc_plugins/CMakeLists.txt
new file mode 100644
index 0000000000..c9ef282c12
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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.
+
+# --- Utils
+add_subdirectory(vehicle_info_plugin)
+add_subdirectory(sdl_rpc_plugin)
+add_subdirectory(rc_rpc_plugin)
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/CMakeLists.txt b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/CMakeLists.txt
new file mode 100644
index 0000000000..00de927b6e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/CMakeLists.txt
@@ -0,0 +1,80 @@
+# 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 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_directories(include)
+
+set (COMMANDS_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/commands
+)
+
+set (MOBILE_COMMANDS_SOURCE_DIR
+ ${COMMANDS_SOURCE_DIR}/mobile
+)
+
+set (HMI_COMMANDS_SOURCE_DIR
+ ${COMMANDS_SOURCE_DIR}/hmi
+)
+
+collect_sources(MOBILE_COMMANDS "${MOBILE_COMMANDS_SOURCE_DIR}")
+collect_sources(HMI_COMMANDS "${HMI_COMMANDS_SOURCE_DIR}")
+collect_sources(PLUGIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src")
+collect_sources(COMMANDS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/commands")
+
+set(LIBRARIES
+ HMI_API
+ MOBILE_API
+ ApplicationManager
+ v4_protocol_v1_2_no_extra
+ SmartObjects
+ Utils
+)
+
+if(ENABLE_LOG)
+ list(APPEND LIBRARIES log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
+endif()
+
+add_library("rc_rpc_plugin" SHARED ${PLUGIN_SOURCES} ${MOBILE_COMMANDS} ${HMI_COMMANDS} ${COMMANDS_SOURCES})
+target_link_libraries("rc_rpc_plugin" ${LIBRARIES})
+
+add_library("RCRpcPluginStaticLib" ${PLUGIN_SOURCES} ${MOBILE_COMMANDS} ${HMI_COMMANDS})
+target_link_libraries("RCRpcPluginStaticLib" ${LIBRARIES})
+
+set(INSTALL_DESTINATION bin)
+
+install(TARGETS rc_rpc_plugin
+ DESTINATION ${INSTALL_DESTINATION}
+ 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/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h
new file mode 100644
index 0000000000..fc3721e763
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCButtonPressRequest
+ : public application_manager::commands::RequestToHMI {
+ public:
+ /**
+ * @brief RCButtonPressRequest class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCButtonPressRequest(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,
+ ResourceAllocationManager& resource_allocation_manager);
+ /**
+ * @brief Execute command
+ */
+ void Run() OVERRIDE;
+ ~RCButtonPressRequest();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h
new file mode 100644
index 0000000000..c16f4de0cc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h
@@ -0,0 +1,70 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCButtonPressResponse
+ : public application_manager::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief RCButtonPressResponse class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCButtonPressResponse(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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ ~RCButtonPressResponse();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h
new file mode 100644
index 0000000000..fc2e0d6536
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h
@@ -0,0 +1,62 @@
+/*
+* 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.
+*/
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCGetInteriorVehicleDataConsentRequest
+ : public application_manager::commands::RequestToHMI {
+ public:
+ RCGetInteriorVehicleDataConsentRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+ ~RCGetInteriorVehicleDataConsentRequest();
+};
+
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h
new file mode 100644
index 0000000000..a037d33d5a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCGetInteriorVehicleDataConsentResponse
+ : public application_manager::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief RCGetInteriorVehicleDataConsentResponse class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCGetInteriorVehicleDataConsentResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ ~RCGetInteriorVehicleDataConsentResponse();
+};
+
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_RESPONSE_H_
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
new file mode 100644
index 0000000000..9f7b1211b7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCGetInteriorVehicleDataRequest
+ : public application_manager::commands::RequestToHMI {
+ public:
+ RCGetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+ ~RCGetInteriorVehicleDataRequest();
+};
+
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h
new file mode 100644
index 0000000000..28f9b4b9c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCGetInteriorVehicleDataResponse
+ : public application_manager::commands::ResponseFromHMI {
+ public:
+ RCGetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ ~RCGetInteriorVehicleDataResponse();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h
new file mode 100644
index 0000000000..0afa613c7c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h
@@ -0,0 +1,74 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCOnInteriorVehicleDataNotification
+ : public application_manager::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief RCOnInteriorVehicleDataNotification class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCOnInteriorVehicleDataNotification(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ ~RCOnInteriorVehicleDataNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h
new file mode 100644
index 0000000000..b9ab821176
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h
@@ -0,0 +1,83 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCOnRemoteControlSettingsNotification
+ : public application_manager::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief RCOnRemoteControlSettingsNotification class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCOnRemoteControlSettingsNotification(
+ 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,
+ rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager);
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ ~RCOnRemoteControlSettingsNotification();
+
+ private:
+ ResourceAllocationManager& resource_allocation_manager_;
+
+ /**
+ * @brief Disalows RC functionality for all RC apps
+ * All registered apps will be unsubsribed from OnInteriorVehicleData
+ * notifications
+ */
+ void DisallowRCFunctionality();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h
new file mode 100644
index 0000000000..194b423b1a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCSetInteriorVehicleDataRequest
+ : public application_manager::commands::RequestToHMI {
+ public:
+ /**
+ * @brief RCSetInteriorVehicleDataRequest class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCSetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+ void Run() OVERRIDE;
+ ~RCSetInteriorVehicleDataRequest();
+};
+
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h
new file mode 100644
index 0000000000..f23acda4d4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class RCSetInteriorVehicleDataResponse
+ : public application_manager::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief RCSetInteriorVehicleDataResponse class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCSetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ ~RCSetInteriorVehicleDataResponse();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h
new file mode 100644
index 0000000000..fa89c10bf9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h
@@ -0,0 +1,99 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_REQUEST_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_REQUEST_H
+
+#include "rc_rpc_plugin/commands/rc_command_request.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class ButtonPressRequest : public RCCommandRequest {
+ public:
+ ButtonPressRequest(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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ /**
+ * @brief Execute command
+ * send HMI request if message contains appropriate
+ * button name and module type
+ * otherwise sends negative sesponse to mobile
+ */
+ void Execute() FINAL;
+
+ /**
+ * @brief AcquireResource Tries to acquire specific resource
+ * @param message Incoming message containg the resource name
+ * @return Acquire result
+ */
+ AcquireResult::eType AcquireResource(
+ const app_mngr::commands::MessageSharedPtr& message) FINAL;
+
+ /**
+ * @brief IsResourceFree check resource state
+ * @param module_type Resource name
+ * @return True if free, otherwise - false
+ */
+ bool IsResourceFree(const std::string& module_type) const FINAL;
+
+ /**
+ * @brief SetResourceState changes state of resource
+ * @param state State to set for resource
+ */
+ void SetResourceState(const std::string& module_type,
+ const ResourceState::eType state) FINAL;
+
+ /**
+ * @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) FINAL;
+
+ std::string ModuleType() FINAL;
+
+ /**
+ * @brief ButtonPressRequest class destructor
+ */
+ ~ButtonPressRequest();
+};
+
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_REQUEST_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h
new file mode 100644
index 0000000000..16d7b0e3fe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_RESPONSE_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_RESPONSE_H
+
+#include "application_manager/commands/command_response_impl.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class ButtonPressResponse
+ : public application_manager::commands::CommandResponseImpl {
+ public:
+ ButtonPressResponse(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,
+ ResourceAllocationManager& resource_allocation_manager);
+ void Run() OVERRIDE;
+ /**
+ * @brief ButtonPressResponse class destructor
+ */
+ ~ButtonPressResponse();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_RESPONSE_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h
new file mode 100644
index 0000000000..c2ae0e887f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h
@@ -0,0 +1,98 @@
+/*
+ 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 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_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
+
+#include "rc_rpc_plugin/commands/rc_command_request.h"
+#include <string>
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class GetInteriorVehicleDataRequest : public RCCommandRequest {
+ public:
+ GetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+ /**
+ * @brief Execute command
+ */
+ void Execute() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief GetInteriorVehicleDataRequest class destructor
+ */
+ ~GetInteriorVehicleDataRequest();
+
+ private:
+ /**
+ * @brief Check if app wants to proceed with already setup subscription
+ * @param request_params request parameters to check
+ * @return true if app already subscribed(unsubsribed) for module type but
+ * wants to subscribe(unsubscribe) for the same module again
+ * otherwise - false
+ */
+ bool HasRequestExcessiveSubscription();
+
+ /**
+ * @brief Handle subscription to vehicle data
+ * @param hmi_response json message with response from HMI
+ */
+ void ProccessSubscription(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_response);
+
+ /**
+ * @brief Cuts off subscribe parameter
+ * @param request_params request parameters to handle
+ */
+ void RemoveExcessiveSubscription();
+
+ std::string ModuleType() FINAL;
+ bool excessive_subscription_occured_;
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h
new file mode 100644
index 0000000000..78148ab7df
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h
@@ -0,0 +1,62 @@
+/*
+ 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 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_RC_RPC_PLUGIN_INCLUDE_COMMANDS_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H
+
+#include "application_manager/commands/command_response_impl.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class GetInteriorVehicleDataResponse
+ : public application_manager::commands::CommandResponseImpl {
+ public:
+ GetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ ~GetInteriorVehicleDataResponse();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h
new file mode 100644
index 0000000000..20a7e69868
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h
@@ -0,0 +1,65 @@
+/*
+ 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 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_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+
+#include <string>
+#include "application_manager/commands/command_notification_impl.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class OnInteriorVehicleDataNotification
+ : public application_manager::commands::CommandNotificationImpl {
+ public:
+ OnInteriorVehicleDataNotification(
+ 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_handler,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ std::string ModuleType();
+
+ ~OnInteriorVehicleDataNotification();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h
new file mode 100644
index 0000000000..83a8dfdd75
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h
@@ -0,0 +1,125 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H
+
+#include "rc_rpc_plugin/commands/rc_command_request.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class SetInteriorVehicleDataRequest : public RCCommandRequest {
+ public:
+ SetInteriorVehicleDataRequest(
+ 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,
+ rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager);
+
+ /**
+ * @brief Execute command
+ */
+ void Execute() FINAL;
+
+ /**
+ * @brief AcquireResource proxy AcquireResource to Resource allocation manager
+ * @param message message of requires contatin module types
+ * @return result of acauiring resources
+ */
+ AcquireResult::eType AcquireResource(
+ const app_mngr::commands::MessageSharedPtr& message) FINAL;
+
+ /**
+ * @brief IsResourceFree check resource state
+ * @param module_type Resource name
+ * @return True if free, otherwise - false
+ */
+ bool IsResourceFree(const std::string& module_type) const FINAL;
+
+ /**
+ * @brief SetResourceState changes state of resource
+ * @param state State to set for resource
+ */
+ void SetResourceState(const std::string& module_type,
+ const ResourceState::eType state) FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Method that check if READ_ONLY parameters present
+ * @param request_params params from received message
+ * @return true if present , false - otherwise
+ */
+ bool AreReadOnlyParamsPresent(const smart_objects::SmartObject& module_data);
+
+ /**
+ * @brief Method that check if all request parameters are READ_ONLY
+ * @param request_params params from received message
+ * @return true if all are read only , false - otherwise
+ */
+ bool AreAllParamsReadOnly(const smart_objects::SmartObject& module_data);
+
+ /**
+ * @brief Method that cuts-off READ_ONLY parameters
+ * @param request_params params to handle
+ */
+ void CutOffReadOnlyParams(smart_objects::SmartObject& module_data);
+
+ std::string ModuleType() FINAL;
+
+ /**
+ * @brief SetInteriorVehicleDataRequest class destructor
+ */
+ ~SetInteriorVehicleDataRequest();
+
+ private:
+ /**
+ * @brief ControlData
+ * @param module_data received params
+ * @return value of module data depending on module type
+ */
+ const smart_objects::SmartObject& ControlData(
+ const smart_objects::SmartObject& module_data);
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h
new file mode 100644
index 0000000000..5661a57c07
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H
+
+#include "application_manager/commands/command_response_impl.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+class SetInteriorVehicleDataResponse
+ : public application_manager::commands::CommandResponseImpl {
+ public:
+ SetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager);
+
+ void Run() OVERRIDE;
+
+ ~SetInteriorVehicleDataResponse();
+};
+} // namespace commands
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h
new file mode 100644
index 0000000000..7c5e6f0ebc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h
@@ -0,0 +1,172 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H
+
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+#include "application_manager/commands/command_request_impl.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+
+enum TypeAccess { kDisallowed, kAllowed };
+
+namespace commands {
+
+class RCCommandRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief RCCommandRequest class constructor
+ * @param message MessageSharedPtr
+ * @param application_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handle PolicyHandlerInterface
+ * @param resource_allocation_manager ResourceAllocationManager
+ **/
+ RCCommandRequest(
+ 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_handl,
+ rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager);
+
+ virtual ~RCCommandRequest();
+
+ void onTimeOut() OVERRIDE;
+
+ void Run() OVERRIDE;
+
+ virtual void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ protected:
+ bool is_subscribed;
+ ResourceAllocationManager& resource_allocation_manager_;
+ bool auto_allowed_;
+
+ /**
+ * @brief AcquireResource try to allocate resource for application
+ * In case if allocation of resource is not required, return ALLOWED by
+ * default.
+ * This method should be overrided in RPCs that requires resource allocation
+ * @return result of resource allocation, in case if allocation os not
+ * required, return ALLOWED
+ */
+ virtual AcquireResult::eType AcquireResource(
+ const app_mngr::commands::MessageSharedPtr& message) {
+ return AcquireResult::ALLOWED;
+ }
+
+ /**
+ * @brief IsResourceFree check resource state
+ * This is default implementation which has to be redefined for RPCs which
+ * need to manage the resources
+ * @param module_type Resource name
+ * @return True if free, otherwise - false
+ */
+ virtual bool IsResourceFree(const std::string& module_type) const {
+ UNUSED(module_type);
+ return true;
+ }
+ /**
+ * @brief SetResourceState changes state of resource
+ * This is default implementation which has to be redefined for RPCs which
+ * need to manage the resources
+ * @param module_type Resource name
+ * @param State to set for resource
+ */
+ virtual void SetResourceState(const std::string& module_type,
+ const ResourceState::eType) {}
+
+ /**
+ * Checks if module for application is present in policy table
+ * @param app_id id of application
+ * @param module type Resource name
+ * @return kAllowed if module is present, otherwise - kDisallowed
+ */
+ TypeAccess CheckModule(const std::string& module_type,
+ application_manager::ApplicationSharedPtr app);
+
+ bool auto_allowed() const {
+ return auto_allowed_;
+ }
+
+ void set_auto_allowed(const bool value) {
+ auto_allowed_ = value;
+ }
+
+ /**
+ * @brief executes specific logic of children classes
+ */
+ void virtual Execute() = 0;
+
+ void set_disallowed_info(const std::string& info) {
+ disallowed_info_ = info;
+ }
+
+ virtual std::string ModuleType() = 0;
+
+ private:
+ /**
+ * @brief CheckDriverConsent checks driver consent defined in policy table
+ * @return True if no consent is required, otherwise - false
+ */
+ bool CheckDriverConsent();
+
+ /**
+ * @brief AcquireResources checks whether resource status is busy or not and
+ * then tries to acquire this resource. In case driver consent is required -
+ * sends consent request to HMI.
+ * @return True in case of resource is free and successfully acquired,
+ * otherwise false
+ */
+ bool AcquireResources();
+ void SendDisallowed(TypeAccess access);
+
+ /**
+ * @brief SendGetUserConsent sends consent request to HMI
+ * @param module_type Resource name
+ */
+ void SendGetUserConsent(const std::string& module_type);
+ void ProcessAccessResponse(const app_mngr::event_engine::Event& event);
+ bool IsInterfaceAvailable(
+ const app_mngr::HmiInterfaces::InterfaceID interface) const;
+
+ std::string disallowed_info_;
+};
+}
+}
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H
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
new file mode 100644
index 0000000000..05994492c2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_
+#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_
+
+#include <string>
+#include <set>
+#include "application_manager/app_extension.h"
+
+namespace rc_rpc_plugin {
+class RCAppExtension : public application_manager::AppExtension {
+ public:
+ explicit RCAppExtension(application_manager::AppExtensionUID uid);
+ ~RCAppExtension();
+
+ /**
+ * @brief Subscribe to OnInteriorVehicleDataNotification
+ * @param module interior data specification(zone, data type)
+ */
+ void SubscribeToInteriorVehicleData(const std::string& module_type);
+
+ /**
+ * @brief Unsubscribe from OnInteriorVehicleDataNotification
+ * @param module interior data specification(zone, data type)
+ */
+ void UnsubscribeFromInteriorVehicleData(const std::string& module_type);
+
+ /**
+ * @brief UnsubscribeFromInteriorVehicleData removes all subscriptions for
+ * interior data
+ */
+ void UnsubscribeFromInteriorVehicleData();
+
+ /**
+ * @brief Check if application subscribed to OnInteriorVehicleDataNotification
+ * @param module interior data specification(zone, data type)
+ */
+ bool IsSubscibedToInteriorVehicleData(const std::string& module_type);
+
+ private:
+ std::set<std::string> subscribed_interior_vehicle_data_;
+
+ // AppExtension interface
+ public:
+ void SaveResumptionData(
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) OVERRIDE;
+ void ProcessResumption(const NsSmartDeviceLink::NsSmartObjects::SmartObject&
+ resumption_data) OVERRIDE;
+};
+
+typedef utils::SharedPtr<RCAppExtension> RCAppExtensionPtr;
+
+} // namespace rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h
new file mode 100644
index 0000000000..6f101cefef
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h
@@ -0,0 +1,94 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H
+
+#include <memory>
+#include "application_manager/command_factory.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/command_factory.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/hmi_capabilities.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace app_mngr = application_manager;
+using policy::PolicyHandlerInterface;
+class RCCommandFactory : public application_manager::CommandFactory {
+ public:
+ /**
+ * @brief RCCommandFactory class constructor
+ * @param app_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handler PolicyHandlerInterface
+ * @param allocation_manager ResourceAllocationManager
+ **/
+ RCCommandFactory(app_mngr::ApplicationManager& app_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler,
+ ResourceAllocationManager& allocation_manager);
+ application_manager::CommandSharedPtr CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ /**
+ * @param int32_t command id
+ * @param CommandSource source
+ * @return return true if command can be create, else return false
+ **/
+ virtual bool IsAbleToProcess(
+ const int32_t,
+ const application_manager::commands::Command::CommandSource)
+ const OVERRIDE;
+
+ private:
+ app_mngr::CommandCreator& get_mobile_creator_factory(
+ mobile_apis::FunctionID::eType id,
+ mobile_apis::messageType::eType message_type) const;
+
+ app_mngr::CommandCreator& get_hmi_creator_factory(
+ hmi_apis::FunctionID::eType id,
+ hmi_apis::messageType::eType message_type) const;
+
+ app_mngr::ApplicationManager& app_manager_;
+ app_mngr::rpc_service::RPCService& rpc_service_;
+ app_mngr::HMICapabilities& hmi_capabilities_;
+ PolicyHandlerInterface& policy_handler_;
+ ResourceAllocationManager& allocation_manager_;
+};
+} // namespace rc_rpc_plugin
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H
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
new file mode 100644
index 0000000000..e22f2b64a8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
@@ -0,0 +1,233 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_
+#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_
+
+namespace rc_rpc_plugin {
+
+namespace strings {
+// RemoteControlCapabilities constants
+const char kclimateControlCapabilities[] = "climateControlCapabilities";
+const char kradioControlCapabilities[] = "radioControlCapabilities";
+const char kbuttonCapabilities[] = "buttonCapabilities";
+// RemoteControlCapabilities constants
+
+const char kRadioControlData[] = "radioControlData";
+const char kClimateControlData[] = "climateControlData";
+} // strings
+
+namespace result_codes {
+const char kSuccess[] = "SUCCESS";
+const char kUnsupportedRequest[] = "UNSUPPORTED_REQUEST";
+const char kUnsupportedResource[] = "UNSUPPORTED_RESOURCE";
+const char kDisallowed[] = "DISALLOWED";
+const char kRejected[] = "REJECTED";
+const char kAborted[] = "ABORTED";
+const char kIgnored[] = "IGNORED";
+const char kRetry[] = "RETRY";
+const char kInUse[] = "IN_USE";
+const char kVehicleDataNotAvailable[] = "VEHICLE_DATA_NOT_AVAILABLE";
+const char kTimedOut[] = "TIMED_OUT";
+const char kInvalidData[] = "INVALID_DATA";
+const char kCharLimitExceeded[] = "CHAR_LIMIT_EXCEEDED";
+const char kInvalidId[] = "INVALID_ID";
+const char kDuplicateName[] = "DUPLICATE_NAME";
+const char kApplicationNotRegistered[] = "APPLICATION_NOT_REGISTERED";
+const char kOutOfMemory[] = "OUT_OF_MEMORY";
+const char kTooManyPendingRequests[] = "TOO_MANY_PENDING_REQUESTS";
+const char kWarnings[] = "WARNINGS";
+const char kWrongLanguage[] = "WRONG_LANGUAGE";
+const char kGenericError[] = "GENERIC_ERROR";
+const char kUserDisallowed[] = "USER_DISALLOWED";
+const char kReadOnly[] = "READ_ONLY";
+} // result_codes
+
+namespace json_keys {
+const char kParams[] = "params";
+const char kSuccess[] = "success";
+const char kResultCode[] = "resultCode";
+const char kResult[] = "result";
+const char kInfo[] = "info";
+const char kId[] = "id";
+const char kJsonrpc[] = "jsonrpc";
+const char kMethod[] = "method";
+const char kError[] = "error";
+const char kMessage[] = "message";
+const char kData[] = "data";
+const char kAppId[] = "appID";
+const char kCode[] = "code";
+} // json_keys
+
+namespace message_params {
+const char kName[] = "name";
+
+// SetInteriorVehicleData request
+const char kModuleData[] = "moduleData";
+// SetInteriorVehicleData request
+
+// GetInteriorVehicleData request
+const char kSubscribe[] = "subscribe";
+// GetInteriorVehicleData request
+
+// GetInteriorVehicleData response
+const char kIsSubscribed[] = "isSubscribed";
+// GetInteriorVehicleData response
+
+// OnRemoteControlSettings notification
+const char kAccessMode[] = "accessMode";
+const char kAllowed[] = "allowed";
+// OnRemoteControlSettings notification
+
+// ButtonPress request
+const char kModuleType[] = "moduleType";
+const char kButtonName[] = "buttonName";
+const char kButtonPressMode[] = "buttonPressMode";
+// ButtonPress request
+
+// RdsData struct
+const char kPS[] = "PS";
+const char kRT[] = "RT";
+const char kCT[] = "CT";
+const char kPI[] = "PI";
+const char kPTY[] = "PTY";
+const char kTA[] = "TA";
+const char kTP[] = "TP";
+const char kREG[] = "REG";
+// RdsData struct
+
+// RadioControlData struct
+const char kFrequencyInteger[] = "frequencyInteger";
+const char kFrequencyFraction[] = "frequencyFraction";
+const char kBand[] = "band";
+const char kRdsData[] = "rdsData";
+const char kAvailableHDs[] = "availableHDs";
+const char kHdChannel[] = "hdChannel";
+const char kSignalStrength[] = "signalStrength";
+const char kSignalChangeThreshold[] = "signalChangeThreshold";
+const char kRadioEnable[] = "radioEnable";
+const char kState[] = "state";
+// RadioControlData struct
+
+// ClimateControlData struct
+const char kFanSpeed[] = "fanSpeed";
+const char kCurrentTemperature[] = "currentTemperature";
+const char kDesiredTemperature[] = "desiredTemperature";
+const char kTemperatureUnit[] = "temperatureUnit";
+const char kACEnable[] = "acEnable";
+const char kCirculateAirEnable[] = "circulateAirEnable";
+const char kAutoModeEnable[] = "autoModeEnable";
+const char kDefrostZone[] = "defrostZone";
+const char kDualModeEnable[] = "dualModeEnable";
+const char kACMaxEnable[] = "acMaxEnable";
+const char kVentilationMode[] = "ventilationMode";
+// ClimateControlData struct
+
+// ModuleData struct
+const char kRadioControlData[] = "radioControlData";
+const char kClimateControlData[] = "climateControlData";
+// ModuleData struct
+
+const char kHMIAppID[] = "appID";
+const char kHmiLevel[] = "hmiLevel";
+const char kSysContext[] = "systemContext";
+const char kAudioState[] = "audioStreamingState";
+} // namespace message_params
+
+namespace enums_value {
+
+// ModuleType enum
+const char kClimate[] = "CLIMATE";
+const char kRadio[] = "RADIO";
+// ModuleType enum
+
+// RadioBand enum
+const char kAM[] = "AM";
+const char kFM[] = "FM";
+const char kXM[] = "XM";
+// RadioBand enum
+
+// RadioState enum
+const char kAcquiring[] = "ACQUIRING";
+const char kAcquired[] = "ACQUIRED";
+const char kMulticast[] = "MULTICAST";
+const char kNotFound[] = "NOT_FOUND";
+// RadioState enum
+
+// DefrostZone enum
+const char kFront[] = "FRONT";
+const char kRear[] = "REAR";
+const char kAll[] = "ALL";
+// DefrostZone enum
+
+// TemperatureUnit enum
+const char kFahrenheit[] = "FAHRENHEIT";
+const char kCelsius[] = "CELSIUS";
+// TemperatureUnit enum
+
+// ButtonName enum
+const char kACMax[] = "AC_MAX";
+const char kAC[] = "AC";
+const char kRecirculate[] = "RECIRCULATE";
+const char kFanUp[] = "FAN_UP";
+const char kFanDown[] = "FAN_DOWN";
+const char kTempUp[] = "TEMP_UP";
+const char kTempDown[] = "TEMP_DOWN";
+const char kDefrostMax[] = "DEFROST_MAX";
+const char kDefrost[] = "DEFROST";
+const char kDefrostRear[] = "DEFROST_REAR";
+const char kUpperVent[] = "UPPER_VENT";
+const char kLowerVent[] = "LOWER_VENT";
+const char kVolumeUp[] = "VOLUME_UP";
+const char kVolumeDown[] = "VOLUME_DOWN";
+const char kEject[] = "EJECT";
+const char kSource[] = "SOURCE";
+const char kShuffle[] = "SHUFFLE";
+const char kRepeat[] = "REPEAT";
+// ButtonName enum
+
+// ButtonPressMode enum
+const char kLong[] = "LONG";
+const char kShort[] = "SHORT";
+// ButtonPressMode enum
+
+// Access mode enum
+const char kAutoAllow[] = "AUTO_ALLOW";
+const char kAutoDeny[] = "AUTO_DENY";
+const char kAskDriver[] = "ASK_DRIVER";
+// Access mode enum
+
+} // namespace enums_value
+
+} // namespace remote_control
+
+#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_
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
new file mode 100644
index 0000000000..910eda6d3c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h
@@ -0,0 +1,102 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_PLUGIN_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_PLUGIN_H
+#include "application_manager/plugin_manager/rpc_plugin.h"
+#include "application_manager/command_factory.h"
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+
+namespace rc_rpc_plugin {
+namespace plugins = application_manager::plugin_manager;
+namespace app_mngr = application_manager;
+class RCRPCPlugin : public plugins::RPCPlugin {
+ public:
+ /**
+ * @brief Command initialization function
+ * @param app_manager ApplicationManager
+ * @param rpc_service RPCService
+ * @param hmi_capabilities HMICapabilities
+ * @param policy_handler PolicyHandlerInterface
+ * @return true in case initialization was succesful, false otherwise.
+ **/
+ bool Init(app_mngr::ApplicationManager& app_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) OVERRIDE;
+ /**
+ * @param int32_t command id
+ * @param CommandSource source
+ * @return return true if command can be create, else return false
+ **/
+ bool IsAbleToProcess(
+ const int32_t function_id,
+ const app_mngr::commands::Command::CommandSource message_source) OVERRIDE;
+ /**
+ * @brief PluginName plugin name
+ * @return plugin name
+ */
+ std::string PluginName() OVERRIDE;
+ /**
+ * @brief GetCommandFactory get that is able to generate command
+ * from message
+ * @return plugins command factory
+ */
+ app_mngr::CommandFactory& GetCommandFactory() OVERRIDE;
+ /**
+ * @brief OnPolicyEvent Processes policy related events
+ * @param event Policy event
+ */
+ void OnPolicyEvent(app_mngr::plugin_manager::PolicyEvent event) OVERRIDE;
+ /**
+ * @brief OnApplicationEvent Notifies modules on certain application events
+ * @param event Event
+ * @param application Pointer to application struct
+ */
+ void OnApplicationEvent(plugins::ApplicationEvent event,
+ app_mngr::ApplicationSharedPtr application) OVERRIDE;
+
+ static const uint32_t kRCPluginID = 153;
+
+ typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
+ static Apps GetRCApplications(
+ application_manager::ApplicationManager& app_mngr);
+
+ private:
+ std::unique_ptr<application_manager::CommandFactory> command_factory_;
+ std::unique_ptr<ResourceAllocationManager> resource_allocation_manager_;
+};
+} // namespace rc_rpc_plugin
+
+extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_PLUGIN_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h
new file mode 100644
index 0000000000..0dc8b59f8f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h
@@ -0,0 +1,151 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H
+#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H
+#include <string>
+#include "utils/macro.h"
+#include "utils/shared_ptr.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/plugin_manager/rpc_plugin.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+
+namespace rc_rpc_plugin {
+
+/**
+ * Enum for list of results of allocation resources
+ */
+namespace AcquireResult {
+enum eType { ALLOWED = 0, IN_USE, ASK_DRIVER, REJECTED };
+}
+
+/**
+ * Defines states of acquired resource
+ */
+namespace ResourceState {
+enum eType { FREE = 0, BUSY };
+}
+
+/**
+ * @brief Resources defines list of resources
+ */
+typedef std::vector<std::string> Resources;
+
+class ResourceAllocationManager {
+ public:
+ /**
+ * @brief AcquireResource acquires resource by application
+ * @param module_type resource to acquire
+ * @param app_id application that acquire resource
+ * @return ALLOWED if resource acquired \
+ * IN_USE if resource already acquired
+ * ASK_DRIVER if driver confirmation is required
+ */
+ virtual AcquireResult::eType AcquireResource(const std::string& module_type,
+ const uint32_t app_id) = 0;
+
+ /**
+ * @brief SetResourceState changes resource state. Resource must be acquired
+ * beforehand.
+ * @param module_type Resource to change its state
+ * @param app_id Application aquired resource before
+ * @param state State to set for resource
+ */
+ virtual void SetResourceState(const std::string& module_type,
+ const uint32_t app_id,
+ const ResourceState::eType state) = 0;
+
+ /**
+ * @brief IsResourceFree check resource state
+ * @param module_type Resource name
+ * @return True if free, otherwise - false
+ */
+ virtual bool IsResourceFree(const std::string& module_type) const = 0;
+
+ /**
+ * @brief AcquireResource forces acquiring resource by application
+ * @param module_type resource to acquire
+ * @param app_id application that acquire resource
+ */
+ virtual void ForceAcquireResource(const std::string& module_type,
+ const uint32_t app_id) = 0;
+
+ /**
+ * @brief OnDriverDisallowed callback for rejecting acquiring resource
+ * @param module_type resource type
+ * @param app_id application id
+ */
+ virtual void OnDriverDisallowed(const std::string& module_type,
+ const uint32_t app_id) = 0;
+
+ /**
+ * @brief OnApplicationEvent Processes application related events
+ * @param event Event
+ * @param application Pointer to application struct
+ */
+ virtual void OnApplicationEvent(
+ application_manager::plugin_manager::ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application) = 0;
+
+ /**
+ * @brief OnPolicyEvent Processes policy related events
+ * @param event Policy event
+ */
+ virtual void OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent event) = 0;
+
+ /**
+ * @brief Set current access mode for acquiring resource
+ * @param access_mode
+ */
+ virtual void SetAccessMode(
+ const hmi_apis::Common_RCAccessMode::eType access_mode) = 0;
+
+ /**
+ * @brief Get last set access mode for acquiring resource
+ * @param access_mode
+ */
+ virtual hmi_apis::Common_RCAccessMode::eType GetAccessMode() const = 0;
+
+ /**
+ * @brief Remove all information about all allocations
+ */
+ virtual void ResetAllAllocations() = 0;
+
+ virtual RCAppExtensionPtr GetApplicationExtention(
+ application_manager::ApplicationSharedPtr application) = 0;
+
+ virtual ~ResourceAllocationManager() {}
+};
+
+} // namespace rc_rpc_plugin
+#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h
new file mode 100644
index 0000000000..bb875bb180
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h
@@ -0,0 +1,210 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H
+#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "application_manager/application_impl.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+#include "utils/macro.h"
+#include "utils/lock.h"
+
+namespace rc_rpc_plugin {
+
+typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
+
+class ResourceAllocationManagerImpl : public ResourceAllocationManager {
+ public:
+ ResourceAllocationManagerImpl(
+ application_manager::ApplicationManager& app_mngr,
+ application_manager::rpc_service::RPCService& rpc_service);
+
+ ~ResourceAllocationManagerImpl();
+
+ /**
+ * @brief AcquireResource forces acquiring resource by application
+ * @param module_type resource to acquire
+ * @param app_id application that acquire resourc
+ * @return result of acauiring resources
+ */
+ AcquireResult::eType AcquireResource(const std::string& module_type,
+ const uint32_t app_id) OVERRIDE FINAL;
+ /**
+ * @brief ForceAcquireResource forces acquiring resource by application
+ * @param module_type resource to acquire
+ * @param app_id application that acquire resource
+ */
+ void ForceAcquireResource(const std::string& module_type,
+ const uint32_t app_id) FINAL;
+
+ /**
+ * @brief SetResourceState changes resource state. Resource must be acquired
+ * beforehand.
+ * @param module_type Resource to change its state
+ * @param app_id Application aquired resource before
+ * @param state State to set for resource
+ */
+ void SetResourceState(const std::string& module_type,
+ const uint32_t app_id,
+ const ResourceState::eType state) FINAL;
+
+ /**
+ * @brief IsResourceFree check resource state
+ * @param module_type Resource name
+ * @return True if free, otherwise - false
+ */
+ bool IsResourceFree(const std::string& module_type) const FINAL;
+
+ void SetAccessMode(
+ const hmi_apis::Common_RCAccessMode::eType access_mode) FINAL;
+
+ hmi_apis::Common_RCAccessMode::eType GetAccessMode() const FINAL;
+
+ void OnDriverDisallowed(const std::string& module_type,
+ const uint32_t app_id) FINAL;
+
+ /**
+ * @brief OnApplicationEvent Notifies modules on certain application events
+ * @param event Event
+ * @param application Pointer to application struct
+ */
+ void OnApplicationEvent(
+ application_manager::plugin_manager::ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application) FINAL;
+
+ /**
+ * @brief OnPolicyEvent Processes policy related events
+ * @param event Policy event
+ */
+ void OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent event) FINAL;
+
+ void ResetAllAllocations() FINAL;
+
+ /**
+ * @brief GetApplicationExtention Provides access to application RC extention
+ * @param application Application
+ * @return Pointer to RC extention of application or NULL if not available
+ */
+ RCAppExtensionPtr GetApplicationExtention(
+ application_manager::ApplicationSharedPtr application) FINAL;
+
+ private:
+ /**
+ * @brief IsModuleTypeRejected check if current resource was rejected by
+ * driver for current application
+ * @param module_type resource to check
+ * @param app_id application id
+ * @return true if current resource was rejected by driver for current
+ * application, otherwise - false
+ */
+ bool IsModuleTypeRejected(const std::string& module_type,
+ const uint32_t app_id);
+
+ /**
+ * @brief ReleaseResource Releases resource acquired by application
+ * @param module_type Module name
+ * @param application_id Application id
+ */
+ void ReleaseResource(const std::string& module_type,
+ const uint32_t application_id);
+
+ /**
+ * @brief GetAcquiredResources Provides resources acquired by particular
+ * application currently
+ * @param application_id Application id
+ * @return List of acquired resources by specific application
+ */
+ Resources GetAcquiredResources(const uint32_t application_id) const;
+
+ /**
+ * @brief ProcessApplicationPolicyUpdate Checks if allowed modules list is
+ * changed for registered RC applications and releases in case some modules
+ * now out of the list
+ */
+ void ProcessApplicationPolicyUpdate();
+
+ /**
+ * @brief RemoveAppsSubscriptions Removes subscriptions for interior data for
+ * applications in the list
+ * @param apps Application list
+ */
+ void RemoveAppsSubscriptions(const Apps& apps);
+
+ /**
+ * @brief SetResourceAquired mark resourse as aquired and process logic of
+ * changing state of aquired resources
+ * @param module_type resource name
+ * @param app applicastion that aquire resource
+ */
+ void SetResourceAquired(const std::string& module_type,
+ const uint32_t app_id);
+ /**
+ * @brief SetResourceFree mark resourse as free and process logic of
+ * changing state of aquired resources
+ * @param module_type resource name
+ * @param app applicastion that aquire resource
+ */
+ void SetResourceFree(const std::string& module_type, const uint32_t app_id);
+
+ std::vector<std::string> all_supported_modules();
+ /**
+ * @brief AllocatedResources contains link between resource and application
+ * owning that resource
+ */
+ typedef std::map<std::string, uint32_t> AllocatedResources;
+ AllocatedResources allocated_resources_;
+ mutable sync_primitives::Lock allocated_resources_lock_;
+
+ /**
+ * @brief ResourcesState contains states of ALLOCATED resources
+ */
+ typedef std::map<std::string, ResourceState::eType> ResourcesState;
+ ResourcesState resources_state_;
+ mutable sync_primitives::Lock resources_state_lock_;
+
+ /**
+ * @brief RejectedResources type for connecting list of resources rejected by
+ * driver for application
+ * application_id : [vector of rejected resources]
+ */
+ typedef std::map<uint32_t, std::vector<std::string> > RejectedResources;
+ RejectedResources rejected_resources_for_application_;
+ mutable sync_primitives::Lock rejected_resources_for_application_lock_;
+
+ hmi_apis::Common_RCAccessMode::eType current_access_mode_;
+ application_manager::ApplicationManager& app_mngr_;
+ application_manager::rpc_service::RPCService& rpc_service_;
+};
+} // rc_rpc_plugin
+
+#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_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
new file mode 100644
index 0000000000..d392420238
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc
@@ -0,0 +1,62 @@
+/*
+ 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 "rc_rpc_plugin/commands/hmi/rc_button_press_request.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCButtonPressRequest::RCButtonPressRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+RCButtonPressRequest::~RCButtonPressRequest() {}
+
+void RCButtonPressRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..c7c11354c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc
@@ -0,0 +1,66 @@
+/*
+ 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 "rc_rpc_plugin/commands/hmi/rc_button_press_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCButtonPressResponse::RCButtonPressResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+void RCButtonPressResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ app_mngr::event_engine::Event event(
+ hmi_apis::FunctionID::Buttons_ButtonPress);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+RCButtonPressResponse::~RCButtonPressResponse() {}
+
+} // 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_consent_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc
new file mode 100644
index 0000000000..875f1c8fbf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCGetInteriorVehicleDataConsentRequest::RCGetInteriorVehicleDataConsentRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+RCGetInteriorVehicleDataConsentRequest::
+ ~RCGetInteriorVehicleDataConsentRequest() {}
+
+void RCGetInteriorVehicleDataConsentRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // 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_consent_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc
new file mode 100644
index 0000000000..3a9bb12df1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc
@@ -0,0 +1,69 @@
+/*
+ * 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 "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCGetInteriorVehicleDataConsentResponse::
+ RCGetInteriorVehicleDataConsentResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+void RCGetInteriorVehicleDataConsentResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ app_mngr::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent);
+
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+RCGetInteriorVehicleDataConsentResponse::
+ ~RCGetInteriorVehicleDataConsentResponse() {}
+
+} // 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_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc
new file mode 100644
index 0000000000..0bb5f73c1b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCGetInteriorVehicleDataRequest::RCGetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+RCGetInteriorVehicleDataRequest::~RCGetInteriorVehicleDataRequest() {}
+
+void RCGetInteriorVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // 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
new file mode 100644
index 0000000000..f12512a38d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCGetInteriorVehicleDataResponse::RCGetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+void RCGetInteriorVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ app_mngr::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+RCGetInteriorVehicleDataResponse::~RCGetInteriorVehicleDataResponse() {}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..487193bc4d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
@@ -0,0 +1,64 @@
+/*
+ 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 "rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCOnInteriorVehicleDataNotification::RCOnInteriorVehicleDataNotification(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+RCOnInteriorVehicleDataNotification::~RCOnInteriorVehicleDataNotification() {}
+
+void RCOnInteriorVehicleDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[app_mngr::strings::params][app_mngr::strings::function_id] =
+ static_cast<int>(mobile_apis::FunctionID::eType::OnInteriorVehicleDataID);
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..817223a369
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
@@ -0,0 +1,157 @@
+/*
+ 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 "rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+namespace {
+std::map<std::string, hmi_apis::Common_RCAccessMode::eType> access_modes{
+ {enums_value::kAutoAllow, hmi_apis::Common_RCAccessMode::AUTO_ALLOW},
+ {enums_value::kAutoDeny, hmi_apis::Common_RCAccessMode::AUTO_DENY},
+ {enums_value::kAskDriver, hmi_apis::Common_RCAccessMode::ASK_DRIVER}};
+}
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+RCOnRemoteControlSettingsNotification::RCOnRemoteControlSettingsNotification(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , resource_allocation_manager_(resource_allocation_manager) {}
+
+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
+ it = access_modes.begin();
+ for (; access_modes.end() != it; ++it) {
+ if (access_mode == it->second) {
+ return it->first;
+ }
+ }
+ const std::string error = "UNKNOW_ACCESS_MODE";
+ DCHECK_OR_RETURN(false, error);
+ return error;
+}
+
+void UnsubscribeFromInteriorVehicleDataForAllModules(
+ RCAppExtensionPtr extension) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ extension->UnsubscribeFromInteriorVehicleData(enums_value::kClimate);
+ extension->UnsubscribeFromInteriorVehicleData(enums_value::kRadio);
+}
+
+void RCOnRemoteControlSettingsNotification::DisallowRCFunctionality() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
+ Apps apps = RCRPCPlugin::GetRCApplications(application_manager_);
+ for (Apps::iterator it = apps.begin(); it != apps.end(); ++it) {
+ application_manager::ApplicationSharedPtr app = *it;
+ DCHECK(app);
+ application_manager_.ChangeAppsHMILevel(
+ app->app_id(), mobile_apis::HMILevel::eType::HMI_NONE);
+
+ const RCAppExtensionPtr extension =
+ application_manager::AppExtensionPtr::static_pointer_cast<
+ RCAppExtension>(app->QueryInterface(RCRPCPlugin::kRCPluginID));
+ if (extension) {
+ UnsubscribeFromInteriorVehicleDataForAllModules(extension);
+ }
+ }
+}
+
+void RCOnRemoteControlSettingsNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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");
+ return;
+ }
+
+ const bool is_allowed =
+ (*message_)[app_mngr::strings::msg_params][message_params::kAllowed]
+ .asBool();
+ if (is_allowed) {
+ hmi_apis::Common_RCAccessMode::eType access_mode =
+ hmi_apis::Common_RCAccessMode::INVALID_ENUM;
+ LOG4CXX_DEBUG(logger_, "Allowing RC Functionality");
+ if ((*message_)[app_mngr::strings::msg_params].keyExists(
+ message_params::kAccessMode)) {
+ access_mode = static_cast<hmi_apis::Common_RCAccessMode::eType>(
+ (*message_)[app_mngr::strings::msg_params]
+ [message_params::kAccessMode].asUInt());
+ LOG4CXX_DEBUG(
+ logger_,
+ "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));
+ }
+ resource_allocation_manager_.SetAccessMode(access_mode);
+ } else {
+ LOG4CXX_DEBUG(logger_, "Disallowing RC Functionality");
+ DisallowRCFunctionality();
+ resource_allocation_manager_.ResetAllAllocations();
+ }
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..69ceed17e9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc
@@ -0,0 +1,61 @@
+/*
+ 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 "rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCSetInteriorVehicleDataRequest::RCSetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+RCSetInteriorVehicleDataRequest::~RCSetInteriorVehicleDataRequest() {}
+
+void RCSetInteriorVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..42c2452943
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc
@@ -0,0 +1,66 @@
+/*
+ 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 "rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCSetInteriorVehicleDataResponse::RCSetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+
+void RCSetInteriorVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ app_mngr::event_engine::Event event(
+ hmi_apis::FunctionID::RC_SetInteriorVehicleData);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+RCSetInteriorVehicleDataResponse::~RCSetInteriorVehicleDataResponse() {}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..88e4ebaa3c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
@@ -0,0 +1,299 @@
+/*
+ * 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 "rc_rpc_plugin/commands/mobile/button_press_request.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "smart_objects/enum_schema_item.h"
+#include "utils/macro.h"
+#include "json/json.h"
+#include "utils/helpers.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+using namespace json_keys;
+using namespace message_params;
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+typedef std::map<std::string, mobile_apis::ButtonName::eType> ButtonsMap;
+
+ButtonPressRequest::ButtonPressRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : RCCommandRequest(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle,
+ resource_allocation_manager) {}
+
+ButtonPressRequest::~ButtonPressRequest() {}
+
+const std::vector<std::string> buttons_climate() {
+ std::vector<std::string> data;
+ data.push_back(enums_value::kACMax);
+ data.push_back(enums_value::kAC);
+ data.push_back(enums_value::kRecirculate);
+ data.push_back(enums_value::kFanUp);
+ data.push_back(enums_value::kFanDown);
+ data.push_back(enums_value::kTempUp);
+ data.push_back(enums_value::kTempDown);
+ data.push_back(enums_value::kDefrostMax);
+ data.push_back(enums_value::kDefrost);
+ data.push_back(enums_value::kDefrostRear);
+ data.push_back(enums_value::kUpperVent);
+ data.push_back(enums_value::kLowerVent);
+ return data;
+}
+
+const std::vector<std::string> buttons_radio() {
+ std::vector<std::string> data;
+ data.push_back(enums_value::kVolumeUp);
+ data.push_back(enums_value::kVolumeDown);
+ data.push_back(enums_value::kEject);
+ data.push_back(enums_value::kSource);
+ data.push_back(enums_value::kShuffle);
+ data.push_back(enums_value::kRepeat);
+ return data;
+}
+
+const ButtonsMap buttons_map() {
+ using namespace mobile_apis;
+
+ ButtonsMap buttons_map;
+ buttons_map[enums_value::kACMax] = ButtonName::AC_MAX;
+ buttons_map[enums_value::kAC] = ButtonName::AC;
+ buttons_map[enums_value::kRecirculate] = ButtonName::RECIRCULATE;
+ buttons_map[enums_value::kFanUp] = ButtonName::FAN_UP;
+ buttons_map[enums_value::kFanDown] = ButtonName::FAN_DOWN;
+ buttons_map[enums_value::kTempUp] = ButtonName::TEMP_UP;
+ buttons_map[enums_value::kTempDown] = ButtonName::TEMP_DOWN;
+ buttons_map[enums_value::kDefrostMax] = ButtonName::DEFROST_MAX;
+ buttons_map[enums_value::kDefrost] = ButtonName::DEFROST;
+ buttons_map[enums_value::kDefrostRear] = ButtonName::DEFROST_REAR;
+ buttons_map[enums_value::kUpperVent] = ButtonName::UPPER_VENT;
+ buttons_map[enums_value::kLowerVent] = ButtonName::LOWER_VENT;
+ buttons_map[enums_value::kVolumeUp] = ButtonName::VOLUME_UP;
+ buttons_map[enums_value::kVolumeDown] = ButtonName::VOLUME_DOWN;
+ buttons_map[enums_value::kEject] = ButtonName::EJECT;
+ buttons_map[enums_value::kSource] = ButtonName::SOURCE;
+ buttons_map[enums_value::kShuffle] = ButtonName::SHUFFLE;
+ buttons_map[enums_value::kRepeat] = ButtonName::REPEAT;
+
+ return buttons_map;
+}
+
+bool CheckIfButtonExistInRCCaps(
+ const smart_objects::SmartObject& rc_capabilities,
+ const mobile_apis::ButtonName::eType button) {
+ if (rc_capabilities.keyExists(strings::kbuttonCapabilities)) {
+ const smart_objects::SmartObject& button_caps =
+ rc_capabilities[strings::kbuttonCapabilities];
+ auto it = button_caps.asArray()->begin();
+ for (; it != button_caps.asArray()->end(); ++it) {
+ smart_objects::SmartObject& so = *it;
+ int64_t current_id = so[message_params::kName].asInt();
+ if (-1 == current_id) {
+ // capabilities received from HMI contains enum values
+ // capabilities loaded from file contains string values
+ // TODO : unificate capabilities storing
+ const std::string& bt_name = so[message_params::kName].asString();
+ static ButtonsMap btn_map = buttons_map();
+ current_id = btn_map[bt_name];
+ }
+ 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");
+ return true;
+ }
+ }
+ }
+ LOG4CXX_TRACE(logger_,
+ "Button id " << button << " do not exist in capabilities");
+ return false;
+}
+
+bool CheckButtonName(const std::string& module_type,
+ const std::string& button_name,
+ const smart_objects::SmartObject* rc_capabilities) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (rc_capabilities == NULL) {
+ LOG4CXX_ERROR(logger_, "No remote controll capabilities available");
+ return false;
+ }
+
+ if (enums_value::kRadio == module_type) {
+ if (!helpers::in_range(buttons_radio(), button_name)) {
+ LOG4CXX_WARN(logger_,
+ "Trying to acceess climate button with module type radio");
+ return false;
+ }
+ }
+
+ if (enums_value::kClimate == module_type) {
+ if (!helpers::in_range(buttons_climate(), button_name)) {
+ LOG4CXX_WARN(logger_,
+ "Trying to acceess radio button with module type climate");
+ return false;
+ }
+ }
+ return true;
+}
+
+void ButtonPressRequest::Execute() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const char* button_name;
+ NsSmartDeviceLink::NsSmartObjects::
+ EnumConversionHelper<mobile_apis::ButtonName::eType>::EnumToCString(
+ static_cast<mobile_apis::ButtonName::eType>(
+ (*message_)[app_mngr::strings::msg_params]
+ [message_params::kButtonName].asUInt()),
+ &button_name);
+
+ const std::string module_type = ModuleType();
+ static ButtonsMap btn_map = buttons_map();
+ mobile_apis::ButtonName::eType button_id =
+ mobile_apis::ButtonName::INVALID_ENUM;
+ if (btn_map.end() != btn_map.find(button_name)) {
+ button_id = btn_map[button_name];
+ }
+
+ const smart_objects::SmartObject* rc_capabilities =
+ hmi_capabilities_.rc_capability();
+ const bool button_name_matches_module_type =
+ CheckButtonName(module_type, button_name, rc_capabilities);
+ const bool button_id_exist_in_caps =
+ rc_capabilities &&
+ CheckIfButtonExistInRCCaps(*rc_capabilities, button_id);
+
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+
+ (*message_)[app_mngr::strings::msg_params][app_mngr::strings::app_id] =
+ app->app_id();
+
+ if (button_name_matches_module_type && button_id_exist_in_caps) {
+ SendHMIRequest(hmi_apis::FunctionID::Buttons_ButtonPress,
+ &(*message_)[app_mngr::strings::msg_params],
+ true);
+ } else if (!button_name_matches_module_type) {
+ LOG4CXX_WARN(logger_, "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 is not exists in capabilities!");
+ SetResourceState(module_type, ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ "Requested button is not exists in capabilities!");
+ }
+}
+
+AcquireResult::eType ButtonPressRequest::AcquireResource(
+ const app_mngr::commands::MessageSharedPtr& message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const std::string module_type = ModuleType();
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ return resource_allocation_manager_.AcquireResource(module_type,
+ app->app_id());
+}
+
+bool ButtonPressRequest::IsResourceFree(const std::string& module_type) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return resource_allocation_manager_.IsResourceFree(module_type);
+}
+
+void ButtonPressRequest::SetResourceState(const std::string& module_type,
+ const ResourceState::eType state) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ resource_allocation_manager_.SetResourceState(
+ module_type, app->app_id(), state);
+}
+
+void ButtonPressRequest::on_event(const app_mngr::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RCCommandRequest::on_event(event);
+
+ if (hmi_apis::FunctionID::Buttons_ButtonPress != event.id()) {
+ return;
+ }
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[app_mngr::strings::params][app_mngr::hmi_response::code]
+ .asUInt()));
+
+ bool result =
+ helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>(
+ result_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS);
+
+ if (mobile_apis::Result::READ_ONLY == result_code) {
+ result = false;
+ result_code = mobile_apis::Result::GENERIC_ERROR;
+ }
+ std::string response_info;
+ GetInfo(message, response_info);
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(result, result_code, response_info.c_str());
+}
+
+std::string ButtonPressRequest::ModuleType() {
+ mobile_apis::ModuleType::eType module_type = static_cast<
+ mobile_apis::ModuleType::eType>(
+ (*message_)[app_mngr::strings::msg_params][message_params::kModuleType]
+ .asUInt());
+ const char* str;
+ const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
+ return ok ? str : "unknown";
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..dfdb128322
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc
@@ -0,0 +1,61 @@
+/*
+ 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 "rc_rpc_plugin/commands/mobile/button_press_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+ButtonPressResponse::ButtonPressResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+ButtonPressResponse::~ButtonPressResponse() {}
+
+void ButtonPressResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ application_manager_.GetRPCService().SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..38f94637c2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
@@ -0,0 +1,292 @@
+/*
+ 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 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 "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "smart_objects/enum_schema_item.h"
+#include "utils/macro.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+using namespace json_keys;
+using namespace message_params;
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+GetInteriorVehicleDataRequest::GetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : RCCommandRequest(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle,
+ resource_allocation_manager)
+ , excessive_subscription_occured_(false) {}
+
+bool CheckIfModuleTypeExistInCapabilities(
+ const smart_objects::SmartObject& rc_capabilities,
+ const std::string& module_type) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (enums_value::kRadio == module_type &&
+ !rc_capabilities.keyExists(strings::kradioControlCapabilities)) {
+ LOG4CXX_DEBUG(logger_, " Radio control capabilities not present");
+ return false;
+ }
+ if (enums_value::kClimate == module_type &&
+ !rc_capabilities.keyExists(strings::kclimateControlCapabilities)) {
+ LOG4CXX_DEBUG(logger_, " Climate control capabilities not present");
+ return false;
+ }
+
+ return true;
+}
+
+void GetInteriorVehicleDataRequest::Execute() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const smart_objects::SmartObject* rc_capabilities =
+ hmi_capabilities_.rc_capability();
+
+ const std::string module_type = ModuleType();
+ if (rc_capabilities &&
+ !CheckIfModuleTypeExistInCapabilities(*rc_capabilities, module_type)) {
+ LOG4CXX_WARN(logger_, "Accessing not supported module data");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ "Accessing not supported module data");
+ return;
+ }
+
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+
+ if (HasRequestExcessiveSubscription()) {
+ excessive_subscription_occured_ = true;
+ is_subscribed =
+ (*message_)[app_mngr::strings::msg_params][message_params::kSubscribe]
+ .asBool();
+ RemoveExcessiveSubscription();
+ }
+
+ (*message_)[app_mngr::strings::msg_params][app_mngr::strings::app_id] =
+ app->app_id();
+
+ SendHMIRequest(hmi_apis::FunctionID::RC_GetInteriorVehicleData,
+ &(*message_)[app_mngr::strings::msg_params],
+ true);
+}
+
+void GetInteriorVehicleDataRequest::on_event(
+ const app_mngr::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RCCommandRequest::on_event(event);
+
+ if (hmi_apis::FunctionID::RC_GetInteriorVehicleData != event.id()) {
+ return;
+ }
+
+ smart_objects::SmartObject& hmi_response =
+ const_cast<smart_objects::SmartObject&>(event.smart_object());
+
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ hmi_response[app_mngr::strings::params][app_mngr::hmi_response::code]
+ .asUInt()));
+
+ bool result =
+ helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>(
+ result_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS);
+
+ if (mobile_apis::Result::READ_ONLY == result_code) {
+ result = false;
+ result_code = mobile_apis::Result::GENERIC_ERROR;
+ }
+
+ if (result) {
+ ProccessSubscription(hmi_response);
+ } else {
+ hmi_response[app_mngr::strings::msg_params].erase(
+ message_params::kIsSubscribed);
+ }
+ std::string response_info;
+ GetInfo(hmi_response, response_info);
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(result,
+ result_code,
+ response_info.c_str(),
+ &hmi_response[app_mngr::strings::msg_params]);
+}
+
+GetInteriorVehicleDataRequest::~GetInteriorVehicleDataRequest() {}
+
+void GetInteriorVehicleDataRequest::ProccessSubscription(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_response) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const bool is_subscribe_present_in_request =
+ (*message_)[app_mngr::strings::msg_params].keyExists(
+ message_params::kSubscribe) ||
+ excessive_subscription_occured_;
+
+ const bool isSubscribed_present_in_response =
+ hmi_response[app_mngr::strings::msg_params].keyExists(
+ message_params::kIsSubscribed);
+
+ smart_objects::SmartObject& temp_hmi_response =
+ const_cast<smart_objects::SmartObject&>(hmi_response);
+
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ RCAppExtensionPtr extension =
+ resource_allocation_manager_.GetApplicationExtention(app);
+ const char* module_type;
+ NsSmartDeviceLink::NsSmartObjects::
+ EnumConversionHelper<mobile_apis::ModuleType::eType>::EnumToCString(
+ static_cast<mobile_apis::ModuleType::eType>(
+ hmi_response[app_mngr::strings::msg_params]
+ [message_params::kModuleData]
+ [message_params::kModuleType].asUInt()),
+ &module_type);
+ if (excessive_subscription_occured_) {
+ is_subscribed = extension->IsSubscibedToInteriorVehicleData(module_type);
+ temp_hmi_response[app_mngr::strings::msg_params]
+ [message_params::kIsSubscribed] = is_subscribed;
+ return;
+ }
+ if (!is_subscribe_present_in_request && !isSubscribed_present_in_response) {
+ return;
+ }
+
+ if (is_subscribe_present_in_request && !isSubscribed_present_in_response) {
+ LOG4CXX_WARN(logger_,
+ "conditional mandatory parameter "
+ << message_params::kIsSubscribed
+ << " missed in hmi response");
+
+ is_subscribed = extension->IsSubscibedToInteriorVehicleData(module_type);
+ temp_hmi_response[app_mngr::strings::msg_params]
+ [message_params::kIsSubscribed] = is_subscribed;
+ return;
+ }
+
+ if (!is_subscribe_present_in_request && isSubscribed_present_in_response) {
+ LOG4CXX_WARN(logger_,
+ "Parameter " << message_params::kIsSubscribed
+ << " is ignored due to absence '"
+ << message_params::kSubscribe
+ << "' parameter in request");
+ smart_objects::SmartObject& temp_hmi_response =
+ const_cast<smart_objects::SmartObject&>(hmi_response);
+ temp_hmi_response[app_mngr::strings::msg_params].erase(
+ message_params::kIsSubscribed);
+ return;
+ }
+
+ const bool request_subscribe =
+ (*message_)[app_mngr::strings::msg_params][message_params::kSubscribe]
+ .asBool();
+ const bool response_subscribe =
+ hmi_response[app_mngr::strings::msg_params][message_params::kIsSubscribed]
+ .asBool();
+ is_subscribed = response_subscribe;
+
+ LOG4CXX_TRACE(logger_, "request_subscribe = " << request_subscribe);
+ LOG4CXX_TRACE(logger_, "response_subscribe = " << response_subscribe);
+ if (request_subscribe == response_subscribe) {
+ const std::string module_type = ModuleType();
+ if (response_subscribe) {
+ LOG4CXX_DEBUG(logger_,
+ "SubscribeToInteriorVehicleData " << app->app_id() << " "
+ << module_type);
+ extension->SubscribeToInteriorVehicleData(module_type);
+ } else {
+ LOG4CXX_DEBUG(logger_,
+ "UnsubscribeFromInteriorVehicleData "
+ << app->app_id() << " " << module_type);
+ extension->UnsubscribeFromInteriorVehicleData(module_type);
+ }
+ }
+}
+
+bool GetInteriorVehicleDataRequest::HasRequestExcessiveSubscription() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const bool is_subscribe_present_in_request =
+ (*message_)[app_mngr::strings::msg_params].keyExists(
+ message_params::kSubscribe);
+
+ if (is_subscribe_present_in_request) {
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ RCAppExtensionPtr extension =
+ resource_allocation_manager_.GetApplicationExtention(app);
+
+ const bool is_app_already_subscribed =
+ extension->IsSubscibedToInteriorVehicleData(ModuleType());
+ const bool app_wants_to_subscribe =
+ (*message_)[app_mngr::strings::msg_params][message_params::kSubscribe]
+ .asBool();
+ if (!app_wants_to_subscribe && !is_app_already_subscribed) {
+ return true;
+ }
+ return app_wants_to_subscribe && is_app_already_subscribed;
+ }
+ return false;
+}
+
+void GetInteriorVehicleDataRequest::RemoveExcessiveSubscription() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[app_mngr::strings::msg_params].erase(message_params::kSubscribe);
+}
+
+std::string GetInteriorVehicleDataRequest::ModuleType() {
+ mobile_apis::ModuleType::eType module_type = static_cast<
+ mobile_apis::ModuleType::eType>(
+ (*message_)[app_mngr::strings::msg_params][message_params::kModuleType]
+ .asUInt());
+ const char* str;
+ const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
+ return ok ? str : "unknown";
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..18ccc5b497
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc
@@ -0,0 +1,61 @@
+/*
+ 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 "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+GetInteriorVehicleDataResponse::GetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+GetInteriorVehicleDataResponse::~GetInteriorVehicleDataResponse() {}
+
+void GetInteriorVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ application_manager_.GetRPCService().SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..dfe2feb622
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
@@ -0,0 +1,101 @@
+/*
+ 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 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 "rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "smart_objects/enum_schema_item.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+OnInteriorVehicleDataNotification::OnInteriorVehicleDataNotification(
+ 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_handler,
+ ResourceAllocationManager& resource_allocation_manager)
+ : app_mngr::commands::CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {
+ UNUSED(resource_allocation_manager);
+}
+
+OnInteriorVehicleDataNotification::~OnInteriorVehicleDataNotification() {}
+
+void OnInteriorVehicleDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const std::string module_type = ModuleType();
+
+ typedef std::vector<application_manager::ApplicationSharedPtr> AppPtrs;
+ AppPtrs apps = RCRPCPlugin::GetRCApplications(application_manager_);
+
+ for (AppPtrs::iterator it = apps.begin(); it != apps.end(); ++it) {
+ DCHECK(*it);
+ application_manager::Application& app = **it;
+
+ RCAppExtensionPtr extension =
+ application_manager::AppExtensionPtr::static_pointer_cast<
+ RCAppExtension>(app.QueryInterface(RCRPCPlugin::kRCPluginID));
+ DCHECK(extension);
+ LOG4CXX_TRACE(logger_,
+ "Check subscription for "
+ << app.app_id() << "and module type " << module_type);
+ if (extension->IsSubscibedToInteriorVehicleData(module_type)) {
+ (*message_)[app_mngr::strings::params]
+ [app_mngr::strings::connection_key] = app.app_id();
+ SendNotification();
+ }
+ }
+}
+
+std::string OnInteriorVehicleDataNotification::ModuleType() {
+ mobile_apis::ModuleType::eType module_type =
+ static_cast<mobile_apis::ModuleType::eType>(
+ (*message_)[app_mngr::strings::msg_params]
+ [message_params::kModuleData][message_params::kModuleType]
+ .asUInt());
+ const char* str;
+ const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
+ return ok ? str : "unknown";
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..160915f347
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
@@ -0,0 +1,365 @@
+/*
+ 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 "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "smart_objects/enum_schema_item.h"
+#include "utils/macro.h"
+#include "json/json.h"
+#include "utils/helpers.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+using namespace json_keys;
+using namespace message_params;
+
+namespace {
+std::vector<std::string> GetModuleReadOnlyParams(
+ const std::string& module_type) {
+ std::vector<std::string> module_ro_params;
+ if (enums_value::kClimate == module_type) {
+ module_ro_params.push_back(kCurrentTemperature);
+ } else if (enums_value::kRadio == module_type) {
+ module_ro_params.push_back(kRdsData);
+ module_ro_params.push_back(kAvailableHDs);
+ module_ro_params.push_back(kSignalStrength);
+ module_ro_params.push_back(kSignalChangeThreshold);
+ module_ro_params.push_back(kState);
+ }
+ return module_ro_params;
+}
+
+const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
+ std::map<std::string, std::string> mapping;
+ // climate
+ mapping["fanSpeed"] = "fanSpeedAvailable";
+ mapping["currentTemperature"] = "currentTemperatureAvailable";
+ mapping["desiredTemperature"] = "desiredTemperatureAvailable";
+ mapping["acEnable"] = "acEnableAvailable";
+ mapping["circulateAirEnable"] = "circulateAirEnableAvailable";
+ mapping["autoModeEnable"] = "autoModeEnableAvailable";
+ mapping["defrostZone"] = "defrostZoneAvailable";
+ mapping["dualModeEnable"] = "dualModeEnableAvailable";
+ mapping["acMaxEnable"] = "acMaxEnableAvailable";
+ mapping["ventilationMode"] = "ventilationModeAvailable";
+
+ // radio
+ mapping["band"] = "radioBandAvailable";
+ mapping["frequencyInteger"] = "radioFrequencyAvailable";
+ mapping["frequencyFraction"] = "radioFrequencyAvailable";
+ mapping["rdsData"] = "rdsDataAvailable";
+ mapping["availableHDs"] = "availableHDsAvailable";
+ mapping["hdChannel"] = "availableHDsAvailable";
+ mapping["signalStrength"] = "signalStrengthAvailable";
+ mapping["signalChangeThreshold"] = "signalChangeThresholdAvailable";
+ mapping["radioEnable"] = "radioEnableAvailable";
+ mapping["state"] = "stateAvailable";
+
+ return mapping;
+}
+} // namespace
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+SetInteriorVehicleDataRequest::SetInteriorVehicleDataRequest(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : RCCommandRequest(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle,
+ resource_allocation_manager) {}
+
+SetInteriorVehicleDataRequest::~SetInteriorVehicleDataRequest() {}
+
+bool CheckControlDataByCapabilities(
+ const smart_objects::SmartObject& module_caps,
+ const smart_objects::SmartObject& control_data) {
+ std::map<std::string, std::string> mapping =
+ GetModuleDataToCapabilitiesMapping();
+
+ auto it = control_data.map_begin();
+ for (; it != control_data.map_end(); ++it) {
+ const std::string& request_parameter = it->first;
+ const std::string& caps_key = mapping[request_parameter];
+ const smart_objects::SmartObject& capabilities_status = module_caps[0];
+ LOG4CXX_DEBUG(logger_,
+ "Checking request parameter "
+ << request_parameter
+ << " with capabilities. Appropriate key is " << caps_key);
+ if (!capabilities_status.keyExists(caps_key)) {
+ LOG4CXX_DEBUG(logger_,
+ "Capability "
+ << caps_key
+ << " is missed in RemoteControl capabilities");
+ return false;
+ }
+ if (!capabilities_status[caps_key].asBool()) {
+ LOG4CXX_DEBUG(logger_,
+ "Capability "
+ << caps_key
+ << " is switched off in RemoteControl capabilities");
+ return false;
+ }
+ }
+ return true;
+}
+
+bool CheckIfModuleDataExistInCapabilities(
+ const smart_objects::SmartObject& rc_capabilities,
+ const smart_objects::SmartObject& module_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ bool is_radio_data_valid = true;
+ bool is_climate_data_valid = true;
+ if (module_data.keyExists(message_params::kRadioControlData)) {
+ if (!rc_capabilities.keyExists(strings::kradioControlCapabilities)) {
+ LOG4CXX_DEBUG(logger_, " Radio control capabilities not present");
+ return false;
+ }
+ const smart_objects::SmartObject& radio_caps =
+ rc_capabilities[strings::kradioControlCapabilities];
+ is_radio_data_valid = CheckControlDataByCapabilities(
+ radio_caps, module_data[strings::kRadioControlData]);
+ }
+ if (module_data.keyExists(message_params::kClimateControlData)) {
+ if (!rc_capabilities.keyExists(strings::kclimateControlCapabilities)) {
+ LOG4CXX_DEBUG(logger_, " Climate control capabilities not present");
+ return false;
+ }
+ const smart_objects::SmartObject& climate_caps =
+ rc_capabilities[strings::kclimateControlCapabilities];
+ is_climate_data_valid = CheckControlDataByCapabilities(
+ climate_caps, module_data[strings::kClimateControlData]);
+ }
+
+ return is_radio_data_valid && is_climate_data_valid;
+}
+
+void SetInteriorVehicleDataRequest::Execute() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject& module_data =
+ (*message_)[app_mngr::strings::msg_params][message_params::kModuleData];
+ const std::string module_type = ModuleType();
+ bool module_type_and_data_match = true;
+
+ if (enums_value::kRadio == module_type) {
+ module_type_and_data_match =
+ !(module_data.keyExists(message_params::kClimateControlData));
+ }
+
+ if (enums_value::kClimate == module_type) {
+ module_type_and_data_match =
+ !(module_data.keyExists(message_params::kRadioControlData));
+ }
+
+ if (module_type_and_data_match) {
+ const smart_objects::SmartObject* rc_capabilities =
+ hmi_capabilities_.rc_capability();
+ if (rc_capabilities &&
+ !CheckIfModuleDataExistInCapabilities(*rc_capabilities, module_data)) {
+ LOG4CXX_WARN(logger_, "Accessing not supported module data");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ "Accessing not supported module data");
+ return;
+ }
+ if (AreAllParamsReadOnly(module_data)) {
+ LOG4CXX_WARN(logger_, "All request params in module type are READ ONLY!");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::READ_ONLY,
+ "All request params in module type are READ ONLY!");
+ return;
+ }
+ if (AreReadOnlyParamsPresent(module_data)) {
+ LOG4CXX_DEBUG(logger_, "Request module type has READ ONLY parameters");
+ LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameters... ");
+ CutOffReadOnlyParams(module_data);
+ }
+ application_manager_.RemoveHMIFakeParameters(message_);
+
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+ (*message_)[app_mngr::strings::msg_params][app_mngr::strings::app_id] =
+ app->app_id();
+
+ SendHMIRequest(hmi_apis::FunctionID::RC_SetInteriorVehicleData,
+ &(*message_)[app_mngr::strings::msg_params],
+ true);
+ } else {
+ LOG4CXX_WARN(logger_, "Request module type & data mismatch!");
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "Request module type & data mismatch!");
+ }
+}
+
+void SetInteriorVehicleDataRequest::on_event(
+ const app_mngr::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RCCommandRequest::on_event(event);
+
+ if (hmi_apis::FunctionID::RC_SetInteriorVehicleData != event.id()) {
+ return;
+ }
+
+ const smart_objects::SmartObject& hmi_response = event.smart_object();
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ hmi_response[app_mngr::strings::params][app_mngr::hmi_response::code]
+ .asUInt()));
+
+ bool result =
+ helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>(
+ result_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS);
+
+ smart_objects::SmartObject response_params;
+ if (result) {
+ response_params = hmi_response[app_mngr::strings::msg_params];
+ }
+ std::string info;
+ GetInfo(hmi_response, info);
+ SendResponse(
+ result, result_code, info.c_str(), result ? &response_params : nullptr);
+}
+
+const smart_objects::SmartObject& SetInteriorVehicleDataRequest::ControlData(
+ const smart_objects::SmartObject& module_data) {
+ const std::string module = ModuleType();
+
+ if (enums_value::kRadio == module) {
+ return module_data[message_params::kRadioControlData];
+ } else {
+ return module_data[message_params::kClimateControlData];
+ }
+}
+
+bool SetInteriorVehicleDataRequest::AreAllParamsReadOnly(
+ const smart_objects::SmartObject& module_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& module_type_params =
+ ControlData(module_data);
+ auto it = module_type_params.map_begin();
+ std::vector<std::string> ro_params = GetModuleReadOnlyParams(ModuleType());
+ for (; it != module_type_params.map_end(); ++it) {
+ if (!helpers::in_range(ro_params, it->first)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+bool SetInteriorVehicleDataRequest::AreReadOnlyParamsPresent(
+ const smart_objects::SmartObject& module_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& module_type_params =
+ ControlData(module_data);
+ auto it = module_type_params.map_begin();
+ std::vector<std::string> ro_params = GetModuleReadOnlyParams(ModuleType());
+ for (; it != module_type_params.map_end(); ++it) {
+ if (helpers::in_range(ro_params, it->first)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
+ smart_objects::SmartObject& module_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& module_type_params =
+ ControlData(module_data);
+ const std::string module_type = ModuleType();
+ std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type);
+
+ for (auto& it : ro_params) {
+ if (module_type_params.keyExists(it)) {
+ if (enums_value::kClimate == module_type) {
+ module_data[message_params::kClimateControlData].erase(it);
+ LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << it);
+ } else if (enums_value::kRadio == module_type) {
+ module_data[message_params::kRadioControlData].erase(it);
+ LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << it);
+ }
+ }
+ }
+}
+
+std::string SetInteriorVehicleDataRequest::ModuleType() {
+ mobile_apis::ModuleType::eType module_type =
+ static_cast<mobile_apis::ModuleType::eType>(
+ (*message_)[app_mngr::strings::msg_params]
+ [message_params::kModuleData][message_params::kModuleType]
+ .asUInt());
+ const char* str;
+ const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
+ return ok ? str : "unknown";
+}
+
+AcquireResult::eType SetInteriorVehicleDataRequest::AcquireResource(
+ const app_mngr::commands::MessageSharedPtr& message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const std::string module_type = ModuleType();
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ return resource_allocation_manager_.AcquireResource(module_type,
+ app->app_id());
+}
+
+bool SetInteriorVehicleDataRequest::IsResourceFree(
+ const std::string& module_type) const {
+ return resource_allocation_manager_.IsResourceFree(module_type);
+}
+
+void SetInteriorVehicleDataRequest::SetResourceState(
+ const std::string& module_type, const ResourceState::eType state) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ resource_allocation_manager_.SetResourceState(
+ module_type, app->app_id(), state);
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..2d5d0350e1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc
@@ -0,0 +1,29 @@
+#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h"
+#include "utils/macro.h"
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+SetInteriorVehicleDataResponse::SetInteriorVehicleDataResponse(
+ 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,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ UNUSED(resource_allocation_manager);
+}
+SetInteriorVehicleDataResponse::~SetInteriorVehicleDataResponse() {}
+
+void SetInteriorVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ application_manager_.GetRPCService().SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..4f968dd2d8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
@@ -0,0 +1,265 @@
+/*
+ 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 "rc_rpc_plugin/commands/rc_command_request.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/hmi_interfaces.h"
+#include "smart_objects/enum_schema_item.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+namespace rc_rpc_plugin {
+namespace commands {
+
+RCCommandRequest::RCCommandRequest(
+ 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,
+ rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager)
+ : application_manager::commands::CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , is_subscribed(false)
+ , resource_allocation_manager_(resource_allocation_manager) {}
+
+RCCommandRequest::~RCCommandRequest() {}
+
+bool RCCommandRequest::IsInterfaceAvailable(
+ const app_mngr::HmiInterfaces::InterfaceID interface) const {
+ app_mngr::HmiInterfaces& hmi_interfaces =
+ application_manager_.hmi_interfaces();
+ const app_mngr::HmiInterfaces::InterfaceState state =
+ hmi_interfaces.GetInterfaceState(interface);
+ return app_mngr::HmiInterfaces::STATE_NOT_AVAILABLE != state;
+}
+
+void RCCommandRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const std::string module_type = ModuleType();
+ SetResourceState(module_type, ResourceState::FREE);
+ SendResponse(
+ false, mobile_apis::Result::GENERIC_ERROR, "Request timeout expired");
+}
+
+bool RCCommandRequest::CheckDriverConsent() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ RCAppExtensionPtr extension =
+ resource_allocation_manager_.GetApplicationExtention(app);
+ if (!extension) {
+ LOG4CXX_ERROR(logger_, "NULL pointer.");
+ return false;
+ }
+
+ const std::string module_type = ModuleType();
+ rc_rpc_plugin::TypeAccess access = CheckModule(module_type, app);
+
+ if (rc_rpc_plugin::kAllowed == access) {
+ set_auto_allowed(true);
+ return true;
+ }
+ SendDisallowed(access);
+ return false;
+}
+
+rc_rpc_plugin::TypeAccess RCCommandRequest::CheckModule(
+ const std::string& module_type,
+ application_manager::ApplicationSharedPtr app) {
+ return policy_handler_.CheckModule(app->policy_app_id(), module_type)
+ ? rc_rpc_plugin::TypeAccess::kAllowed
+ : rc_rpc_plugin::TypeAccess::kDisallowed;
+}
+
+void RCCommandRequest::SendDisallowed(rc_rpc_plugin::TypeAccess access) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ std::string info;
+ if (rc_rpc_plugin::kDisallowed == access) {
+ info = disallowed_info_.empty()
+ ? "The RPC is disallowed by vehicle settings"
+ : disallowed_info_;
+ } else {
+ return;
+ }
+ LOG4CXX_ERROR(logger_, info);
+ SendResponse(false, mobile_apis::Result::DISALLOWED, info.c_str());
+}
+
+void RCCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ SendResponse(false,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ "Remote control is not supported by system");
+ return;
+ }
+ LOG4CXX_TRACE(logger_, "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");
+ SendResponse(false, mobile_apis::Result::DISALLOWED, "");
+ return;
+ }
+
+ if (CheckDriverConsent()) {
+ if (AcquireResources()) {
+ Execute(); // run child's logic
+ }
+ // If resource is not aqcuired, AcquireResources method will either
+ // send response to mobile or
+ // send additional request to HMI to ask driver consent
+ }
+}
+
+bool RCCommandRequest::AcquireResources() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const std::string module_type = ModuleType();
+
+ if (!IsResourceFree(module_type)) {
+ LOG4CXX_WARN(logger_, "Resource is busy.");
+ SendResponse(false, mobile_apis::Result::IN_USE, "");
+ return false;
+ }
+
+ AcquireResult::eType acquire_result = AcquireResource(message_);
+ switch (acquire_result) {
+ case AcquireResult::ALLOWED: {
+ SetResourceState(module_type, ResourceState::BUSY);
+ return true;
+ }
+ case AcquireResult::IN_USE: {
+ SendResponse(false, mobile_apis::Result::IN_USE, "");
+ return false;
+ }
+ case AcquireResult::ASK_DRIVER: {
+ SendGetUserConsent(module_type);
+ return false;
+ }
+ case AcquireResult::REJECTED: {
+ SendResponse(false, mobile_apis::Result::REJECTED, "");
+ return false;
+ }
+ }
+ return false;
+}
+
+void RCCommandRequest::on_event(const app_mngr::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (event.id() == hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent) {
+ ProcessAccessResponse(event);
+ } else {
+ const std::string module_type = ModuleType();
+ SetResourceState(module_type, ResourceState::FREE);
+ }
+}
+
+void RCCommandRequest::ProcessAccessResponse(
+ const app_mngr::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ const std::string module_type = ModuleType();
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED, "");
+ return;
+ }
+
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[app_mngr::strings::params][app_mngr::hmi_response::code]
+ .asUInt()));
+
+ const bool result =
+ helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>(
+ result_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS);
+
+ bool is_allowed = false;
+ if (result) {
+ if (message[app_mngr::strings::msg_params].keyExists(
+ message_params::kAllowed)) {
+ is_allowed =
+ message[app_mngr::strings::msg_params][message_params::kAllowed]
+ .asBool();
+ }
+ if (is_allowed) {
+ resource_allocation_manager_.ForceAcquireResource(module_type,
+ app->app_id());
+ SetResourceState(module_type, ResourceState::BUSY);
+ Execute(); // run child's logic
+ } else {
+ resource_allocation_manager_.OnDriverDisallowed(module_type,
+ app->app_id());
+ SendResponse(
+ false,
+ mobile_apis::Result::REJECTED,
+ "The resource is in use and the driver disallows this remote "
+ "control RPC");
+ }
+ } else {
+ std::string response_info;
+ GetInfo(message, response_info);
+ SendResponse(false, result_code, response_info.c_str());
+ }
+}
+
+void RCCommandRequest::SendGetUserConsent(const std::string& module_type) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+ DCHECK(app);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[app_mngr::strings::app_id] = app->app_id();
+ msg_params[message_params::kModuleType] = module_type;
+ SendHMIRequest(hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent,
+ &msg_params,
+ true);
+}
+}
+}
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
new file mode 100644
index 0000000000..5c0a94cccc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
@@ -0,0 +1,68 @@
+/*
+ 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 "rc_rpc_plugin/rc_app_extension.h"
+
+namespace rc_rpc_plugin {
+RCAppExtension::RCAppExtension(application_manager::AppExtensionUID uid)
+ : AppExtension(uid) {}
+
+void RCAppExtension::SubscribeToInteriorVehicleData(
+ const std::string& module_type) {
+ subscribed_interior_vehicle_data_.insert(module_type);
+}
+
+void RCAppExtension::UnsubscribeFromInteriorVehicleData(
+ const std::string& module_type) {
+ subscribed_interior_vehicle_data_.erase(module_type);
+}
+
+void RCAppExtension::UnsubscribeFromInteriorVehicleData() {
+ subscribed_interior_vehicle_data_.clear();
+}
+
+bool RCAppExtension::IsSubscibedToInteriorVehicleData(
+ const std::string& module_type) {
+ std::set<std::string>::iterator it =
+ subscribed_interior_vehicle_data_.find(module_type);
+
+ return (it != subscribed_interior_vehicle_data_.end());
+}
+
+void RCAppExtension::SaveResumptionData(
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) {}
+
+void RCAppExtension::ProcessResumption(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) {}
+
+RCAppExtension::~RCAppExtension() {}
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..707d35aa0f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc
@@ -0,0 +1,306 @@
+/*
+ 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 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 "rc_rpc_plugin/rc_command_factory.h"
+#include "rc_rpc_plugin/commands/mobile/button_press_request.h"
+#include "rc_rpc_plugin/commands/mobile/button_press_response.h"
+#include "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h"
+#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h"
+#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h"
+#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h"
+#include "rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h"
+#include "rc_rpc_plugin/commands/hmi/rc_button_press_request.h"
+#include "rc_rpc_plugin/commands/hmi/rc_button_press_response.h"
+#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h"
+#include "rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h"
+#include "rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h"
+#include "rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+#include "rc_rpc_plugin/resource_allocation_manager.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+namespace application_manager {
+using rc_rpc_plugin::ResourceAllocationManager;
+
+template <typename RCCommandType>
+class RCCommandCreator : public CommandCreator {
+ public:
+ RCCommandCreator(ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ PolicyHandlerInterface& policy_handler,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler)
+ , resource_allocation_manager_(resource_allocation_manager) {}
+
+ private:
+ bool CanBeCreated() const override {
+ return true;
+ }
+
+ CommandSharedPtr create(
+ const commands::MessageSharedPtr& message) const override {
+ CommandSharedPtr command(new RCCommandType(message,
+ application_manager_,
+ rpc_service_,
+ hmi_capabilities_,
+ policy_handler_,
+ resource_allocation_manager_));
+ return command;
+ }
+
+ ApplicationManager& application_manager_;
+ RPCService& rpc_service_;
+ HMICapabilities& hmi_capabilities_;
+ PolicyHandlerInterface& policy_handler_;
+ ResourceAllocationManager& resource_allocation_manager_;
+};
+
+struct RCInvalidCommand {};
+
+template <>
+class RCCommandCreator<RCInvalidCommand> : public CommandCreator {
+ public:
+ RCCommandCreator(ApplicationManager& application_manager,
+ RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ PolicyHandlerInterface& policy_handler,
+ ResourceAllocationManager& resource_allocation_manager) {
+ UNUSED(application_manager);
+ UNUSED(rpc_service);
+ UNUSED(hmi_capabilities);
+ UNUSED(policy_handler);
+ UNUSED(resource_allocation_manager);
+ }
+
+ private:
+ bool CanBeCreated() const override {
+ return false;
+ }
+
+ CommandSharedPtr create(
+ const commands::MessageSharedPtr& message) const override {
+ UNUSED(message);
+ return CommandSharedPtr();
+ }
+};
+
+struct RCCommandCreatorFactory {
+ RCCommandCreatorFactory(
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ PolicyHandlerInterface& policy_handler,
+ ResourceAllocationManager& resource_allocation_manager)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler)
+ , resource_allocation_manager_(resource_allocation_manager) {}
+
+ template <typename RCCommandType>
+ CommandCreator& GetCreator() {
+ static RCCommandCreator<RCCommandType> res(application_manager_,
+ rpc_service_,
+ hmi_capabilities_,
+ policy_handler_,
+ resource_allocation_manager_);
+ return res;
+ }
+ ApplicationManager& application_manager_;
+ RPCService& rpc_service_;
+ HMICapabilities& hmi_capabilities_;
+ PolicyHandlerInterface& policy_handler_;
+ ResourceAllocationManager& resource_allocation_manager_;
+};
+}
+
+namespace rc_rpc_plugin {
+using namespace application_manager;
+
+RCCommandFactory::RCCommandFactory(
+ app_mngr::ApplicationManager& app_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler,
+ ResourceAllocationManager& allocation_manager)
+ : app_manager_(app_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler)
+ , allocation_manager_(allocation_manager) {}
+
+CommandSharedPtr RCCommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ if (app_mngr::commands::Command::SOURCE_HMI == source) {
+ hmi_apis::messageType::eType message_type =
+ static_cast<hmi_apis::messageType::eType>(
+ (*message)[strings::params][strings::message_type].asInt());
+
+ hmi_apis::FunctionID::eType function_id =
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ return get_hmi_creator_factory(function_id, message_type).create(message);
+ } else {
+ mobile_apis::messageType::eType message_type =
+ static_cast<mobile_apis::messageType::eType>(
+ (*message)[strings::params][strings::message_type].asInt());
+
+ mobile_apis::FunctionID::eType function_id =
+ static_cast<mobile_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ return get_mobile_creator_factory(function_id, message_type)
+ .create(message);
+ }
+}
+
+bool RCCommandFactory::IsAbleToProcess(
+ const int32_t function_id,
+ const application_manager::commands::Command::CommandSource message_source)
+ const {
+ using app_mngr::commands::Command;
+ if (Command::SOURCE_HMI == message_source) {
+ return get_hmi_creator_factory(
+ static_cast<hmi_apis::FunctionID::eType>(function_id),
+ hmi_apis::messageType::INVALID_ENUM).CanBeCreated();
+ } else {
+ return get_mobile_creator_factory(
+ static_cast<mobile_api::FunctionID::eType>(function_id),
+ mobile_api::messageType::INVALID_ENUM).CanBeCreated();
+ }
+}
+
+CommandCreator& RCCommandFactory::get_mobile_creator_factory(
+ mobile_api::FunctionID::eType id,
+ mobile_api::messageType::eType message_type) const {
+ LOG4CXX_DEBUG(logger_,
+ "CreateMobileCommand function_id: " << id << " message_type: "
+ << message_type);
+ RCCommandCreatorFactory rc_factory(app_manager_,
+ rpc_service_,
+ hmi_capabilities_,
+ policy_handler_,
+ allocation_manager_);
+
+ switch (id) {
+ case mobile_apis::FunctionID::ButtonPressID: {
+ return mobile_api::messageType::request == message_type
+ ? rc_factory.GetCreator<commands::ButtonPressRequest>()
+ : rc_factory.GetCreator<commands::ButtonPressResponse>();
+ }
+ case mobile_apis::FunctionID::GetInteriorVehicleDataID: {
+ return mobile_api::messageType::request == message_type
+ ? rc_factory
+ .GetCreator<commands::GetInteriorVehicleDataRequest>()
+ : rc_factory
+ .GetCreator<commands::GetInteriorVehicleDataResponse>();
+ }
+ case mobile_apis::FunctionID::SetInteriorVehicleDataID: {
+ return mobile_api::messageType::request == message_type
+ ? rc_factory
+ .GetCreator<commands::SetInteriorVehicleDataRequest>()
+ : rc_factory
+ .GetCreator<commands::SetInteriorVehicleDataResponse>();
+ }
+ case mobile_apis::FunctionID::OnInteriorVehicleDataID: {
+ return rc_factory
+ .GetCreator<commands::OnInteriorVehicleDataNotification>();
+ }
+ default: { return rc_factory.GetCreator<RCInvalidCommand>(); }
+ }
+}
+
+CommandCreator& RCCommandFactory::get_hmi_creator_factory(
+ hmi_apis::FunctionID::eType id,
+ hmi_apis::messageType::eType message_type) const {
+ LOG4CXX_DEBUG(logger_,
+ "CreateHMICommand function_id: " << id << " message_type: "
+ << message_type);
+
+ RCCommandCreatorFactory rc_factory(app_manager_,
+ rpc_service_,
+ hmi_capabilities_,
+ policy_handler_,
+ allocation_manager_);
+
+ switch (id) {
+ case hmi_apis::FunctionID::Buttons_ButtonPress: {
+ return hmi_apis::messageType::request == message_type
+ ? rc_factory.GetCreator<commands::RCButtonPressRequest>()
+ : rc_factory.GetCreator<commands::RCButtonPressResponse>();
+ }
+ case hmi_apis::FunctionID::RC_GetInteriorVehicleData: {
+ return hmi_apis::messageType::request == message_type
+ ? rc_factory
+ .GetCreator<commands::RCGetInteriorVehicleDataRequest>()
+ : rc_factory.GetCreator<
+ commands::RCGetInteriorVehicleDataResponse>();
+ }
+ case hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent: {
+ return hmi_apis::messageType::request == message_type
+ ? rc_factory.GetCreator<
+ commands::RCGetInteriorVehicleDataConsentRequest>()
+ : rc_factory.GetCreator<
+ commands::RCGetInteriorVehicleDataConsentResponse>();
+ }
+ case hmi_apis::FunctionID::RC_SetInteriorVehicleData: {
+ return hmi_apis::messageType::request == message_type
+ ? rc_factory
+ .GetCreator<commands::RCSetInteriorVehicleDataRequest>()
+ : rc_factory.GetCreator<
+ commands::RCSetInteriorVehicleDataResponse>();
+ }
+ case hmi_apis::FunctionID::RC_OnInteriorVehicleData: {
+ return rc_factory
+ .GetCreator<commands::RCOnInteriorVehicleDataNotification>();
+ }
+ case hmi_apis::FunctionID::RC_OnRemoteControlSettings: {
+ return rc_factory
+ .GetCreator<commands::RCOnRemoteControlSettingsNotification>();
+ }
+ default: { return rc_factory.GetCreator<RCInvalidCommand>(); }
+ }
+}
+}
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
new file mode 100644
index 0000000000..36377c620b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
@@ -0,0 +1,128 @@
+/*
+ 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 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 "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_command_factory.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+#include "rc_rpc_plugin/resource_allocation_manager_impl.h"
+#include "utils/helpers.h"
+
+namespace rc_rpc_plugin {
+namespace plugins = application_manager::plugin_manager;
+
+bool RCRPCPlugin::Init(
+ application_manager::ApplicationManager& app_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) {
+ resource_allocation_manager_.reset(
+ new ResourceAllocationManagerImpl(app_manager, rpc_service));
+ command_factory_.reset(
+ new rc_rpc_plugin::RCCommandFactory(app_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler,
+ *resource_allocation_manager_));
+ return true;
+}
+
+bool RCRPCPlugin::IsAbleToProcess(
+ const int32_t function_id,
+ const application_manager::commands::Command::CommandSource
+ message_source) {
+ return command_factory_->IsAbleToProcess(function_id, message_source);
+}
+
+std::string RCRPCPlugin::PluginName() {
+ return "RC RPC Plugin";
+}
+
+application_manager::CommandFactory& RCRPCPlugin::GetCommandFactory() {
+ return *command_factory_;
+}
+
+void RCRPCPlugin::OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent event) {
+ switch (event) {
+ case plugins::kApplicationPolicyUpdated: {
+ resource_allocation_manager_->OnPolicyEvent(event);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+void RCRPCPlugin::OnApplicationEvent(
+ application_manager::plugin_manager::ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application) {
+ if (!application->is_remote_control_supported()) {
+ return;
+ }
+ switch (event) {
+ case plugins::kApplicationRegistered: {
+ application->AddExtension(new RCAppExtension(kRCPluginID));
+ break;
+ }
+ case plugins::kApplicationExit: {
+ resource_allocation_manager_->OnApplicationEvent(event, application);
+ break;
+ }
+ case plugins::kApplicationUnregistered: {
+ resource_allocation_manager_->OnApplicationEvent(event, application);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+RCRPCPlugin::Apps RCRPCPlugin::GetRCApplications(
+ application_manager::ApplicationManager& app_mngr) {
+ using application_manager::ApplicationSharedPtr;
+ using application_manager::ApplicationSet;
+ 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);
+ }
+ }
+ return result;
+}
+
+} // namespace rc_rpc_plugin
+
+extern "C" application_manager::plugin_manager::RPCPlugin* Create() {
+ return new rc_rpc_plugin::RCRPCPlugin();
+}
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
new file mode 100644
index 0000000000..c2962863e3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
@@ -0,0 +1,417 @@
+/*
+ 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 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 "rc_rpc_plugin/resource_allocation_manager_impl.h"
+#include "application_manager/application.h"
+#include "application_manager/application_manager.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+#include "smart_objects/enum_schema_item.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "application_manager/message_helper.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "json/json.h"
+#include "utils/helpers.h"
+#include "utils/make_shared.h"
+
+namespace rc_rpc_plugin {
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+
+ResourceAllocationManagerImpl::ResourceAllocationManagerImpl(
+ application_manager::ApplicationManager& app_mngr,
+ application_manager::rpc_service::RPCService& rpc_service)
+ : current_access_mode_(hmi_apis::Common_RCAccessMode::AUTO_ALLOW)
+ , app_mngr_(app_mngr)
+ , rpc_service_(rpc_service) {}
+
+ResourceAllocationManagerImpl::~ResourceAllocationManagerImpl() {}
+
+AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
+ const std::string& module_type, const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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!");
+ return AcquireResult::IN_USE;
+ }
+
+ sync_primitives::AutoLock lock(allocated_resources_lock_);
+ const AllocatedResources::const_iterator allocated_it =
+ allocated_resources_.find(module_type);
+ if (allocated_resources_.end() == allocated_it) {
+ SetResourceAquired(module_type, app_id);
+ LOG4CXX_DEBUG(logger_,
+ "Resource is not acquired yet. "
+ << "App: " << app_id << " is allowed to acquire "
+ << module_type);
+ return AcquireResult::ALLOWED;
+ }
+
+ if (app_id == allocated_resources_[module_type]) {
+ LOG4CXX_DEBUG(logger_,
+ "App: " << app_id << " is already acquired resource "
+ << module_type);
+ return AcquireResult::ALLOWED;
+ }
+
+ if (IsModuleTypeRejected(module_type, app_id)) {
+ LOG4CXX_DEBUG(logger_,
+ "Driver disallowed app: " << app_id << " to acquire "
+ << module_type);
+ return AcquireResult::REJECTED;
+ }
+
+ const mobile_apis::HMILevel::eType acquiring_app_hmi_level =
+ acquiring_app->hmi_level();
+
+ 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);
+ 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);
+ 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);
+ 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);
+
+ SetResourceAquired(module_type, app_id);
+ return AcquireResult::ALLOWED;
+ }
+ default: { DCHECK_OR_RETURN(false, AcquireResult::IN_USE); }
+ }
+}
+
+void ResourceAllocationManagerImpl::ReleaseResource(
+ const std::string& module_type, const uint32_t application_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_DEBUG(logger_, "Release " << module_type << " by " << application_id);
+ SetResourceFree(module_type, application_id);
+}
+
+void ResourceAllocationManagerImpl::ProcessApplicationPolicyUpdate() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ Apps app_list = RCRPCPlugin::GetRCApplications(app_mngr_);
+
+ Apps::const_iterator app = app_list.begin();
+ for (; app_list.end() != app; ++app) {
+ application_manager::ApplicationSharedPtr app_ptr = *app;
+ const uint32_t application_id = app_ptr->app_id();
+ Resources acquired_modules = GetAcquiredResources(application_id);
+ std::sort(acquired_modules.begin(), acquired_modules.end());
+
+ Resources allowed_modules;
+ app_mngr_.GetPolicyHandler().GetModuleTypes((*app)->policy_app_id(),
+ &allowed_modules);
+ std::sort(allowed_modules.begin(), allowed_modules.end());
+
+ LOG4CXX_DEBUG(logger_,
+ "Acquired modules: " << acquired_modules.size()
+ << " , allowed modules: "
+ << allowed_modules.size());
+
+ Resources disallowed_modules;
+ std::set_difference(acquired_modules.begin(),
+ acquired_modules.end(),
+ allowed_modules.begin(),
+ allowed_modules.end(),
+ std::back_inserter(disallowed_modules));
+
+ RCAppExtensionPtr rc_extention = GetApplicationExtention(app_ptr);
+ Resources::const_iterator module = disallowed_modules.begin();
+ for (; disallowed_modules.end() != module; ++module) {
+ ReleaseResource(*module, application_id);
+ if (rc_extention) {
+ rc_extention->UnsubscribeFromInteriorVehicleData(*module);
+ }
+ }
+ }
+}
+
+RCAppExtensionPtr ResourceAllocationManagerImpl::GetApplicationExtention(
+ application_manager::ApplicationSharedPtr application) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RCAppExtensionPtr rc_app_extension;
+ if (!application) {
+ return rc_app_extension;
+ }
+
+ application_manager::AppExtensionPtr app_extension =
+ application->QueryInterface(RCRPCPlugin::kRCPluginID);
+ if (!app_extension) {
+ return rc_app_extension;
+ }
+
+ rc_app_extension =
+ application_manager::AppExtensionPtr::static_pointer_cast<RCAppExtension>(
+ app_extension);
+
+ return rc_app_extension;
+}
+
+void ResourceAllocationManagerImpl::RemoveAppsSubscriptions(const Apps& apps) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ Apps::const_iterator app = apps.begin();
+ for (; apps.end() != app; ++app) {
+ application_manager::ApplicationSharedPtr app_ptr = *app;
+ if (!app_ptr) {
+ continue;
+ }
+ RCAppExtensionPtr rc_extention = GetApplicationExtention(app_ptr);
+ if (rc_extention) {
+ rc_extention->UnsubscribeFromInteriorVehicleData();
+ }
+ }
+}
+
+void ResourceAllocationManagerImpl::SetResourceAquired(
+ const std::string& module_type, const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ allocated_resources_[module_type] = app_id;
+}
+
+void ResourceAllocationManagerImpl::SetResourceFree(
+ const std::string& module_type, const uint32_t app_id) {
+ AllocatedResources::const_iterator allocation =
+ allocated_resources_.find(module_type);
+ if (allocated_resources_.end() == allocation) {
+ LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is not allocated.");
+ return;
+ }
+ if (app_id != allocation->second) {
+ LOG4CXX_ERROR(logger_,
+ "Resource " << module_type
+ << " is allocated by different application "
+ << allocation->second);
+ }
+ allocated_resources_.erase(allocation);
+ LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is released.");
+}
+
+std::vector<std::string> ResourceAllocationManagerImpl::GetAcquiredResources(
+ const uint32_t application_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ Resources allocated_resources;
+ AllocatedResources::const_iterator allocation = allocated_resources_.begin();
+ for (; allocated_resources_.end() != allocation; ++allocation) {
+ if (application_id == allocation->second) {
+ allocated_resources.push_back(allocation->first);
+ }
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Application " << application_id << " acquired "
+ << allocated_resources.size()
+ << " resource(s).");
+
+ return allocated_resources;
+}
+
+void ResourceAllocationManagerImpl::SetResourceState(
+ const std::string& module_type,
+ 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
+ << " to state " << state);
+ {
+ sync_primitives::AutoLock lock(allocated_resources_lock_);
+ const AllocatedResources::const_iterator allocated_it =
+ allocated_resources_.find(module_type);
+
+ const bool acquired = allocated_resources_.end() != allocated_it;
+ if (acquired) {
+ LOG4CXX_DEBUG(logger_,
+ "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");
+ }
+ }
+
+ sync_primitives::AutoLock lock(resources_state_lock_);
+ resources_state_[module_type] = state;
+ LOG4CXX_DEBUG(logger_, "Resource " << module_type << " got state " << state);
+}
+
+bool ResourceAllocationManagerImpl::IsResourceFree(
+ const std::string& module_type) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(resources_state_lock_);
+ const ResourcesState::const_iterator resource =
+ resources_state_.find(module_type);
+
+ if (resources_state_.end() == resource) {
+ LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is free.");
+ return true;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Resource " << module_type << " state is " << resource->second);
+
+ return ResourceState::FREE == resource->second;
+}
+
+void ResourceAllocationManagerImpl::SetAccessMode(
+ const hmi_apis::Common_RCAccessMode::eType access_mode) {
+ if (hmi_apis::Common_RCAccessMode::ASK_DRIVER != access_mode) {
+ sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
+ rejected_resources_for_application_.clear();
+ }
+ current_access_mode_ = access_mode;
+}
+
+hmi_apis::Common_RCAccessMode::eType
+ResourceAllocationManagerImpl::GetAccessMode() const {
+ return current_access_mode_;
+}
+
+void ResourceAllocationManagerImpl::ForceAcquireResource(
+ const std::string& module_type, const uint32_t app_id) {
+ LOG4CXX_DEBUG(logger_, "Force " << app_id << " acquiring " << module_type);
+ sync_primitives::AutoLock lock(allocated_resources_lock_);
+ SetResourceAquired(module_type, app_id);
+}
+
+bool ResourceAllocationManagerImpl::IsModuleTypeRejected(
+ const std::string& module_type, const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
+ RejectedResources::iterator it =
+ rejected_resources_for_application_.find(app_id);
+
+ if (rejected_resources_for_application_.end() == it) {
+ return false;
+ }
+
+ const std::vector<std::string>& list_of_rejected_resources =
+ rejected_resources_for_application_[app_id];
+
+ return helpers::in_range(list_of_rejected_resources, module_type);
+}
+
+void ResourceAllocationManagerImpl::OnDriverDisallowed(
+ const std::string& module_type, const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
+ auto it = rejected_resources_for_application_.find(app_id);
+
+ if (rejected_resources_for_application_.end() == it) {
+ rejected_resources_for_application_[app_id] = std::vector<std::string>();
+ }
+ std::vector<std::string>& list_of_rejected_resources =
+ rejected_resources_for_application_[app_id];
+ list_of_rejected_resources.push_back(module_type);
+}
+
+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());
+
+ if (ApplicationEvent::kApplicationExit == event ||
+ ApplicationEvent::kApplicationUnregistered == event) {
+ Resources acquired_modules = GetAcquiredResources(application->app_id());
+ Resources::const_iterator module = acquired_modules.begin();
+ for (; acquired_modules.end() != module; ++module) {
+ ReleaseResource(*module, application->app_id());
+ }
+
+ Apps app_list;
+ app_list.push_back(application);
+ RemoveAppsSubscriptions(app_list);
+ }
+}
+
+void ResourceAllocationManagerImpl::OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent event) {
+ using application_manager::plugin_manager::PolicyEvent;
+ LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_DEBUG(logger_, "Event " << event);
+
+ if (PolicyEvent::kApplicationPolicyUpdated == event) {
+ ProcessApplicationPolicyUpdate();
+ return;
+ }
+
+ if (PolicyEvent::kApplicationsDisabled == event) {
+ ResetAllAllocations();
+ Apps app_list = RCRPCPlugin::GetRCApplications(app_mngr_);
+ RemoveAppsSubscriptions(app_list);
+ return;
+ }
+}
+
+void ResourceAllocationManagerImpl::ResetAllAllocations() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ {
+ sync_primitives::AutoLock lock(resources_state_lock_);
+ resources_state_.clear();
+ }
+ {
+ sync_primitives::AutoLock lock(allocated_resources_lock_);
+ allocated_resources_.clear();
+ }
+ {
+ sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
+ rejected_resources_for_application_.clear();
+ }
+}
+
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..a66ab107be
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt
@@ -0,0 +1,75 @@
+# 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 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(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
+
+include_directories (
+ ${GMOCK_INCLUDE_DIRECTORY}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${COMPONENTS_DIR}/application_manager/test/include
+ ${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/test/include/
+ ${COMPONENTS_DIR}/include/test/application_manager/
+ ${COMPONENTS_DIR}/rc_rpc_plugin/test/include
+ )
+
+set (RC_TEST_SOURCES
+${CMAKE_CURRENT_SOURCE_DIR}/resource_allocation_manager_impl_test.cc
+)
+
+set(RC_COMMANDS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/commands)
+
+file(GLOB SOURCES
+ ${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
+ ${RC_COMMANDS_TEST_DIR}/*
+)
+
+set(LIBRARIES
+ RCRpcPluginStaticLib
+ ApplicationManager
+ SmartObjects
+ ProtocolHandler
+ MessageHelper
+ connectionHandler
+ Utils
+ jsoncpp
+ gmock_main
+ dl
+)
+
+if(ENABLE_LOG)
+ list(APPEND LIBRARIES log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
+ list(APPEND LIBRARIES apr-1 -L${APR_LIBS_DIRECTORY})
+ list(APPEND LIBRARIES aprutil-1 -L${APR_UTIL_LIBS_DIRECTORY})
+ list(APPEND LIBRARIES expat -L${EXPAT_LIBS_DIRECTORY})
+endif()
+
+create_test("rc_commands_test" "${SOURCES}" "${LIBRARIES}" )
+create_test("resource_allocation_manager_test" "${RC_TEST_SOURCES}" "${LIBRARIES}")
+
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/CMakeLists.txt b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/CMakeLists.txt
new file mode 100644
index 0000000000..9ea47dca38
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/CMakeLists.txt
@@ -0,0 +1,62 @@
+# 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(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
+
+include_directories(
+ ${GMOCK_INCLUDE_DIRECTORY}
+ ${COMPONENTS_DIR}/rc_rpc_plugin/include/
+ ${COMPONENTS_DIR}/rc_rpc_plugin/include/rc_rpc_plugin/
+ ${COMPONENTS_DIR}/rc_rpc_plugin/include/rc_rpc_plugin/commands/
+ ${COMPONENTS_DIR}/rc_rpc_plugin/test/include
+)
+
+set(RC_COMMANDS_TEST_DIR ${RC_TEST_DIR}/commands)
+
+file(GLOB SOURCES
+ ${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
+ ${RC_COMMANDS_TEST_DIR}/*
+)
+
+set(LIBRARIES
+ gmock
+ RemoteControlModule
+ Utils
+ SmartObjects
+ jsoncpp
+ HMI_API
+ MOBILE_API
+ ApplicationManager
+ AMHMICommandsLibrary
+ AMMobileCommandsLibrary
+ connectionHandler
+)
+
+create_test("rc_commands_test" "${SOURCES}" "${LIBRARIES}" )
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
new file mode 100644
index 0000000000..5098f6472e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
@@ -0,0 +1,319 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "rc_rpc_plugin/commands/mobile/button_press_request.h"
+#include "rc_rpc_plugin/rc_command_factory.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+
+using test::components::application_manager_test::MockApplication;
+using test::components::commands_test::CommandRequestTest;
+using test::components::commands_test::CommandsTestMocks;
+using test::components::commands_test::HMIResultCodeIs;
+using test::components::commands_test::MobileResultCodeIs;
+using ::testing::_;
+using ::testing::Mock;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SaveArg;
+using ::application_manager::Message;
+using ::application_manager::MessageType;
+using application_manager::commands::MessageSharedPtr;
+using ::protocol_handler::MessagePriority;
+
+namespace {
+const int kModuleId = 153u;
+const uint32_t kConnectionKey = 1u;
+const uint32_t kAppId = 0u;
+const std::string kPolicyAppId = "Test";
+}
+
+namespace rc_rpc_plugin_test {
+
+using namespace rc_rpc_plugin;
+
+class ButtonPressRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ ButtonPressRequestTest()
+ : rc_capabilities_(smart_objects::SmartType_Map)
+ , mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
+ , rc_app_extention_(
+ utils::MakeShared<rc_rpc_plugin::RCAppExtension>(kModuleId)) {}
+
+ smart_objects::SmartObject ButtonCapability(
+ const mobile_apis::ButtonName::eType button_name) {
+ smart_objects::SmartObject button(smart_objects::SmartType_Map);
+ button["name"] = button_name;
+ return button;
+ }
+
+ void SetUp() OVERRIDE {
+ using namespace mobile_apis;
+
+ std::vector<ButtonName::eType> button_names = {ButtonName::AC_MAX,
+ ButtonName::AC,
+ ButtonName::RECIRCULATE,
+ ButtonName::FAN_UP,
+ ButtonName::FAN_DOWN,
+ ButtonName::TEMP_UP,
+ ButtonName::TEMP_DOWN,
+ ButtonName::DEFROST_MAX,
+ ButtonName::DEFROST,
+ ButtonName::DEFROST_REAR,
+ ButtonName::UPPER_VENT,
+ ButtonName::LOWER_VENT,
+ ButtonName::VOLUME_UP,
+ ButtonName::VOLUME_DOWN,
+ ButtonName::EJECT,
+ ButtonName::SOURCE,
+ ButtonName::SHUFFLE,
+ ButtonName::REPEAT};
+
+ smart_objects::SmartObject button_caps(smart_objects::SmartType_Array);
+ for (size_t i = 0; i < button_names.size(); i++) {
+ button_caps[i] = ButtonCapability(button_names[i]);
+ }
+ rc_capabilities_[strings::kbuttonCapabilities] = button_caps;
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+ ON_CALL(mock_allocation_manager_, GetApplicationExtention(_))
+ .WillByDefault(Return(rc_app_extention_));
+ 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_));
+ ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ ON_CALL(mock_policy_handler_,
+ CheckHMIType(kPolicyAppId,
+ mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
+ nullptr)).WillByDefault(Return(true));
+ }
+
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ mobile_apis::FunctionID::ButtonPressID;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kConnectionKey;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kAppId;
+ return message;
+ }
+
+ template <class Command>
+ application_manager::SharedPtr<Command> CreateRCCommand(
+ MessageSharedPtr& msg) {
+ InitCommand(kDefaultTimeout_);
+ return ::utils::MakeShared<Command>(msg ? msg : msg = CreateMessage(),
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_allocation_manager_);
+ }
+
+ protected:
+ smart_objects::SmartObject rc_capabilities_;
+ utils::SharedPtr<MockApplication> mock_app_;
+ utils::SharedPtr<rc_rpc_plugin::RCAppExtension> rc_app_extention_;
+ test::components::policy_test::MockPolicyHandlerInterface
+ mock_policy_handler_;
+ testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
+ mock_allocation_manager_;
+};
+
+TEST_F(ButtonPressRequestTest,
+ Execute_ButtonNameMatchesModuleType_ExpectCorrectMessageSentToHMI) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
+ msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
+ msg_params[message_params::kButtonPressMode] =
+ mobile_apis::ButtonPressMode::SHORT;
+
+ // Expectations
+ const std::string resource = "CLIMATE";
+ ON_CALL(mock_policy_handler_, CheckModule(_, _)).WillByDefault(Return(true));
+ EXPECT_CALL(mock_allocation_manager_, IsResourceFree(resource))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_allocation_manager_, AcquireResource(resource, _))
+ .WillOnce(Return(rc_rpc_plugin::AcquireResult::ALLOWED));
+ EXPECT_CALL(
+ mock_allocation_manager_,
+ SetResourceState(resource, kAppId, rc_rpc_plugin::ResourceState::BUSY));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::Buttons_ButtonPress)))
+ .WillOnce(Return(true));
+
+ // Act
+ application_manager::SharedPtr<rc_rpc_plugin::commands::ButtonPressRequest>
+ command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>(
+ mobile_message);
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(
+ ButtonPressRequestTest,
+ Execute_ButtonNameDoesNotMatchModuleType_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO;
+ msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
+ msg_params[message_params::kButtonPressMode] =
+ mobile_apis::ButtonPressMode::SHORT;
+ // Expectations
+
+ const std::string resource = "RADIO";
+ ON_CALL(mock_policy_handler_, CheckModule(_, _)).WillByDefault(Return(true));
+ EXPECT_CALL(mock_allocation_manager_, IsResourceFree(resource))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_allocation_manager_, AcquireResource(resource, _))
+ .WillOnce(Return(rc_rpc_plugin::AcquireResult::ALLOWED));
+ EXPECT_CALL(mock_allocation_manager_, SetResourceState(resource, kAppId, _))
+ .Times(2);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Buttons_ButtonPress))).Times(0);
+ MessageSharedPtr command_result;
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _))
+ .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
+
+ // Act
+ application_manager::SharedPtr<rc_rpc_plugin::commands::ButtonPressRequest>
+ command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>(
+ mobile_message);
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(ButtonPressRequestTest, OnEvent_ExpectSuccessfullResponseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
+ msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
+ msg_params[message_params::kButtonPressMode] =
+ mobile_apis::ButtonPressMode::SHORT;
+
+ MessageSharedPtr hmi_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ (*hmi_message)[application_manager::strings::msg_params];
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ hmi_msg_params[application_manager::hmi_response::code] = response_code;
+ hmi_msg_params[application_manager::strings::connection_key] = kConnectionKey;
+
+ // Expectations
+ EXPECT_CALL(mock_allocation_manager_,
+ SetResourceState(_, kAppId, rc_rpc_plugin::ResourceState::FREE))
+ .Times(2);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _))
+ .WillOnce(Return(true));
+
+ // Act
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::Buttons_ButtonPress);
+ event.set_smart_object(*hmi_message);
+ application_manager::SharedPtr<rc_rpc_plugin::commands::ButtonPressRequest>
+ command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>(
+ mobile_message);
+ command->on_event(event);
+}
+
+TEST_F(ButtonPressRequestTest,
+ OnEvent_ReadOnlyParamFromHMI_ExpectFalseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
+ msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
+ msg_params[message_params::kButtonPressMode] =
+ mobile_apis::ButtonPressMode::SHORT;
+
+ MessageSharedPtr hmi_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ (*hmi_message)[application_manager::strings::params];
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::READ_ONLY;
+ hmi_msg_params[application_manager::hmi_response::code] = response_code;
+ hmi_msg_params[application_manager::strings::connection_key] = kConnectionKey;
+
+ // Expectations
+ EXPECT_CALL(mock_allocation_manager_,
+ SetResourceState(_, kAppId, rc_rpc_plugin::ResourceState::FREE))
+ .Times(2);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR), _))
+ .WillOnce(Return(false));
+
+ // Act
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::Buttons_ButtonPress);
+ event.set_smart_object(*hmi_message);
+ application_manager::SharedPtr<rc_rpc_plugin::commands::ButtonPressRequest>
+ command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>(
+ mobile_message);
+ command->on_event(event);
+}
+
+} // namespace rc_rpc_plugin_test
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
new file mode 100644
index 0000000000..7074bfb9c5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
@@ -0,0 +1,238 @@
+/*
+ * 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 "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h"
+#include "gtest/gtest.h"
+#include "application_manager/mock_application.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "application_manager/message_helper.h"
+#include "rc_rpc_plugin/rc_command_factory.h"
+#include "application_manager/event_engine/event_dispatcher.h"
+#include "application_manager/commands/command_request_test.h"
+#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+
+using ::testing::_;
+using ::testing::Mock;
+using ::testing::NiceMock;
+using ::testing::StrictMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SaveArg;
+using ::application_manager::Message;
+using ::application_manager::MessageType;
+using application_manager::commands::MessageSharedPtr;
+using ::application_manager::ApplicationSharedPtr;
+using ::protocol_handler::MessagePriority;
+using test::components::application_manager_test::MockApplication;
+using test::components::application_manager_test::MockApplicationManager;
+using test::components::commands_test::MockApplicationManager;
+using test::components::commands_test::CommandRequestTest;
+using test::components::commands_test::CommandsTestMocks;
+using test::components::commands_test::HMIResultCodeIs;
+using test::components::commands_test::MobileResultCodeIs;
+
+namespace {
+const int32_t kConnectionKey = 5u;
+const uint32_t kAppId = 0u;
+const int kModuleId = 153u;
+}
+
+namespace rc_rpc_plugin_test {
+
+using namespace rc_rpc_plugin;
+class GetInteriorVehicleDataRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ GetInteriorVehicleDataRequestTest()
+ : mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
+ , rc_app_extention_(utils::MakeShared<RCAppExtension>(kModuleId)) {
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(mock_hmi_interfaces_));
+
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceState(application_manager::HmiInterfaces::HMI_INTERFACE_RC))
+ .WillByDefault(Return(application_manager::HmiInterfaces::
+ InterfaceState::STATE_AVAILABLE));
+ ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
+ ON_CALL(mock_allocation_manager_, GetApplicationExtention(_))
+ .WillByDefault(Return(rc_app_extention_));
+ 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_));
+ ON_CALL(mock_policy_handler_,
+ CheckHMIType(
+ _, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, nullptr))
+ .WillByDefault(Return(true));
+ }
+
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ mobile_apis::FunctionID::GetInteriorVehicleDataID;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kConnectionKey;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kAppId;
+ return message;
+ }
+ template <class Command>
+ application_manager::SharedPtr<Command> CreateRCCommand(
+ MessageSharedPtr& msg) {
+ InitCommand(kDefaultTimeout_);
+ return ::utils::MakeShared<Command>(msg ? msg : msg = CreateMessage(),
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_allocation_manager_);
+ }
+
+ protected:
+ smart_objects::SmartObject rc_capabilities_;
+ utils::SharedPtr<MockApplication> mock_app_;
+ utils::SharedPtr<RCAppExtension> rc_app_extention_;
+ testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
+ mock_allocation_manager_;
+};
+TEST_F(GetInteriorVehicleDataRequestTest,
+ Execute_MessageValidationOk_ExpectCorrectMessageSentToHMI) {
+ // Arrange
+ ON_CALL(mock_policy_handler_, CheckModule(_, _)).WillByDefault(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillOnce(Return(nullptr));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData)))
+ .WillOnce(Return(true));
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->Run();
+}
+
+TEST_F(
+ GetInteriorVehicleDataRequestTest,
+ Execute_MessageValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO;
+ ON_CALL(mock_policy_handler_, CheckModule(_, _)).WillByDefault(Return(true));
+ MessageSharedPtr command_result;
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData))).Times(0);
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _))
+ .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->Run();
+}
+
+TEST_F(GetInteriorVehicleDataRequestTest,
+ OnEvent_ValidHmiResponse_ExpectSuccessfullResponseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
+
+ MessageSharedPtr hmi_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ (*hmi_message)[application_manager::strings::msg_params];
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ hmi_msg_params[application_manager::hmi_response::code] = response_code;
+ hmi_msg_params[application_manager::strings::connection_key] = kConnectionKey;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _))
+ .WillOnce(Return(true));
+
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(*hmi_message);
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->on_event(event);
+}
+
+TEST_F(GetInteriorVehicleDataRequestTest,
+ OnEvent_InvalidHmiResponse_ExpectGenericErrorResponseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
+
+ MessageSharedPtr hmi_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ (*hmi_message)[application_manager::strings::params];
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::READ_ONLY;
+ hmi_msg_params[application_manager::hmi_response::code] = response_code;
+ hmi_msg_params[application_manager::strings::connection_key] = kConnectionKey;
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR), _))
+ .WillOnce(Return(false));
+
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(*hmi_message);
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->on_event(event);
+}
+} // 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
new file mode 100644
index 0000000000..78d20c6b13
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc
@@ -0,0 +1,140 @@
+/*
+ * 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 "application_manager/application.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/commands/commands_test.h"
+#include "rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h"
+#include "gtest/gtest.h"
+#include "interfaces/MOBILE_API.h"
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::NiceMock;
+using ::testing::SaveArg;
+using ::testing::Mock;
+using application_manager::ApplicationSet;
+using application_manager::commands::MessageSharedPtr;
+using test::components::application_manager_test::MockApplication;
+using test::components::application_manager_test::MockApplicationManager;
+using test::components::commands_test::CommandsTest;
+using test::components::commands_test::CommandsTestMocks;
+
+namespace {
+const uint32_t kAppId = 0u;
+const uint32_t kConnectionKey = 1u;
+const std::string kPolicyAppId = "Test";
+}
+
+namespace rc_rpc_plugin_test {
+using namespace rc_rpc_plugin;
+using application_manager::ApplicationSet;
+
+class OnInteriorVehicleDataNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnInteriorVehicleDataNotificationTest()
+ : mock_app_(utils::MakeShared<NiceMock<MockApplication> >()) {}
+
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ mobile_apis::FunctionID::SetInteriorVehicleDataID;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kConnectionKey;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kAppId;
+ smart_objects::SmartObject& msg_param =
+ (*message)[application_manager::strings::msg_params];
+ msg_param[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
+
+ return message;
+ }
+
+ template <class Command>
+ application_manager::SharedPtr<Command> CreateRCCommand(
+ MessageSharedPtr& msg) {
+ InitCommand(kDefaultTimeout_);
+ return ::utils::MakeShared<Command>(msg ? msg : msg = CreateMessage(),
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_allocation_manager_);
+ }
+
+ protected:
+ utils::SharedPtr<MockApplication> mock_app_;
+ testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
+ mock_allocation_manager_;
+};
+
+TEST_F(OnInteriorVehicleDataNotificationTest,
+ Run_SendMessageToMobile_Notification) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ ApplicationSet app_set = {mock_app_};
+ MessageSharedPtr message;
+ std::shared_ptr<sync_primitives::Lock> apps_lock =
+ std::make_shared<sync_primitives::Lock>();
+ DataAccessor<ApplicationSet> accessor(app_set, apps_lock);
+ // Expectations
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+ rc_extention_ptr->SubscribeToInteriorVehicleData(enums_value::kClimate);
+ ON_CALL(*mock_app_, QueryInterface(_))
+ .WillByDefault(Return(rc_extention_ptr));
+ ON_CALL(*mock_app_, is_remote_control_supported())
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, false))
+ .WillOnce(SaveArg<0>(&message));
+ // Act
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::OnInteriorVehicleDataNotification> command =
+ CreateRCCommand<
+ rc_rpc_plugin::commands::OnInteriorVehicleDataNotification>(
+ mobile_message);
+ command->Run();
+ // Assertions
+ ASSERT_TRUE(message);
+ Mock::VerifyAndClearExpectations(&app_mngr_);
+}
+
+} // namespace rc_rpc_plugin_test
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc
new file mode 100644
index 0000000000..f3ac768a4e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc
@@ -0,0 +1,163 @@
+/*
+ * 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 "application_manager/application.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/commands/commands_test.h"
+#include "rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h"
+#include "gtest/gtest.h"
+#include "interfaces/MOBILE_API.h"
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::NiceMock;
+using ::testing::SaveArg;
+using ::testing::Mock;
+using application_manager::ApplicationSet;
+using application_manager::commands::MessageSharedPtr;
+using test::components::application_manager_test::MockApplication;
+using test::components::application_manager_test::MockApplicationManager;
+using test::components::commands_test::CommandsTest;
+using test::components::commands_test::CommandsTestMocks;
+
+namespace {
+const uint32_t kAppId = 0u;
+const uint32_t kConnectionKey = 1u;
+const std::string kPolicyAppId = "Test";
+}
+
+namespace rc_rpc_plugin_test {
+using namespace rc_rpc_plugin;
+using application_manager::ApplicationSet;
+
+class RCOnRemoteControlSettingsNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ RCOnRemoteControlSettingsNotificationTest()
+ : mock_app_(utils::MakeShared<NiceMock<MockApplication> >()) {}
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ mobile_apis::FunctionID::SetInteriorVehicleDataID;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kConnectionKey;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kAppId;
+ smart_objects::SmartObject& msg_param =
+ (*message)[application_manager::strings::msg_params];
+ msg_param[message_params::kModuleType] = enums_value::kClimate;
+
+ return message;
+ }
+
+ template <class Command>
+ application_manager::SharedPtr<Command> CreateRCCommand(
+ MessageSharedPtr& msg) {
+ InitCommand(kDefaultTimeout_);
+ return ::utils::MakeShared<Command>(msg ? msg : msg = CreateMessage(),
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_allocation_manager_);
+ }
+
+ protected:
+ utils::SharedPtr<MockApplication> mock_app_;
+ testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
+ mock_allocation_manager_;
+};
+
+TEST_F(RCOnRemoteControlSettingsNotificationTest,
+ Run_Allowed_SetAccessMode) { // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ (*mobile_message)[application_manager::strings::msg_params]
+ [message_params::kAllowed] = true;
+
+ // Expectations
+
+ ON_CALL(mock_allocation_manager_, GetAccessMode())
+ .WillByDefault(Return(hmi_apis::Common_RCAccessMode::ASK_DRIVER));
+
+ EXPECT_CALL(mock_allocation_manager_,
+ SetAccessMode(hmi_apis::Common_RCAccessMode::ASK_DRIVER));
+ // Act
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification> command =
+ CreateRCCommand<
+ rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification>(
+ mobile_message);
+
+ command->Run();
+}
+
+TEST_F(RCOnRemoteControlSettingsNotificationTest,
+ Run_NotAllowed_ResetAllAllocations) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ (*mobile_message)[application_manager::strings::msg_params]
+ [message_params::kAllowed] = false;
+
+ ApplicationSet app_set = {mock_app_};
+
+ std::shared_ptr<sync_primitives::Lock> apps_lock =
+ std::make_shared<sync_primitives::Lock>();
+ DataAccessor<ApplicationSet> accessor(app_set, apps_lock);
+ // Expectations
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+ rc_extention_ptr->SubscribeToInteriorVehicleData(enums_value::kClimate);
+ ON_CALL(*mock_app_, QueryInterface(_))
+ .WillByDefault(Return(rc_extention_ptr));
+
+ EXPECT_CALL(mock_allocation_manager_, ResetAllAllocations());
+
+ // Act
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification> command =
+ CreateRCCommand<
+ rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification>(
+ mobile_message);
+
+ command->Run();
+ Mock::VerifyAndClearExpectations(&app_mngr_);
+}
+
+} // namespace rc_rpc_plugin_test
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
new file mode 100644
index 0000000000..8fad1aef60
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
@@ -0,0 +1,239 @@
+/*
+ * 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 "application_manager/application.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/rpc_service_impl.h"
+#include "application_manager/mock_request_controller_settings.h"
+#include "application_manager/include/application_manager/command_holder_impl.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/request_controller.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
+#include "application_manager/mock_rpc_plugin.h"
+#include "application_manager/mock_command_factory.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/message.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h"
+#include "rc_rpc_plugin/commands/mobile/button_press_request.h"
+#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h"
+#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h"
+#include "hmi_message_handler/mock_hmi_message_handler.h"
+#include "interfaces/MOBILE_API.h"
+#include "include/test/protocol_handler/mock_protocol_handler.h"
+#include "test/application_manager/mock_application_manager_settings.h"
+#include "utils/make_shared.h"
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::NiceMock;
+using ::testing::SaveArg;
+using ::testing::Mock;
+using ::testing::NiceMock;
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+using am::ApplicationSet;
+using am::commands::MessageSharedPtr;
+using am::commands::CommandImpl;
+using am::plugin_manager::RPCPlugin;
+using ::smart_objects::SmartObject;
+using rc_rpc_plugin::commands::ButtonPressRequest;
+using rc_rpc_plugin::commands::RCGetInteriorVehicleDataConsentResponse;
+using rc_rpc_plugin::commands::RCGetInteriorVehicleDataConsentRequest;
+using rc_rpc_plugin::RCRPCPlugin;
+using test::components::commands_test::CommandsTestMocks;
+using test::components::commands_test::CommandRequestTest;
+using am::plugin_manager::MockRPCPluginManager;
+using am::plugin_manager::MockRPCPlugin;
+using test::components::application_manager_test::MockApplication;
+using test::components::application_manager_test::MockRequestControlerSettings;
+using test::components::protocol_handler_test::MockProtocolHandler;
+using test::components::hmi_message_handler_test::MockHMIMessageHandler;
+using test::components::application_manager_test::MockHMICapabilities;
+using test::components::application_manager_test::MockCommandFactory;
+using test::components::policy_test::MockPolicyHandlerInterface;
+
+namespace rc_rpc_plugin_test {
+using namespace rc_rpc_plugin;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kAppId = 5u;
+const std::string kResource = "CLIMATE";
+const uint32_t kPluginID = RCRPCPlugin::kRCPluginID;
+} // namespace
+
+class RCGetInteriorVehicleDataConsentTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ RCGetInteriorVehicleDataConsentTest()
+ : mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
+ , command_holder(app_mngr_)
+ , request_controller(mock_request_controler)
+ , rpc_service(app_mngr_,
+ request_controller,
+ &mock_protocol_handler,
+ &mock_hmi_handler,
+ command_holder)
+ , rc_app_extention_(utils::MakeShared<RCAppExtension>(kPluginID))
+ , mock_rpc_plugin_manager(
+ utils::MakeShared<NiceMock<MockRPCPluginManager> >())
+ , rpc_plugin(mock_rpc_plugin)
+ , optional_mock_rpc_plugin(mock_rpc_plugin) {
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(mock_hmi_interfaces_));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceState(application_manager::HmiInterfaces::HMI_INTERFACE_RC))
+ .WillByDefault(Return(application_manager::HmiInterfaces::
+ InterfaceState::STATE_AVAILABLE));
+ ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
+ ON_CALL(mock_allocation_manager_, GetApplicationExtention(_))
+ .WillByDefault(Return(rc_app_extention_));
+ 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_));
+ ON_CALL(mock_policy_handler_,
+ CheckHMIType(
+ _, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, nullptr))
+ .WillByDefault(Return(true));
+ ON_CALL(mock_policy_handler_, CheckModule(_, _))
+ .WillByDefault(Return(true));
+ ON_CALL(app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(*mock_rpc_plugin_manager));
+ ON_CALL(*mock_rpc_plugin_manager, FindPluginToProcess(_, _))
+ .WillByDefault(Return(rpc_plugin));
+ ON_CALL(mock_allocation_manager_, IsResourceFree(kResource))
+ .WillByDefault(Return(true));
+ }
+
+ template <class Command>
+ application_manager::SharedPtr<Command> CreateRCCommand(
+ MessageSharedPtr& msg) {
+ InitCommand(kDefaultTimeout_);
+ return ::utils::MakeShared<Command>(msg ? msg : msg = CreateMessage(),
+ app_mngr_,
+ rpc_service,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_allocation_manager_);
+ }
+
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ mobile_apis::FunctionID::ButtonPressID;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kConnectionKey;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kAppId;
+ return message;
+ }
+
+ protected:
+ utils::SharedPtr<MockApplication> mock_app_;
+ MockRequestControlerSettings mock_request_controler;
+ MockProtocolHandler mock_protocol_handler;
+ MockHMIMessageHandler mock_hmi_handler;
+ am::CommandHolderImpl command_holder;
+ testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
+ mock_allocation_manager_;
+ smart_objects::SmartObject rc_capabilities_;
+ MockRPCPlugin mock_rpc_plugin;
+ MockCommandFactory mock_command_factory;
+ am::request_controller::RequestController request_controller;
+ am::rpc_service::RPCServiceImpl rpc_service;
+ utils::SharedPtr<RCAppExtension> rc_app_extention_;
+ utils::SharedPtr<am::plugin_manager::MockRPCPluginManager>
+ mock_rpc_plugin_manager;
+ utils::Optional<RPCPlugin> rpc_plugin;
+ utils::Optional<MockRPCPlugin> optional_mock_rpc_plugin;
+};
+
+TEST_F(RCGetInteriorVehicleDataConsentTest,
+ Run_MobileSendButtonPressMessage_HMISendASKDRIVERModeToMobile) {
+ // Arrange
+ auto mobile_message = CreateBasicMessage();
+
+ // Expectations
+ EXPECT_CALL(mock_allocation_manager_, AcquireResource(_, _))
+ .WillOnce(Return(rc_rpc_plugin::AcquireResult::ASK_DRIVER));
+ EXPECT_CALL(*optional_mock_rpc_plugin, GetCommandFactory())
+ .WillOnce(ReturnRef(mock_command_factory));
+ auto rc_consent_request =
+ CreateRCCommand<commands::RCGetInteriorVehicleDataConsentRequest>(
+ mobile_message);
+ EXPECT_CALL(mock_command_factory, CreateCommand(_, _))
+ .WillOnce(Return(rc_consent_request));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_RC));
+
+ // Act
+ auto command = CreateRCCommand<commands::ButtonPressRequest>(mobile_message);
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(RCGetInteriorVehicleDataConsentTest,
+ Run_MobileSendButtonPressMessage_HMISendINUSEModeToMobile) {
+ // Arrange
+ auto mobile_message = CreateBasicMessage();
+
+ // Expectations
+ EXPECT_CALL(mock_allocation_manager_, AcquireResource(_, _))
+ .WillOnce(Return(rc_rpc_plugin::AcquireResult::IN_USE));
+
+ EXPECT_CALL(*optional_mock_rpc_plugin, GetCommandFactory())
+ .WillOnce(ReturnRef(mock_command_factory));
+ auto rc_consent_response =
+ CreateRCCommand<commands::RCGetInteriorVehicleDataConsentResponse>(
+ mobile_message);
+ EXPECT_CALL(mock_command_factory, CreateCommand(_, _))
+ .WillOnce(Return(rc_consent_response));
+ auto command = CreateRCCommand<commands::ButtonPressRequest>(mobile_message);
+
+ // Act
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+} // namespace rc_rpc_plugin_test
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
new file mode 100644
index 0000000000..68985e5f94
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
@@ -0,0 +1,225 @@
+/*
+ * 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 "application_manager/application.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h"
+#include "gtest/gtest.h"
+#include "interfaces/MOBILE_API.h"
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::NiceMock;
+using application_manager::ApplicationSet;
+using application_manager::commands::MessageSharedPtr;
+using test::components::application_manager_test::MockApplication;
+using test::components::application_manager_test::MockApplicationManager;
+using test::components::commands_test::CommandRequestTest;
+using test::components::commands_test::CommandsTestMocks;
+
+namespace {
+const uint32_t kAppId = 0u;
+const int kModuleId = 153u;
+const uint32_t kConnectionKey = 1u;
+const std::string kPolicyAppId = "Test";
+}
+
+namespace rc_rpc_plugin_test {
+using namespace rc_rpc_plugin;
+
+class SetInteriorVehicleDataRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SetInteriorVehicleDataRequestTest()
+ : mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
+ , rc_app_extention_(utils::MakeShared<RCAppExtension>(kModuleId)) {}
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(mock_hmi_interfaces_));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceState(application_manager::HmiInterfaces::HMI_INTERFACE_RC))
+ .WillByDefault(Return(application_manager::HmiInterfaces::
+ InterfaceState::STATE_AVAILABLE));
+ ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
+ ON_CALL(mock_allocation_manager_, GetApplicationExtention(_))
+ .WillByDefault(Return(rc_app_extention_));
+
+ ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ ON_CALL(mock_allocation_manager_, IsResourceFree(_))
+ .WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, AcquireResource(_, _))
+ .WillByDefault(Return(AcquireResult::ALLOWED));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
+ ON_CALL(mock_policy_handler_,
+ CheckHMIType(kPolicyAppId,
+ mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
+ nullptr)).WillByDefault(Return(true));
+ }
+
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ mobile_apis::FunctionID::SetInteriorVehicleDataID;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kConnectionKey;
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::connection_key] = kAppId;
+ return message;
+ }
+
+ template <class Command>
+ application_manager::SharedPtr<Command> CreateRCCommand(
+ MessageSharedPtr& msg) {
+ InitCommand(kDefaultTimeout_);
+ return ::utils::MakeShared<Command>(msg ? msg : msg = CreateMessage(),
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_allocation_manager_);
+ }
+
+ protected:
+ testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
+ mock_allocation_manager_;
+ utils::SharedPtr<MockApplication> mock_app_;
+ utils::SharedPtr<RCAppExtension> rc_app_extention_;
+};
+
+TEST_F(SetInteriorVehicleDataRequestTest,
+ Execute_ValidWithoutReadOnlyParams_ExpectResendToHMI) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleData][message_params::kModuleType] =
+ mobile_apis::ModuleType::CLIMATE;
+ msg_params[message_params::kModuleData][message_params::kClimateControlData] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ // Expectations
+ EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _))
+ .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed));
+
+ EXPECT_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillOnce(Return(nullptr));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(test::components::commands_test::MobileResultCodeIs(
+ mobile_apis::Result::READ_ONLY),
+ application_manager::commands::Command::SOURCE_SDL));
+ // Act
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->Run();
+}
+
+TEST_F(
+ SetInteriorVehicleDataRequestTest,
+ Execute_ValidWithSettableAndReadOnlyParams_ExpectCutReadOnlyAndResendToHMI) {
+ // Arrange
+
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleData][message_params::kModuleType] =
+ mobile_apis::ModuleType::RADIO;
+ smart_objects::SmartObject radio_control_data(smart_objects::SmartType_Map);
+ radio_control_data[message_params::kState] = true;
+ radio_control_data[message_params::kRadioEnable] = true;
+ msg_params[message_params::kModuleData][message_params::kRadioControlData] =
+ radio_control_data;
+
+ // Expectations
+ EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _))
+ .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed));
+
+ EXPECT_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillOnce(Return(nullptr));
+
+ EXPECT_CALL(app_mngr_, RemoveHMIFakeParameters(_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(test::components::commands_test::MobileResultCodeIs(
+ mobile_apis::Result::OUT_OF_MEMORY),
+ application_manager::commands::Command::SOURCE_SDL));
+
+ // Act
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->Run();
+}
+
+TEST_F(
+ SetInteriorVehicleDataRequestTest,
+ Execute_MessageValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleData][message_params::kModuleType] =
+ mobile_apis::ModuleType::RADIO;
+
+ msg_params[message_params::kModuleData][message_params::kClimateControlData] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ // Expectations
+ EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _))
+ .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(test::components::commands_test::MobileResultCodeIs(
+ mobile_apis::Result::INVALID_DATA),
+ application_manager::commands::Command::SOURCE_SDL));
+
+ // Act
+ application_manager::SharedPtr<
+ rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command =
+ CreateRCCommand<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
+ mobile_message);
+ command->Run();
+}
+
+} // namespace rc_rpc_plugin_test
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
new file mode 100644
index 0000000000..fb9326209c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_RESOURCE_ALLOCATION_MANAGER_H_
+#define SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_RESOURCE_ALLOCATION_MANAGER_H_
+
+#include "gmock/gmock.h"
+#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h"
+
+namespace rc_rpc_plugin_test {
+
+class MockResourceAllocationManager
+ : public rc_rpc_plugin::ResourceAllocationManager {
+ public:
+ MOCK_METHOD2(AcquireResource,
+ rc_rpc_plugin::AcquireResult::eType(
+ const std::string& module_type, const uint32_t app_id));
+ MOCK_METHOD2(ForceAcquireResource,
+ void(const std::string& module_type, const uint32_t app_id));
+ MOCK_METHOD2(OnDriverDisallowed,
+ void(const std::string& module_type, const uint32_t app_id));
+ MOCK_METHOD2(OnApplicationEvent,
+ void(application_manager::plugin_manager::ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application));
+ MOCK_METHOD1(OnPolicyEvent,
+ void(application_manager::plugin_manager::PolicyEvent event));
+ MOCK_METHOD1(SetAccessMode,
+ void(const hmi_apis::Common_RCAccessMode::eType access_mode));
+ MOCK_CONST_METHOD0(GetAccessMode, hmi_apis::Common_RCAccessMode::eType());
+ MOCK_METHOD3(SetResourceState,
+ void(const std::string& module_type,
+ const uint32_t app_id,
+ const rc_rpc_plugin::ResourceState::eType state));
+ MOCK_CONST_METHOD1(IsResourceFree, bool(const std::string& module_type));
+ MOCK_METHOD1(GetApplicationExtention,
+ rc_rpc_plugin::RCAppExtensionPtr(
+ application_manager::ApplicationSharedPtr application));
+ MOCK_METHOD0(ResetAllAllocations, void());
+};
+
+} // namespace rc_rpc_plugin_test
+
+#endif // SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_RESOURCE_ALLOCATION_MANAGER_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
new file mode 100644
index 0000000000..26840a1b33
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
@@ -0,0 +1,508 @@
+/*
+ * 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 <algorithm>
+#include "gtest/gtest.h"
+
+#include "rc_rpc_plugin/resource_allocation_manager_impl.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_rpc_service.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+
+using test::components::application_manager_test::MockApplication;
+using test::components::application_manager_test::MockApplicationManager;
+using test::components::application_manager_test::MockRPCService;
+
+using ::testing::_;
+using ::testing::Mock;
+using ::testing::NiceMock;
+using ::testing::StrictMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SaveArg;
+using ::testing::Eq;
+using ::testing::DoAll;
+using ::testing::SetArgPointee;
+using ::application_manager::Message;
+using ::application_manager::MessageType;
+using ::application_manager::ApplicationSharedPtr;
+using ::protocol_handler::MessagePriority;
+
+namespace {
+const bool kDeviceHandle = 1u;
+const std::string kModuleType1 = "CLIMATE";
+const std::string kModuleType2 = "RADIO";
+const int32_t kConnectionKey = 5;
+const int32_t kCorrelationId = 5;
+const uint32_t kAppId1 = 11u;
+const uint32_t kAppId2 = 22u;
+const std::string policy_app_id_1_ = "policy_id_1";
+}
+
+namespace rc_rpc_plugin_test {
+
+using namespace rc_rpc_plugin;
+
+class RAManagerTest : public ::testing::Test {
+ public:
+ RAManagerTest()
+ : message_(utils::MakeShared<Message>(MessagePriority::FromServiceType(
+ protocol_handler::ServiceType::kRpc)))
+ , mock_app_1_(utils::MakeShared<NiceMock<MockApplication> >())
+ , mock_app_2_(utils::MakeShared<NiceMock<MockApplication> >())
+ , apps_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , apps_da_(apps_, apps_lock_ptr_) {
+ ON_CALL(mock_app_mngr_, GetPolicyHandler())
+ .WillByDefault(ReturnRef(mock_policy_handler_));
+ auto plugin_id = rc_rpc_plugin::RCRPCPlugin::kRCPluginID;
+ app_ext_ptr_ = utils::MakeShared<rc_rpc_plugin::RCAppExtension>(plugin_id);
+ ON_CALL(*mock_app_1_, app_id()).WillByDefault(Return(kAppId1));
+ }
+
+ void CheckResultWithHMILevelAndAccessMode(
+ ResourceAllocationManagerImpl& ra_manager,
+ mobile_apis::HMILevel::eType app_level,
+ const rc_rpc_plugin::AcquireResult::eType expected_result,
+ const hmi_apis::Common_RCAccessMode::eType access_mode);
+
+ protected:
+ NiceMock<MockApplicationManager> mock_app_mngr_;
+ NiceMock<MockRPCService> mock_rpc_service_;
+ test::components::policy_test::MockPolicyHandlerInterface
+ mock_policy_handler_;
+ application_manager::MessagePtr message_;
+
+ application_manager::AppExtensionPtr app_ext_ptr_;
+ utils::SharedPtr<NiceMock<MockApplication> > mock_app_1_;
+ utils::SharedPtr<NiceMock<MockApplication> > mock_app_2_;
+ application_manager::ApplicationSet apps_;
+ std::shared_ptr<sync_primitives::Lock> apps_lock_ptr_;
+ DataAccessor<application_manager::ApplicationSet> apps_da_;
+};
+
+void RAManagerTest::CheckResultWithHMILevelAndAccessMode(
+ ResourceAllocationManagerImpl& ra_manager,
+ mobile_apis::HMILevel::eType app_level,
+ const AcquireResult::eType expected_result,
+ const hmi_apis::Common_RCAccessMode::eType access_mode) {
+ // Arrange
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(mock_app_1_));
+ ra_manager.SetAccessMode(access_mode);
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillOnce(Return(mock_app_2_));
+ EXPECT_CALL(*mock_app_2_, hmi_level()).WillOnce(Return(app_level));
+ // Second app tries to get already acquired resource by 1st app
+ EXPECT_EQ(expected_result, ra_manager.AcquireResource(kModuleType1, kAppId2));
+}
+
+TEST_F(RAManagerTest, AcquireResource_NoAppRegistered_Expect_InUse) {
+ // Arrange
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ // Act & Assert
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::IN_USE,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+}
+
+TEST_F(RAManagerTest,
+ AcquireResource_AppRegisteredAnyHmiLevelResourceFree_Expect_Allowed) {
+ // Arrange
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(mock_app_1_));
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ // Act & Assert
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+}
+
+TEST_F(
+ RAManagerTest,
+ AcquireResource_AppInAnyHmiLevelWantsToAcquireSameResourceTwice_Expect_Allowed) {
+ // Arrange
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(mock_app_1_));
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(mock_app_1_));
+ // Same app tries to get already acquired resource
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+}
+
+TEST_F(
+ RAManagerTest,
+ AcquireResource_App2_NotInFULLWantsToGetAcquiredResource_Expect_Rejected) {
+ using namespace mobile_apis;
+ using namespace hmi_apis;
+ using namespace rc_rpc_plugin;
+ const HMILevel::eType app_level = HMILevel::eType::HMI_BACKGROUND;
+ const AcquireResult::eType expected_result = AcquireResult::REJECTED;
+ const Common_RCAccessMode::eType access_mode =
+ Common_RCAccessMode::eType::AUTO_ALLOW;
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ CheckResultWithHMILevelAndAccessMode(
+ ra_manager, app_level, expected_result, access_mode);
+}
+
+TEST_F(
+ RAManagerTest,
+ AcquireResource_App2_InFULLWantsToGetAcquiredResource_AUTO_DENY_Expect_InUse) {
+ using namespace mobile_apis;
+ using namespace hmi_apis;
+ using namespace rc_rpc_plugin;
+ const HMILevel::eType app_level = HMILevel::eType::HMI_FULL;
+ const AcquireResult::eType expected_result = AcquireResult::IN_USE;
+ const Common_RCAccessMode::eType access_mode =
+ Common_RCAccessMode::eType::AUTO_DENY;
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ CheckResultWithHMILevelAndAccessMode(
+ ra_manager, app_level, expected_result, access_mode);
+}
+
+TEST_F(
+ RAManagerTest,
+ AcquireResource_App2_InFULLWantsToGetAcquiredResource_AUTO_ALLOW_Expect_Allowed) {
+ using namespace mobile_apis;
+ using namespace hmi_apis;
+ using namespace rc_rpc_plugin;
+ const HMILevel::eType app_level = HMILevel::eType::HMI_FULL;
+ const AcquireResult::eType expected_result = AcquireResult::ALLOWED;
+ const Common_RCAccessMode::eType access_mode =
+ Common_RCAccessMode::eType::AUTO_ALLOW;
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ CheckResultWithHMILevelAndAccessMode(
+ ra_manager, app_level, expected_result, access_mode);
+}
+
+TEST_F(
+ RAManagerTest,
+ AcquireResource_App2_InFULLWantsToGetAcquiredResource_ASK_DRIVER_Expect_AskDriver) {
+ using namespace mobile_apis;
+ using namespace hmi_apis;
+ using namespace rc_rpc_plugin;
+ const HMILevel::eType app_level = HMILevel::eType::HMI_FULL;
+ const AcquireResult::eType expected_result = AcquireResult::ASK_DRIVER;
+ const Common_RCAccessMode::eType access_mode =
+ Common_RCAccessMode::eType::ASK_DRIVER;
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ CheckResultWithHMILevelAndAccessMode(
+ ra_manager, app_level, expected_result, access_mode);
+}
+
+TEST_F(RAManagerTest,
+ AcquireResource_AcquiredModuleIsRejectedForApp2_ExpectApp2Rejected) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_1_));
+ EXPECT_EQ(AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+
+ // Act
+ ra_manager.OnDriverDisallowed(kModuleType1, kAppId2);
+
+ // Assert
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillOnce(Return(mock_app_2_));
+ EXPECT_EQ(AcquireResult::REJECTED,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+}
+
+TEST_F(RAManagerTest, AppExit_ReleaseResource) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_1_));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+
+ EXPECT_CALL(*mock_app_1_, QueryInterface(_))
+ .WillOnce(Return(rc_extention_ptr));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+
+ // Act
+ ra_manager.OnApplicationEvent(
+ application_manager::plugin_manager::kApplicationExit, mock_app_1_);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillRepeatedly(Return(mock_app_2_));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+}
+
+TEST_F(RAManagerTest, AnotherAppExit_NoReleaseResource) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(mock_app_1_));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillRepeatedly(Return(mock_app_2_));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+
+ EXPECT_CALL(*mock_app_2_, QueryInterface(_))
+ .WillOnce(Return(rc_extention_ptr));
+
+ // Act
+ application_manager::ApplicationSharedPtr app_ptr(mock_app_2_);
+ EXPECT_CALL(*mock_app_2_, app_id()).WillRepeatedly(Return(kAppId2));
+ ra_manager.OnApplicationEvent(
+ application_manager::plugin_manager::kApplicationExit, app_ptr);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillOnce(Return(mock_app_2_));
+ EXPECT_CALL(*mock_app_2_, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::IN_USE,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+}
+
+TEST_F(RAManagerTest, AppUnregistered_ReleaseResource) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+
+ EXPECT_CALL(*mock_app_1_, QueryInterface(_))
+ .WillOnce(Return(rc_extention_ptr));
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_1_));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+
+ // Act
+ application_manager::ApplicationSharedPtr app_ptr(mock_app_1_);
+ EXPECT_CALL(*mock_app_1_, app_id()).WillRepeatedly(Return(kAppId1));
+
+ ra_manager.OnApplicationEvent(
+ application_manager::plugin_manager::kApplicationUnregistered, app_ptr);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillOnce(Return(mock_app_2_));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+}
+
+TEST_F(RAManagerTest, AnotherAppUnregistered_NoReleaseResource) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillOnce(Return(mock_app_1_));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_2_));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+
+ EXPECT_CALL(*mock_app_2_, QueryInterface(_))
+ .WillOnce(Return(rc_extention_ptr));
+
+ // Act
+ application_manager::ApplicationSharedPtr app_ptr(mock_app_2_);
+ EXPECT_CALL(*mock_app_2_, app_id()).WillRepeatedly(Return(kAppId2));
+
+ ra_manager.OnApplicationEvent(
+ application_manager::plugin_manager::kApplicationUnregistered, app_ptr);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillOnce(Return(mock_app_2_));
+ EXPECT_CALL(*mock_app_2_, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::IN_USE,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+}
+
+TEST_F(RAManagerTest, AppsDisallowed_ReleaseAllResources) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_1_));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType2, kAppId1));
+
+ application_manager::ApplicationSet apps;
+ apps.insert(mock_app_1_);
+ std::shared_ptr<sync_primitives::Lock> apps_lock =
+ std::make_shared<sync_primitives::Lock>();
+ DataAccessor<application_manager::ApplicationSet> apps_da(apps, apps_lock);
+
+ EXPECT_CALL(mock_app_mngr_, applications()).WillRepeatedly(Return(apps_da));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<RCAppExtension>(application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+
+ EXPECT_CALL(*mock_app_1_, QueryInterface(RCRPCPlugin::kRCPluginID))
+ .WillRepeatedly(Return(rc_extention_ptr));
+
+ // Act
+ ra_manager.OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent::kApplicationsDisabled);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillRepeatedly(Return(mock_app_2_));
+ EXPECT_CALL(*mock_app_2_, hmi_level())
+ .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType2, kAppId2));
+ Mock::VerifyAndClearExpectations(&mock_app_mngr_);
+}
+
+TEST_F(RAManagerTest, AppGotRevokedModulesWithPTU_ReleaseRevokedResource) {
+ // Arrange
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_1_));
+
+ RCAppExtensionPtr rc_extention_ptr =
+ utils::MakeShared<rc_rpc_plugin::RCAppExtension>(
+ application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+
+ EXPECT_CALL(*mock_app_1_, QueryInterface(RCRPCPlugin::kRCPluginID))
+ .WillRepeatedly(Return(rc_extention_ptr));
+
+ ON_CALL(*mock_app_1_, is_remote_control_supported())
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId1))
+ .WillRepeatedly(Return(mock_app_1_));
+
+ EXPECT_CALL(*mock_app_1_, app_id()).WillRepeatedly(Return(kAppId1));
+
+ EXPECT_CALL(*mock_app_1_, policy_app_id())
+ .WillRepeatedly(Return(policy_app_id_1_));
+
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType1, kAppId1));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType2, kAppId1));
+
+ application_manager::ApplicationSet apps;
+ apps.insert(mock_app_1_);
+ std::shared_ptr<sync_primitives::Lock> apps_lock =
+ std::make_shared<sync_primitives::Lock>();
+ DataAccessor<application_manager::ApplicationSet> apps_da(apps, apps_lock);
+
+ EXPECT_CALL(mock_app_mngr_, applications()).WillRepeatedly(Return(apps_da));
+
+ Resources allowed_modules;
+ allowed_modules.push_back(kModuleType1);
+
+ EXPECT_CALL(mock_policy_handler_, GetModuleTypes(policy_app_id_1_, _))
+ .WillOnce(DoAll(SetArgPointee<1>(allowed_modules), Return(true)));
+
+ // Act
+ ra_manager.OnPolicyEvent(application_manager::plugin_manager::PolicyEvent::
+ kApplicationPolicyUpdated);
+
+ EXPECT_CALL(mock_app_mngr_, application(kAppId2))
+ .WillRepeatedly(Return(mock_app_2_));
+ EXPECT_CALL(*mock_app_2_, hmi_level())
+ .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::IN_USE,
+ ra_manager.AcquireResource(kModuleType1, kAppId2));
+ EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
+ ra_manager.AcquireResource(kModuleType2, kAppId2));
+ Mock::VerifyAndClearExpectations(&mock_app_mngr_);
+}
+
+TEST_F(RAManagerTest, GetAccessMode_ExpectedSameAsHadSet) {
+ ResourceAllocationManagerImpl ra_manager(mock_app_mngr_, mock_rpc_service_);
+
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::AUTO_DENY);
+ EXPECT_EQ(hmi_apis::Common_RCAccessMode::AUTO_DENY,
+ ra_manager.GetAccessMode());
+
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::ASK_DRIVER);
+ EXPECT_EQ(hmi_apis::Common_RCAccessMode::ASK_DRIVER,
+ ra_manager.GetAccessMode());
+
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::AUTO_ALLOW);
+ EXPECT_EQ(hmi_apis::Common_RCAccessMode::AUTO_ALLOW,
+ ra_manager.GetAccessMode());
+
+ ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::INVALID_ENUM);
+ EXPECT_EQ(hmi_apis::Common_RCAccessMode::INVALID_ENUM,
+ ra_manager.GetAccessMode());
+}
+
+} // namespace rc_rpc_plugin
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
new file mode 100644
index 0000000000..11dd35d061
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt
@@ -0,0 +1,77 @@
+# 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 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_directories(include)
+
+set (COMMANDS_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/commands
+)
+
+set (MOBILE_COMMANDS_SOURCE_DIR
+ ${COMMANDS_SOURCE_DIR}/mobile
+)
+
+set (HMI_COMMANDS_SOURCE_DIR
+ ${COMMANDS_SOURCE_DIR}/hmi
+)
+
+collect_sources(MOBILE_COMMANDS "${MOBILE_COMMANDS_SOURCE_DIR}")
+collect_sources(HMI_COMMANDS "${HMI_COMMANDS_SOURCE_DIR}")
+collect_sources(RPC_PLUGIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src")
+
+set(LIBRARIES
+ HMI_API
+ MOBILE_API
+ ApplicationManager
+ v4_protocol_v1_2_no_extra
+ SmartObjects
+ Utils
+ Policy
+)
+
+if(ENABLE_LOG)
+ list(APPEND LIBRARIES log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
+endif()
+
+add_library("sdl_rpc_plugin" SHARED ${MOBILE_COMMANDS} ${HMI_COMMANDS} ${RPC_PLUGIN_SOURCES})
+target_link_libraries("sdl_rpc_plugin" ${LIBRARIES})
+
+set(INSTALL_DESTINATION bin)
+
+install(TARGETS sdl_rpc_plugin
+ DESTINATION ${INSTALL_DESTINATION}
+ 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/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_request.h
new file mode 100644
index 0000000000..7b0911fef9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ActivateAppRequest command class
+ **/
+class ActivateAppRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief ActivateAppRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ActivateAppRequest(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 ActivateAppRequest class destructor
+ **/
+ virtual ~ActivateAppRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ActivateAppRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_response.h
new file mode 100644
index 0000000000..f937b4f63b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/activate_app_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ActivateAppResponse command class
+ **/
+class ActivateAppResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief ActivateAppResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ActivateAppResponse(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 ActivateAppResponse class destructor
+ **/
+ virtual ~ActivateAppResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ActivateAppResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/add_statistics_info_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/add_statistics_info_notification.h
new file mode 100644
index 0000000000..4e9e4d54d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/add_statistics_info_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ADD_STATISTICS_INFO_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ADD_STATISTICS_INFO_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AddStatisticsInfoNotification command class
+ **/
+class AddStatisticsInfoNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief AddStatisticsInfoNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AddStatisticsInfoNotification(
+ 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 AddStatisticsInfoNotification class destructor
+ **/
+ virtual ~AddStatisticsInfoNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AddStatisticsInfoNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ADD_STATISTICS_INFO_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h
new file mode 100644
index 0000000000..45acb3a424
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AllowAllAppsRequest command class
+ **/
+class AllowAllAppsRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief AllowAllAppsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AllowAllAppsRequest(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 AllowAllAppsRequest class destructor
+ **/
+ virtual ~AllowAllAppsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AllowAllAppsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_response.h
new file mode 100644
index 0000000000..41d1c9e752
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_all_apps_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AllowAllAppsResponse command class
+ **/
+class AllowAllAppsResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief AllowAllAppsResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AllowAllAppsResponse(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 AllowAllAppsResponse class destructor
+ **/
+ virtual ~AllowAllAppsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AllowAllAppsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_request.h
new file mode 100644
index 0000000000..b3a2d88d7d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AllowAppRequest command class
+ **/
+class AllowAppRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief AllowAppRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AllowAppRequest(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 AllowAppRequest class destructor
+ **/
+ virtual ~AllowAppRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AllowAppRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_response.h
new file mode 100644
index 0000000000..55637e1756
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/allow_app_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AllowAppResponse command class
+ **/
+class AllowAppResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief AllowAppResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AllowAppResponse(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 AllowAppResponse class destructor
+ **/
+ virtual ~AllowAppResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AllowAppResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_request.h
new file mode 100644
index 0000000000..2208671e0b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_request.h
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_GET_SYSTEM_TIME_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_GET_SYSTEM_TIME_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief The BasicCommunicationGetSystemTimeRequest class sends the request
+ * to the HMI in order to receive current system time.
+ */
+class BasicCommunicationGetSystemTimeRequest
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief BasicCommunicationGetSystemTimeRequest does nothing except of
+ * initializing base class with the passed parameters.
+ * @param message the message to send to HMI
+ * @param application_manager application manager. Location service which
+ * is provides neccessary api to send the request.
+ */
+ BasicCommunicationGetSystemTimeRequest(
+ 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_handler);
+
+ /**
+ * @brief onTimeOut allows to handle case when
+ * system does not respond for certain request in
+ * appropriate time window.
+ */
+ void onTimeOut() FINAL;
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_GET_SYSTEM_TIME_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h
new file mode 100644
index 0000000000..90160d9953
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_GET_SYSTEM_TIME_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_GET_SYSTEM_TIME_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+#include "utils/macro.h"
+#include "application_manager/application_manager_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief The BasicCommunicationGetSystemTimeResponse class represents the
+ * HMI response which is contains data obtained from HMI.
+ */
+class BasicCommunicationGetSystemTimeResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief BasicCommunicationGetSystemTimeResponse does nothing except of
+ * initializing base class with the passed parameters.
+ * @param message the message to send to HMI
+ * @param application_manager Location service which which is provides
+ * neccessary api to send the request.
+ */
+ BasicCommunicationGetSystemTimeResponse(
+ 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_handler);
+
+ /**
+ * @brief Run takes the message obtained from the HMI and
+ * sends this data to the subscribed on certain event class
+ */
+ void Run() FINAL;
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_GET_SYSTEM_TIME_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_on_awake_sdl.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_on_awake_sdl.h
new file mode 100644
index 0000000000..2ac1be2580
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_on_awake_sdl.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_ON_AWAKE_SDL_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_ON_AWAKE_SDL_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAwakeSDLNotification command class
+ **/
+class OnAwakeSDLNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnAwakeSDLNotification class constructor
+ * @param message Incoming SmartObject message
+ * @param application_manager reference to ApplicationManager instance
+ **/
+ OnAwakeSDLNotification(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 OnAwakeSDLNotification class destructor
+ **/
+ virtual ~OnAwakeSDLNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAwakeSDLNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_ON_AWAKE_SDL_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h
new file mode 100644
index 0000000000..a7eb820146
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief BasicCommunicationSystemRequest command class
+ **/
+class BasicCommunicationSystemRequest
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief BasicCommunicationSystemRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ BasicCommunicationSystemRequest(
+ 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 BasicCommunicationSystemRequest class destructor
+ **/
+ virtual ~BasicCommunicationSystemRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BasicCommunicationSystemRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_response.h
new file mode 100644
index 0000000000..20483a45e3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_system_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief BasicCommunicationSystemResponse command class
+ **/
+class BasicCommunicationSystemResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief BasicCommunicationSystemResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ BasicCommunicationSystemResponse(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief BasicCommunicationSystemResponse class destructor
+ **/
+ virtual ~BasicCommunicationSystemResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BasicCommunicationSystemResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BASIC_COMMUNICATION_SYSTEM_RESPONSE_H_
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
new file mode 100644
index 0000000000..5c650fb8e4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ButtonGetCapabilitiesRequest command class
+ **/
+class ButtonGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief ButtonGetCapabilitiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ButtonGetCapabilitiesRequest(
+ 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 ButtonGetCapabilitiesRequest class destructor
+ **/
+ virtual ~ButtonGetCapabilitiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_response.h
new file mode 100644
index 0000000000..bf2f15c18a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ButtonGetCapabilitiesResponse command class
+ **/
+class ButtonGetCapabilitiesResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief ButtonGetCapabilitiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ButtonGetCapabilitiesResponse(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief ButtonGetCapabilitiesResponse class destructor
+ **/
+ virtual ~ButtonGetCapabilitiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_request.h
new file mode 100644
index 0000000000..635b0579f4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ClosePopupRequest command class
+ **/
+class ClosePopupRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief ClosePopupRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ClosePopupRequest(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 ClosePopupRequest class destructor
+ **/
+ virtual ~ClosePopupRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ClosePopupRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_response.h
new file mode 100644
index 0000000000..199b40f070
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/close_popup_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_CLOSE_POPUP_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_CLOSE_POPUP_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ClosePopupResponse command class
+ **/
+class ClosePopupResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief ClosePopupResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ClosePopupResponse(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 ClosePopupResponse class destructor
+ **/
+ virtual ~ClosePopupResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ClosePopupResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_CLOSE_POPUP_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_request.h
new file mode 100644
index 0000000000..a70bff2553
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_request.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DECRYPT_CERTIFICATE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DECRYPT_CERTIFICATE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DecryptCertificateRequest command class
+ **/
+class DecryptCertificateRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief DecryptCertificateRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DecryptCertificateRequest(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 Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DecryptCertificateRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DECRYPT_CERTIFICATE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h
new file mode 100644
index 0000000000..88b216eeea
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DECRYPT_CERTIFICATE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DECRYPT_CERTIFICATE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DecryptCertificateResponse command class
+ **/
+class DecryptCertificateResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief DecryptCertificateResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DecryptCertificateResponse(
+ 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 DecryptCertificateResponse class destructor
+ **/
+ virtual ~DecryptCertificateResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DecryptCertificateResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DECRYPT_CERTIFICATE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_request.h
new file mode 100644
index 0000000000..fa0efb90e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_request.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DIAL_NUMBER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DIAL_NUMBER_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+/**
+ * @brief DialNumberRequest command class
+ **/
+class DialNumberRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief DialNumberRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DialNumberRequest(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 DialNumberRequest class destructor
+ **/
+ virtual ~DialNumberRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DialNumberRequest);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DIAL_NUMBER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_response.h
new file mode 100644
index 0000000000..33d4788eca
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/dial_number_response.h
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DIAL_NUMBER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DIAL_NUMBER_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief DialNumberResponse command class
+ **/
+class DialNumberResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief DialNumberResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DialNumberResponse(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 DialNumberResponse class destructor
+ **/
+ virtual ~DialNumberResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DialNumberResponse);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_DIAL_NUMBER_RESPONSE_H_
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
new file mode 100644
index 0000000000..d771167798
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_SYSTEM_INFO_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_SYSTEM_INFO_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief GetSystemInfoRequest command class
+ **/
+class GetSystemInfoRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief GetSystemInfoRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetSystemInfoRequest(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 GetSystemInfoRequest class destructor
+ **/
+ virtual ~GetSystemInfoRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetSystemInfoRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_SYSTEM_INFO_REQUEST_H_
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
new file mode 100644
index 0000000000..5bf5f41b73
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_SYSTEM_INFO_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_SYSTEM_INFO_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+struct SystemInfo {
+ std::string ccpu_version;
+ std::string wers_country_code;
+ std::string language;
+};
+
+/**
+ * @brief GetSystemInfoResponse command class
+ **/
+class GetSystemInfoResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief GetSystemInfoResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetSystemInfoResponse(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 GetSystemInfoResponse class destructor
+ **/
+ virtual ~GetSystemInfoResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ const SystemInfo GetSystemInfo(
+ const hmi_apis::Common_Result::eType code) const;
+
+ DISALLOW_COPY_AND_ASSIGN(GetSystemInfoResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_SYSTEM_INFO_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls.h
new file mode 100644
index 0000000000..93b414c8c4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls.h
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_URLS_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_URLS_H_
+
+#include "application_manager/commands/request_from_hmi.h"
+#include "policy/policy_types.h"
+#include "smart_objects/smart_object.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+/**
+ * @brief GetUrls command class
+ **/
+class GetUrls : public app_mngr::commands::RequestFromHMI {
+ public:
+ /**
+ * @brief GetUrls class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetUrls(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 GetUrls class destructor
+ **/
+ virtual ~GetUrls();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+#ifdef PROPRIETARY_MODE
+ /**
+ * @brief Processes URLs collecting for policy service
+ * @param endpoints Endpoints section of policy table
+ */
+ void ProcessPolicyServiceURLs(const policy::EndpointUrls& endpoints);
+#endif // PROPRIETARY_MODE
+
+ /**
+ * @brief Process URLs collecting for service
+ * @param endpoints Endpoints section of policy table
+ */
+ void ProcessServiceURLs(const policy::EndpointUrls& endpoints);
+
+ /**
+ * @brief Sends response to HMI
+ * @param result Result code
+ */
+ void SendResponseToHMI(hmi_apis::Common_Result::eType result);
+
+ DISALLOW_COPY_AND_ASSIGN(GetUrls);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_URLS_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls_response.h
new file mode 100644
index 0000000000..1ff38194b8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_urls_response.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_URLS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_URLS_RESPONSE_H_
+
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class GetUrlsResponse : public app_mngr::commands::ResponseToHMI {
+ public:
+ /**
+ * @brief GetUrlsResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetUrlsResponse(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 GetUrlsResponse class destructor
+ **/
+ virtual ~GetUrlsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetUrlsResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_GET_URLS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_request.h
new file mode 100644
index 0000000000..34c10cedf1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief MixingAudioSupportedRequest command class
+ **/
+class MixingAudioSupportedRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief MixingAudioSupportedRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ MixingAudioSupportedRequest(
+ 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 MixingAudioSupportedRequest class destructor
+ **/
+ virtual ~MixingAudioSupportedRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MixingAudioSupportedRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h
new file mode 100644
index 0000000000..5c67666225
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief MixingAudioSupportedResponse command class
+ **/
+class MixingAudioSupportedResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief MixingAudioSupportedResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ MixingAudioSupportedResponse(
+ 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 MixingAudioSupportedResponse class destructor
+ **/
+ virtual ~MixingAudioSupportedResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MixingAudioSupportedResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h
new file mode 100644
index 0000000000..3f63ef883d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviAlertManeuverRequest command class
+ **/
+class NaviAlertManeuverRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviAlertManeuverRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviAlertManeuverRequest(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 NaviAlertManeuverRequest class destructor
+ **/
+ virtual ~NaviAlertManeuverRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviAlertManeuverRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_response.h
new file mode 100644
index 0000000000..7d7c4de85e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviAlertManeuverResponse command class
+ **/
+class NaviAlertManeuverResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviAlertManeuverResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviAlertManeuverResponse(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 NaviAlertManeuverResponse class destructor
+ **/
+ virtual ~NaviAlertManeuverResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviAlertManeuverResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
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
new file mode 100644
index 0000000000..80e948ad25
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AudioStartStreamRequest command class
+ **/
+class AudioStartStreamRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief AudioStartStreamRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AudioStartStreamRequest(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 OnNaviStartStreamRequest class destructor
+ **/
+ virtual ~AudioStartStreamRequest();
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ virtual void onTimeOut();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief On event callback
+ **/
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ /**
+ * @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);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_response.h
new file mode 100644
index 0000000000..926cfc36ed
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_response.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AudioStartStreamResponse command class
+ **/
+class AudioStartStreamResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief AudioStartStreamResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AudioStartStreamResponse(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 AudioStartStreamResponse class destructor
+ **/
+ virtual ~AudioStartStreamResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AudioStartStreamResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_START_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h
new file mode 100644
index 0000000000..7c5fbbdd3d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AudioStopStreamRequest command class
+ **/
+class AudioStopStreamRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief AudioStopStreamRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AudioStopStreamRequest(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 NaviStopStreamRequest class destructor
+ **/
+ virtual ~AudioStopStreamRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AudioStopStreamRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_response.h
new file mode 100644
index 0000000000..8eb091dd92
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_response.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviStopStreamResponse command class
+ **/
+class AudioStopStreamResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief AudioStopStreamResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AudioStopStreamResponse(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 OnNaviStopStreamResponse class destructor
+ **/
+ virtual ~AudioStopStreamResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AudioStopStreamResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_AUDIO_STOP_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h
new file mode 100644
index 0000000000..dab5fc1022
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviGetWayPointsRequest command class
+ **/
+class NaviGetWayPointsRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviGetWayPointsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviGetWayPointsRequest(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 NaviGetWayPointsRequest class destructor
+ **/
+ virtual ~NaviGetWayPointsRequest();
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviGetWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_response.h
new file mode 100644
index 0000000000..fb93c2c64a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_get_way_points_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviGetWaypoints command class
+ **/
+class NaviGetWayPointsResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviGetWaypoints class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviGetWayPointsResponse(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 NaviGetWaypoints class destructor
+ **/
+ virtual ~NaviGetWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviGetWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h
new file mode 100644
index 0000000000..404ddc9f00
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviIsReadyRequest command class
+ **/
+class NaviIsReadyRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief NaviIsReadyRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviIsReadyRequest(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 NaviIsReadyRequest class destructor
+ **/
+ virtual ~NaviIsReadyRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviIsReadyRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_response.h
new file mode 100644
index 0000000000..7f94312d04
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_is_ready_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviIsReadyResponse command class
+ **/
+class NaviIsReadyResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviIsReadyResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviIsReadyResponse(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 NaviIsReadyResponse class destructor
+ **/
+ virtual ~NaviIsReadyResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviIsReadyResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_request.h
new file mode 100644
index 0000000000..7bdf0e4787
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SEND_LOCATION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SEND_LOCATION_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSendLocationRequest command class
+ */
+class NaviSendLocationRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviSendLocationRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ */
+ NaviSendLocationRequest(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 NaviSendLocationRequest class destructor
+ */
+ virtual ~NaviSendLocationRequest();
+
+ /**
+ * @brief Execute command
+ */
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSendLocationRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SEND_LOCATION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_response.h
new file mode 100644
index 0000000000..6a65eb00a1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_send_location_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SEND_LOCATION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SEND_LOCATION_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSendLocationResponse command class
+ */
+class NaviSendLocationResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviSendLocationResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ */
+ NaviSendLocationResponse(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 NaviSendLocationResponse class destructor
+ */
+ virtual ~NaviSendLocationResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSendLocationResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SEND_LOCATION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_request.h
new file mode 100644
index 0000000000..a981b8ff81
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_request.h
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSetVideoConfigRequest command class
+ **/
+class NaviSetVideoConfigRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief NaviSetVideoConfigRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ * @param application_manager Reference of application manager
+ **/
+ NaviSetVideoConfigRequest(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 NaviSetVideoConfigRequest class destructor
+ **/
+ virtual ~NaviSetVideoConfigRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ /**
+ * @brief onTimeOut callback
+ */
+ void onTimeOut() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSetVideoConfigRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_response.h
new file mode 100644
index 0000000000..f5f9e7a5ee
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_set_video_config_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSetVideoConfigResponse command class
+ **/
+class NaviSetVideoConfigResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviSetVideoConfigResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ * @param application_manager Reference of application manager
+ **/
+ NaviSetVideoConfigResponse(
+ 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 NaviSetVideoConfigResponse class destructor
+ **/
+ virtual ~NaviSetVideoConfigResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSetVideoConfigResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SET_VIDEO_CONFIG_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h
new file mode 100644
index 0000000000..f64bdf6ce0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviShowConstantTBTRequest command class
+ **/
+class NaviShowConstantTBTRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviShowConstantTBTRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviShowConstantTBTRequest(
+ 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_handler);
+
+ /**
+ * @brief NaviShowConstantTBTRequest class destructor
+ **/
+ virtual ~NaviShowConstantTBTRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviShowConstantTBTRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h
new file mode 100644
index 0000000000..fd4da08cf0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviShowConstantTBTResponse command class
+ **/
+class NaviShowConstantTBTResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviShowConstantTBTResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviShowConstantTBTResponse(
+ 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 NaviShowConstantTBTResponse class destructor
+ **/
+ virtual ~NaviShowConstantTBTResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviShowConstantTBTResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
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
new file mode 100644
index 0000000000..d5aae67661
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviStartStreamRequest command class
+ **/
+class NaviStartStreamRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief NaviStartStreamRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviStartStreamRequest(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 OnNaviStartStreamRequest class destructor
+ **/
+ virtual ~NaviStartStreamRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief On event callback
+ **/
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ virtual void onTimeOut();
+
+ /**
+ * @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);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_response.h
new file mode 100644
index 0000000000..b4770e82fe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_response.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviStartStreamResponse command class
+ **/
+class NaviStartStreamResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviStartStreamResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviStartStreamResponse(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 NaviStartStreamResponse class destructor
+ **/
+ virtual ~NaviStartStreamResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviStartStreamResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h
new file mode 100644
index 0000000000..400c61ba07
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviStopStreamRequest command class
+ **/
+class NaviStopStreamRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviStopStreamRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviStopStreamRequest(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 NaviStopStreamRequest class destructor
+ **/
+ virtual ~NaviStopStreamRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviStopStreamRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_response.h
new file mode 100644
index 0000000000..39512ac2bb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_stop_stream_response.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviStopStreamResponse command class
+ **/
+class NaviStopStreamResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviStopStreamResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviStopStreamResponse(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 OnNaviStopStreamResponse class destructor
+ **/
+ virtual ~NaviStopStreamResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviStopStreamResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
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
new file mode 100644
index 0000000000..052c3c7151
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSubscribeWayPointsRequest command class
+ **/
+class NaviSubscribeWayPointsRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviSubscribeWayPointsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviSubscribeWayPointsRequest(
+ const app_mngr::commands::MessageSharedPtr& messag,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+ /**
+ * @brief NaviSubscribeWayPointsRequest class destructor
+ **/
+ virtual ~NaviSubscribeWayPointsRequest();
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_response.h
new file mode 100644
index 0000000000..73aab4633f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSubscribeWaypoints command class
+ **/
+class NaviSubscribeWayPointsResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviSubscribeWaypoints class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviSubscribeWayPointsResponse(
+ 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 NaviSubscribeWaypoints class destructor
+ **/
+ virtual ~NaviSubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h
new file mode 100644
index 0000000000..6061858e5c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviSubscribeWayPointsRequest command class
+ **/
+class NaviUnSubscribeWayPointsRequest
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviUnSubscribeWayPointsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviUnSubscribeWayPointsRequest(
+ 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 NaviUnSubscribeWayPointsRequest class destructor
+ **/
+ virtual ~NaviUnSubscribeWayPointsRequest();
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviUnSubscribeWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_response.h
new file mode 100644
index 0000000000..3a02228b8b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviUnSubscribeWaypoints command class
+ **/
+class NaviUnsubscribeWayPointsResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviUnSubscribeWaypoints class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviUnsubscribeWayPointsResponse(
+ 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 NaviUnSubscribeWaypoints class destructor
+ **/
+ virtual ~NaviUnsubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviUnsubscribeWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h
new file mode 100644
index 0000000000..db269a65d3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviUpdateTurnListRequest command class
+ **/
+class NaviUpdateTurnListRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief NaviUpdateTurnListRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviUpdateTurnListRequest(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 NaviUpdateTurnListRequest class destructor
+ **/
+ virtual ~NaviUpdateTurnListRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviUpdateTurnListRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_response.h
new file mode 100644
index 0000000000..20295485a3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_update_turn_list_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief NaviUpdateTurnListResponse command class
+ **/
+class NaviUpdateTurnListResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviUpdateTurnListResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ NaviUpdateTurnListResponse(
+ 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 NaviUpdateTurnListResponse class destructor
+ **/
+ virtual ~NaviUpdateTurnListResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviUpdateTurnListResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h
new file mode 100644
index 0000000000..42bf877f2d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_ALLOW_SDL_FUNCTIONALITY_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_ALLOW_SDL_FUNCTIONALITY_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAllowSDLFunctionalityNotification command class
+ **/
+class OnAllowSDLFunctionalityNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnAllowSDLFunctionalityNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAllowSDLFunctionalityNotification(
+ 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 OnAllowSDLFunctionalityNotification class destructor
+ **/
+ virtual ~OnAllowSDLFunctionalityNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAllowSDLFunctionalityNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_ALLOW_SDL_FUNCTIONALITY_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h
new file mode 100644
index 0000000000..cc21d699fb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppActivatedNotification command class
+ **/
+class OnAppActivatedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnAppActivatedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppActivatedNotification(
+ 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 OnAppActivatedNotification class destructor
+ **/
+ virtual ~OnAppActivatedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppActivatedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h
new file mode 100644
index 0000000000..9b4a6ba5a0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppDeactivatedNotification command class
+ **/
+class OnAppDeactivatedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnAppDeactivatedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppDeactivatedNotification(
+ 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 OnAppDeactivatedNotification class destructor
+ **/
+ virtual ~OnAppDeactivatedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppDeactivatedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h
new file mode 100644
index 0000000000..6008a8ce51
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_PERMISSION_CHANGED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_PERMISSION_CHANGED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppPermissionChangedNotification command class
+ **/
+class OnAppPermissionChangedNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnAppPermissionChangedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppPermissionChangedNotification(
+ 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 OnAppPermissionChangedNotification class destructor
+ **/
+ virtual ~OnAppPermissionChangedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppPermissionChangedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_PERMISSION_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h
new file mode 100644
index 0000000000..a751b25d85
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_PERMISSION_CONSENT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_PERMISSION_CONSENT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppPermissionConsentNotification command class
+ **/
+class OnAppPermissionConsentNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnAppPermissionConsentNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppPermissionConsentNotification(
+ 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 OnAppPermissionConsentNotification class destructor
+ **/
+ virtual ~OnAppPermissionConsentNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppPermissionConsentNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_PERMISSION_CONSENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h
new file mode 100644
index 0000000000..3548786d1d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppRegisteredNotification command class
+ **/
+class OnAppRegisteredNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnAppRegisteredNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppRegisteredNotification(
+ 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 OnAppRegisteredNotification class destructor
+ **/
+ virtual ~OnAppRegisteredNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppRegisteredNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h
new file mode 100644
index 0000000000..097eb1eb28
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppUnregisteredNotification command class
+ **/
+class OnAppUnregisteredNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnAppUnregisteredNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppUnregisteredNotification(
+ 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 OnAppUnregisteredNotification class destructor
+ **/
+ ~OnAppUnregisteredNotification() FINAL;
+
+ /**
+ * @brief Init overrides and skips replacement of app id with hmi id since
+ * 1) at the moment this notification is being sent there is no application
+ * registered in application manager
+ * 2) hmi id is already used whenever this message is being constructed, so
+ * its already there
+ * @return True in any case
+ */
+ bool Init() FINAL;
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() FINAL;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppUnregisteredNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h
new file mode 100644
index 0000000000..cac306f760
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAudioDataStreamingNotification command class
+ **/
+class OnAudioDataStreamingNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnAudioDataStreamingNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAudioDataStreamingNotification(
+ 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 OnAudioDataStreamingNotification class destructor
+ **/
+ virtual ~OnAudioDataStreamingNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAudioDataStreamingNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_event_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_event_notification.h
new file mode 100644
index 0000000000..b83fe1bfe0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_event_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnButtonEventNotification command class
+ **/
+class OnButtonEventNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnButtonEventNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnButtonEventNotification(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 Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnButtonEventNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_press_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_press_notification.h
new file mode 100644
index 0000000000..e996c9952c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_press_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnButtonPressNotification command class
+ **/
+class OnButtonPressNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnButtonPressNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnButtonPressNotification(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 Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnButtonPressNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h
new file mode 100644
index 0000000000..4ed60f9a07
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_SUBSCRIPTION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_SUBSCRIPTION_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnButtonSubscriptionNotification command class
+ **/
+class OnButtonSubscriptionNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnButtonSubscriptionNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnButtonSubscriptionNotification(
+ 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 OnButtonSubscriptionNotification class destructor
+ **/
+ virtual ~OnButtonSubscriptionNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnButtonSubscriptionNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_BUTTON_SUBSCRIPTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h
new file mode 100644
index 0000000000..99c165c12f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnDeviceChosenNotification command class
+ **/
+class OnDeviceChosenNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnDeviceChosenNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnDeviceChosenNotification(
+ 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 OnDeviceChosenNotification class destructor
+ **/
+ virtual ~OnDeviceChosenNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnDeviceChosenNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h
new file mode 100644
index 0000000000..7701e2a601
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DEVICE_STATE_CHANGED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DEVICE_STATE_CHANGED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnDeviceStateChangedNotification command class
+ **/
+class OnDeviceStateChangedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnDeviceStateChangedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnDeviceStateChangedNotification(
+ 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 OnDeviceStateChangedNotification class destructor
+ **/
+ virtual ~OnDeviceStateChangedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnDeviceStateChangedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DEVICE_STATE_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h
new file mode 100644
index 0000000000..51fb49c6bc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnDriverDistractionNotification command class
+ **/
+class OnDriverDistractionNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnDriverDistractionNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnDriverDistractionNotification(
+ 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 OnDriverDistractionNotification class destructor
+ **/
+ virtual ~OnDriverDistractionNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnDriverDistractionNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h
new file mode 100644
index 0000000000..cff0a0e617
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EVENT_CHANGED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EVENT_CHANGED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnEventChangedNotification command class
+ **/
+class OnEventChangedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnEventChangedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnEventChangedNotification(
+ 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 OnEventChangedNotification class destructor
+ **/
+ virtual ~OnEventChangedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnEventChangedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EVENT_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h
new file mode 100644
index 0000000000..116932d87a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EXIT_ALL_APPLICATIONS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EXIT_ALL_APPLICATIONS_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnExitAllApplicationsNotification command class
+ **/
+class OnExitAllApplicationsNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnExitAllApplicationsNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnExitAllApplicationsNotification(
+ 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 OnExitAllApplicationsNotification class destructor
+ **/
+ virtual ~OnExitAllApplicationsNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ private:
+ /**
+ * @brief Notify's HMI that SDL stored all data required for resumption
+ **/
+ void SendOnSDLPersistenceComplete();
+
+ DISALLOW_COPY_AND_ASSIGN(OnExitAllApplicationsNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EXIT_ALL_APPLICATIONS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_application_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_application_notification.h
new file mode 100644
index 0000000000..11c397bfe7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_exit_application_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EXIT_APPLICATION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EXIT_APPLICATION_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnExitApplicationNotification command class
+ **/
+class OnExitApplicationNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnExitApplicationNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnExitApplicationNotification(
+ 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 OnExitApplicationNotification class destructor
+ **/
+ virtual ~OnExitApplicationNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnExitApplicationNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_EXIT_APPLICATION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h
new file mode 100644
index 0000000000..38c5dcf535
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_FILE_REMOVED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_FILE_REMOVED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnFileRemovedNotification command class
+ **/
+class OnFileRemovedNotification : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnFileRemovedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnFileRemovedNotification(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 OnFileRemovedNotification class destructor
+ **/
+ virtual ~OnFileRemovedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnFileRemovedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_FILE_REMOVED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_find_applications.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_find_applications.h
new file mode 100644
index 0000000000..672ded9dcf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_find_applications.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_FIND_APPLICATIONS_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_FIND_APPLICATIONS_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnFindApplications command class
+ **/
+class OnFindApplications : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnFindApplications class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnFindApplications(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 OnFindApplications class destructor
+ **/
+ virtual ~OnFindApplications();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnFindApplications);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_FIND_APPLICATIONS_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h
new file mode 100644
index 0000000000..85b7ed356e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_IGNITION_CYCLE_OVER_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_IGNITION_CYCLE_OVER_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnIgnitionCycleOverNotification command class
+ **/
+class OnIgnitionCycleOverNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnIgnitionCycleOverNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnIgnitionCycleOverNotification(
+ 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 OnIgnitionCycleOverNotification class destructor
+ **/
+ virtual ~OnIgnitionCycleOverNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnIgnitionCycleOverNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_IGNITION_CYCLE_OVER_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h
new file mode 100644
index 0000000000..075dc2cb5c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnNaviTBTClientStateNotification command class
+ **/
+class OnNaviTBTClientStateNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnNaviTBTClientStateNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnNaviTBTClientStateNotification(
+ 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 OnNaviTBTClientStateNotification class destructor
+ **/
+ virtual ~OnNaviTBTClientStateNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnNaviTBTClientStateNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h
new file mode 100644
index 0000000000..3efde9c8c1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnNaviWayPointChangeNotification command class
+ **/
+class OnNaviWayPointChangeNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnNaviWayPointChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnNaviWayPointChangeNotification(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& app_man,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnNaviWayPointChangeNotification class destructor
+ **/
+ virtual ~OnNaviWayPointChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnNaviWayPointChangeNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_policy_update.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_policy_update.h
new file mode 100644
index 0000000000..331e352795
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_policy_update.h
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_POLICY_UPDATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_POLICY_UPDATE_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class OnPolicyUpdate : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnPolicyUpdate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnPolicyUpdate(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 OnPolicyUpdate class destructor
+ **/
+ virtual ~OnPolicyUpdate();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnPolicyUpdate);
+};
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_POLICY_UPDATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_put_file_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_put_file_notification.h
new file mode 100644
index 0000000000..503013ff58
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_put_file_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_PUT_FILE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_PUT_FILE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnPutFileNotification command class
+ **/
+class OnPutFileNotification : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnPutFileNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnPutFileNotification(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 OnPutFileNotification class destructor
+ **/
+ virtual ~OnPutFileNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnPutFileNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_PUT_FILE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ready_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ready_notification.h
new file mode 100644
index 0000000000..c4adc20090
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ready_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnReadyNotification command class
+ **/
+class OnReadyNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnReadyNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnReadyNotification(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 OnReadyNotification class destructor
+ **/
+ virtual ~OnReadyNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnReadyNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_received_policy_update.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_received_policy_update.h
new file mode 100644
index 0000000000..c1e1b01a18
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_received_policy_update.h
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RECEIVED_POLICY_UPDATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RECEIVED_POLICY_UPDATE_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class OnReceivedPolicyUpdate : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnReceivedPolicyUpdate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnReceivedPolicyUpdate(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 OnReceivedPolicyUpdate class destructor
+ **/
+ ~OnReceivedPolicyUpdate() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnReceivedPolicyUpdate);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RECEIVED_POLICY_UPDATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_record_start_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_record_start_notification.h
new file mode 100644
index 0000000000..c5755a364c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_record_start_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RECORD_START_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RECORD_START_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnRecordStartdNotification command class
+ **/
+class OnRecordStartdNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnRecordStartdNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnRecordStartdNotification(
+ 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 OnRecordStartdNotification class destructor
+ **/
+ virtual ~OnRecordStartdNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnRecordStartdNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RECORD_START_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h
new file mode 100644
index 0000000000..ef2b5a34eb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RESUME_AUDIO_SOURCE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RESUME_AUDIO_SOURCE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnResumeAudioSourceNotification command class
+ **/
+class OnResumeAudioSourceNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnResumeAudioSourceNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnResumeAudioSourceNotification(
+ 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 OnResumeAudioSourceNotification class destructor
+ **/
+ virtual ~OnResumeAudioSourceNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnResumeAudioSourceNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_RESUME_AUDIO_SOURCE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h
new file mode 100644
index 0000000000..34fe41de81
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSDLCloseNotification command class
+ **/
+class OnSDLCloseNotification : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnSDLCloseNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSDLCloseNotification(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 OnSdlCloseNotification class destructor
+ **/
+ virtual ~OnSDLCloseNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSDLCloseNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h
new file mode 100644
index 0000000000..9fe736a595
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_CONSENT_NEEDED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_CONSENT_NEEDED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSDLConsentNeededNotification command class
+ **/
+class OnSDLConsentNeededNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnSDLConsentNeededNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSDLConsentNeededNotification(
+ 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 OnSDLConsentNeededNotification class destructor
+ **/
+ virtual ~OnSDLConsentNeededNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSDLConsentNeededNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_CONSENT_NEEDED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h
new file mode 100644
index 0000000000..96f63845e1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_PERSISTENCE_COMPLETE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_PERSISTENCE_COMPLETE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSDLPersistenceCompleteNotification command class
+ **/
+class OnSDLPersistenceCompleteNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnSDLPersistenceCompleteNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSDLPersistenceCompleteNotification(
+ 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 OnSDLPersistenceCompleteNotification class destructor
+ **/
+ virtual ~OnSDLPersistenceCompleteNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSDLPersistenceCompleteNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SDL_PERSISTENCE_COMPLETE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_start_device_discovery.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_start_device_discovery.h
new file mode 100644
index 0000000000..da049b1dc4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_start_device_discovery.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_START_DEVICE_DISCOVERY_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_START_DEVICE_DISCOVERY_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnStartDeviceDiscovery command class
+ **/
+class OnStartDeviceDiscovery : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnStartDeviceDiscovery class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnStartDeviceDiscovery(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 OnStartDeviceDiscovery class destructor
+ **/
+ virtual ~OnStartDeviceDiscovery();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnStartDeviceDiscovery);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_START_DEVICE_DISCOVERY_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_status_update_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_status_update_notification.h
new file mode 100644
index 0000000000..7c61fac041
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_status_update_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_STATUS_UPDATE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_STATUS_UPDATE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnGetStatusUpdateNotification command class
+ **/
+class OnStatusUpdateNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnGetStatusUpdateNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnStatusUpdateNotification(
+ 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 OnGetStatusUpdateNotification class destructor
+ **/
+ virtual ~OnStatusUpdateNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnStatusUpdateNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_STATUS_UPDATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_context_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_context_notification.h
new file mode 100644
index 0000000000..d4c940bac7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_context_notification.h
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile_api = mobile_apis;
+/**
+ * @brief OnSystemContextNotification command class
+ **/
+class OnSystemContextNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnSystemContextNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSystemContextNotification(
+ 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 OnSystemContextNotification class destructor
+ **/
+ virtual ~OnSystemContextNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSystemContextNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_error_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_error_notification.h
new file mode 100644
index 0000000000..76325b078f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_error_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_ERROR_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_ERROR_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSystemErrorNotification command class
+ **/
+class OnSystemErrorNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnSystemErrorNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSystemErrorNotification(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 OnSystemErrorNotification class destructor
+ **/
+ virtual ~OnSystemErrorNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSystemErrorNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_ERROR_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h
new file mode 100644
index 0000000000..1e4046b83b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_INFO_CHANGED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_INFO_CHANGED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSystemInfoChangedNotification command class
+ **/
+class OnSystemInfoChangedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnSystemInfoChangedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSystemInfoChangedNotification(
+ 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 OnSystemInfoChangedNotification class destructor
+ **/
+ virtual ~OnSystemInfoChangedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSystemInfoChangedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_INFO_CHANGED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_request_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_request_notification.h
new file mode 100644
index 0000000000..1e1e1818b8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_request_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSystemRequestNotification command class
+ **/
+class OnSystemRequestNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnSystemRequestNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSystemRequestNotification(
+ 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 OnSystemRequestNotification class destructor
+ **/
+ virtual ~OnSystemRequestNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSystemRequestNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_time_ready_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_time_ready_notification.h
new file mode 100644
index 0000000000..0beba8dc6b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_system_time_ready_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_TIME_READY_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_TIME_READY_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief OnSystemTimeReadyNotification command class.
+ * Notifies SDL whenever system time module is ready.
+ * It could be GPS or any other module which is allows
+ * to obtain system time. Once SDL receive this notification
+ * it is allowed to use GetSystemTimeRequest to rerieve system time.
+ */
+class OnSystemTimeReadyNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnSystemTimeReadyNotification create the command.
+ * @param message content of the command. Passed directy to base class.
+ */
+ OnSystemTimeReadyNotification(
+ 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_handler);
+
+ /**
+ * @brief ~OnSystemTimeReadyNotification destroys the command object.
+ */
+ ~OnSystemTimeReadyNotification();
+
+ /**
+ * @brief Run creates SystemTimeReady event
+ * and notifies all the subscribers.
+ */
+ void Run() FINAL;
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_SYSTEM_TIME_READY_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h
new file mode 100644
index 0000000000..33c7d98b6f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnTTSLanguageChangeNotification command class
+ **/
+class OnTTSLanguageChangeNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnTTSLanguageChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnTTSLanguageChangeNotification(
+ 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 OnTTSLanguageChangeNotification class destructor
+ **/
+ virtual ~OnTTSLanguageChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnTTSLanguageChangeNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h
new file mode 100644
index 0000000000..70050a667e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_RESET_TIMEOUT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_RESET_TIMEOUT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnTTSResetTimeoutNotification command class
+ **/
+class OnTTSResetTimeoutNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnTTSResetTimeoutNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnTTSResetTimeoutNotification(
+ 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 OnTTSResetTimeoutNotification class destructor
+ **/
+ virtual ~OnTTSResetTimeoutNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnTTSResetTimeoutNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_RESET_TIMEOUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h
new file mode 100644
index 0000000000..93dac3f292
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnTTSStartedNotification command class
+ **/
+class OnTTSStartedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnTTSStartedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnTTSStartedNotification(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 OnTTSStartedNotification class destructor
+ **/
+ virtual ~OnTTSStartedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnTTSStartedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h
new file mode 100644
index 0000000000..362e96f4be
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnTTSStoppedNotification command class
+ **/
+class OnTTSStoppedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnTTSStoppedNotification class constructor
+ *
+ * @param message Incoming SmartObject OnTTSStartedNotificationmessage
+ **/
+ OnTTSStoppedNotification(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 OnTTSStoppedNotification class destructor
+ **/
+ virtual ~OnTTSStoppedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnTTSStoppedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h
new file mode 100644
index 0000000000..0cc4e9e772
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUICommandNotification command class
+ **/
+class OnUICommandNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUICommandNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUICommandNotification(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 OnUICommandNotification class destructor
+ **/
+ virtual ~OnUICommandNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUICommandNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h
new file mode 100644
index 0000000000..c487894770
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnUIKeyBoardInputNotification command class
+ **/
+class OnUIKeyBoardInputNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUIKeyBoardInputNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUIKeyBoardInputNotification(
+ 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 OnUIKeyBoardInputNotification class destructor
+ **/
+ virtual ~OnUIKeyBoardInputNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUIKeyBoardInputNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h
new file mode 100644
index 0000000000..f30b8573aa
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUILanguageChangeNotification command class
+ **/
+class OnUILanguageChangeNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUILanguageChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUILanguageChangeNotification(
+ 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 OnUILanguageChangeNotification class destructor
+ **/
+ virtual ~OnUILanguageChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUILanguageChangeNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h
new file mode 100644
index 0000000000..bbdf4d04ef
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnUIResetTimeoutNotification command class
+ **/
+class OnUIResetTimeoutNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUIResetTimeoutNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUIResetTimeoutNotification(
+ 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 OnUIResetTimeoutNotification class destructor
+ **/
+ virtual ~OnUIResetTimeoutNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUIResetTimeoutNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h
new file mode 100644
index 0000000000..5c7dd0128b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnUITouchEventNotification command class
+ **/
+class OnUITouchEventNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUITouchEventNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUITouchEventNotification(
+ 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 OnUITouchEventNotification class destructor
+ **/
+ virtual ~OnUITouchEventNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUITouchEventNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_update_device_list.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_update_device_list.h
new file mode 100644
index 0000000000..2942c36053
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_update_device_list.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UPDATE_DEVICE_LIST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UPDATE_DEVICE_LIST_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUpdateDeviceList command class
+ **/
+class OnUpdateDeviceList : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUpdateDeviceList class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUpdateDeviceList(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 OnUpdateDeviceList class destructor
+ **/
+ virtual ~OnUpdateDeviceList();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUpdateDeviceList);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UPDATE_DEVICE_LIST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h
new file mode 100644
index 0000000000..ed0b1572ff
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIAccPedalPositionNotification command class
+ **/
+class OnVIAccPedalPositionNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIAccPedalPositionNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIAccPedalPositionNotification(
+ 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 OnVIAccPedalPositionNotification class destructor
+ **/
+ virtual ~OnVIAccPedalPositionNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIAccPedalPositionNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h
new file mode 100644
index 0000000000..cc81160ccb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIBeltStatusNotification command class
+ **/
+class OnVIBeltStatusNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIBeltStatusNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIBeltStatusNotification(
+ 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 OnVIBeltStatusNotification class destructor
+ **/
+ virtual ~OnVIBeltStatusNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIBeltStatusNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h
new file mode 100644
index 0000000000..2b46b69f55
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIBodyInformationNotification command class
+ **/
+class OnVIBodyInformationNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIBodyInformationNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIBodyInformationNotification(
+ 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 OnVIBodyInformationNotification class destructor
+ **/
+ virtual ~OnVIBodyInformationNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIBodyInformationNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h
new file mode 100644
index 0000000000..05da9a775d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIDeviceStatusNotification command class
+ **/
+class OnVIDeviceStatusNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIDeviceStatusNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIDeviceStatusNotification(
+ 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 OnVIDeviceStatusNotification class destructor
+ **/
+ virtual ~OnVIDeviceStatusNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIDeviceStatusNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h
new file mode 100644
index 0000000000..6640d7953a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIDriverBrakingNotification command class
+ **/
+class OnVIDriverBrakingNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIDriverBrakingNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIDriverBrakingNotification(
+ 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 OnVIDriverBrakingNotification class destructor
+ **/
+ virtual ~OnVIDriverBrakingNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIDriverBrakingNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h
new file mode 100644
index 0000000000..f8c0526f8c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIEngineTorqueNotification command class
+ **/
+class OnVIEngineTorqueNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIEngineTorqueNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIEngineTorqueNotification(
+ 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 OnVIEngineTorqueNotification class destructor
+ **/
+ virtual ~OnVIEngineTorqueNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIEngineTorqueNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h
new file mode 100644
index 0000000000..900aecd845
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIExternalTemperatureNotification command class
+ **/
+class OnVIExternalTemperatureNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIExternalTemperatureNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIExternalTemperatureNotification(
+ 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 OnVIExternalTemperatureNotification class destructor
+ **/
+ virtual ~OnVIExternalTemperatureNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIExternalTemperatureNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h
new file mode 100644
index 0000000000..7374de9ad9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIFuelLevelNotification command class
+ **/
+class OnVIFuelLevelNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIFuelLevelNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIFuelLevelNotification(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 OnVIFuelLevelNotification class destructor
+ **/
+ virtual ~OnVIFuelLevelNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIFuelLevelNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h
new file mode 100644
index 0000000000..a705fcbd04
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIFuelLevelStateNotification command class
+ **/
+class OnVIFuelLevelStateNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIFuelLevelStateNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIFuelLevelStateNotification(
+ 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 OnVIFuelLevelStateNotification class destructor
+ **/
+ virtual ~OnVIFuelLevelStateNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIFuelLevelStateNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h
new file mode 100644
index 0000000000..984e1e4c0b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIGpsDataNotification command class
+ **/
+class OnVIGpsDataNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIGpsDataNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIGpsDataNotification(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 OnVIGpsDataNotification class destructor
+ **/
+ virtual ~OnVIGpsDataNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIGpsDataNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h
new file mode 100644
index 0000000000..1dfda8a9e0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIHeadLampStatusNotification command class
+ **/
+class OnVIHeadLampStatusNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIHeadLampStatusNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIHeadLampStatusNotification(
+ 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 OnVIHeadLampStatusNotification class destructor
+ **/
+ virtual ~OnVIHeadLampStatusNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIHeadLampStatusNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h
new file mode 100644
index 0000000000..fd8743907c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIInstantFuelConsumptionNotification command class
+ **/
+class OnVIInstantFuelConsumptionNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIInstantFuelConsumptionNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIInstantFuelConsumptionNotification(
+ 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 OnVIInstantFuelConsumptionNotification class destructor
+ **/
+ virtual ~OnVIInstantFuelConsumptionNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIInstantFuelConsumptionNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h
new file mode 100644
index 0000000000..25ace2821d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIMyKeyNotification command class
+ **/
+class OnVIMyKeyNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIMyKeyNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIMyKeyNotification(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 OnVIMyKeyNotification class destructor
+ **/
+ virtual ~OnVIMyKeyNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIMyKeyNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h
new file mode 100644
index 0000000000..ad141e733c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIOdometerNotification command class
+ **/
+class OnVIOdometerNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIOdometerNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIOdometerNotification(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 OnVIOdometerNotification class destructor
+ **/
+ virtual ~OnVIOdometerNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIOdometerNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h
new file mode 100644
index 0000000000..95fb873957
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIPrndlNotification command class
+ **/
+class OnVIPrndlNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIPrndlNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIPrndlNotification(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 OnVIPrndlNotification class destructor
+ **/
+ virtual ~OnVIPrndlNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIPrndlNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h
new file mode 100644
index 0000000000..d4b121a96f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIRpmNotification command class
+ **/
+class OnVIRpmNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIRpmNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIRpmNotification(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 OnVIRpmNotification class destructor
+ **/
+ virtual ~OnVIRpmNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIRpmNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h
new file mode 100644
index 0000000000..4afaafc9ff
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVISpeedNotification command class
+ **/
+class OnVISpeedNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVISpeedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVISpeedNotification(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 OnVISpeedNotification class destructor
+ **/
+ virtual ~OnVISpeedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVISpeedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h
new file mode 100644
index 0000000000..0d0aeadad8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVISteeringWheelAngleNotification command class
+ **/
+class OnVISteeringWheelAngleNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVISteeringWheelAngleNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVISteeringWheelAngleNotification(
+ 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 OnVISteeringWheelAngleNotification class destructor
+ **/
+ virtual ~OnVISteeringWheelAngleNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVISteeringWheelAngleNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h
new file mode 100644
index 0000000000..c358ed37e9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVITirePressureNotification command class
+ **/
+class OnVITirePressureNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVITirePressureNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVITirePressureNotification(
+ 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 OnVITirePressureNotification class destructor
+ **/
+ virtual ~OnVITirePressureNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVITirePressureNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h
new file mode 100644
index 0000000000..75062a51e1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIVinNotification command class
+ **/
+class OnVIVinNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIVinNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIVinNotification(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 OnVIVinNotification class destructor
+ **/
+ virtual ~OnVIVinNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIVinNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h
new file mode 100644
index 0000000000..de7a5dfc9e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIWiperStatusNotification command class
+ **/
+class OnVIWiperStatusNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIWiperStatusNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIWiperStatusNotification(
+ 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 OnVIWiperStatusNotification class destructor
+ **/
+ virtual ~OnVIWiperStatusNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIWiperStatusNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h
new file mode 100644
index 0000000000..7a7cf3cd96
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVideoDataStreamingNotification command class
+ **/
+class OnVideoDataStreamingNotification
+ : public app_mngr::commands::NotificationToHMI {
+ public:
+ /**
+ * @brief OnVideoDataStreamingNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVideoDataStreamingNotification(
+ 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 OnVideoDataStreamingNotification class destructor
+ **/
+ virtual ~OnVideoDataStreamingNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVideoDataStreamingNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h
new file mode 100644
index 0000000000..3ef21fc568
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVRCommandNotification command class
+ **/
+class OnVRCommandNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVRCommandNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVRCommandNotification(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 OnVRCommandNotification class destructor
+ **/
+ virtual ~OnVRCommandNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVRCommandNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h
new file mode 100644
index 0000000000..e6bd39d46e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVRLanguageChangeNotification command class
+ **/
+class OnVRLanguageChangeNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVRLanguageChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVRLanguageChangeNotification(
+ 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 OnVRLanguageChangeNotification class destructor
+ **/
+ virtual ~OnVRLanguageChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVRLanguageChangeNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h
new file mode 100644
index 0000000000..abca9db91d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVRStartedNotification command class
+ **/
+class OnVRStartedNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVRStartedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVRStartedNotification(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 OnVRStartedNotification class destructor
+ **/
+ virtual ~OnVRStartedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVRStartedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h
new file mode 100644
index 0000000000..9b53214f8f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVRStoppedNotification command class
+ **/
+class OnVRStoppedNotification : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVRStoppedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVRStoppedNotification(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 OnVRStoppedNotification class destructor
+ **/
+ virtual ~OnVRStoppedNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVRStoppedNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VR_STOPPED_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
new file mode 100644
index 0000000000..8f94d4876a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_GET_CAPABILITIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_GET_CAPABILITIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief RCGetCapabilitiesRequest command class
+ **/
+class RCGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief RCGetCapabilitiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ RCGetCapabilitiesRequest(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 RCGetCapabilitiesRequest class destructor
+ **/
+ virtual ~RCGetCapabilitiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RCGetCapabilitiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_response.h
new file mode 100644
index 0000000000..dec31c9ea1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_GET_CAPABILITIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_GET_CAPABILITIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief RCGetCapabilitiesResponse command class
+ **/
+class RCGetCapabilitiesResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief RCGetCapabilitiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ RCGetCapabilitiesResponse(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 RCGetCapabilitiesResponse class destructor
+ **/
+ virtual ~RCGetCapabilitiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RCGetCapabilitiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_GET_CAPABILITIES_RESPONSE_H_
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
new file mode 100644
index 0000000000..3ba614f823
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h
@@ -0,0 +1,94 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_IS_READY_REQUEST_H_
+#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;
+
+namespace commands {
+
+/**
+ * @brief RCIsReadyRequest command class
+ **/
+class RCIsReadyRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief RCIsReadyRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ RCIsReadyRequest(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 RCIsReadyRequest class destructor
+ **/
+ virtual ~RCIsReadyRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ void onTimeOut() OVERRIDE;
+
+ /**
+ * @brief Send request to HMI for fetching of cappabilities
+ */
+ void SendMessageToHMI();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RCIsReadyRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_response.h
new file mode 100644
index 0000000000..93f30e795c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_IS_READY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_IS_READY_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief RCIsReadyResponse command class
+ **/
+class RCIsReadyResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief RCIsReadyResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ RCIsReadyResponse(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 RCIsReadyResponse class destructor
+ **/
+ virtual ~RCIsReadyResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RCIsReadyResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_request.h
new file mode 100644
index 0000000000..e97312b881
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_request.h
@@ -0,0 +1,114 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_ACTIVATE_APP_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_ACTIVATE_APP_REQUEST_H_
+
+#include "application_manager/commands/request_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLActivateAppRequest command class
+ **/
+class SDLActivateAppRequest : public app_mngr::commands::RequestFromHMI {
+ public:
+ /**
+ * @brief Applications registered over protocol v4
+ */
+ typedef std::vector<application_manager::ApplicationSharedPtr> V4ProtoApps;
+
+ /**
+ * @brief SDLActivateAppRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLActivateAppRequest(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 SDLActivateAppRequest class destructor
+ **/
+ ~SDLActivateAppRequest() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief onTimeOut allows to process case when timeout has appeared
+ * during request execution.
+ */
+ void onTimeOut() OVERRIDE;
+
+ /**
+ * @brief on_event allows to handle events
+ *
+ * @param event event type that current request subscribed on.
+ */
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ private:
+ uint32_t app_id() const;
+ uint32_t hmi_app_id(const smart_objects::SmartObject& so) const;
+
+ /**
+ * @brief Retrieves all v4 protocol applications for particular device
+ * @param handle Device handle
+ * @return List of applications registered over v4 protocol
+ */
+ V4ProtoApps get_v4_proto_apps(
+ const connection_handler::DeviceHandle handle) const;
+
+ /**
+ * @brief Get v4 protocol application reported as forgrounded on device
+ * @param handle Device
+ * @return Pointer to application or empty pointer
+ */
+ app_mngr::ApplicationSharedPtr get_foreground_app(
+ const connection_handler::DeviceHandle handle) const;
+
+ DISALLOW_COPY_AND_ASSIGN(SDLActivateAppRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_ACTIVATE_APP_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h
new file mode 100644
index 0000000000..7a3f5157da
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_ACTIVATE_APP_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_ACTIVATE_APP_RESPONSE_H_
+
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLActivateAppResponse command class
+ **/
+class SDLActivateAppResponse : public app_mngr::commands::ResponseToHMI {
+ public:
+ /**
+ * @brief SDLActivateAppResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLActivateAppResponse(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 SDLActivateAppResponse class destructor
+ **/
+ virtual ~SDLActivateAppResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLActivateAppResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_ACTIVATE_APP_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_request.h
new file mode 100644
index 0000000000..61426e0af3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_REQUEST_H_
+
+#include "application_manager/commands/request_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLGetListOfPermissionsRequest command class
+ **/
+class SDLGetListOfPermissionsRequest
+ : public app_mngr::commands::RequestFromHMI {
+ public:
+ /**
+ * @brief SDLGetListOfPermissionsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLGetListOfPermissionsRequest(
+ 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 SDLGetListOfPermissionsRequest class destructor
+ **/
+ virtual ~SDLGetListOfPermissionsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLGetListOfPermissionsRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h
new file mode 100644
index 0000000000..e2556bac3d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_RESPONSE_H_
+
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLGetListOfPermissionsResponse command class
+ **/
+class SDLGetListOfPermissionsResponse
+ : public app_mngr::commands::ResponseToHMI {
+ public:
+ /**
+ * @brief SDLGetListOfPermissionsResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLGetListOfPermissionsResponse(
+ 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 SDLGetListOfPermissionsResponse class destructor
+ **/
+ virtual ~SDLGetListOfPermissionsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLGetListOfPermissionsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_LIST_OF_PERMISSIONS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_request.h
new file mode 100644
index 0000000000..b6376bacc6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_request.h
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_REQUEST_H_
+
+#include "application_manager/commands/request_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLGetStatusUpdateRequest command class
+ **/
+class SDLGetStatusUpdateRequest : public app_mngr::commands::RequestFromHMI {
+ public:
+ /**
+ * @brief SDLGetStatusUpdateRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLGetStatusUpdateRequest(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 SDLGetStatusUpdateRequest class destructor
+ **/
+ virtual ~SDLGetStatusUpdateRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLGetStatusUpdateRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h
new file mode 100644
index 0000000000..4e6da22370
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_RESPONSE_H_
+
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLGetStatusUpdateResponse command class
+ **/
+class SDLGetStatusUpdateResponse : public app_mngr::commands::ResponseToHMI {
+ public:
+ /**
+ * @brief SDLGetStatusUpdateResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLGetStatusUpdateResponse(
+ 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 SDLGetStatusUpdateResponse class destructor
+ **/
+ virtual ~SDLGetStatusUpdateResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLGetStatusUpdateResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_STATUS_UPDATE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_request.h
new file mode 100644
index 0000000000..75902e2733
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_request.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_REQUEST_H_
+
+#include "application_manager/commands/request_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLGetUserFriendlyMessageRequest command class
+ **/
+class SDLGetUserFriendlyMessageRequest
+ : public app_mngr::commands::RequestFromHMI {
+ public:
+ /**
+ * @brief SDLGetUserFriendlyMessageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLGetUserFriendlyMessageRequest(
+ 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 SDLGetUserFriendlyMessageRequest class destructor
+ **/
+ virtual ~SDLGetUserFriendlyMessageRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLGetUserFriendlyMessageRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h
new file mode 100644
index 0000000000..a02d6894e3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_RESPONSE_H_
+
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SDLGetUserFriendlyMessageResponse command class
+ **/
+class SDLGetUserFriendlyMessageResponse
+ : public app_mngr::commands::ResponseToHMI {
+ public:
+ /**
+ * @brief SDLGetUserFriendlyMessageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLGetUserFriendlyMessageResponse(
+ 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 SDLGetUserFriendlyMessageResponse class destructor
+ **/
+ virtual ~SDLGetUserFriendlyMessageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLGetUserFriendlyMessageResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_GET_USER_FRIENDLY_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update.h
new file mode 100644
index 0000000000..f164aed775
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update.h
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_POLICY_UPDATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_POLICY_UPDATE_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class SDLPolicyUpdate : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief SDLPolicyUpdate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLPolicyUpdate(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);
+
+ ~SDLPolicyUpdate() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLPolicyUpdate);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_POLICY_UPDATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update_response.h
new file mode 100644
index 0000000000..63f33477b6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/sdl_policy_update_response.h
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_POLICY_UPDATE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_POLICY_UPDATE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class SDLPolicyUpdateResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief SDLPolicyUpdateResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SDLPolicyUpdateResponse(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 SDLPolicyUpdateResponse class destructor
+ **/
+ virtual ~SDLPolicyUpdateResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SDLPolicyUpdateResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_SDL_POLICY_UPDATE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h
new file mode 100644
index 0000000000..229ed92947
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSChangeRegistrationRequest command class
+ **/
+class TTSChangeRegistrationRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSChangeRegistrationRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSChangeRegistrationRequest(
+ 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 TTSChangeRegistrationRequest class destructor
+ **/
+ virtual ~TTSChangeRegistrationRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSChangeRegistrationRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_response.h
new file mode 100644
index 0000000000..8462178283
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_change_registration_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSChangeRegistratioResponse command class
+ **/
+class TTSChangeRegistratioResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSChangeRegistratioResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSChangeRegistratioResponse(
+ 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 TTSChangeRegistratioResponse class destructor
+ **/
+ virtual ~TTSChangeRegistratioResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSChangeRegistratioResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
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
new file mode 100644
index 0000000000..df6cf3b4a4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSGetCapabilitiesRequest command class
+ **/
+class TTSGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSGetCapabilitiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSGetCapabilitiesRequest(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 TTSGetCapabilitiesRequest class destructor
+ **/
+ virtual ~TTSGetCapabilitiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_response.h
new file mode 100644
index 0000000000..7919f213a4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSGetCapabilitiesResponse command class
+ **/
+class TTSGetCapabilitiesResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSGetCapabilitiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSGetCapabilitiesResponse(
+ 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 TTSGetCapabilitiesResponse class destructor
+ **/
+ virtual ~TTSGetCapabilitiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
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
new file mode 100644
index 0000000000..09345c02d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSGetLanguageRequest command class
+ **/
+class TTSGetLanguageRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSGetLanguageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSGetLanguageRequest(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 TTSGetLanguageRequest class destructor
+ **/
+ virtual ~TTSGetLanguageRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_response.h
new file mode 100644
index 0000000000..e52dbf1ada
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSGetLanguageResponse command class
+ **/
+class TTSGetLanguageResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSGetLanguageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSGetLanguageResponse(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 TTSGetLanguageResponse class destructor
+ **/
+ virtual ~TTSGetLanguageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
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
new file mode 100644
index 0000000000..c42d0257d3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSGetSupportedLanguagesRequest command class
+ **/
+class TTSGetSupportedLanguagesRequest
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSGetSupportedLanguagesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSGetSupportedLanguagesRequest(
+ 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 TTSGetSupportedLanguagesRequest class destructor
+ **/
+ virtual ~TTSGetSupportedLanguagesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_response.h
new file mode 100644
index 0000000000..cc24db22b9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSGetSupportedLanguagesResponse command class
+ **/
+class TTSGetSupportedLanguagesResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSGetSupportedLanguagesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSGetSupportedLanguagesResponse(
+ 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 TTSGetSupportedLanguagesResponse class destructor
+ **/
+ virtual ~TTSGetSupportedLanguagesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
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
new file mode 100644
index 0000000000..b7dffd5bde
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSIsReadyRequest command class
+ **/
+class TTSIsReadyRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief TTSIsReadyRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSIsReadyRequest(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_handler);
+
+ /**
+ * @brief TTSIsReadyRequest class destructor
+ **/
+ virtual ~TTSIsReadyRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ void onTimeOut() OVERRIDE;
+
+ /**
+ * @brief Send request to HMI for fetching of cappabilities
+ */
+ void SendMessageToHMI();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSIsReadyRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_response.h
new file mode 100644
index 0000000000..268edd0eeb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSIsReadyResponse command class
+ **/
+class TTSIsReadyResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSIsReadyResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSIsReadyResponse(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 TTSIsReadyResponse class destructor
+ **/
+ virtual ~TTSIsReadyResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSIsReadyResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
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
new file mode 100644
index 0000000000..f416b3a787
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSSetGlobalPropertiesRequest command class
+ **/
+class TTSSetGlobalPropertiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSSetGlobalPropertiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSSetGlobalPropertiesRequest(
+ 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_handler);
+
+ /**
+ * @brief TTSSetGlobalPropertiesRequest class destructor
+ **/
+ virtual ~TTSSetGlobalPropertiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_response.h
new file mode 100644
index 0000000000..ff5622296c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSSetGlobalPropertiesResponse command class
+ **/
+class TTSSetGlobalPropertiesResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSSetGlobalPropertiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSSetGlobalPropertiesResponse(
+ 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 TTSSetGlobalPropertiesResponse class destructor
+ **/
+ virtual ~TTSSetGlobalPropertiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_request.h
new file mode 100644
index 0000000000..9e8915a440
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSSpeakRequest command class
+ **/
+class TTSSpeakRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSSpeakRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSSpeakRequest(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 TTSSpeakRequest class destructor
+ **/
+ virtual ~TTSSpeakRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSSpeakRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_response.h
new file mode 100644
index 0000000000..e4b2c8adbd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_speak_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSSpeakResponse command class
+ **/
+class TTSSpeakResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSSpeakResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSSpeakResponse(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 TTSSpeakResponse class destructor
+ **/
+ virtual ~TTSSpeakResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSSpeakResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h
new file mode 100644
index 0000000000..8eb6a66c95
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSStopSpeakingRequest command class
+ **/
+class TTSStopSpeakingRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief TTSStopSpeakingRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSStopSpeakingRequest(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 TTSStopSpeakingRequest class destructor
+ **/
+ virtual ~TTSStopSpeakingRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSStopSpeakingRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_response.h
new file mode 100644
index 0000000000..d433fe2280
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_stop_speaking_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSStopSpeakingResponse command class
+ **/
+class TTSStopSpeakingResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSStopSpeakingResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ TTSStopSpeakingResponse(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 TTSStopSpeakingResponse class destructor
+ **/
+ virtual ~TTSStopSpeakingResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TTSStopSpeakingResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
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
new file mode 100644
index 0000000000..e5d2483576
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAddCommandRequest command class
+ **/
+class UIAddCommandRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIAddCommandRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIAddCommandRequest(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 UIAddCommandRequest class destructor
+ **/
+ virtual ~UIAddCommandRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIAddCommandRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_response.h
new file mode 100644
index 0000000000..90a9666561
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAddCommandResponse command class
+ **/
+class UIAddCommandResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIAddCommandResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIAddCommandResponse(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 UIAddCommandResponse class destructor
+ **/
+ virtual ~UIAddCommandResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIAddCommandResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
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
new file mode 100644
index 0000000000..5de5e41cd6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAddSubmenuRequest command class
+ **/
+class UIAddSubmenuRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIAddSubmenuRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIAddSubmenuRequest(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 UIAddSubmenuRequest class destructor
+ **/
+ virtual ~UIAddSubmenuRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_response.h
new file mode 100644
index 0000000000..20f830be27
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAddSubmenuResponse command class
+ **/
+class UIAddSubmenuResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIAddSubmenuResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIAddSubmenuResponse(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 UIAddSubmenuResponse class destructor
+ **/
+ virtual ~UIAddSubmenuResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_request.h
new file mode 100644
index 0000000000..6235a51c7d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ALERT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ALERT_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAlertRequest command class
+ **/
+class UIAlertRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIAlertRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIAlertRequest(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 UIAlertRequest class destructor
+ **/
+ virtual ~UIAlertRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIAlertRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ALERT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_response.h
new file mode 100644
index 0000000000..b43185af78
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_alert_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAlertResponse command class
+ **/
+class UIAlertResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIAlertResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIAlertResponse(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 UIAlertResponse class destructor
+ **/
+ virtual ~UIAlertResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIAlertResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h
new file mode 100644
index 0000000000..c504c55727
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIChangeRegistrationRequest command class
+ **/
+class UIChangeRegistrationRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIChangeRegistrationRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIChangeRegistrationRequest(
+ 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_handlel);
+
+ /**
+ * @brief UIChangeRegistrationRequest class destructor
+ **/
+ virtual ~UIChangeRegistrationRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIChangeRegistrationRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_response.h
new file mode 100644
index 0000000000..d7fca83d3e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_change_registration_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIChangeRegistratioResponse command class
+ **/
+class UIChangeRegistratioResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIChangeRegistratioResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIChangeRegistratioResponse(
+ 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 UIChangeRegistratioResponse class destructor
+ **/
+ virtual ~UIChangeRegistratioResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIChangeRegistratioResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h
new file mode 100644
index 0000000000..ecc0b44495
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIDeleteCommandRequest command class
+ **/
+class UIDeleteCommandRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIDeleteCommandRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIDeleteCommandRequest(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 UIDeleteCommandRequest class destructor
+ **/
+ virtual ~UIDeleteCommandRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIDeleteCommandRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_response.h
new file mode 100644
index 0000000000..f9601b7491
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_command_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIDeleteCommandResponse command class
+ **/
+class UIDeleteCommandResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIDeleteCommandResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIDeleteCommandResponse(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 UIDeleteCommandResponse class destructor
+ **/
+ virtual ~UIDeleteCommandResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIDeleteCommandResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h
new file mode 100644
index 0000000000..3161c84b7c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIAddSubmenuRequest command class
+ **/
+class UIDeleteSubmenuRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIDeleteSubmenuRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIDeleteSubmenuRequest(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 UIDeleteSubmenuRequest class destructor
+ **/
+ virtual ~UIDeleteSubmenuRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIDeleteSubmenuRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_response.h
new file mode 100644
index 0000000000..7c73a53c3e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_delete_submenu_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIDeleteSubmenuResponse command class
+ **/
+class UIDeleteSubmenuResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIDeleteSubmenuResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIDeleteSubmenuResponse(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 UIDeleteSubmenuResponse class destructor
+ **/
+ virtual ~UIDeleteSubmenuResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIDeleteSubmenuResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h
new file mode 100644
index 0000000000..8d34e1852b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIEndAudioPassThruRequest command class
+ * When this request is invoked, the audio capture stops
+ **/
+class UIEndAudioPassThruRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIEndAudioPassThruRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIEndAudioPassThruRequest(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 UIEndAudioPassThruRequest class destructor
+ **/
+ virtual ~UIEndAudioPassThruRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIEndAudioPassThruRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_response.h
new file mode 100644
index 0000000000..b1c3bfd87a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIEndAudioPassThruResponse command class
+ **/
+class UIEndAudioPassThruResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIEndAudioPassThruResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIEndAudioPassThruResponse(
+ 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 UIEndAudioPassThruResponse class destructor
+ **/
+ virtual ~UIEndAudioPassThruResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIEndAudioPassThruResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
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
new file mode 100644
index 0000000000..47782cc7a9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIGetCapabilitiesRequest command class
+ **/
+class UIGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIGetCapabilitiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIGetCapabilitiesRequest(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 UIGetCapabilitiesRequest class destructor
+ **/
+ virtual ~UIGetCapabilitiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_response.h
new file mode 100644
index 0000000000..421844560d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIGetCapabilitiesResponse command class
+ **/
+class UIGetCapabilitiesResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIGetCapabilitiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIGetCapabilitiesResponse(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 UIGetCapabilitiesResponse class destructor
+ **/
+ virtual ~UIGetCapabilitiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
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
new file mode 100644
index 0000000000..7c82584178
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIGetLanguageRequest command class
+ **/
+class UIGetLanguageRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIGetLanguageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIGetLanguageRequest(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 UIGetLanguageRequest class destructor
+ **/
+ virtual ~UIGetLanguageRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIGetLanguageRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_response.h
new file mode 100644
index 0000000000..7354e87ee4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIGetLanguageResponse command class
+ **/
+class UIGetLanguageResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIGetLanguageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIGetLanguageResponse(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 UIGetLanguageResponse class destructor
+ **/
+ virtual ~UIGetLanguageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIGetLanguageResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
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
new file mode 100644
index 0000000000..7fd456b92b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIGetSupportedLanguagesRequest command class
+ **/
+class UIGetSupportedLanguagesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIGetSupportedLanguagesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIGetSupportedLanguagesRequest(
+ 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 UIGetSupportedLanguagesRequest class destructor
+ **/
+ virtual ~UIGetSupportedLanguagesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_response.h
new file mode 100644
index 0000000000..26d8e98892
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIGetSupportedLanguagesResponse command class
+ **/
+class UIGetSupportedLanguagesResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIGetSupportedLanguagesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIGetSupportedLanguagesResponse(
+ 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 UIGetSupportedLanguagesResponse class destructor
+ **/
+ virtual ~UIGetSupportedLanguagesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
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
new file mode 100644
index 0000000000..2e7806cd2b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIIsReadyRequest command class
+ **/
+class UIIsReadyRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief UIIsReadyRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIIsReadyRequest(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 UIIsReadyRequest class destructor
+ **/
+ virtual ~UIIsReadyRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ virtual void onTimeOut() OVERRIDE;
+
+ /**
+ * @brief Send request to HMI for fetching of cappabilities
+ */
+ void SendMessageToHMI();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIIsReadyRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_response.h
new file mode 100644
index 0000000000..f2b4f201f3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIIsReadyResponse command class
+ **/
+class UIIsReadyResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIIsReadyResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIIsReadyResponse(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 UIIsReadyResponse class destructor
+ **/
+ virtual ~UIIsReadyResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIIsReadyResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h
new file mode 100644
index 0000000000..6d4e870228
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIPerformAudioPassThruRequest command class
+ **/
+class UIPerformAudioPassThruRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIPerformAudioPassThruRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIPerformAudioPassThruRequest(
+ 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 UIPerformAudioPassThruRequest class destructor
+ **/
+ virtual ~UIPerformAudioPassThruRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIPerformAudioPassThruRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_response.h
new file mode 100644
index 0000000000..e36a292573
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIPerformAudioPassThruResponse command class
+ **/
+class UIPerformAudioPassThruResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIPerformAudioPassThruResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIPerformAudioPassThruResponse(
+ 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 UIPerformAudioPassThruResponse class destructor
+ **/
+ virtual ~UIPerformAudioPassThruResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIPerformAudioPassThruResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h
new file mode 100644
index 0000000000..ff4540de23
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIPerformInteractionRequest command class
+ **/
+class UIPerformInteractionRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIPerformInteractionRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIPerformInteractionRequest(
+ 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 UIPerformInteractionRequest class destructor
+ **/
+ virtual ~UIPerformInteractionRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIPerformInteractionRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_response.h
new file mode 100644
index 0000000000..caf5716e18
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_perform_interaction_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIPerformInteractionResponse command class
+ **/
+class UIPerformInteractionResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIPerformInteractionResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIPerformInteractionResponse(
+ 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 UIPerformInteractionResponse class destructor
+ **/
+ virtual ~UIPerformInteractionResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIPerformInteractionResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h
new file mode 100644
index 0000000000..f5acf41c8d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIScrollableMessageRequest command class
+ **/
+class UIScrollableMessageRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIScrollableMessageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIScrollableMessageRequest(
+ 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 UIScrollableMessageRequest class destructor
+ **/
+ virtual ~UIScrollableMessageRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIScrollableMessageRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_response.h
new file mode 100644
index 0000000000..e46265c0e4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_scrollable_message_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIScrollableMessageResponse command class
+ **/
+class UIScrollableMessageResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIScrollableMessageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIScrollableMessageResponse(
+ 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 UIScrollableMessageResponse class destructor
+ **/
+ virtual ~UIScrollableMessageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIScrollableMessageResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h
new file mode 100644
index 0000000000..4e260a99ff
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISendHapticDataRequest command class
+ **/
+class UISendHapticDataRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISendHapticDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ * @param application_manager Reference of application manager
+ **/
+ UISendHapticDataRequest(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 UISendHapticDataRequest class destructor
+ **/
+ ~UISendHapticDataRequest() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISendHapticDataRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h
new file mode 100644
index 0000000000..1bf38939be
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISendHapticDataResponse command class
+ **/
+class UISendHapticDataResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISendHapticDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ * @param application_manager Reference of application manager
+ **/
+ UISendHapticDataResponse(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 UISendHapticDataResponse class destructor
+ **/
+ ~UISendHapticDataResponse() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISendHapticDataResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h
new file mode 100644
index 0000000000..ea526df135
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_APP_ICON_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_APP_ICON_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetIconRequest command class
+ **/
+class UISetAppIconRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISetIconRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetAppIconRequest(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 UISetIconRequest class destructor
+ **/
+ virtual ~UISetAppIconRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetAppIconRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_APP_ICON_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_response.h
new file mode 100644
index 0000000000..af2c4fafea
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_app_icon_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_APP_ICON_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_APP_ICON_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetIconResponse command class
+ **/
+class UISetAppIconResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISetIconResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetAppIconResponse(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 UISetIconResponse class destructor
+ **/
+ virtual ~UISetAppIconResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetAppIconResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_APP_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h
new file mode 100644
index 0000000000..f60f7325fd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h
@@ -0,0 +1,76 @@
+/* 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UiSetDisplayLayoutRequest command class
+ **/
+class UiSetDisplayLayoutRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UiSetDisplayLayoutRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UiSetDisplayLayoutRequest(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 UiSetDisplayLayoutRequest class destructor
+ **/
+ virtual ~UiSetDisplayLayoutRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UiSetDisplayLayoutRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h
new file mode 100644
index 0000000000..ce404a4049
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UiSetDisplayLayoutResponse command class
+ **/
+class UiSetDisplayLayoutResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UiSetDisplayLayoutResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UiSetDisplayLayoutResponse(
+ 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 UiSetDisplayLayoutResponse class destructor
+ **/
+ virtual ~UiSetDisplayLayoutResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UiSetDisplayLayoutResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
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
new file mode 100644
index 0000000000..44e8bba450
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetGlobalPropertiesRequest command class
+ **/
+class UISetGlobalPropertiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISetGlobalPropertiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetGlobalPropertiesRequest(
+ 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 UIShowRequest class destructor
+ **/
+ virtual ~UISetGlobalPropertiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_response.h
new file mode 100644
index 0000000000..a9c27a423b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetGlobalPropertiesResponse command class
+ **/
+class UISetGlobalPropertiesResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISetGlobalPropertiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetGlobalPropertiesResponse(
+ 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 UISetGlobalPropertiesResponse class destructor
+ **/
+ virtual ~UISetGlobalPropertiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_request.h
new file mode 100644
index 0000000000..84c275ec5a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetIconRequest command class
+ **/
+class UISetIconRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISetIconRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetIconRequest(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 UISetIconRequest class destructor
+ **/
+ virtual ~UISetIconRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetIconRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_response.h
new file mode 100644
index 0000000000..654dff25b5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_icon_response.h
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetIconResponse command class
+ **/
+class UISetIconResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISetIconResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetIconResponse(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief UISetIconResponse class destructor
+ **/
+ virtual ~UISetIconResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetIconResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h
new file mode 100644
index 0000000000..24f4d76d89
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetMediaClockTimerRequest command class
+ **/
+class UISetMediaClockTimerRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISetMediaClockTimerRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetMediaClockTimerRequest(
+ 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 UISetMediaClockTimerRequest class destructor
+ **/
+ virtual ~UISetMediaClockTimerRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetMediaClockTimerRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_response.h
new file mode 100644
index 0000000000..c664bd04f9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISetMediaClockTimerResponse command class
+ **/
+class UISetMediaClockTimerResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISetMediaClockTimerResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISetMediaClockTimerResponse(
+ 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 UISetMediaClockTimerResponse class destructor
+ **/
+ virtual ~UISetMediaClockTimerResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISetMediaClockTimerResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_request.h
new file mode 100644
index 0000000000..7ba950d530
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIShowRequest command class
+ **/
+class UIShowRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIShowRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIShowRequest(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 UIShowRequest class destructor
+ **/
+ virtual ~UIShowRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIShowRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_response.h
new file mode 100644
index 0000000000..f9f7a61056
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIShowResponse command class
+ **/
+class UIShowResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIShowResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UIShowResponse(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 UIShowResponse class destructor
+ **/
+ virtual ~UIShowResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIShowResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_request.h
new file mode 100644
index 0000000000..3de1b4e775
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ButtonGetCapabilitiesRequest command class
+ **/
+class UISliderRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISliderRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISliderRequest(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 UISliderRequest class destructor
+ **/
+ virtual ~UISliderRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISliderRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_response.h
new file mode 100644
index 0000000000..17d1f8a8ed
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_slider_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISliderResponse command class
+ **/
+class UISliderResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISliderResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISliderResponse(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 UISliderResponse class destructor
+ **/
+ virtual ~UISliderResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISliderResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_request.h
new file mode 100644
index 0000000000..dc0166e33f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_APP_LIST_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_APP_LIST_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateAppListRequest command class
+ **/
+class UpdateAppListRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UpdateAppListRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateAppListRequest(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 UpdateAppListRequest class destructor
+ **/
+ virtual ~UpdateAppListRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpdateAppListRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_APP_LIST_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_response.h
new file mode 100644
index 0000000000..2e3bb79233
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_app_list_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_APP_LIST_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_APP_LIST_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateAppListResponse command class
+ **/
+class UpdateAppListResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UpdateAppListResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateAppListResponse(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 UpdateAppListResponse class destructor
+ **/
+ virtual ~UpdateAppListResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpdateAppListResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_APP_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_request.h
new file mode 100644
index 0000000000..c4c9f11e06
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_request.h
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_DEVICE_LIST_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_DEVICE_LIST_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/event_engine/event_observer.h"
+#include "utils/lock.h"
+#include "utils/conditional_variable.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateDeviceListRequest command class
+ **/
+class UpdateDeviceListRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief UpdateDeviceListRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateDeviceListRequest(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 UpdateDeviceListRequest class destructor
+ **/
+ ~UpdateDeviceListRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ * Need to observe OnHMIReady event, to send UpdateDeviceListRequest
+ * when HMI will be ready
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ /**
+ * @brief Need to stop execution StopMethod if HMI did not started
+ */
+ virtual bool CleanUp();
+
+ private:
+ sync_primitives::Lock wait_hmi_lock;
+ sync_primitives::ConditionalVariable termination_condition_;
+
+ DISALLOW_COPY_AND_ASSIGN(UpdateDeviceListRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_DEVICE_LIST_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_response.h
new file mode 100644
index 0000000000..c33518a545
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_device_list_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateDeviceListResponse command class
+ **/
+class UpdateDeviceListResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UpdateDeviceListResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateDeviceListResponse(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 UpdateDeviceListResponse class destructor
+ **/
+ virtual ~UpdateDeviceListResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpdateDeviceListResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_request.h
new file mode 100644
index 0000000000..e30b045fcb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_SDL_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_SDL_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateSDLRequest command class
+ **/
+class UpdateSDLRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UpdateSDLRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateSDLRequest(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 UpdateSDLRequest class destructor
+ **/
+ virtual ~UpdateSDLRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpdateSDLRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_SDL_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_response.h
new file mode 100644
index 0000000000..f71921ea3a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/update_sdl_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_SDL_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_SDL_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateSDLResponse command class
+ **/
+class UpdateSDLResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UpdateSDLResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateSDLResponse(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 UpdateSDLResponse class destructor
+ **/
+ virtual ~UpdateSDLResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpdateSDLResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UPDATE_SDL_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_request_template.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_request_template.h
new file mode 100644
index 0000000000..0c3c63c32c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_request_template.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_TEMPLATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_TEMPLATE_H_
+
+#include "application_manager/event_engine/event.h"
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief VIGetVehicleDataRequestTemplate command class
+ *
+ * Template class for sending 1 subscribe thin request
+ **/
+template <event_engine::Event::EventID eventID>
+class VIGetVehicleDataRequestTemplate
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIGetVehicleDataRequestTemplate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetVehicleDataRequestTemplate(
+ 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)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ /**
+ * @brief Execute command with sending DBus thin request to HMI
+ **/
+ virtual void Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataRequestTemplate<eventID>);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_response_template.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_response_template.h
new file mode 100644
index 0000000000..e28c55ba12
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_response_template.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
+
+#include "application_manager/event_engine/event.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief VIGetVehicleDataResponseTemplate command class
+ **/
+template <event_engine::Event::EventID eventID>
+class VIGetVehicleDataResponseTemplate : public ResponseFromHMI {
+ public:
+ /**
+ * @brief VIGetVehicleDataResponseTemplate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetVehicleDataResponseTemplate(
+ 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)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(eventID);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataResponseTemplate<eventID>);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_request_template.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_request_template.h
new file mode 100644
index 0000000000..b74d013a82
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_request_template.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
+
+#include "application_manager/event_engine/event.h"
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief VISubscriveVehicleDataRequestTemplate command class
+ *
+ * Template class for sending 1 subscribe thin request
+ **/
+template <event_engine::Event::EventID eventID>
+class VISubscribeVehicleDataRequestTemplate
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VISubscriveVehicleDataRequestTemplate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VISubscribeVehicleDataRequestTemplate(
+ 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)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ /**
+ * @brief Execute command with sending DBus thin request to HMI
+ **/
+ virtual void Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataRequestTemplate<eventID>);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_response_template.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_response_template.h
new file mode 100644
index 0000000000..42dba56345
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_response_template.h
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
+
+#include "application_manager/event_engine/event.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+/**
+ * @brief VISubscriveVehicleDataResponseTemplate command class
+ **/
+template <event_engine::Event::EventID eventID>
+class VISubscribeVehicleDataResponseTemplate : public ResponseFromHMI {
+ public:
+ /**
+ * @brief VISubscriveVehicleDataResponseTemplate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VISubscribeVehicleDataResponseTemplate(
+ 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)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(eventID);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataResponseTemplate<eventID>);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
new file mode 100644
index 0000000000..2cb5d622b1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
+
+#include "application_manager/event_engine/event.h"
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief VIUnsubscriveVehicleDataRequestTemplate command class
+ *
+ * Template class for sending 1 unsubscribe thin request
+ **/
+template <event_engine::Event::EventID eventID>
+class VIUnsubscribeVehicleDataRequestTemplate
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIUnsubscriveVehicleDataRequestTemplate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIUnsubscribeVehicleDataRequestTemplate(
+ 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)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ /**
+ * @brief Execute command with sending DBus thin request to HMI
+ **/
+ virtual void Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataRequestTemplate<eventID>);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
new file mode 100644
index 0000000000..6138aa59fb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
+
+#include "application_manager/event_engine/event.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+/**
+ * @brief VIUnsubscriveVehicleDataResponseTemplate command class
+ **/
+template <event_engine::Event::EventID eventID>
+class VIUnsubscribeVehicleDataResponseTemplate : public ResponseFromHMI {
+ public:
+ /**
+ * @brief VISubscriveVehicleDataResponseTemplate class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIUnsubscribeVehicleDataResponseTemplate(
+ 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)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(eventID);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataResponseTemplate<eventID>);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_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
new file mode 100644
index 0000000000..0abb37adbc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRAddCommandRequest command class
+ **/
+class VRAddCommandRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRAddCommandRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRAddCommandRequest(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 VRAddCommandRequest class destructor
+ **/
+ virtual ~VRAddCommandRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRAddCommandRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_response.h
new file mode 100644
index 0000000000..5f9c99a483
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRAddCommandResponse command class
+ **/
+class VRAddCommandResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRAddCommandResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRAddCommandResponse(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 VRAddCommandResponse class destructor
+ **/
+ virtual ~VRAddCommandResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRAddCommandResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h
new file mode 100644
index 0000000000..4af28cb542
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRChangeRegistrationRequest command class
+ **/
+class VRChangeRegistrationRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRChangeRegistrationRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRChangeRegistrationRequest(
+ 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 VRChangeRegistrationRequest class destructor
+ **/
+ virtual ~VRChangeRegistrationRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRChangeRegistrationRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_response.h
new file mode 100644
index 0000000000..a80df0968b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_change_registration_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRChangeRegistrationResponse command class
+ **/
+class VRChangeRegistrationResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRChangeRegistrationResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRChangeRegistrationResponse(
+ 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 VRChangeRegistrationResponse class destructor
+ **/
+ virtual ~VRChangeRegistrationResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRChangeRegistrationResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h
new file mode 100644
index 0000000000..0ed9521ec5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRDeleteCommandRequest command class
+ **/
+class VRDeleteCommandRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRDeleteCommandRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRDeleteCommandRequest(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 VRDeleteCommandRequest class destructor
+ **/
+ virtual ~VRDeleteCommandRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRDeleteCommandRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_response.h
new file mode 100644
index 0000000000..63efcab355
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_delete_command_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRDeleteCommandResponse command class
+ **/
+class VRDeleteCommandResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRDeleteCommandResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRDeleteCommandResponse(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 VRDeleteCommandResponse class destructor
+ **/
+ virtual ~VRDeleteCommandResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRDeleteCommandResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
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
new file mode 100644
index 0000000000..f8ac83af58
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRGetCapabilitiesRequest command class
+ **/
+class VRGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRGetCapabilitiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRGetCapabilitiesRequest(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 VRGetCapabilitiesRequest class destructor
+ **/
+ virtual ~VRGetCapabilitiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_response.h
new file mode 100644
index 0000000000..9c9bb55b1b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRGetCapabilitiesResponse command class
+ **/
+class VRGetCapabilitiesResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRGetCapabilitiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRGetCapabilitiesResponse(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 VRGetCapabilitiesResponse class destructor
+ **/
+ virtual ~VRGetCapabilitiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
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
new file mode 100644
index 0000000000..e764cbef91
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRGetLanguageRequest command class
+ **/
+class VRGetLanguageRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRGetLanguageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRGetLanguageRequest(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 VRGetLanguageRequest class destructor
+ **/
+ virtual ~VRGetLanguageRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRGetLanguageRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_response.h
new file mode 100644
index 0000000000..470fe3ebdc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRGetLanguageResponse command class
+ **/
+class VRGetLanguageResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRGetLanguageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRGetLanguageResponse(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 VRGetLanguageResponse class destructor
+ **/
+ virtual ~VRGetLanguageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRGetLanguageResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
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
new file mode 100644
index 0000000000..8d9e9e2a61
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRGetSupportedLanguagesRequest command class
+ **/
+class VRGetSupportedLanguagesRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRGetSupportedLanguagesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRGetSupportedLanguagesRequest(
+ 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 VRGetSupportedLanguagesRequest class destructor
+ **/
+ virtual ~VRGetSupportedLanguagesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_response.h
new file mode 100644
index 0000000000..735844cd99
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRGetSupportedLanguagesResponse command class
+ **/
+class VRGetSupportedLanguagesResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRGetSupportedLanguagesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRGetSupportedLanguagesResponse(
+ 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 VRGetSupportedLanguagesResponse class destructor
+ **/
+ virtual ~VRGetSupportedLanguagesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
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
new file mode 100644
index 0000000000..0b580f6c1d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h
@@ -0,0 +1,94 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
+#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"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRIsReadyRequest command class
+ **/
+class VRIsReadyRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief VRIsReadyRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRIsReadyRequest(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 VRIsReadyRequest class destructor
+ **/
+ virtual ~VRIsReadyRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ void onTimeOut() OVERRIDE;
+
+ /**
+ * @brief Send request to HMI for fetching of cappabilities
+ */
+ void SendMessageToHMI();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRIsReadyRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_response.h
new file mode 100644
index 0000000000..42c47f5077
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRIsReadyResponse command class
+ **/
+class VRIsReadyResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VRIsReadyResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRIsReadyResponse(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 VRIsReadyResponse class destructor
+ **/
+ virtual ~VRIsReadyResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRIsReadyResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h
new file mode 100644
index 0000000000..6f206c010f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_PERFORM_INTERACTION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_PERFORM_INTERACTION_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VRPerformInteractionRequest command class
+ **/
+class VRPerformInteractionRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VRPerformInteractionRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRPerformInteractionRequest(
+ 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 VRPerformInteractionRequest class destructor
+ **/
+ virtual ~VRPerformInteractionRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRPerformInteractionRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_PERFORM_INTERACTION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_response.h
new file mode 100644
index 0000000000..9e8599419f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_perform_interaction_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_PERFORM_INTERACTION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_PERFORM_INTERACTION_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief TTSPerformInteractionResponse command class
+ **/
+class VRPerformInteractionResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief TTSPerformInteractionResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VRPerformInteractionResponse(
+ 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 TTSPerformInteractionResponse class destructor
+ **/
+ virtual ~VRPerformInteractionResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VRPerformInteractionResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h
new file mode 100644
index 0000000000..745fb3ec18
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h
@@ -0,0 +1,169 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_COMMAND_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_COMMAND_REQUEST_H_
+
+#include <string>
+
+#include "application_manager/application.h"
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AddCommandRequest command class
+ **/
+class AddCommandRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief AddCommandRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AddCommandRequest(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_handler);
+
+ /**
+ * @brief AddCommandRequest class destructor
+ **/
+ ~AddCommandRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Function is called by RequestController when request execution time
+ * has exceed it's limit
+ */
+ void onTimeOut() FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /*
+ * @brief Check if command name doesn't exist in application
+ * Please see SDLAQ-CRS-407 for more information
+ *
+ * @param app Mobile application
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool CheckCommandName(app_mngr::ApplicationConstSharedPtr app);
+
+ /*
+ * @brief Check if command VR synonyms doesn't exist in application commands
+ * Please see SDLAQ-CRS-407 for more information
+ *
+ * @param app Mobile application
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool CheckCommandVRSynonym(app_mngr::ApplicationConstSharedPtr app);
+
+ /*
+ * @brief Check if command parent ID exists in submenu map
+ *
+ * @param app Mobile application
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool CheckCommandParentId(app_mngr::ApplicationConstSharedPtr app);
+
+ /**
+ * @brief Removes command from list when HMI sends negative response or
+ * HMI does not answer on addCommand request.
+ */
+ void RemoveCommand();
+
+ DISALLOW_COPY_AND_ASSIGN(AddCommandRequest);
+
+ /*
+ * @brief Check if there some not delivered hmi responses exist
+ *
+ * @return true if all responses received
+ */
+ bool IsPendingResponseExist();
+
+ /**
+ * @brief Checks add command param
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if add command contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ inline bool BothSend() const;
+
+ /**
+ * @brief GenerateMobileResponseInfo generated info for mobile response
+ * depends from UI and VR responses
+ * @return info for mobile response
+ */
+ const std::string GenerateMobileResponseInfo();
+ bool send_ui_;
+ bool send_vr_;
+
+ bool is_ui_received_;
+ bool is_vr_received_;
+
+ std::string ui_info_;
+ std::string vr_info_;
+
+ hmi_apis::Common_Result::eType ui_result_;
+ hmi_apis::Common_Result::eType vr_result_;
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_response.h
new file mode 100644
index 0000000000..fb3f172b0b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_COMMAND_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_COMMAND_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AddCommandResponse command class
+ **/
+class AddCommandResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief AddCommandResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AddCommandResponse(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_handler);
+
+ /**
+ * @brief AddCommandResponse class destructor
+ **/
+ virtual ~AddCommandResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AddCommandResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_request.h
new file mode 100644
index 0000000000..37ba9a5990
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_request.h
@@ -0,0 +1,97 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_SUB_MENU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_SUB_MENU_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AddSubMenuRequest command class
+ **/
+class AddSubMenuRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief AddSubMenuRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AddSubMenuRequest(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_handler);
+
+ /**
+ * @brief AddSubMenuRequest class destructor
+ **/
+ ~AddSubMenuRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /*
+ * @brief Check if submenu name is valid
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool CheckSubMenuName();
+
+ DISALLOW_COPY_AND_ASSIGN(AddSubMenuRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_SUB_MENU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_response.h
new file mode 100644
index 0000000000..253556f899
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_sub_menu_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_SUB_MENU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_SUB_MENU_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AddSubMenuResponse command class
+ **/
+class AddSubMenuResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief AddSubMenuResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AddSubMenuResponse(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_handler);
+
+ /**
+ * @brief AddSubMenuResponse class destructor
+ **/
+ virtual ~AddSubMenuResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AddSubMenuResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ADD_SUB_MENU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_request.h
new file mode 100644
index 0000000000..93f716cb65
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_request.h
@@ -0,0 +1,110 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_MANEUVER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_MANEUVER_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/commands/pending.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AlertManeuverRequest command class
+ **/
+class AlertManeuverRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief AlertManeuverRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AlertManeuverRequest(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_handler);
+
+ /**
+ * @brief AlertManeuverRequest class destructor
+ **/
+ virtual ~AlertManeuverRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /**
+ * @brief Prepare parameters for sending to mobile application
+ * @param result_code contains result code for sending to mobile application
+ * @param return_info contains resulting info for sending to mobile
+ * application
+ * @return result for sending to mobile application.
+ */
+ bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
+ std::string& return_info);
+ /**
+ * @brief Checks alert maneuver params(ttsChunks, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if alert maneuver contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ hmi_apis::Common_Result::eType tts_speak_result_code_;
+ hmi_apis::Common_Result::eType navi_alert_maneuver_result_code_;
+ std::string info_navi_;
+ std::string info_tts_;
+ app_mngr::commands::Pending pending_requests_;
+
+ DISALLOW_COPY_AND_ASSIGN(AlertManeuverRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_MANEUVER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_response.h
new file mode 100644
index 0000000000..8b21aa64eb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_maneuver_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_MANEUVER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_MANEUVER_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AlertManeuverResponse command class
+ **/
+class AlertManeuverResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief AlertManeuverResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AlertManeuverResponse(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_handler);
+
+ /**
+ * @brief AlertManeuverResponse class destructor
+ **/
+ virtual ~AlertManeuverResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AlertManeuverResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_MANEUVER_RESPONSE_H_
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
new file mode 100644
index 0000000000..e34653daf4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h
@@ -0,0 +1,154 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_REQUEST_H_
+
+#include <string>
+
+#include "application_manager/commands/command_request_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AlertRequest command class
+ **/
+class AlertRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief AlertRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AlertRequest(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_handler);
+
+ /**
+ * @brief AlertRequest class destructor
+ **/
+ virtual ~AlertRequest();
+
+ /**
+ * @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 Alert request
+ *
+ * @param app_id Id of application requested this RPC
+ */
+ void SendAlertRequest(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 CheckStringsOfAlertRequest();
+
+ /*
+ * @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_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_;
+ hmi_apis::Common_Result::eType tts_speak_result_;
+ std::string ui_response_info_;
+ std::string tts_response_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(AlertRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_response.h
new file mode 100644
index 0000000000..4ae95fb979
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief AlertResponse command class
+ **/
+class AlertResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief AlertResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ AlertResponse(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_handler);
+
+ /**
+ * @brief AlertResponse class destructor
+ **/
+ virtual ~AlertResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AlertResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ALERT_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_request.h
new file mode 100644
index 0000000000..bd5c34ebd1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_request.h
@@ -0,0 +1,191 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
+
+#include <strings.h>
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/commands/pending.h"
+#include "utils/macro.h"
+#include "utils/custom_string.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+/**
+ * @brief ChangeRegistrationRequest command class
+ **/
+class ChangeRegistrationRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ChangeRegistrationRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ChangeRegistrationRequest(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_handler);
+
+ /**
+ * @brief ChangeRegistrationRequest class destructor
+ **/
+ virtual ~ChangeRegistrationRequest();
+
+ /**
+ * @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);
+
+ private:
+ /*
+ * @brief Search for requested language in HMI UI supported languages
+ *
+ * @return true if language supported by UI, otherwise false
+ */
+ bool IsLanguageSupportedByUI(const int32_t& hmi_display_lang);
+
+ /*
+ * @brief Search for requested language in HMI VR supported languages
+ *
+ * @return true if language supported by VR, otherwise false
+ */
+ bool IsLanguageSupportedByVR(const int32_t& hmi_display_lang);
+
+ /*
+ * @brief Search for requested language in HMI TTS supported languages
+ *
+ * @return true if language supported by TTS, otherwise false
+ */
+ bool IsLanguageSupportedByTTS(const int32_t& hmi_display_lang);
+
+ /*
+ * @brief Check if there some not delivered hmi responses exist
+ *
+ * @return true if all responses received
+ */
+ bool IsPendingResponseExist();
+
+ /**
+ * @brief Checks change_registration params(ttsName, appname,
+ * ngnMediaScreenAppName, vrSynonyms) on invalid characters.
+ *
+ * @return true if command contains \t\n \\t \\n of whitespace otherwise
+ * returns false.
+ */
+ bool IsWhiteSpaceExist();
+
+ /**
+ * @brief Check parameters (name, vr) for
+ * coincidence with already known parameters of registered applications
+ *
+ * @return SUCCESS if there is no coincidence of app.name/VR synonyms,
+ * otherwise appropriate error code returns
+ */
+ mobile_apis::Result::eType CheckCoincidence();
+
+ /**
+ * @brief Checks if requested name is allowed by policy
+ * @param app_name Application name
+ * @return true, if allowed, otherwise - false
+ */
+ bool IsNicknameAllowed(const custom_str::CustomString& app_name) const;
+
+ /**
+ * @brief Prepare result code and result for sending to mobile application
+ * @param result_code contains result code for sending to mobile application
+ * @param response_info contains info for sending to mobile application
+ * @return result for sending to mobile application.
+ */
+ bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
+ std::string& ResponseInfo);
+
+ /**
+ * @brief Predicate for using with CheckCoincidence method to compare with VR
+ * synonym SO
+ *
+ * @return TRUE if there is coincidence of VR, otherwise FALSE
+ */
+ struct CoincidencePredicateVR {
+ CoincidencePredicateVR(const custom_str::CustomString& newItem)
+ : newItem_(newItem) {}
+
+ bool operator()(const smart_objects::SmartObject& obj) const {
+ const custom_str::CustomString& vr_synonym = obj.asCustomString();
+ return newItem_.CompareIgnoreCase(vr_synonym);
+ };
+
+ const custom_str::CustomString& newItem_;
+ };
+
+ app_mngr::commands::Pending pending_requests_;
+
+ hmi_apis::Common_Result::eType ui_result_;
+ hmi_apis::Common_Result::eType vr_result_;
+ hmi_apis::Common_Result::eType tts_result_;
+ std::string ui_response_info_;
+ std::string vr_response_info_;
+ std::string tts_response_info_;
+
+ void SendVRRequest(app_mngr::ApplicationSharedPtr app,
+ smart_objects::SmartObject& msg_params);
+
+ void SendTTSRequest(app_mngr::ApplicationSharedPtr app,
+ smart_objects::SmartObject& msg_params);
+
+ void SendUIRequest(app_mngr::ApplicationSharedPtr app,
+ smart_objects::SmartObject& msg_params,
+ const int32_t hmi_language);
+
+ DISALLOW_COPY_AND_ASSIGN(ChangeRegistrationRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_response.h
new file mode 100644
index 0000000000..4cb8c394c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/change_registration_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CHANGE_REGISTRATION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CHANGE_REGISTRATION_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ChangeRegistrationResponse command class
+ **/
+class ChangeRegistrationResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief ChangeRegistrationResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ChangeRegistrationResponse(
+ 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_handler);
+
+ /**
+ * @brief ChangeRegistrationResponse class destructor
+ **/
+ virtual ~ChangeRegistrationResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChangeRegistrationResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
new file mode 100644
index 0000000000..285b0b10db
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
@@ -0,0 +1,277 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
+#include <map>
+#include <string>
+
+#include "application_manager/application.h"
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/event_engine/event_observer.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+/**
+ * @brief CreateInteractionChoiceSetRequest command class
+ **/
+class CreateInteractionChoiceSetRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief CreateInteractionChoiceSetRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ CreateInteractionChoiceSetRequest(
+ 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_handler);
+
+ /**
+ * @brief CreateInteractionChoiceSetRequest class destructor
+ **/
+ ~CreateInteractionChoiceSetRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Function is called by RequestController when request execution time
+ * has exceed it's limit
+ */
+ void onTimeOut() FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /**
+ * @brief DeleteChoices allows to walk through the sent commands collection
+ * in order to sent appropriate DeleteCommand request.
+ */
+ void DeleteChoices();
+
+ /**
+ * @brief Calls after all responses from HMI were received.
+ * Terminates request and sends successful response to mobile
+ * if all responses were SUCCESS or calls DeleteChoices in other case.
+ */
+ void OnAllHMIResponsesReceived();
+
+ /**
+ * @brief The VRCommand struct
+ * Collect minimum information about sent VR commands, for correctly
+ * processing deleting sent commands if error from HMI received
+ */
+ struct VRCommandInfo {
+ VRCommandInfo() : cmd_id_(0), succesful_response_received_(false) {}
+ VRCommandInfo(uint32_t cmd_id)
+ : cmd_id_(cmd_id), succesful_response_received_(false) {}
+ uint32_t cmd_id_;
+ bool succesful_response_received_;
+ };
+
+ typedef std::map<uint32_t, VRCommandInfo> SentCommandsMap;
+ SentCommandsMap sent_commands_map_;
+
+ int32_t choice_set_id_;
+ size_t expected_chs_count_;
+ size_t received_chs_count_;
+
+ /**
+ * @brief Flag for stop sending VR commands to HMI, in case one of responses
+ * failed
+ */
+ volatile bool error_from_hmi_;
+ sync_primitives::Lock error_from_hmi_lock_;
+
+ /**
+ * @brief Flag shows if request already was expired by timeout
+ */
+ volatile bool is_timed_out_;
+ sync_primitives::Lock is_timed_out_lock_;
+
+ sync_primitives::Lock vr_commands_lock_;
+ /*
+ * @brief Sends VR AddCommand request to HMI
+ *
+ * @param app_id Application ID
+ *
+ */
+ void SendVRAddCommandRequests(app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Checks incoming choiseSet params.
+ * @param app Registred mobile application
+ *
+ * @return Mobile result code
+ */
+ mobile_apis::Result::eType CheckChoiceSet(
+ app_mngr::ApplicationConstSharedPtr app);
+
+ /*
+ * @brief Predicate for using with CheckChoiceSet method to compare choice ID
+ *param
+ *
+ * return TRUE if there is coincidence of choice ID, otherwise FALSE
+ */
+ struct CoincidencePredicateChoiceID {
+ CoincidencePredicateChoiceID(const uint32_t newItem) : newItem_(newItem) {}
+
+ bool operator()(smart_objects::SmartObject obj) {
+ return obj[app_mngr::strings::choice_id].asUInt() == newItem_;
+ }
+
+ const uint32_t newItem_;
+ };
+
+ /*
+ * @brief Predicate for using with CheckChoiceSet method to compare menu name
+ *param
+ *
+ * return TRUE if there is coincidence of menu name, otherwise FALSE
+ */
+ struct CoincidencePredicateMenuName {
+ CoincidencePredicateMenuName(const std::string& newItem)
+ : newItem_(newItem) {}
+
+ bool operator()(smart_objects::SmartObject obj) {
+ return obj[app_mngr::strings::menu_name].asString() == newItem_;
+ }
+
+ const std::string& newItem_;
+ };
+
+ /*
+ * @brief Predicate for using with CheckChoiceSet method to compare VR commands
+ *param
+ *
+ * return TRUE if there is coincidence of VR commands, otherwise FALSE
+ */
+ struct CoincidencePredicateVRCommands {
+ CoincidencePredicateVRCommands(const smart_objects::SmartObject& newItem)
+ : newItem_(newItem) {}
+
+ bool operator()(smart_objects::SmartObject obj) {
+ return compareStr(obj, newItem_);
+ }
+
+ const smart_objects::SmartObject& newItem_;
+ };
+
+ /*
+ * @brief Checks if incoming choice set doesn't has similar VR synonyms.
+ *
+ * @param choice1 Choice to compare
+ * @param choice2 Choice to compare
+ *
+ * return Return TRUE if there are similar VR synonyms in choice set,
+ * otherwise FALSE
+ */
+ bool compareSynonyms(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2);
+
+ /*
+ * @brief Checks VR synonyms ignoring differences in case.
+ *
+ * @param str1 VR synonym to compare
+ * @param str2 VR synonym to compare
+ *
+ * return Return TRUE if there are similar VR synonyms in choice set,
+ * otherwise FALSE
+ */
+ static bool compareStr(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2);
+
+ /**
+ * @brief Checks choice set params(menuName, tertiaryText, ...)
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @param choice_set which must check
+ * @return if choice_set contains \t\n \\t \\n return TRUE, FALSE otherwise
+ */
+ bool IsWhiteSpaceExist(const smart_objects::SmartObject& choice_set);
+
+ /**
+ * @brief ProcessHmiError process received error from HMI.
+ * This function id not thread safe. It should be protected with
+ * vr_commands_lock_
+ * @param vr_result ERROR type
+ */
+ void ProcessHmiError(const hmi_apis::Common_Result::eType vr_result);
+
+ /**
+ * @brief ProcessSuccesfulHMIResponse process succesful response from HMI\
+ * This function id not thread safe. It should be protected with
+ * vr_commands_lock_
+ * @param corr_id correlation id of received response
+ * @return true if resuest with corr_itd was sent on HMI, false otherwise
+ */
+ bool ProcessSuccesfulHMIResponse(const uint32_t corr_id);
+
+ /**
+ * @brief CountReceivedVRResponses counts received HMI responses. Updated
+ * request timeout if not all responses received
+ * Send response to mobile if all responses received.
+ */
+ void CountReceivedVRResponses();
+
+ DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_response.h
new file mode 100644
index 0000000000..76718bc2c3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief CreateInteractionChoiceSetResponse command class
+ **/
+class CreateInteractionChoiceSetResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief CreateInteractionChoiceSetResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ CreateInteractionChoiceSetResponse(
+ 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_handler);
+
+ /**
+ * @brief CreateInteractionChoiceSetResponse class destructor
+ **/
+ virtual ~CreateInteractionChoiceSetResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_request.h
new file mode 100644
index 0000000000..a21b1928d0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_request.h
@@ -0,0 +1,119 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_COMMAND_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_COMMAND_REQUEST_H_
+
+#include <string>
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DeleteCommandRequest command class
+ **/
+class DeleteCommandRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief DeleteCommandRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteCommandRequest(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_handler);
+
+ /**
+ * @brief DeleteCommandRequest class destructor
+ **/
+ ~DeleteCommandRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DeleteCommandRequest);
+
+ /*
+ * @brief Check if there some not delivered hmi responses exist
+ *
+ * @return true if all responses received
+ */
+ bool IsPendingResponseExist();
+
+ /*
+ * @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 is_ui_send_;
+ bool is_vr_send_;
+
+ bool is_ui_received_;
+ bool is_vr_received_;
+
+ hmi_apis::Common_Result::eType ui_result_;
+ hmi_apis::Common_Result::eType vr_result_;
+ std::string ui_info_;
+ std::string vr_info_;
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_COMMAND_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_response.h
new file mode 100644
index 0000000000..f81f119792
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_command_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_COMMAND_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_COMMAND_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DeleteCommandResponse command class
+ **/
+class DeleteCommandResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief DeleteCommandResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteCommandResponse(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_handler);
+
+ /**
+ * @brief DeleteCommandResponse class destructor
+ **/
+ virtual ~DeleteCommandResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DeleteCommandResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_COMMAND_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_request.h
new file mode 100644
index 0000000000..02cd0086b6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_request.h
@@ -0,0 +1,83 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_FILE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_FILE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+struct AppFile;
+
+namespace commands {
+
+/**
+ * @brief DeleteFileRequest command class
+ **/
+class DeleteFileRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief DeleteFileRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteFileRequest(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_handler);
+
+ /**
+ * @brief DeleteFileRequest class destructor
+ **/
+ virtual ~DeleteFileRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DeleteFileRequest);
+
+ void SendFileRemovedNotification(
+ const application_manager::AppFile* file) const;
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_FILE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_response.h
new file mode 100644
index 0000000000..fbdc70c9bc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_file_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_FILE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_FILE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DeleteFileResponse command class
+ **/
+class DeleteFileResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief DeleteFileResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteFileResponse(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_handler);
+
+ /**
+ * @brief DeleteFileResponse class destructor
+ **/
+ virtual ~DeleteFileResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DeleteFileResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_FILE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h
new file mode 100644
index 0000000000..4dec11a67b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h
@@ -0,0 +1,95 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DeleteInteractionChoiceSetRequest command class
+ **/
+class DeleteInteractionChoiceSetRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief DeleteInteractionChoiceSetRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteInteractionChoiceSetRequest(
+ 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_handler);
+
+ /**
+ * @brief DeleteInteractionChoiceSetRequest class destructor
+ **/
+ ~DeleteInteractionChoiceSetRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /*
+ * @brief Check if requested choice set ID in use by perform interaction
+ *
+ * @param app mobile application
+ */
+ bool ChoiceSetInUse(app_mngr::ApplicationConstSharedPtr app);
+
+ void SendVrDeleteCommand(app_mngr::ApplicationSharedPtr app);
+
+ DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_response.h
new file mode 100644
index 0000000000..0fce16ea9f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DeleteInteractionChoiceSetResponse command class
+ **/
+class DeleteInteractionChoiceSetResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief DeleteInteractionChoiceSetResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteInteractionChoiceSetResponse(
+ 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_handler);
+
+ /**
+ * @brief DeleteInteractionChoiceSetResponse class destructor
+ **/
+ virtual ~DeleteInteractionChoiceSetResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
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
new file mode 100644
index 0000000000..c947fda78a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h
@@ -0,0 +1,109 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_SUB_MENU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_SUB_MENU_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DeleteSubMenuRequest command class
+ **/
+class DeleteSubMenuRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief DeleteSubMenuRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteSubMenuRequest(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_handler);
+
+ /**
+ * @brief DeleteSubMenuRequest class destructor
+ **/
+ ~DeleteSubMenuRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /*
+ * @brief Deletes VR commands from SDL for corresponding submenu ID
+ *
+ * @param app_id Application ID
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ void DeleteSubMenuVRCommands(app_mngr::ApplicationConstSharedPtr app);
+
+ /*
+ * @brief Deletes UI commands from SDL for corresponding submenu ID
+ *
+ * @param app_id Application ID
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ void DeleteSubMenuUICommands(app_mngr::ApplicationSharedPtr const app);
+
+ DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_SUB_MENU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_response.h
new file mode 100644
index 0000000000..e5b0c58a34
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_SUB_MENU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_SUB_MENU_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ResetGlobalPropertiesResponse command class
+ **/
+class DeleteSubMenuResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief DeleteSubMenuResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DeleteSubMenuResponse(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_handler);
+
+ /**
+ * @brief DeleteSubMenuResponse class destructor
+ **/
+ virtual ~DeleteSubMenuResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_SUB_MENU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_request.h
new file mode 100644
index 0000000000..3e313602c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_request.h
@@ -0,0 +1,95 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAL_NUMBER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAL_NUMBER_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DialNumber request command class
+ **/
+class DialNumberRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief DialNumberRequest class constructor
+ **/
+ DialNumberRequest(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_handler);
+
+ /**
+ * \brief DialNumberRequest class destructor
+ **/
+ ~DialNumberRequest() OVERRIDE;
+
+ /**
+ * @brief Initialize request params
+ **/
+ bool Init() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @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);
+
+ private:
+ /**
+ * @brief Removes from number param all characters
+ * except the + character and digits.
+ *
+ */
+ void StripNumberParam(std::string& number);
+
+ DISALLOW_COPY_AND_ASSIGN(DialNumberRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAL_NUMBER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_response.h
new file mode 100644
index 0000000000..6181231458
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/dial_number_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAL_NUMBER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAL_NUMBER_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DialNumberResponse command class
+ **/
+class DialNumberResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief DialNumberResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DialNumberResponse(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_handler);
+
+ /**
+ * @brief DialNumberResponse class destructor
+ **/
+ virtual ~DialNumberResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DialNumberResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAL_NUMBER_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_request.h
new file mode 100644
index 0000000000..319a20958e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_request.h
@@ -0,0 +1,85 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief EndAudioPassThruRequest command class
+ **/
+class EndAudioPassThruRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief EndAudioPassThruRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ EndAudioPassThruRequest(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_handler);
+
+ /**
+ * @brief EndAudioPassThruRequest class destructor
+ **/
+ virtual ~EndAudioPassThruRequest();
+
+ /**
+ * @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);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(EndAudioPassThruRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_response.h
new file mode 100644
index 0000000000..e2a667f272
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_response.h
@@ -0,0 +1,79 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief EndAudioPassThruResponse command class
+ **/
+class EndAudioPassThruResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief EndAudioPassThruResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ EndAudioPassThruResponse(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_handler);
+
+ /**
+ * @brief EndAudioPassThruResponse class destructor
+ **/
+ virtual ~EndAudioPassThruResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(EndAudioPassThruResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_END_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/generic_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/generic_response.h
new file mode 100644
index 0000000000..b780daaf03
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/generic_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GENERIC_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GENERIC_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class GenericResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief GenericResponse class constructor
+ **/
+ GenericResponse(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manage,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manage,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ /**
+ * \brief GenericResponse class destructor
+ **/
+ virtual ~GenericResponse() {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GenericResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GENERIC_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_request.h
new file mode 100644
index 0000000000..b8da061870
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_request.h
@@ -0,0 +1,67 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class GetSystemCapabilityRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ GetSystemCapabilityRequest(
+ 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_handler);
+
+ virtual ~GetSystemCapabilityRequest();
+
+ virtual void Run() OVERRIDE;
+
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetSystemCapabilityRequest);
+
+}; // GetSystemCapabilityRequest
+} // commands
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_response.h
new file mode 100644
index 0000000000..9fa954c89f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_system_capability_response.h
@@ -0,0 +1,66 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class GetSystemCapabilityResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ GetSystemCapabilityResponse(
+ 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_handler);
+
+ virtual ~GetSystemCapabilityResponse();
+
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetSystemCapabilityResponse);
+
+}; // GetSystemCapabilityResponse
+} // commands
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_SYSTEM_CAPABILITY_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_request.h
new file mode 100644
index 0000000000..7197874475
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_request.h
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief GetWayPointsRequest command class
+ **/
+class GetWayPointsRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief GetWayPointsRequest class constructor
+ **/
+ GetWayPointsRequest(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_handler);
+
+ /**
+ * \brief GetWayPointsRequest class destructor
+ **/
+ virtual ~GetWayPointsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_response.h
new file mode 100644
index 0000000000..bb480a7ac0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_way_points_response.h
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief GetWayPointsResponse command class
+ **/
+class GetWayPointsResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief GetWayPointsResponse class constructor
+ **/
+ GetWayPointsResponse(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_handler);
+
+ /**
+ * \brief GetWayPointsResponse class destructor
+ **/
+ virtual ~GetWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_request.h
new file mode 100644
index 0000000000..53d75819f8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_request.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_LIST_FILES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_LIST_FILES_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ListFilesRequest command class
+ **/
+class ListFilesRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ListFilesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ListFilesRequest(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_handler);
+
+ /**
+ * @brief ListFilesRequest class destructor
+ **/
+ virtual ~ListFilesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ListFilesRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_LIST_FILES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_response.h
new file mode 100644
index 0000000000..1b3cdf1b02
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/list_files_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_LIST_FILES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_LIST_FILES_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ListFilesResponse command class
+ **/
+class ListFilesResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief ListFilesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ListFilesResponse(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_handler);
+
+ /**
+ * @brief ListFilesResponse class destructor
+ **/
+ virtual ~ListFilesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ListFilesResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_LIST_FILES_RESPONSE_H_
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
new file mode 100644
index 0000000000..ba01d4bb28
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAppInterfaceUnregisteredNotification class
+ **/
+class OnAppInterfaceUnregisteredNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnAppInterfaceUnregisteredNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAppInterfaceUnregisteredNotification(
+ 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_handler);
+
+ /**
+ * @brief OnAppInterfaceUnregisteredNotification class destructor
+ **/
+ virtual ~OnAppInterfaceUnregisteredNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAppInterfaceUnregisteredNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_audio_pass_thru_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_audio_pass_thru_notification.h
new file mode 100644
index 0000000000..e3410bd873
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_audio_pass_thru_notification.h
@@ -0,0 +1,82 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnAudioPassThruNotification class used to send notification with
+ *binary data written from
+ * microphone to mobile device while PerformAudioPassThru is active.
+ **/
+class OnAudioPassThruNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnAudioPassThruNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnAudioPassThruNotification(
+ 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_handler);
+
+ /**
+ * @brief OnAudioPassThruNotification class destructor
+ **/
+ virtual ~OnAudioPassThruNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnAudioPassThruNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_event_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_event_notification.h
new file mode 100644
index 0000000000..6afdc0e1cf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_event_notification.h
@@ -0,0 +1,92 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_BUTTON_EVENT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_BUTTON_EVENT_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+/**
+ * @brief OnButtonEventNotification class is used to send notification
+ * to mobile device that some button was pressed on HMI.
+ **/
+class OnButtonEventNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnButtonEventNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnButtonEventNotification(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_handler);
+
+ /**
+ * @brief OnButtonEventNotification class destructor
+ **/
+ virtual ~OnButtonEventNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ /*
+ * @brief Sends button event notification to mobile device
+ *
+ * @param app Application to receive notification
+ */
+ void SendButtonEvent(app_mngr::ApplicationConstSharedPtr app);
+
+ DISALLOW_COPY_AND_ASSIGN(OnButtonEventNotification);
+};
+
+} // namespace mobile
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_BUTTON_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_press_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_press_notification.h
new file mode 100644
index 0000000000..fe9bc449be
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_button_press_notification.h
@@ -0,0 +1,91 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_BUTTON_PRESS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_BUTTON_PRESS_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+/**
+ * @brief OnButtonPressNotification class is used to send notification
+ * to mobile device that some button was pressed on HMI.
+ **/
+class OnButtonPressNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnButtonPressNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnButtonPressNotification(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_handler);
+
+ /**
+ * @brief OnButtonEventCommand class destructor
+ **/
+ virtual ~OnButtonPressNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ /*
+ * @brief Sends button press notification to mobile device
+ *
+ * @param app Application to receive notification
+ */
+ void SendButtonPress(app_mngr::ApplicationConstSharedPtr app);
+
+ DISALLOW_COPY_AND_ASSIGN(OnButtonPressNotification);
+};
+
+} // namespace mobile
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_BUTTON_PRESS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_command_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_command_notification.h
new file mode 100644
index 0000000000..367b280e73
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_command_notification.h
@@ -0,0 +1,82 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+/**
+ * @brief OnCommandNotification class is used to send notification
+ * to mobile device.
+ **/
+class OnCommandNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnCommandNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnCommandNotification(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_handler);
+
+ /**
+ * @brief OnCommandNotification class destructor
+ **/
+ virtual ~OnCommandNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnCommandNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_driver_distraction_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_driver_distraction_notification.h
new file mode 100644
index 0000000000..82e6097d84
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_driver_distraction_notification.h
@@ -0,0 +1,84 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+/**
+ * @brief OnDriverDistractionNotification class
+ **/
+class OnDriverDistractionNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnDriverDistractionNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnDriverDistractionNotification(
+ 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_handler);
+
+ /**
+ * @brief OnDriverDistractionNotification class destructor
+ **/
+ virtual ~OnDriverDistractionNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnDriverDistractionNotification);
+};
+
+} // namespace mobile
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hash_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hash_change_notification.h
new file mode 100644
index 0000000000..76c9cf34c5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hash_change_notification.h
@@ -0,0 +1,81 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HASH_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HASH_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+namespace mobile {
+
+/**
+ * @brief OnHashChangeNotification class
+ **/
+class OnHashChangeNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnHashChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnHashChangeNotification(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_handler);
+
+ /**
+ * @brief OnHashChangeNotification class destructor
+ **/
+ virtual ~OnHashChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnHashChangeNotification);
+};
+
+} // namespace mobile
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HASH_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification.h
new file mode 100644
index 0000000000..0e1919676b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification.h
@@ -0,0 +1,79 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnHMIStatusNotification class
+ **/
+class OnHMIStatusNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnHMIStatusNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnHMIStatusNotification(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_handler);
+
+ /**
+ * @brief OnHMIStatusNotification class destructor
+ **/
+ virtual ~OnHMIStatusNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnHMIStatusNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification_from_mobile.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification_from_mobile.h
new file mode 100644
index 0000000000..12e3b54be9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_hmi_status_notification_from_mobile.h
@@ -0,0 +1,82 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_FROM_MOBILE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_FROM_MOBILE_H_
+
+#include "application_manager/commands/command_notification_from_mobile_impl.h"
+#include "application_manager/application_manager.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnHMIStatusNotificationFromMobile class
+ **/
+class OnHMIStatusNotificationFromMobile
+ : public app_mngr::commands::CommandNotificationFromMobileImpl {
+ public:
+ /**
+ * @brief OnHMIStatusNotificationFromMobile class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnHMIStatusNotificationFromMobile(
+ 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_handler);
+
+ /**
+ * @brief OnHMIStatusNotificationFromMobile class destructor
+ **/
+ virtual ~OnHMIStatusNotificationFromMobile();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnHMIStatusNotificationFromMobile);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_HMI_STATUS_NOTIFICATION_FROM_MOBILE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_keyboard_input_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_keyboard_input_notification.h
new file mode 100644
index 0000000000..d34815ff2f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_keyboard_input_notification.h
@@ -0,0 +1,83 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+/**
+ * @brief OnKeyBoardInputNotification class
+ **/
+class OnKeyBoardInputNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnKeyBoardInputNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnKeyBoardInputNotification(
+ 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_handler);
+
+ /**
+ * @brief OnKeyBoardInputNotification class destructor
+ **/
+ virtual ~OnKeyBoardInputNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnKeyBoardInputNotification);
+};
+
+} // namespace mobile
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_language_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_language_change_notification.h
new file mode 100644
index 0000000000..b234b93796
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_language_change_notification.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnLanguageChangeNotification class
+ **/
+class OnLanguageChangeNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnLanguageChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnLanguageChangeNotification(
+ 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_handler);
+
+ /**
+ * @brief OnLanguageChangeNotification class destructor
+ **/
+ virtual ~OnLanguageChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnLanguageChangeNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h
new file mode 100644
index 0000000000..f586a0d36c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnPermissionsChangeNotification class
+ **/
+class OnPermissionsChangeNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnPermissionsChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnPermissionsChangeNotification(
+ 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_handler);
+
+ /**
+ * @brief OnPermissionsChangeNotification class destructor
+ **/
+ virtual ~OnPermissionsChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnPermissionsChangeNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_system_request_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_system_request_notification.h
new file mode 100644
index 0000000000..b369ad38f2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_system_request_notification.h
@@ -0,0 +1,93 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_SYSTEM_REQUEST_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_SYSTEM_REQUEST_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "policy/policy_table/enums.h"
+#include <vector>
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+/**
+ * @brief OnSystemRequestNotification class
+ **/
+class OnSystemRequestNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ typedef std::vector<uint8_t> BinaryMessage;
+ /**
+ * @brief OnSystemRequestNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSystemRequestNotification(
+ 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_handler);
+
+ /**
+ * @brief OnSystemRequestNotification class destructor
+ **/
+ ~OnSystemRequestNotification() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+#ifdef PROPRIETARY_MODE
+ /**
+ * @brief Adds HTTP header to message
+ * @param message Message
+ */
+ void AddHeader(BinaryMessage& message) const;
+ size_t ParsePTString(std::string& pt_string) const;
+#endif // PROPRIETARY_MODE
+
+ DISALLOW_COPY_AND_ASSIGN(OnSystemRequestNotification);
+};
+
+} // namespace mobile
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_SYSTEM_REQUEST_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h
new file mode 100644
index 0000000000..39b12fea15
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnTBTClientStateNotification class
+ **/
+class OnTBTClientStateNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnTBTClientStateNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnTBTClientStateNotification(
+ 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_handler);
+
+ /**
+ * @brief OnTBTClientStateNotification class destructor
+ **/
+ virtual ~OnTBTClientStateNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnTBTClientStateNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h
new file mode 100644
index 0000000000..858759b793
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h
@@ -0,0 +1,82 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+/**
+ * @brief OnTouchEventNotification class
+ **/
+class OnTouchEventNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnTouchEventNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnTouchEventNotification(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_handler);
+
+ /**
+ * @brief OnTouchEventNotification class destructor
+ **/
+ virtual ~OnTouchEventNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnTouchEventNotification);
+};
+
+} // namespace mobile
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_way_point_change_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_way_point_change_notification.h
new file mode 100644
index 0000000000..c379fceb02
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_way_point_change_notification.h
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class OnWayPointChangeNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnWayPointChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnWayPointChangeNotification(
+ 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_handler);
+
+ /**
+ * @brief OnWayPointChangeNotification class destructor
+ **/
+ virtual ~OnWayPointChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnWayPointChangeNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h
new file mode 100644
index 0000000000..6db222a401
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h
@@ -0,0 +1,198 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief PerformAudioPassThruRequest command class
+ **/
+class PerformAudioPassThruRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief PerformAudioPassThruRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ PerformAudioPassThruRequest(
+ 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_handler);
+
+ /**
+ * @brief PerformAudioPassThruRequest class destructor
+ **/
+ virtual ~PerformAudioPassThruRequest();
+
+ /**
+ * @brief Function is called by RequestController when request execution time
+ * has exceed it's limit
+ *
+ */
+ virtual void onTimeOut();
+
+ /**
+ * @brief Init required by command resources
+ **/
+ 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);
+
+ private:
+ /**
+ * @brief Prepare result code, result and info for sending to mobile
+ * @brief Response params
+ * success for sending to mobile application
+ * result code for sending to mobile application
+ * info for sending to mobile application
+ */
+ struct ResponseParams {
+ bool success;
+ mobile_apis::Result::eType result_code;
+ std::string info;
+ ResponseParams()
+ : success(false), result_code(mobile_apis::Result::INVALID_ENUM) {}
+ };
+
+ ResponseParams response_params_;
+
+ /**
+ * @brief Prepare result code, result and info for sending to mobile
+ * application
+ * @param result_code contains result code for sending to mobile application
+ * @return result for sending to mobile application.
+ * @deprecated
+ */
+ DEPRECATED bool PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info);
+ /**
+ * @brief Prepare result code, 'success' result and info for sending
+ * to mobile application
+ * @param result_code contains result code for sending to mobile application
+ * @return result for sending to mobile application.
+ */
+ const ResponseParams& PrepareResponseParameters();
+
+ /**
+ * @brief Sends TTS Speak request
+ */
+ void SendSpeakRequest();
+
+ /**
+ * @brief Sends UI PerformAudioPassThru request
+ */
+ void SendPerformAudioPassThruRequest();
+
+ /**
+ * @brief Sends UI RecordStart notification after TTS Speak response received.
+ * Indicates that capturing mic data should be started
+ */
+ void SendRecordStartNotification();
+
+ /**
+ * @brief Starts microphone recording
+ */
+ void StartMicrophoneRecording();
+
+ /**
+ * @brief Checks perform audio pass thru params(initialPrompt, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if perform audio pass thru contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ /**
+ * @brief If is_active_tts_speak_ TRUE - set up to FALSE and send request
+ * TTS_StopSpeaking to HMI
+ */
+ void FinishTTSSpeak();
+
+ /*
+ * @brief Tells if there are sent requests without responses
+ */
+ bool IsWaitingHMIResponse();
+
+ /**
+ * @brief Pair of result_code and success for mobile app
+ */
+ typedef std::pair<mobile_apis::Result::eType, bool> AudioPassThruResults;
+
+ /**
+ * @brief Checks result code from HMI for splitted RPC
+ * and returns parameter for sending to mobile app in
+ * audioPassThru communication.
+ * @param ui_response contains result_code from UI
+ * @param tts_response contains result_code from TTS
+ * @return pair of result code (UI error code has precedence than TTS's,
+ * error_code from TTS is turned to WARNINGS) and
+ * result for mobile app
+ */
+ AudioPassThruResults PrepareAudioPassThruResultCodeForResponse(
+ const app_mngr::commands::ResponseInfo& ui_response,
+ const app_mngr::commands::ResponseInfo& tts_response);
+
+ hmi_apis::Common_Result::eType result_tts_speak_;
+ hmi_apis::Common_Result::eType result_ui_;
+ std::string ui_info_;
+ std::string tts_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(PerformAudioPassThruRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_response.h
new file mode 100644
index 0000000000..6654762067
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief PerformAudioPassThruResponse command class
+ **/
+class PerformAudioPassThruResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief PerformAudioPassThruResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ PerformAudioPassThruResponse(
+ 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_handler);
+
+ /**
+ * @brief PerformAudioPassThruResponse class destructor
+ **/
+ virtual ~PerformAudioPassThruResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PerformAudioPassThruResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
new file mode 100644
index 0000000000..40e706b851
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
@@ -0,0 +1,244 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_INTERACTION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_INTERACTION_REQUEST_H_
+
+#include <string>
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+/**
+ * @brief PerformInteractionRequest command class
+ **/
+class PerformInteractionRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief PerformInteractionRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ PerformInteractionRequest(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_handler);
+
+ /**
+ * @brief PerformInteractionRequest class destructor
+ **/
+ virtual ~PerformInteractionRequest();
+
+ /**
+ * @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
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ /*
+ * @brief Function is called by RequestController when request execution time
+ * has exceed it's limit
+ *
+ */
+ virtual void onTimeOut();
+
+ private:
+ /**
+ * @brief Function will be called when VR_OnCommand event
+ * comes
+ * @param message which should send to mobile side
+ * @return true if send response to mobile application otherwise
+ * return false.
+ */
+ bool ProcessVRResponse(const smart_objects::SmartObject& message,
+ smart_objects::SmartObject& msg_params);
+
+ /**
+ * @brief Sends PerformInteraction response to mobile side
+ * @param message which should send to mobile side
+ */
+ void ProcessUIResponse(const smart_objects::SmartObject& message,
+ smart_objects::SmartObject& msg_params);
+
+ /*
+ * @brief Sends UI PerformInteraction request to HMI
+ *
+ * @param app_id Application ID
+ *
+ */
+ void SendUIPerformInteractionRequest(
+ app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Sends TTS PerformInteraction request to HMI
+ *
+ * @param app_id Application ID
+ *
+ */
+ void SendVRPerformInteractionRequest(
+ app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Sends UI Show VR help request to HMI
+ *
+ * @param app_id Application ID
+ */
+ void SendUIShowVRHelpRequest(app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Checks if incoming choice set doesn't has similar menu names.
+ *
+ * @param app_id Application ID
+ *
+ * return Return TRUE if there are no similar menu names in choice set,
+ * otherwise FALSE
+ */
+ bool CheckChoiceSetMenuNames(app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Checks if incoming choice set doesn't has similar VR synonyms.
+ *
+ * @param app_id Application ID
+ *
+ * return Return TRUE if there are no similar VR synonyms in choice set,
+ * otherwise FALSE
+ */
+ bool CheckChoiceSetVRSynonyms(app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Checks if request with non-sequential positions of vrHelpItems
+ * SDLAQ-CRS-466
+ *
+ * @param app_id Application ID
+ *
+ * @return TRUE if vrHelpItems positions are sequential,
+ * otherwise FALSE
+ */
+ bool CheckVrHelpItemPositions(app_mngr::ApplicationSharedPtr const app);
+
+ /*
+ * @brief Disable PerformInteraction state in application and
+ * delete VR commands from HMI
+ */
+ void DisablePerformInteraction();
+
+ /**
+ * @brief Checks perform interaction params(initialText, initialPrompt, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if perform interaction contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ /**
+ * @brief Send HMI close PopUp and call DisablePerformInteraction
+ */
+ void TerminatePerformInteraction();
+
+ /**
+ * @brief Checks parameter ChoiceID from response.
+ * @param app contains pointer to application
+ * @param choice_id contains ChoiceID from response.
+ * @return if ChoiceID from response is correct method returns TRUE
+ * otherwise returns FALSE.
+ */
+ bool CheckChoiceIDFromResponse(app_mngr::ApplicationSharedPtr app,
+ int32_t choice_id);
+
+ /**
+ * @brief Checks for a match of choice ID, in
+ * choice sets.
+ * @param app contains pointer to application.
+ * @param choice_set_id_list_length contains amount
+ * of choice set ids.
+ * @param choice_set_id_list array of choice set ids
+ * @return If request contains several choice sets with
+ * same choice id returns false, otherwise returns
+ * true.
+ */
+ bool CheckChoiceIDFromRequest(
+ app_mngr::ApplicationSharedPtr app,
+ const size_t choice_set_id_list_length,
+ const smart_objects::SmartObject& choice_set_id_list) const;
+
+ /**
+ * @brief Tells if there are sent requests without responses
+ * @return If there is request without response method returns TRUE
+ * otherwise returns FALSE
+ */
+ const bool HasHMIResponsesToWait() const;
+
+ /**
+ * @brief Check UI & VR result codes, send response to mobile
+ * @param msg_param Message params to send
+ */
+ void SendBothModeResponse(const smart_objects::SmartObject& msg_param);
+
+ mobile_apis::InteractionMode::eType interaction_mode_;
+ bool ui_response_received_;
+ bool vr_response_received_;
+ bool app_pi_was_active_before_;
+ static uint32_t pi_requests_count_;
+ hmi_apis::Common_Result::eType vr_result_code_;
+ hmi_apis::Common_Result::eType ui_result_code_;
+ std::string ui_info_;
+ std::string vr_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(PerformInteractionRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_INTERACTION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_response.h
new file mode 100644
index 0000000000..6bb9135dcc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_INTERACTION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_INTERACTION_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief PerformInteractionResponse command class
+ **/
+class PerformInteractionResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief PerformInteractionResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ PerformInteractionResponse(
+ 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_handler);
+
+ /**
+ * @brief PerformInteractionResponse class destructor
+ **/
+ virtual ~PerformInteractionResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PerformInteractionResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_request.h
new file mode 100644
index 0000000000..f82af197b9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_request.h
@@ -0,0 +1,86 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PUT_FILE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PUT_FILE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief PutFileRequest command class
+ **/
+class PutFileRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief PutFileRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ PutFileRequest(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_handler);
+
+ /**
+ * @brief PutFileRequest class destructor
+ **/
+ virtual ~PutFileRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ int64_t offset_;
+ std::string sync_file_name_;
+ int64_t length_;
+ mobile_apis::FileType::eType file_type_;
+ bool is_persistent_file_;
+
+ void SendOnPutFileNotification();
+ DISALLOW_COPY_AND_ASSIGN(PutFileRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PUT_FILE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_response.h
new file mode 100644
index 0000000000..22dbf1b5d5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/put_file_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PUT_FILE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PUT_FILE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief PutFileResponse command class
+ **/
+class PutFileResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief PutFileResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ PutFileResponse(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_handler);
+
+ /**
+ * @brief PutFileResponse class destructor
+ **/
+ virtual ~PutFileResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PutFileResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_PUT_FILE_RESPONSE_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
new file mode 100644
index 0000000000..9cac2ab34f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h
@@ -0,0 +1,230 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "utils/macro.h"
+#include "utils/custom_string.h"
+
+namespace policy {
+struct DeviceInfo;
+}
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class Application;
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+/**
+ * @brief Register app interface request command class
+ **/
+class RegisterAppInterfaceRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief RegisterAppInterfaceRequest class constructor
+ **/
+ RegisterAppInterfaceRequest(
+ 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_handler);
+
+ /**
+ * @brief RegisterAppInterfaceRequest class destructor
+ **/
+ virtual ~RegisterAppInterfaceRequest();
+
+ /**
+ * @brief Init required by command resources
+ **/
+ virtual bool Init();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Prepares and sends RegisterAppInterface response to mobile
+ * considering application type
+ **/
+ void SendRegisterAppInterfaceResponseToMobile();
+
+ private:
+ /**
+ * @brief The AppicationType enum defines whether application is newly
+ * registered or existing and being switched over another transport
+ */
+ enum class ApplicationType {
+ kNewApplication,
+ kSwitchedApplicationHashOk,
+ kSwitchedApplicationWrongHashId
+ };
+
+ /**
+ * @brief Prepares and sends RegisterAppInterface response to mobile
+ * considering application type
+ * @param app_type Type of application
+ **/
+ void SendRegisterAppInterfaceResponseToMobile(ApplicationType app_type);
+
+ smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification(
+ const uint32_t connection_key, app_mngr::ApplicationSharedPtr app);
+
+ /**
+ * @brief SendChangeRegistration send ChangeRegistration on HMI
+ * @param function_id interface specific ChangeRegistration
+ * @param language language of registration
+ * @param app_id application to change registration
+ */
+ void SendChangeRegistration(const hmi_apis::FunctionID::eType function_id,
+ const int32_t language,
+ const uint32_t app_id);
+
+ /**
+ * @brief SendChangeRegistrationOnHMI send required SendChangeRegistration
+ * HMI
+ * @param app application to change registration
+ */
+ void SendChangeRegistrationOnHMI(app_mngr::ApplicationConstSharedPtr app);
+
+ /**
+ * @brief Sends OnAppRegistered notification to HMI
+ *
+ *@param application_impl application with changed HMI status
+ *
+ **/
+ void SendOnAppRegisteredNotificationToHMI(
+ const app_mngr::Application& application_impl,
+ bool resumption = false,
+ bool need_restore_vr = false);
+ /*
+ * @brief Check new ID along with known mobile application ID
+ *
+ * return TRUE if ID is known already, otherwise - FALSE
+ */
+ bool IsApplicationWithSameAppIdRegistered();
+
+ /*
+ * @brief Check new application parameters (name, tts, vr) for
+ * coincidence with already known parameters of registered applications
+ *
+ * return SUCCESS if there is no coincidence of app.name/TTS/VR synonyms,
+ * otherwise appropriate error code returns
+ */
+ mobile_apis::Result::eType CheckCoincidence();
+
+ /*
+ * @brief Predicate for using with CheckCoincidence method to compare with VR
+ * synonym SO
+ *
+ * return TRUE if there is coincidence of VR, otherwise FALSE
+ */
+ struct CoincidencePredicateVR {
+ CoincidencePredicateVR(const custom_str::CustomString& newItem)
+ : newItem_(newItem) {}
+
+ bool operator()(const smart_objects::SmartObject& obj) {
+ const custom_str::CustomString& vr_synonym = obj.asCustomString();
+ return newItem_.CompareIgnoreCase(vr_synonym);
+ }
+ const custom_str::CustomString& newItem_;
+ };
+
+ /**
+ * @brief Check request parameters against policy table data
+ * @return SUCCESS if check ok, otherwise return appropriate error code
+ */
+ mobile_apis::Result::eType CheckWithPolicyData();
+
+ /**
+ * @brief Fill DeviceInfo struct with data from request, if any
+ * @param device_info Struct for device params from request
+ */
+ void FillDeviceInfo(policy::DeviceInfo* device_info);
+
+ /**
+ * @brief Checks register app interface params(ttsName, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if register app interface contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ /**
+ * @brief Checks vehicle type params (model, year etc.) and in case of absense
+ * replaces with policy table backup values
+ * @param vehicle_type VehicleType struct
+ * @param param Vehicle param
+ * @param backup_value Backup value
+ */
+ void CheckResponseVehicleTypeParam(smart_objects::SmartObject& vehicle_type,
+ const std::string& param,
+ const std::string& backup_value);
+ /**
+ * @brief Sends ButtonSubscription notification at start up
+ * to notify HMI that app subscribed on the custom button by default.
+ */
+ void SendSubscribeCustomButtonNotification();
+
+ /**
+ * @brief IsApplicationSwitched checks whether application is switched from
+ * another transport. If application id is found, but not in reconnection
+ * list, returns 'already registered' code. Otherwise - proceed with
+ * switching.
+ * @return True if application is detected as switched, otherwise false.
+ */
+ bool IsApplicationSwitched();
+
+ private:
+ std::string response_info_;
+ mobile_apis::Result::eType result_code_;
+
+ policy::PolicyHandlerInterface& GetPolicyHandler();
+ DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_response.h
new file mode 100644
index 0000000000..d591d67794
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_response.h
@@ -0,0 +1,84 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+/**
+ * @brief Register app interface request command class
+ **/
+class RegisterAppInterfaceResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief RegisterAppInterfaceResponse class constructor
+ **/
+ RegisterAppInterfaceResponse(
+ const app_mngr::commands::MessageSharedPtr& response,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(response,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ /**
+ * \brief RegisterAppInterfaceResponse class destructor
+ **/
+ virtual ~RegisterAppInterfaceResponse() {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ void SetHeartBeatTimeout(uint32_t connection_key,
+ const std::string& mobile_app_id);
+
+ DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
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
new file mode 100644
index 0000000000..6f7e330bf5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h
@@ -0,0 +1,149 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ResetGlobalPropertiesRequest command class
+ **/
+class ResetGlobalPropertiesRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ResetGlobalPropertiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ResetGlobalPropertiesRequest(
+ 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_handler);
+
+ /**
+ * @brief ResetGlobalPropertiesRequest class destructor
+ **/
+ ~ResetGlobalPropertiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ 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
+ * @param out_response_info contains info for sending to mobile applicaion
+ * @return result for sending to mobile application.
+ */
+ bool PrepareResponseParameters(mobile_apis::Result::eType& out_result_code,
+ std::string& out_response_info);
+
+ /*
+ * @brief Check if there some not delivered hmi responses exist
+ *
+ * @return true if all responses received
+ */
+ bool IsPendingResponseExist();
+
+ DISALLOW_COPY_AND_ASSIGN(ResetGlobalPropertiesRequest);
+
+ hmi_apis::Common_Result::eType ui_result_;
+ hmi_apis::Common_Result::eType tts_result_;
+ std::string ui_response_info_;
+ std::string tts_response_info_;
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_response.h
new file mode 100644
index 0000000000..b33ef41426
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ResetGlobalPropertiesResponse command class
+ **/
+class ResetGlobalPropertiesResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief ResetGlobalPropertiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ResetGlobalPropertiesResponse(
+ 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_handler);
+
+ /**
+ * @brief ResetGlobalPropertiesResponse class destructor
+ **/
+ virtual ~ResetGlobalPropertiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ResetGlobalPropertiesResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_request.h
new file mode 100644
index 0000000000..a641fa0cd4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_request.h
@@ -0,0 +1,90 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief scrollable message request command class
+ **/
+class ScrollableMessageRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ScrollableMessageRequest class constructor
+ **/
+ ScrollableMessageRequest(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_handler);
+
+ /**
+ * @brief SliderCommand class destructor
+ **/
+ virtual ~ScrollableMessageRequest();
+
+ /**
+ * @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
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScrollableMessageRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_response.h
new file mode 100644
index 0000000000..8bc8a36363
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/scrollable_message_response.h
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class ScrollableMessageResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief ScrollableMessageResponse class constructor
+ **/
+ ScrollableMessageResponse(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_handler);
+
+ /**
+ * \brief SpeakResponseCommand class destructor
+ **/
+ virtual ~ScrollableMessageResponse() {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScrollableMessageResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_request.h
new file mode 100644
index 0000000000..e3ed6ef28b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_request.h
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
+
+#include <string>
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "smart_objects/smart_object.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SendHapticDataRequest command class
+ **/
+class SendHapticDataRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SendHapticDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ * @param application_manager Reference of application manager
+ **/
+ SendHapticDataRequest(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_handler);
+
+ /**
+ * @brief SendHapticDataRequest class destructor
+ **/
+ ~SendHapticDataRequest() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @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) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SendHapticDataRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_response.h
new file mode 100644
index 0000000000..53e8766241
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_haptic_data_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SendHapticDataResponse command class
+ **/
+class SendHapticDataResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SendHapticDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ * @param application_manager Reference of application manager
+ **/
+ SendHapticDataResponse(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_handler);
+
+ /**
+ * @brief SendHapticDataResponse class destructor
+ **/
+ ~SendHapticDataResponse() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SendHapticDataResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_request.h
new file mode 100644
index 0000000000..6626da4c9d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_request.h
@@ -0,0 +1,100 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_LOCATION_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_LOCATION_REQUEST_H_
+
+#include <list>
+#include "application_manager/commands/command_request_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief send location request command class
+ */
+class SendLocationRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SendLocationRquest class constructor
+ */
+ SendLocationRequest(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_handler);
+
+ /**
+ * @brief SendLocationRquest class destructor
+ */
+ virtual ~SendLocationRequest();
+
+ /**
+ * @brief Execute command
+ */
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /**
+ * @brief CheckFieldsCompatibility checks if fields are compatible with each
+ * other.
+ * @return true if compatible, otherwise return false
+ */
+ bool CheckFieldsCompatibility();
+
+ /**
+ * @brief Checks sendlocation params(locationName, locationDescription, ...).
+ * Checks string if it contains \t\n \\t \\n or whitespace
+ * @return true if string contains invalid characters, otherwise returns false
+ */
+ bool IsWhiteSpaceExist();
+
+ bool CheckHMICapabilities(
+ std::vector<hmi_apis::Common_TextFieldName::eType>& fields_names);
+ DISALLOW_COPY_AND_ASSIGN(SendLocationRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_LOCATION_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_response.h
new file mode 100644
index 0000000000..cb461f9a60
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/send_location_response.h
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_LOCATION_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_LOCATION_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class SendLocationResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SendLocationResponse class constructor
+ */
+ SendLocationResponse(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_handler);
+
+ /**
+ * @brief SendLocationResponse class destructor
+ */
+ virtual ~SendLocationResponse();
+
+ /**
+ * @brief Execute command
+ */
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SendLocationResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SEND_LOCATION_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_request.h
new file mode 100644
index 0000000000..1075999af9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_request.h
@@ -0,0 +1,116 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_APP_ICON_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_APP_ICON_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetIconRequest command class
+ **/
+class SetAppIconRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief Contains information about the type of image
+ */
+ typedef enum { STATIC = 0, DYNAMIC } ImageType;
+
+ /**
+ * @brief SetIconRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetAppIconRequest(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_handler);
+
+ /**
+ * @brief SetIconRequest class destructor
+ **/
+ virtual ~SetAppIconRequest();
+
+ /**
+ * @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);
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ /**
+ * @brief Copies file to icon storage
+ * @param path_to_file Path to icon
+ */
+ void CopyToIconStorage(const std::string& path_to_file) const;
+
+ /**
+ * @brief Remove oldest icons
+ * @param storage Path to icons storage
+ * @param icons_amount Amount of icons to be deleted
+ */
+ void RemoveOldestIcons(const std::string& storage,
+ const uint32_t icons_amount) const;
+
+ /**
+ * @brief Checks, if there enough space in storage for icon copy
+ * @param file_size File size
+ * @return true, if enough, otherwise - false
+ */
+ bool IsEnoughSpaceForIcon(const uint64_t icon_size) const;
+ DISALLOW_COPY_AND_ASSIGN(SetAppIconRequest);
+
+ private:
+ /**
+ * @brief Checks, if icons saving to configured folder is enabled
+ */
+ bool is_icons_saving_enabled_;
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_APP_ICON_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_response.h
new file mode 100644
index 0000000000..e4ce0725dc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_app_icon_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_APP_ICON_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_APP_ICON_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetIconResponse command class
+ **/
+class SetAppIconResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SetIconResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetAppIconResponse(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_handler);
+
+ /**
+ * @brief SetIconResponse class destructor
+ **/
+ virtual ~SetAppIconResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetAppIconResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_APP_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_request.h
new file mode 100644
index 0000000000..4bd800988c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_request.h
@@ -0,0 +1,85 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetDisplayLayoutRequest command class
+ **/
+class SetDisplayLayoutRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SetDisplayLayoutRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetDisplayLayoutRequest(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_handler);
+
+ /**
+ * @brief SetDisplayLayoutRequest class destructor
+ **/
+ virtual ~SetDisplayLayoutRequest();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ **/
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetDisplayLayoutRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_response.h
new file mode 100644
index 0000000000..73f57fc187
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_display_layout_response.h
@@ -0,0 +1,79 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetDisplayLayoutResponse command class
+ **/
+class SetDisplayLayoutResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SetDisplayLayoutResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetDisplayLayoutResponse(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_handler);
+
+ /**
+ * @brief SetDisplayLayoutResponse class destructor
+ **/
+ virtual ~SetDisplayLayoutResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetDisplayLayoutResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
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
new file mode 100644
index 0000000000..7a8abaaad6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h
@@ -0,0 +1,166 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
+#include <string>
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+#include "application_manager/application.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief Register app interface request command class
+ **/
+class SetGlobalPropertiesRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SetGlobalPropertiesRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetGlobalPropertiesRequest(
+ 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_handler);
+
+ /**
+ * @brief SetGlobalPropertiesRequest class destructor
+ **/
+ ~SetGlobalPropertiesRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ // Verify correctness VrHelptitle value
+ static bool ValidateVRHelpTitle(
+ const smart_objects::SmartObject* const vr_help_so_ptr);
+
+ // prepare UI sending data (VrHelps, Menus, Keyboard) to SmartObject
+ static void PrepareUIRequestVRHelpData(
+ const app_mngr::ApplicationSharedPtr app,
+ const smart_objects::SmartObject& msg_params,
+ smart_objects::SmartObject& out_params);
+
+ static bool PrepareUIRequestDefaultVRHelpData(
+ const app_mngr::ApplicationSharedPtr app,
+ smart_objects::SmartObject& out_params);
+
+ static void PrepareUIRequestMenuAndKeyboardData(
+ const app_mngr::ApplicationSharedPtr app,
+ const smart_objects::SmartObject& msg_params,
+ smart_objects::SmartObject& out_params);
+
+ // Send TTS request to HMI
+ void SendTTSRequest(const smart_objects::SmartObject& params,
+ bool use_events);
+
+ // Send UI request to HMI
+ void SendUIRequest(const smart_objects::SmartObject& params, bool use_events);
+
+ // VRHelp shall contain sequential positions and start from 1
+ static bool CheckVrHelpItemsOrder(const smart_objects::SmartObject& vr_help);
+
+ /**
+ * @brief Check if there some not delivered hmi responses exist
+ *
+ * @return true if all responses received
+ */
+ bool IsPendingResponseExist();
+
+ /**
+ * @brief Checks if request has at least one parameter
+ *
+ * @param params request parameters
+ *
+ * @returns true if at least one parameter is present in object
+ */
+ static bool ValidateConditionalMandatoryParameters(
+ const smart_objects::SmartObject& params);
+
+ /**
+ * @brief Checks set global properties params(helpPrompt, timeoutPrompt, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if set global properties contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ /*
+ * @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 sending to mobile applicaion
+ * @return result for sending to mobile application.
+ */
+ bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
+ std::string& info);
+
+ bool is_ui_send_;
+ bool is_tts_send_;
+
+ bool is_ui_received_;
+ bool is_tts_received_;
+
+ hmi_apis::Common_Result::eType ui_result_;
+ hmi_apis::Common_Result::eType tts_result_;
+ std::string ui_response_info_;
+ std::string tts_response_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(SetGlobalPropertiesRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_response.h
new file mode 100644
index 0000000000..778dc9b7d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief Register app interface request command class
+ **/
+class SetGlobalPropertiesResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SetGlobalPropertiesResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetGlobalPropertiesResponse(
+ 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_handler);
+
+ /**
+ * @brief SetGlobalPropertiesResponse class destructor
+ **/
+ virtual ~SetGlobalPropertiesResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetGlobalPropertiesResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_request.h
new file mode 100644
index 0000000000..f994f06ca3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_request.h
@@ -0,0 +1,91 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application_manager.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetIconRequest command class
+ **/
+class SetIconRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief Contains information about the type of image
+ */
+ typedef enum { STATIC = 0, DYNAMIC } ImageType;
+
+ /**
+ * @brief SetIconRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetIconRequest(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_handler);
+
+ /**
+ * @brief SetIconRequest class destructor
+ **/
+ virtual ~SetIconRequest();
+
+ /**
+ * @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);
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetIconRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_response.h
new file mode 100644
index 0000000000..c83ea3607a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_icon_response.h
@@ -0,0 +1,79 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/application_manager.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetIconResponse command class
+ **/
+class SetIconResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SetIconResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SetIconResponse(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& app_man,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ /**
+ * @brief SetIconResponse class destructor
+ **/
+ virtual ~SetIconResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetIconResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h
new file mode 100644
index 0000000000..ef674f1c38
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h
@@ -0,0 +1,86 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SetMediaClockRequest request command class
+ **/
+class SetMediaClockRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief SetMediaClockRequest class constructor
+ **/
+ SetMediaClockRequest(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_handler);
+
+ /**
+ * \brief ShowCommand class destructor
+ **/
+ virtual ~SetMediaClockRequest();
+
+ /**
+ * @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);
+
+ private:
+ bool isDataValid();
+
+ DISALLOW_COPY_AND_ASSIGN(SetMediaClockRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h
new file mode 100644
index 0000000000..2fb3f25839
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class SetMediaClockTimerResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief SetMediaClockTimerResponse class constructor
+ **/
+ SetMediaClockTimerResponse(
+ 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_handler);
+
+ /**
+ * \brief SetMediaClockTimerResponse class destructor
+ **/
+ virtual ~SetMediaClockTimerResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SetMediaClockTimerResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h
new file mode 100644
index 0000000000..cadc87cef6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h
@@ -0,0 +1,94 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ShowConstantTBTRequest command class
+ **/
+class ShowConstantTBTRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ShowConstantTBTRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ShowConstantTBTRequest(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_handler);
+
+ /**
+ * @brief ShowConstantTBTRequest class destructor
+ **/
+ virtual ~ShowConstantTBTRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /**
+ * @brief Checks show constant TBT params(turnIcon, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if show constant TBT contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ DISALLOW_COPY_AND_ASSIGN(ShowConstantTBTRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h
new file mode 100644
index 0000000000..4129a7640e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ShowConstantTBTResponse command class
+ **/
+class ShowConstantTBTResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief ShowConstantTBTResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ShowConstantTBTResponse(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_handler);
+
+ /**
+ * @brief ShowConstantTBTResponse class destructor
+ **/
+ virtual ~ShowConstantTBTResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ShowConstantTBTResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_request.h
new file mode 100644
index 0000000000..2277a38f11
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_request.h
@@ -0,0 +1,103 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief show request command class
+ **/
+class ShowRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief ShowRequest class constructor
+ **/
+ ShowRequest(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_handler);
+
+ /**
+ * \brief ShowRequest class destructor
+ **/
+ virtual ~ShowRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /*
+ * @brief Check if all strings have valid syntax in request
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool CheckStringsOfShowRequest();
+
+ /**
+ * @brief Handle the conversion of metadata information from the incoming
+ * mobile json message format to the outgoing hmi json message format
+ */
+ void HandleMetadata(const char* field_id,
+ int32_t field_index,
+ smart_objects::SmartObject& msg_params);
+
+ mobile_apis::Result::eType core_result_code_;
+ std::string core_response_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShowRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_response.h
new file mode 100644
index 0000000000..c78820a26e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_response.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class ShowResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief ShowResponse class constructor
+ **/
+ ShowResponse(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_handler);
+
+ /**
+ * \brief ShowResponse class destructor
+ **/
+ virtual ~ShowResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ShowResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_request.h
new file mode 100644
index 0000000000..f1e06e8d8d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_request.h
@@ -0,0 +1,96 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SLIDER_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SLIDER_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief slider request command class
+ **/
+class SliderRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief SliderRequest class constructor
+ **/
+ SliderRequest(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_handler);
+
+ /**
+ * \brief SliderRequest class destructor
+ **/
+ virtual ~SliderRequest();
+
+ /**
+ * @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
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /**
+ * @brief Checks slider params(sliderHeader, sliderFooter, ...).
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if slider contains \t\n \\t \\n return TRUE, FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ DISALLOW_COPY_AND_ASSIGN(SliderRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SLIDER_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_response.h
new file mode 100644
index 0000000000..2a93103632
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/slider_response.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class SliderResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief SliderResponse class constructor
+ **/
+ SliderResponse(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_handler);
+
+ /**
+ * \brief SpeakResponseCommand class destructor
+ **/
+ virtual ~SliderResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SliderResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_request.h
new file mode 100644
index 0000000000..d6d47bb869
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_request.h
@@ -0,0 +1,98 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SPEAK_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SPEAK_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief speak request command class
+ **/
+class SpeakRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief SpeakRequest class constructor
+ **/
+ SpeakRequest(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_handler);
+
+ /**
+ * \brief SpeakRequest class destructor
+ **/
+ virtual ~SpeakRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /*
+ * @brief Sends Speak response to mobile side
+ *
+ * @param message which should send to mobile side
+ *
+ */
+ void ProcessTTSSpeakResponse(const smart_objects::SmartObject& message);
+
+ /**
+ * @brief Checks speak param ttsChunks on the contents \t\n \\t \\n
+ * @return if speak contains \t\n \\t \\n return TRUE, FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ DISALLOW_COPY_AND_ASSIGN(SpeakRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SPEAK_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_response.h
new file mode 100644
index 0000000000..30eda07810
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/speak_response.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/message.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+
+class SpeakResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief SpeakResponse class constructor
+ **/
+ SpeakResponse(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_handler);
+
+ /**
+ * \brief SpeakResponse class destructor
+ **/
+ virtual ~SpeakResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SpeakResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_request.h
new file mode 100644
index 0000000000..011c0aa359
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_request.h
@@ -0,0 +1,103 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubscribeButtonRequest command class
+ **/
+class SubscribeButtonRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SubscribeButtonRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SubscribeButtonRequest(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_handler);
+
+ /**
+ * @brief SubscribeButtonRequest class destructor
+ **/
+ ~SubscribeButtonRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /**
+ * @brief Checks if button subscription allowed. In case non-media
+ * application trying to subscribe on buttons(tune, seek) negative result will
+ * be returned
+ *
+ * @param app Application requested subscription
+ * @param btn_id Button to be subscribe
+ *
+ * @return TRUE on success, otherwise false
+ **/
+ bool IsSubscriptionAllowed(app_mngr::ApplicationSharedPtr app,
+ const mobile_apis::ButtonName::eType btn_id);
+
+ /**
+ * @brief Sends ButtonSubscription notification
+ * to notify HMI that app subscribed on the button.
+ */
+ void SendSubscribeButtonNotification();
+
+ DISALLOW_COPY_AND_ASSIGN(SubscribeButtonRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_response.h
new file mode 100644
index 0000000000..28e942ec17
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_button_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubscribeButtonResponse command class
+ **/
+class SubscribeButtonResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SubscribeButtonResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SubscribeButtonResponse(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_handlers);
+
+ /**
+ * @brief SubscribeButtonResponse class destructor
+ **/
+ virtual ~SubscribeButtonResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SubscribeButtonResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_request.h
new file mode 100644
index 0000000000..6105f08750
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_request.h
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubsribeWayPointsRequest command class
+ **/
+class SubscribeWayPointsRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief SubscribeWayPointsRequest class constructor
+ **/
+ SubscribeWayPointsRequest(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_handler);
+
+ /**
+ * \brief SubscribeWayPointsRequest class destructor
+ **/
+ ~SubscribeWayPointsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SubscribeWayPointsRequest);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_response.h
new file mode 100644
index 0000000000..cd27e96d25
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_way_points_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubscribeWayPointsResponse command class
+ **/
+class SubscribeWayPointsResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief SubscribeWayPointsResponse class constructor
+ **/
+ SubscribeWayPointsResponse(
+ 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_handler);
+
+ /**
+ * \brief SubscribeWayPointsResponse class destructor
+ **/
+ virtual ~SubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SubscribeWayPointsResponse);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_request.h
new file mode 100644
index 0000000000..c34db34506
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_request.h
@@ -0,0 +1,98 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SYSTEM_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SYSTEM_REQUEST_H_
+
+#include <string>
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "smart_objects/smart_object.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SystemRequest command class
+ **/
+class SystemRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SystemRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SystemRequest(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_handler);
+
+ /**
+ * @brief SystemRequest class destructor
+ **/
+ virtual ~SystemRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /**
+ * @brief Validates data coming within QueryApps response
+ * @param data Data
+ * @return true, if data is valid, otherwise - false
+ */
+ bool ValidateQueryAppData(smart_objects::SmartObject& data) const;
+
+ private:
+ static uint32_t index;
+ std::string processing_file_;
+ DISALLOW_COPY_AND_ASSIGN(SystemRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SYSTEM_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_response.h
new file mode 100644
index 0000000000..afbd557d12
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/system_response.h
@@ -0,0 +1,77 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SYSTEM_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SYSTEM_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SystemResponse command class
+ **/
+class SystemResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SystemResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SystemResponse(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_handler);
+
+ /**
+ * @brief SystemResponse class destructor
+ **/
+ virtual ~SystemResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SystemResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SYSTEM_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h
new file mode 100644
index 0000000000..172f934a15
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h
@@ -0,0 +1,85 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief Unregister app interface request command class
+ **/
+class UnregisterAppInterfaceRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief UnregisterAppInterfaceRequest class constructor
+ **/
+ UnregisterAppInterfaceRequest(
+ 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_handler)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ /**
+ * \brief UnregisterAppInterfaceRequest class destructor
+ **/
+ virtual ~UnregisterAppInterfaceRequest() {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+ // virtual void cleanUp() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnregisterAppInterfaceRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_response.h
new file mode 100644
index 0000000000..13d8b549e8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unregister_app_interface_response.h
@@ -0,0 +1,81 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+namespace commands {
+/**
+ * @brief Unregister app interface request command class
+ **/
+class UnregisterAppInterfaceResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief UnregisterAppInterfaceResponse class constructor
+ **/
+ UnregisterAppInterfaceResponse(
+ const app_mngr::commands::MessageSharedPtr& response,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(response,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ /**
+ * \brief UnregisterAppInterfaceResponse class destructor
+ **/
+ virtual ~UnregisterAppInterfaceResponse() {}
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnregisterAppInterfaceResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_request.h
new file mode 100644
index 0000000000..8cbaafbfe1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_request.h
@@ -0,0 +1,89 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnsubscribeButtonRequest command class
+ **/
+class UnsubscribeButtonRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief UnsubscribeButtonRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UnsubscribeButtonRequest(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_handler);
+
+ /**
+ * @brief UnsubscribeButtonRequest class destructor
+ **/
+ ~UnsubscribeButtonRequest() FINAL;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ /**
+ * @brief Sends ButtonSubscription notification
+ * to notify HMI that app unsubscribed from the button.
+ */
+ void SendUnsubscribeButtonNotification();
+
+ DISALLOW_COPY_AND_ASSIGN(UnsubscribeButtonRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_response.h
new file mode 100644
index 0000000000..1db067acce
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_button_response.h
@@ -0,0 +1,79 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnsubscribeButtonResponse command class
+ **/
+class UnsubscribeButtonResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief UnsubscribeButtonResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UnsubscribeButtonResponse(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_handler);
+
+ /**
+ * @brief UnsubscribeButtonResponse class destructor
+ **/
+ virtual ~UnsubscribeButtonResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnsubscribeButtonResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_request.h
new file mode 100644
index 0000000000..b7b87f8b51
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_request.h
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+class UnSubscribeWayPointsRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * \brief UnSubscribeWayPointsRequest class constructor
+ **/
+ UnSubscribeWayPointsRequest(
+ 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_handler);
+
+ /**
+ * \brief UnSubscribeWayPointsRequest class destructor
+ **/
+ ~UnSubscribeWayPointsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnSubscribeWayPointsRequest);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_response.h
new file mode 100644
index 0000000000..c578bf9f99
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnsubscribeWayPointsResponse command class
+ **/
+class UnsubscribeWayPointsResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * \brief UnsubscribeWayPointsResponse class constructor
+ **/
+ UnsubscribeWayPointsResponse(
+ 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_handler);
+
+ /**
+ * \brief UnsubscribeWayPointsResponse class destructor
+ **/
+ virtual ~UnsubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnsubscribeWayPointsResponse);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_request.h
new file mode 100644
index 0000000000..8766339f96
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_request.h
@@ -0,0 +1,102 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateTurnListRequest command class
+ **/
+class UpdateTurnListRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief UpdateTurnListRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateTurnListRequest(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_handler);
+
+ /**
+ * @brief UpdateTurnListRequest class destructor
+ **/
+ virtual ~UpdateTurnListRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+ private:
+ /**
+ * @brief check correct parameter turnList
+ *
+ * @return TRUE if turnList is correct,
+ * otherwise FALSE
+ */
+ bool CheckTurnListArray();
+
+ /**
+ * @brief Checks update turn list param
+ * When type is String there is a check on the contents \t\n \\t \\n
+ * @return if update turn list contains \t\n \\t \\n return TRUE,
+ * FALSE otherwise
+ */
+ bool IsWhiteSpaceExist();
+
+ DISALLOW_COPY_AND_ASSIGN(UpdateTurnListRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_response.h
new file mode 100644
index 0000000000..59d3bf0b2c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/update_turn_list_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UpdateTurnListResponse command class
+ **/
+class UpdateTurnListResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief UpdateTurnListResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UpdateTurnListResponse(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_handler);
+
+ /**
+ * @brief UpdateTurnListResponse class destructor
+ **/
+ virtual ~UpdateTurnListResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpdateTurnListResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/hmi_command_factory.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/hmi_command_factory.h
new file mode 100644
index 0000000000..eee454fb00
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/hmi_command_factory.h
@@ -0,0 +1,75 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_HMI_COMMAND_FACTORY_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_HMI_COMMAND_FACTORY_H_
+
+#include "application_manager/command_factory.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+/**
+ * @brief Factory class for HMI command creation
+ **/
+class HMICommandFactory : public app_mngr::CommandFactory {
+ public:
+ HMICommandFactory(app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ app_mngr::CommandSharedPtr CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t,
+ const application_manager::commands::Command::CommandSource)
+ const OVERRIDE;
+
+ private:
+ app_mngr::CommandCreator& get_creator_factory(
+ hmi_apis::FunctionID::eType id,
+ hmi_apis::messageType::eType message_type,
+ app_mngr::commands::Command::CommandSource source) const;
+
+ app_mngr::ApplicationManager& application_manager_;
+ app_mngr::rpc_service::RPCService& rpc_service_;
+ app_mngr::HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
+ DISALLOW_COPY_AND_ASSIGN(HMICommandFactory);
+};
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_HMI_COMMAND_FACTORY_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/mobile_command_factory.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/mobile_command_factory.h
new file mode 100644
index 0000000000..f0840dde41
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/mobile_command_factory.h
@@ -0,0 +1,75 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_MOBILE_COMMAND_FACTORY_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_MOBILE_COMMAND_FACTORY_H_
+
+#include "application_manager/command_factory.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+/**
+ * @brief Factory class for mobile command creation
+ **/
+class MobileCommandFactory : public app_mngr::CommandFactory {
+ public:
+ MobileCommandFactory(app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ app_mngr::CommandSharedPtr CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t,
+ const application_manager::commands::Command::CommandSource)
+ const OVERRIDE;
+
+ private:
+ app_mngr::CommandCreator& get_creator_factory(
+ mobile_apis::FunctionID::eType id,
+ mobile_apis::messageType::eType message_type,
+ app_mngr::commands::Command::CommandSource source) const;
+
+ app_mngr::ApplicationManager& application_manager_;
+ app_mngr::rpc_service::RPCService& rpc_service_;
+ app_mngr::HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
+ DISALLOW_COPY_AND_ASSIGN(MobileCommandFactory);
+};
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_MOBILE_COMMAND_FACTORY_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_command_factory.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_command_factory.h
new file mode 100644
index 0000000000..5b5f0ae49f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_command_factory.h
@@ -0,0 +1,73 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_COMMAND_FACTORY_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_COMMAND_FACTORY_H
+
+#include <memory>
+#include "application_manager/application_manager.h"
+#include "application_manager/command_factory.h"
+#include "sdl_rpc_plugin/hmi_command_factory.h"
+#include "sdl_rpc_plugin/mobile_command_factory.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/hmi_capabilities.h"
+#include "application_manager/policies/policy_handler_interface.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+class SDLCommandFactory : public app_mngr::CommandFactory {
+ public:
+ SDLCommandFactory(app_mngr::ApplicationManager& app_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ app_mngr::CommandSharedPtr CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t,
+ const application_manager::commands::Command::CommandSource)
+ const OVERRIDE;
+
+ private:
+ app_mngr::ApplicationManager& app_manager_;
+ app_mngr::rpc_service::RPCService& rpc_service_;
+ app_mngr::HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
+ std::unique_ptr<HMICommandFactory> hmi_command_factory_;
+ std::unique_ptr<MobileCommandFactory> mobile_command_factory_;
+};
+}
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_COMMAND_FACTORY_H
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
new file mode 100644
index 0000000000..6ae3a0b6bc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h
@@ -0,0 +1,68 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_RPC_PLUGIN_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_RPC_PLUGIN_H
+#include "application_manager/plugin_manager/rpc_plugin.h"
+#include "application_manager/command_factory.h"
+
+namespace sdl_rpc_plugin {
+namespace plugins = application_manager::plugin_manager;
+class SDLRPCPlugin : public plugins::RPCPlugin {
+ // RPCPlugin interface
+ public:
+ bool Init(application_manager::ApplicationManager& app_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t function_id,
+ const application_manager::commands::Command::CommandSource
+ message_source) OVERRIDE;
+ std::string PluginName() OVERRIDE;
+
+ application_manager::CommandFactory& GetCommandFactory() OVERRIDE;
+ void OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent event) OVERRIDE;
+ void OnApplicationEvent(
+ application_manager::plugin_manager::ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application) OVERRIDE;
+
+ private:
+ std::unique_ptr<application_manager::CommandFactory> command_factory_;
+};
+}
+
+extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+
+#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/src/commands/hmi/activate_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc
new file mode 100644
index 0000000000..19d01b594f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc
@@ -0,0 +1,78 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/activate_app_request.h"
+
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ActivateAppRequest::ActivateAppRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ActivateAppRequest::~ActivateAppRequest() {
+ LOG4CXX_TRACE(logger_, "~ActivateAppRequest");
+}
+
+void ActivateAppRequest::Run() {
+ LOG4CXX_TRACE(logger_, "enter " << correlation_id());
+ uint32_t app_id = RequestToHMI::application_id();
+ application_manager_.set_application_id(correlation_id(), app_id);
+#ifdef ENABLE_LOG
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::activate_app_hmi_level)) {
+ mobile_apis::HMILevel::eType requested_hmi_level =
+ 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);
+ }
+#endif
+ SendRequest();
+ LOG4CXX_TRACE(logger_, "exit");
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d7e38c5d5b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/activate_app_response.h"
+
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ActivateAppResponse::ActivateAppResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ActivateAppResponse::~ActivateAppResponse() {}
+
+void ActivateAppResponse::Run() {
+ LOG4CXX_TRACE(logger_, "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");
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3e46bd353a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/add_statistics_info_notification.h"
+#include "application_manager/policies/policy_handler.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AddStatisticsInfoNotification::AddStatisticsInfoNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {}
+
+void AddStatisticsInfoNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ int type = (*message_)[strings::msg_params][hmi_notification::statistic_type]
+ .asInt();
+
+ policy_handler_.AddStatisticsInfo(type);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..b227dd79dc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AllowAllAppsRequest::AllowAllAppsRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AllowAllAppsRequest::~AllowAllAppsRequest() {}
+
+void AllowAllAppsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2fdf29a7dd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/allow_all_apps_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AllowAllAppsResponse::AllowAllAppsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AllowAllAppsResponse::~AllowAllAppsResponse() {}
+
+void AllowAllAppsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ application_manager_.SetAllAppsAllowed(
+ (*message_)[strings::msg_params][hmi_response::allowed].asBool());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0c6e5145c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/allow_app_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AllowAppRequest::AllowAppRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AllowAppRequest::~AllowAppRequest() {}
+
+void AllowAppRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4853c3764a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc
@@ -0,0 +1,73 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/allow_app_response.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AllowAppResponse::AllowAppResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AllowAppResponse::~AllowAppResponse() {}
+
+void AllowAppResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ uint32_t connection_key =
+ (*message_)[strings::params][strings::connection_key].asInt();
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key);
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+ app->set_app_allowed(
+ (*message_)[strings::msg_params][hmi_response::allowed].asBool());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..fb87612e19
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc
@@ -0,0 +1,58 @@
+/*
+ * 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
+ * distribut wiion.
+ *
+ * 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/commands/hmi/basic_communication_get_system_time_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+BasicCommunicationGetSystemTimeRequest::BasicCommunicationGetSystemTimeRequest(
+ 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) {}
+
+void BasicCommunicationGetSystemTimeRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ application_manager_.protocol_handler().NotifyOnFailedHandshake();
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
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
new file mode 100644
index 0000000000..c067debf36
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h"
+#include "utils/logger.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "Commands")
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+BasicCommunicationGetSystemTimeResponse::
+ BasicCommunicationGetSystemTimeResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+void BasicCommunicationGetSystemTimeResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_GetSystemTime);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0c39389116
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc
@@ -0,0 +1,82 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/basic_communication_on_awake_sdl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resume_ctrl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAwakeSDLNotification::OnAwakeSDLNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAwakeSDLNotification::~OnAwakeSDLNotification() {}
+
+void OnAwakeSDLNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!application_manager_.resume_controller().is_suspended()) {
+ return;
+ }
+
+ {
+ DataAccessor<ApplicationSet> accessor = application_manager_.applications();
+ ApplicationSetIt itBegin = accessor.GetData().begin();
+ ApplicationSetIt itEnd = accessor.GetData().end();
+ for (; itBegin != itEnd; ++itBegin) {
+ const ApplicationSharedPtr app = *itBegin;
+ if (app && app->IsHashChangedDuringSuspend()) {
+ MessageHelper::SendHashUpdateNotification(app->app_id(),
+ application_manager_);
+ app->SetHashChangedDuringSuspend(false);
+ }
+ }
+ }
+
+ application_manager_.resume_controller().OnAwake();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..04e44a6979
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+BasicCommunicationSystemRequest::BasicCommunicationSystemRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {}
+
+void BasicCommunicationSystemRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5f8221fdbe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/basic_communication_system_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+BasicCommunicationSystemResponse::BasicCommunicationSystemResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {}
+
+void BasicCommunicationSystemResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_SystemRequest);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cf2fbd9761
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h"
+#include "utils/logger.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {}
+
+void ButtonGetCapabilitiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..863e179040
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc
@@ -0,0 +1,77 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/button_get_capabilities_response.h"
+
+#include "utils/logger.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {}
+
+void ButtonGetCapabilitiesResponse::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());
+
+ if (hmi_apis::Common_Result::SUCCESS != code) {
+ LOG4CXX_ERROR(logger_, "Error is returned. Capabilities won't be updated.");
+ return;
+ }
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_button_capabilities(
+ (*message_)[strings::msg_params][hmi_response::capabilities]);
+
+ hmi_capabilities.set_preset_bank_capabilities(
+ (*message_)[strings::msg_params][hmi_response::preset_bank_capabilities]);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..84a47b9deb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/close_popup_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ClosePopupRequest::ClosePopupRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ClosePopupRequest::~ClosePopupRequest() {}
+
+void ClosePopupRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..25396af337
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/close_popup_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ClosePopupResponse::ClosePopupResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ClosePopupResponse::~ClosePopupResponse() {}
+
+void ClosePopupResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // TODO(VS): Process response from HMI
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0e09c14650
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/decrypt_certificate_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DecryptCertificateRequest::DecryptCertificateRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+void DecryptCertificateRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..694298ed91
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc
@@ -0,0 +1,68 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h"
+
+#include "application_manager/policies/policy_handler.h"
+#ifdef EXTERNAL_PROPRIETARY_MODE
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DecryptCertificateResponse::DecryptCertificateResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+DecryptCertificateResponse::~DecryptCertificateResponse() {}
+
+void DecryptCertificateResponse::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());
+
+ const bool is_succeeded = hmi_apis::Common_Result::SUCCESS == code;
+
+ policy_handler_.OnCertificateDecrypted(is_succeeded);
+}
+
+} // namespace commands
+} // namespace application_manager
+#endif // EXTERNAL_PROPRIETARY_MODE
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_request.cc
new file mode 100644
index 0000000000..63f5c2e815
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_request.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/dial_number_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+DialNumberRequest::DialNumberRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+DialNumberRequest::~DialNumberRequest() {}
+
+void DialNumberRequest::Run() {
+ SendRequest();
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_response.cc
new file mode 100644
index 0000000000..6d37ece2bf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/dial_number_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/dial_number_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+DialNumberResponse::DialNumberResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+DialNumberResponse::~DialNumberResponse() {}
+
+void DialNumberResponse::Run() {
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_DialNumber);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c06c90973d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/get_system_info_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetSystemInfoRequest::GetSystemInfoRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+GetSystemInfoRequest::~GetSystemInfoRequest() {}
+
+void GetSystemInfoRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ uint32_t correlation_id = RequestToHMI::correlation_id();
+ uint32_t app_id = RequestToHMI::application_id();
+ application_manager_.set_application_id(correlation_id, app_id);
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..aef428b39f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc
@@ -0,0 +1,93 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/get_system_info_response.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+GetSystemInfoResponse::GetSystemInfoResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+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());
+
+ const SystemInfo& info = GetSystemInfo(code);
+
+ // 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);
+}
+
+const SystemInfo GetSystemInfoResponse::GetSystemInfo(
+ const hmi_apis::Common_Result::eType code) 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();
+
+ info.wers_country_code =
+ (*message_)[strings::msg_params]["wersCountryCode"].asString();
+
+ const uint32_t lang_code =
+ (*message_)[strings::msg_params]["language"].asUInt();
+ info.language = application_manager::MessageHelper::CommonLanguageToString(
+ static_cast<hmi_apis::Common_Language::eType>(lang_code));
+
+ hmi_capabilities_.set_ccpu_version(info.ccpu_version);
+
+ return info;
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls.cc
new file mode 100644
index 0000000000..52b95d3fa3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls.cc
@@ -0,0 +1,230 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/get_urls.h"
+#include "application_manager/message.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/policies/policy_handler.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+GetUrls::GetUrls(const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+GetUrls::~GetUrls() {}
+
+void GetUrls::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ namespace Common_Result = hmi_apis::Common_Result;
+ using policy::EndpointUrls;
+
+ if (!policy_handler_.PolicyEnabled()) {
+ SendResponseToHMI(Common_Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+
+ const uint32_t service_to_check =
+ (*message_)[strings::msg_params][hmi_request::service].asUInt();
+
+ EndpointUrls endpoints;
+ policy_handler_.GetUpdateUrls(service_to_check, endpoints);
+
+ if (endpoints.empty()) {
+ LOG4CXX_ERROR(logger_, "No URLs for service " << service_to_check);
+ SendResponseToHMI(Common_Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+
+#ifdef PROPRIETARY_MODE
+ const uint32_t policy_service = 7u;
+
+ if (policy_service == service_to_check) {
+ ProcessPolicyServiceURLs(endpoints);
+ return;
+ }
+#endif // PROPRIETARY_MODE
+
+ ProcessServiceURLs(endpoints);
+}
+
+void GetUrls::ProcessServiceURLs(const policy::EndpointUrls& endpoints) {
+ namespace Common_Result = hmi_apis::Common_Result;
+ using smart_objects::SmartObject;
+
+ (*message_)[strings::msg_params].erase(hmi_request::service);
+ SmartObject& urls = (*message_)[strings::msg_params][hmi_response::urls];
+
+ size_t index = 0;
+ for (size_t e = 0; e < endpoints.size(); ++e) {
+ ApplicationSharedPtr app =
+ application_manager_.application_by_policy_id(endpoints[e].app_id);
+
+#ifndef PROPRIETARY_MODE
+ bool registered_not_default = false;
+ if (policy::kDefaultId != endpoints[e].app_id) {
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "Can't find application with policy id "
+ << endpoints[e].app_id
+ << " URLs adding for this application is skipped.");
+ continue;
+ }
+ registered_not_default = true;
+ }
+#endif // EXTERNAL_PROPRIETARY_MODE || HTTP
+ for (size_t u = 0; u < endpoints[e].url.size(); ++u, ++index) {
+ const std::string& app_url = endpoints[e].url[u];
+ SmartObject& service_info = urls[index];
+
+ service_info[strings::url] = app_url;
+#ifndef PROPRIETARY_MODE
+ if (registered_not_default) {
+ service_info[strings::app_id] = app->hmi_app_id();
+ }
+#else // EXTERNAL_PROPRIETARY_MODE || HTTP
+ service_info[hmi_response::policy_app_id] = endpoints[e].app_id;
+#endif
+ }
+ }
+ SendResponseToHMI(Common_Result::SUCCESS);
+}
+
+void GetUrls::SendResponseToHMI(hmi_apis::Common_Result::eType result) {
+ (*message_)[strings::params][strings::message_type] = MessageType::kResponse;
+ (*message_)[strings::params][hmi_response::code] = result;
+ rpc_service_.ManageHMICommand(message_);
+}
+
+#ifdef PROPRIETARY_MODE
+struct PolicyAppIdComparator {
+ PolicyAppIdComparator(const std::string& policy_app_id)
+ : policy_app_id_(policy_app_id) {}
+
+ bool operator()(const policy::EndpointData& data) {
+ return data.app_id == policy_app_id_;
+ }
+ std::string policy_app_id_;
+};
+
+void FillSODefaultUrls(smart_objects::SmartObject& urls,
+ const policy::EndpointUrls& endpoints) {
+ using smart_objects::SmartObject;
+ PolicyAppIdComparator comparator(policy::kDefaultId);
+ policy::EndpointUrls::const_iterator it =
+ std::find_if(endpoints.begin(), endpoints.end(), comparator);
+ if (it == endpoints.end()) {
+ return;
+ }
+ SmartObject service_info = SmartObject(smart_objects::SmartType_Map);
+ for (size_t i = 0; i < (*it).url.size(); ++i) {
+ service_info[strings::url] = (*it).url[i];
+ urls[i] = service_info;
+ }
+}
+
+void GetUrls::ProcessPolicyServiceURLs(const policy::EndpointUrls& endpoints) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace smart_objects;
+ using namespace application_manager;
+ using namespace strings;
+ using namespace hmi_apis;
+
+ const uint32_t app_id_to_send_to = policy_handler_.GetAppIdForSending();
+
+ if (!app_id_to_send_to) {
+ LOG4CXX_ERROR(logger_,
+ "There are no available applications for processing.");
+ SmartObject urls(SmartType_Array);
+ FillSODefaultUrls(urls, endpoints);
+ if (!urls.empty()) {
+ (*message_)[msg_params][hmi_response::urls] = urls;
+ }
+ (*message_).erase(hmi_request::service);
+ SendResponseToHMI(Common_Result::SUCCESS);
+ return;
+ }
+
+ ApplicationSharedPtr app =
+ application_manager_.application(app_id_to_send_to);
+
+ if (!app.valid()) {
+ LOG4CXX_WARN(logger_,
+ "There is no registered application with "
+ "connection key '"
+ << app_id_to_send_to << "'");
+ SendResponseToHMI(Common_Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+
+ SmartObject& object = *message_;
+ object[msg_params].erase(hmi_request::service);
+ object[msg_params][hmi_response::urls] = SmartObject(SmartType_Array);
+ SmartObject& urls = object[msg_params][hmi_response::urls];
+ const std::string mobile_app_id = app->policy_app_id();
+
+ size_t index = 0;
+ for (size_t i = 0; i < endpoints.size(); ++i) {
+ using namespace helpers;
+
+ const bool to_add = Compare<std::string, EQ, ONE>(
+ endpoints[i].app_id, mobile_app_id, policy::kDefaultId);
+ const bool is_default = policy::kDefaultId == endpoints[i].app_id;
+
+ if (to_add) {
+ for (size_t k = 0; k < endpoints[i].url.size(); ++k) {
+ if (!is_default) {
+ urls[index][strings::app_id] = app_id_to_send_to;
+ }
+ urls[index][strings::url] = endpoints[i].url[k];
+ ++index;
+ }
+ }
+ }
+ SendResponseToHMI(Common_Result::SUCCESS);
+ return;
+}
+#endif // PROPRIETARY_MODE
+
+} // namespace commands
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls_response.cc
new file mode 100644
index 0000000000..57c925e08f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_urls_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/get_urls_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+GetUrlsResponse::GetUrlsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+GetUrlsResponse::~GetUrlsResponse() {}
+
+void GetUrlsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..39f7e61c06
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/mixing_audio_supported_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+MixingAudioSupportedRequest::MixingAudioSupportedRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {}
+
+void MixingAudioSupportedRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..26fa967844
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+MixingAudioSupportedResponse::MixingAudioSupportedResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {}
+
+void MixingAudioSupportedResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ hmi_capabilities_.set_attenuated_supported(
+ (*message_)[strings::msg_params][hmi_response::attenuated_supported]
+ .asBool());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ae3695b68e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviAlertManeuverRequest::NaviAlertManeuverRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {}
+
+void NaviAlertManeuverRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6a6307038a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviAlertManeuverResponse::NaviAlertManeuverResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {}
+
+void NaviAlertManeuverResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_AlertManeuver);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3d2370d55b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc
@@ -0,0 +1,189 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h"
+
+#include "application_manager/message_helper.h"
+#include "protocol_handler/protocol_handler.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AudioStartStreamRequest::AudioStartStreamRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher())
+ , retry_number_(0) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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_
+ << "; retry_number_ = " << retry_number_);
+}
+
+AudioStartStreamRequest::~AudioStartStreamRequest() {}
+
+void AudioStartStreamRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
+ LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ return;
+ }
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "Applcation with hmi_app_id " << application_id()
+ << " does not exist");
+ return;
+ }
+ SetAllowedToTerminate(false);
+ subscribe_on_event(hmi_apis::FunctionID::Navigation_StartAudioStream,
+ correlation_id());
+ app->set_audio_streaming_allowed(true);
+ SendRequest();
+}
+
+void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
+ using namespace protocol_handler;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "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");
+
+ 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");
+ if (application_manager_.HMILevelAllowsStreaming(app->app_id(),
+ ServiceType::kAudio)) {
+ app->set_audio_streaming_approved(true);
+ } else {
+ LOG4CXX_WARN(
+ logger_,
+ "StartAudioStreamRequest aborted. Application can not stream");
+ }
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+ break;
+ }
+ if (hmi_apis::Common_Result::REJECTED == code) {
+ LOG4CXX_INFO(logger_, "StartAudioStream response REJECTED");
+ RetryStartSession();
+ break;
+ }
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void AudioStartStreamRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RetryStartSession();
+}
+
+void AudioStartStreamRequest::RetryStartSession() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "StartAudioStreamRequest aborted. Application not found");
+ return;
+ }
+
+ if (!app->audio_streaming_allowed()) {
+ LOG4CXX_WARN(logger_, "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;
+ }
+
+ uint32_t curr_retry_number = app->audio_stream_retry_number();
+ LOG4CXX_DEBUG(
+ logger_, "Retry number " << curr_retry_number << " of " << retry_number_);
+
+ 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.");
+
+ application_manager_.EndNaviServices(app->app_id());
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..362a46cc19
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AudioStartStreamResponse::AudioStartStreamResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AudioStartStreamResponse::~AudioStartStreamResponse() {}
+
+void AudioStartStreamResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_StartAudioStream);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ba2b8c8157
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AudioStopStreamRequest::AudioStopStreamRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AudioStopStreamRequest::~AudioStopStreamRequest() {}
+
+void AudioStopStreamRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
+ LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ return;
+ }
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..87ddc81696
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc
@@ -0,0 +1,59 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AudioStopStreamResponse::AudioStopStreamResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+AudioStopStreamResponse::~AudioStopStreamResponse() {}
+
+void AudioStopStreamResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..77ef3e3369
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviGetWayPointsRequest::NaviGetWayPointsRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviGetWayPointsRequest::~NaviGetWayPointsRequest() {}
+
+void NaviGetWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0aad5e5724
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_get_way_points_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviGetWayPointsResponse::NaviGetWayPointsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {}
+
+void NaviGetWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..781b8d3045
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc
@@ -0,0 +1,87 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviIsReadyRequest::NaviIsReadyRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+NaviIsReadyRequest::~NaviIsReadyRequest() {}
+
+void NaviIsReadyRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(hmi_apis::FunctionID::Navigation_IsReady,
+ correlation_id());
+ SendRequest();
+}
+
+void NaviIsReadyRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::Navigation_IsReady: {
+ LOG4CXX_DEBUG(logger_, "Received Navigation_IsReady event");
+ unsubscribe_from_event(hmi_apis::FunctionID::Navigation_IsReady);
+ const bool is_available = app_mngr::commands::ChangeInterfaceState(
+ application_manager_,
+ message,
+ HmiInterfaces::HMI_INTERFACE_Navigation);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities.set_is_navi_cooperating(is_available);
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..b4e64e2a3e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_is_ready_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviIsReadyResponse::NaviIsReadyResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviIsReadyResponse::~NaviIsReadyResponse() {}
+
+void NaviIsReadyResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_IsReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a10f61310d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_send_location_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviSendLocationRequest::NaviSendLocationRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviSendLocationRequest::~NaviSendLocationRequest() {}
+
+void NaviSendLocationRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f93e2e17c3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_send_location_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviSendLocationResponse::NaviSendLocationResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviSendLocationResponse::~NaviSendLocationResponse() {}
+
+void NaviSendLocationResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_SendLocation);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5e4426bd20
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
@@ -0,0 +1,156 @@
+/*
+ * 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 names of the copyright holders 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/commands/hmi/navi_set_video_config_request.h"
+#include <string>
+#include <vector>
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviSetVideoConfigRequest::NaviSetVideoConfigRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+NaviSetVideoConfigRequest::~NaviSetVideoConfigRequest() {}
+
+void NaviSetVideoConfigRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
+ LOG4CXX_WARN(logger_, "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");
+ return;
+ }
+
+ subscribe_on_event(hmi_apis::FunctionID::Navigation_SetVideoConfig,
+ correlation_id());
+ SendRequest();
+}
+
+void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "Application is not found, abort NaviSetVideoConfigRequest");
+ return;
+ }
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::Navigation_SetVideoConfig: {
+ 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;
+ } else {
+ LOG4CXX_DEBUG(logger_,
+ "Received SetVideoConfig failure response (" << event.id()
+ << ")");
+ result = false;
+ if (message[strings::msg_params].keyExists(strings::rejected_params)) {
+ const smart_objects::SmartArray* list =
+ message[strings::msg_params][strings::rejected_params].asArray();
+ if (list != NULL) {
+ for (unsigned int i = 0; i < list->size(); i++) {
+ const std::string& param = (*list)[i].asString();
+ // Make sure that we actually sent the parameter in the request
+ if ((*message_)[strings::msg_params].keyExists(strings::config) &&
+ (*message_)[strings::msg_params][strings::config].keyExists(
+ param)) {
+ rejected_params.push_back(param);
+ }
+ }
+ }
+ }
+ }
+ application_manager_.OnStreamingConfigured(
+ app->app_id(),
+ protocol_handler::ServiceType::kMobileNav,
+ result,
+ rejected_params);
+ break;
+ }
+ default:
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+}
+
+void NaviSetVideoConfigRequest::onTimeOut() {
+ LOG4CXX_WARN(logger_, "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");
+ return;
+ }
+
+ std::vector<std::string> empty;
+ application_manager_.OnStreamingConfigured(
+ app->app_id(), protocol_handler::ServiceType::kMobileNav, false, empty);
+
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c5f1c5307f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 names of the copyright holders 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/commands/hmi/navi_set_video_config_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviSetVideoConfigResponse::NaviSetVideoConfigResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviSetVideoConfigResponse::~NaviSetVideoConfigResponse() {}
+
+void NaviSetVideoConfigResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_SetVideoConfig);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..22d604ab0d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviShowConstantTBTRequest::NaviShowConstantTBTRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {}
+
+void NaviShowConstantTBTRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d2ff26b645
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviShowConstantTBTResponse::NaviShowConstantTBTResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {}
+
+void NaviShowConstantTBTResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e44d89f93a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc
@@ -0,0 +1,189 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h"
+
+#include "application_manager/message_helper.h"
+#include "protocol_handler/protocol_handler.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviStartStreamRequest::NaviStartStreamRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher())
+ , retry_number_(0) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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_
+ << "; retry_number_ = " << retry_number_);
+}
+
+NaviStartStreamRequest::~NaviStartStreamRequest() {}
+
+void NaviStartStreamRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
+ LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ return;
+ }
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "Applcation with hmi_app_id " << application_id()
+ << "does not exist");
+ return;
+ }
+ SetAllowedToTerminate(false);
+ subscribe_on_event(hmi_apis::FunctionID::Navigation_StartStream,
+ correlation_id());
+ app->set_video_streaming_allowed(true);
+ SendRequest();
+}
+
+void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
+ using namespace protocol_handler;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "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");
+
+ 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");
+ if (application_manager_.HMILevelAllowsStreaming(
+ app->app_id(), ServiceType::kMobileNav)) {
+ app->set_video_streaming_approved(true);
+ } else {
+ LOG4CXX_DEBUG(
+ logger_,
+ "NaviStartStreamRequest aborted. Application can not stream");
+ }
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+ break;
+ }
+ if (hmi_apis::Common_Result::REJECTED == code) {
+ LOG4CXX_INFO(logger_, "StartStream response REJECTED ");
+ RetryStartSession();
+ break;
+ }
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void NaviStartStreamRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RetryStartSession();
+}
+
+void NaviStartStreamRequest::RetryStartSession() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "NaviStartStreamRequest aborted. Application not found");
+ return;
+ }
+
+ if (!app->video_streaming_allowed()) {
+ LOG4CXX_WARN(logger_, "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;
+ }
+
+ uint32_t curr_retry_number = app->video_stream_retry_number();
+ LOG4CXX_DEBUG(
+ logger_, "Retry number " << curr_retry_number << " of " << retry_number_);
+
+ 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");
+
+ application_manager_.EndNaviServices(app->app_id());
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f09a334f51
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_start_stream_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviStartStreamResponse::NaviStartStreamResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviStartStreamResponse::~NaviStartStreamResponse() {}
+
+void NaviStartStreamResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_StartStream);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3e27692d62
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviStopStreamRequest::NaviStopStreamRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviStopStreamRequest::~NaviStopStreamRequest() {}
+
+void NaviStopStreamRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
+ LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ return;
+ }
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..61b8d5a1e2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc
@@ -0,0 +1,59 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_stop_stream_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviStopStreamResponse::NaviStopStreamResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviStopStreamResponse::~NaviStopStreamResponse() {}
+
+void NaviStopStreamResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a4445ebce8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviSubscribeWayPointsRequest::~NaviSubscribeWayPointsRequest() {}
+
+void NaviSubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ae5f236f6f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviSubscribeWayPointsResponse::~NaviSubscribeWayPointsResponse() {}
+
+void NaviSubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::Navigation_SubscribeWayPoints);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e7d416bc61
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviUnSubscribeWayPointsRequest::NaviUnSubscribeWayPointsRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviUnSubscribeWayPointsRequest::~NaviUnSubscribeWayPointsRequest() {}
+
+void NaviUnSubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c084bd52d3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc
@@ -0,0 +1,68 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviUnsubscribeWayPointsResponse::~NaviUnsubscribeWayPointsResponse() {}
+
+void NaviUnsubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9c507c3637
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviUpdateTurnListRequest::NaviUpdateTurnListRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {}
+
+void NaviUpdateTurnListRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..eb232e6d01
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/navi_update_turn_list_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+NaviUpdateTurnListResponse::NaviUpdateTurnListResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {}
+
+void NaviUpdateTurnListResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..398c2dac30
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc
@@ -0,0 +1,69 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/policies/policy_handler.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAllowSDLFunctionalityNotification::~OnAllowSDLFunctionalityNotification() {}
+
+void OnAllowSDLFunctionalityNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ std::string device_id;
+ if ((*message_)[strings::msg_params].keyExists("device")) {
+ device_id = (*message_)[strings::msg_params]["device"]["id"].asString();
+ }
+ policy_handler_.OnAllowSDLFunctionalityNotification(
+ (*message_)[strings::msg_params][hmi_response::allowed].asBool(),
+ device_id);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..189596c58a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h"
+
+#include "application_manager/message_helper.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAppActivatedNotification::OnAppActivatedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAppActivatedNotification::~OnAppActivatedNotification() {}
+
+void OnAppActivatedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppActivated);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ee45f9bf1e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc
@@ -0,0 +1,69 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAppDeactivatedNotification::OnAppDeactivatedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {}
+
+void OnAppDeactivatedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e13299ece7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAppPermissionChangedNotification::OnAppPermissionChangedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {}
+
+void OnAppPermissionChangedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..839c16ca08
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc
@@ -0,0 +1,183 @@
+
+/**
+ * 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 "sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/message_helper.h"
+#include <algorithm>
+#include <functional>
+#include <string>
+#include "policy/policy_types.h"
+#include "smart_objects/smart_object.h"
+#include "utils/make_shared.h"
+
+namespace {
+
+/**
+ * @brief Converts SmartObject data to group permission status and appends to
+ * collection
+ */
+struct PermissionsAppender
+ : public std::unary_function<void,
+ const smart_objects::SmartArray::value_type&> {
+ PermissionsAppender(policy::PermissionConsent& consents)
+ : allowed_key_(application_manager::hmi_response::allowed)
+ , consents_(consents) {}
+ void operator()(const smart_objects::SmartArray::value_type& item) const {
+ using namespace policy;
+ using namespace application_manager;
+
+ FunctionalGroupPermission permissions;
+
+ permissions.group_id = static_cast<int32_t>(item[strings::id].asInt());
+ permissions.group_alias = item[strings::name].asString();
+
+ if (item.keyExists(allowed_key_)) {
+ permissions.state =
+ item[allowed_key_].asBool() ? kGroupAllowed : kGroupDisallowed;
+ }
+
+ consents_.group_permissions.push_back(permissions);
+ }
+
+ private:
+ const std::string allowed_key_;
+ policy::PermissionConsent& consents_;
+};
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+/**
+ * @brief Converts SmartObject data to customer connectivity status item and
+ * appends to collection
+ */
+struct ExternalConsentStatusAppender
+ : std::unary_function<void, const smart_objects::SmartArray::value_type&> {
+ ExternalConsentStatusAppender(
+ policy::ExternalConsentStatus& external_consent_status)
+ : external_consent_status_(external_consent_status) {}
+ void operator()(const smart_objects::SmartArray::value_type& item) const {
+ using namespace policy;
+ using namespace hmi_apis;
+ using namespace application_manager;
+
+ ExternalConsentStatusItem status_item(
+ static_cast<uint32_t>(item[strings::entity_type].asUInt()),
+ static_cast<uint32_t>(item[strings::entity_id].asUInt()),
+ static_cast<Common_EntityStatus::eType>(
+ item[strings::status].asUInt()) == Common_EntityStatus::ON
+ ? policy::kStatusOn
+ : policy::kStatusOff);
+
+ external_consent_status_.insert(status_item);
+ }
+
+ private:
+ policy::ExternalConsentStatus& external_consent_status_;
+};
+#endif
+} // namespace
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAppPermissionConsentNotification::OnAppPermissionConsentNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {}
+
+void OnAppPermissionConsentNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+
+ uint32_t connection_key = 0;
+
+ policy::PermissionConsent permission_consent;
+
+ // If user defined group permissions for specific app
+ if (msg_params.keyExists(strings::app_id)) {
+ connection_key = msg_params[strings::app_id].asUInt();
+ }
+
+ if (msg_params.keyExists(strings::consented_functions)) {
+ const smart_objects::SmartArray* user_consent =
+ msg_params[strings::consented_functions].asArray();
+
+ smart_objects::SmartArray::const_iterator it = user_consent->begin();
+ smart_objects::SmartArray::const_iterator it_end = user_consent->end();
+ for (; it != it_end; ++it) {
+ policy::FunctionalGroupPermission permissions;
+ permissions.group_id = (*it)["id"].asInt();
+ permissions.group_alias = (*it)["name"].asString();
+ if ((*it).keyExists("allowed")) {
+ permissions.state = (*it)["allowed"].asBool()
+ ? policy::kGroupAllowed
+ : policy::kGroupDisallowed;
+ } else {
+ permissions.state = policy::kGroupUndefined;
+ }
+
+ permission_consent.group_permissions.push_back(permissions);
+ }
+
+ permission_consent.consent_source = msg_params[strings::source].asString();
+ }
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ policy::ExternalConsentStatus external_consent_status;
+ if (msg_params.keyExists(strings::external_consent_status)) {
+ const smart_objects::SmartArray* system_external_consent_status =
+ msg_params[strings::external_consent_status].asArray();
+ ExternalConsentStatusAppender status_appender(external_consent_status);
+ std::for_each(system_external_consent_status->begin(),
+ system_external_consent_status->end(),
+ status_appender);
+ }
+ policy_handler_.OnAppPermissionConsent(
+ connection_key, permission_consent, external_consent_status);
+#else
+ policy_handler_.OnAppPermissionConsent(connection_key, permission_consent);
+#endif
+}
+} // commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..24c5a94272
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAppRegisteredNotification::OnAppRegisteredNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAppRegisteredNotification::~OnAppRegisteredNotification() {}
+
+void OnAppRegisteredNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ // SDL must notify system about app registration before any dependent actions
+ // will be started
+ SendNotification();
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..001b9fa5e0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc
@@ -0,0 +1,76 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h"
+
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAppUnregisteredNotification::OnAppUnregisteredNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {}
+
+bool OnAppUnregisteredNotification::Init() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_DEBUG(logger_, "Replacement of hmi id is skipped.");
+ return true;
+}
+
+void OnAppUnregisteredNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // sending event for delete VRCommand on PerformInteraction
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e2cd6d2cbf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnAudioDataStreamingNotification::OnAudioDataStreamingNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() {}
+
+void OnAudioDataStreamingNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1f052b865b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc
@@ -0,0 +1,70 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_button_event_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "utils/logger.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnButtonEventNotification::OnButtonEventNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+void OnButtonEventNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6c5d8f5a43
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc
@@ -0,0 +1,72 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_button_press_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "utils/logger.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnButtonPressNotification::OnButtonPressNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+void OnButtonPressNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::Buttons_OnButtonPress);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int>(mobile_apis::FunctionID::eType::OnButtonPressID);
+ SendNotificationToMobile(message_);
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..70ff1c3fad
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnButtonSubscriptionNotification::OnButtonSubscriptionNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnButtonSubscriptionNotification::~OnButtonSubscriptionNotification() {}
+
+void OnButtonSubscriptionNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2c4f9a1ccc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnDeviceChosenNotification::OnDeviceChosenNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnDeviceChosenNotification::~OnDeviceChosenNotification() {}
+
+void OnDeviceChosenNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
+ application_manager_.ConnectToDevice(
+ (*message_)[strings::msg_params][strings::device_info][strings::id]
+ .asString());
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..307dccd09b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc
@@ -0,0 +1,124 @@
+/*
+ * 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 <algorithm>
+#include "sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/HMI_API.h"
+#include "encryption/hashing.h"
+
+namespace {
+// TODO(AOleynik) : replace this !!!
+void check_zero(const char& a, const char& b, std::string& bt_mac) {
+ if ('0' != a && '0' == b) {
+ bt_mac.push_back(a);
+ bt_mac.push_back(b);
+ } else if ('0' == a) {
+ bt_mac.push_back(b);
+ } else {
+ bt_mac.push_back(a);
+ bt_mac.push_back(b);
+ }
+}
+
+std::string convert_to_bt_mac(std::string& deviceInternalId) {
+ std::transform(deviceInternalId.begin(),
+ deviceInternalId.end(),
+ deviceInternalId.begin(),
+ ::tolower);
+
+ std::string bt_mac;
+ check_zero(deviceInternalId[10], deviceInternalId[11], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[8], deviceInternalId[9], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[6], deviceInternalId[7], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[4], deviceInternalId[5], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[2], deviceInternalId[3], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[0], deviceInternalId[1], bt_mac);
+
+ return bt_mac;
+}
+}
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnDeviceStateChangedNotification::OnDeviceStateChangedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {}
+
+void OnDeviceStateChangedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if ((*message_)[strings::msg_params]["deviceState"] ==
+ hmi_apis::Common_DeviceState::UNPAIRED) {
+ // It is expected, that "deviceInternalId" is the device MAC address in
+ // form XXXXXXXXXX
+ std::string device_id =
+ (*message_)[strings::msg_params]["deviceInternalId"].asString();
+ if (device_id.empty()) {
+ if ((*message_)[strings::msg_params].keyExists("deviceId")) {
+ device_id =
+ (*message_)[strings::msg_params]["deviceId"]["id"].asString();
+ }
+ } else {
+ // Policy uses hashed MAC address as device_id
+ LOG4CXX_DEBUG(logger_, "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);
+ device_id = encryption::MakeHash(bt_mac);
+ LOG4CXX_DEBUG(logger_, "Device_id hashed as BT MAC : " << device_id);
+ }
+ policy_handler_.RemoveDevice(device_id);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..16ca48a2d4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc
@@ -0,0 +1,143 @@
+/*
+ * 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 <set>
+#include "sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/make_shared.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+namespace {
+struct OnDriverDistractionProcessor {
+ OnDriverDistractionProcessor(
+ OnDriverDistractionNotification& command,
+ smart_objects::SmartObjectSPtr on_driver_distraction_so,
+ ApplicationManager& application_manager)
+ : command_(command)
+ , on_driver_distraction_so_(on_driver_distraction_so)
+ , application_manager_(application_manager)
+ , stringified_function_id_(MessageHelper::StringifiedFunctionID(
+ mobile_api::FunctionID::OnDriverDistractionID)) {}
+
+ void operator()(ApplicationSharedPtr application) {
+ if (application) {
+ (*on_driver_distraction_so_)[strings::params][strings::connection_key] =
+ application->app_id();
+ const RPCParams params;
+ policy::CheckPermissionResult result;
+ application_manager_.GetPolicyHandler().CheckPermissions(
+ application, stringified_function_id_, params, result);
+ if (result.hmi_level_permitted != policy::kRpcAllowed) {
+ MobileMessageQueue messages;
+ application->SwapMobileMessageQueue(messages);
+ messages.erase(
+ std::remove_if(
+ messages.begin(),
+ messages.end(),
+ [this](smart_objects::SmartObjectSPtr message) {
+ return (*message)[strings::params][strings::function_id]
+ .asString() == stringified_function_id_;
+ }),
+ messages.end());
+ application->PushMobileMessage(on_driver_distraction_so_);
+ return;
+ }
+ command_.SendNotificationToMobile(on_driver_distraction_so_);
+ }
+ }
+
+ private:
+ OnDriverDistractionNotification& command_;
+ smart_objects::SmartObjectSPtr on_driver_distraction_so_;
+ ApplicationManager& application_manager_;
+ std::string stringified_function_id_;
+};
+}
+
+OnDriverDistractionNotification::OnDriverDistractionNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
+
+void OnDriverDistractionNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const hmi_apis::Common_DriverDistractionState::eType state =
+ static_cast<hmi_apis::Common_DriverDistractionState::eType>(
+ (*message_)[strings::msg_params][hmi_notification::state].asInt());
+ application_manager_.set_driver_distraction_state(state);
+
+ smart_objects::SmartObjectSPtr on_driver_distraction =
+ utils::MakeShared<smart_objects::SmartObject>();
+
+ if (!on_driver_distraction) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+ (*on_driver_distraction)[strings::params][strings::function_id] =
+ mobile_api::FunctionID::OnDriverDistractionID;
+ (*on_driver_distraction)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+ (*on_driver_distraction)[strings::msg_params][mobile_notification::state] =
+ state;
+
+ const ApplicationSet applications =
+ application_manager_.applications().GetData();
+
+ OnDriverDistractionProcessor processor(
+ *this, on_driver_distraction, application_manager_);
+ std::for_each(applications.begin(), applications.end(), processor);
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cd3f2c23e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnEventChangedNotification::OnEventChangedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnEventChangedNotification::~OnEventChangedNotification() {}
+
+void OnEventChangedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9131bf7392
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc
@@ -0,0 +1,124 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h"
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnExitAllApplicationsNotification::OnExitAllApplicationsNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {}
+
+void OnExitAllApplicationsNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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);
+
+ mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
+ mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM;
+
+ switch (reason) {
+ case hmi_apis::Common_ApplicationsCloseReason::IGNITION_OFF: {
+ mob_reason = mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF;
+ break;
+ }
+ case hmi_apis::Common_ApplicationsCloseReason::MASTER_RESET: {
+ mob_reason = mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET;
+ break;
+ }
+ case hmi_apis::Common_ApplicationsCloseReason::FACTORY_DEFAULTS: {
+ mob_reason = mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS;
+ break;
+ }
+ case hmi_apis::Common_ApplicationsCloseReason::SUSPEND: {
+ application_manager_.resume_controller().OnSuspend();
+ SendOnSDLPersistenceComplete();
+ return;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Unknown Application close reason" << reason);
+ return;
+ }
+ }
+
+ application_manager_.SetUnregisterAllApplicationsReason(mob_reason);
+
+ if (mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET == mob_reason ||
+ mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS ==
+ mob_reason) {
+ application_manager_.HeadUnitReset(mob_reason);
+ }
+ kill(getpid(), SIGINT);
+}
+
+void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObjectSPtr message =
+ new smart_objects::SmartObject(smart_objects::SmartType_Map);
+ (*message)[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete;
+ (*message)[strings::params][strings::message_type] =
+ MessageType::kNotification;
+ (*message)[strings::params][strings::correlation_id] =
+ application_manager_.GetNextHMICorrelationID();
+
+ rpc_service_.ManageHMICommand(message);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d2a149bf94
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc
@@ -0,0 +1,125 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_exit_application_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/state_controller.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnExitApplicationNotification::OnExitApplicationNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnExitApplicationNotification::~OnExitApplicationNotification() {}
+
+void OnExitApplicationNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ using namespace mobile_apis;
+ using namespace hmi_apis;
+
+ uint32_t app_id = (*message_)[strings::msg_params][strings::app_id].asUInt();
+ ApplicationSharedPtr app_impl = application_manager_.application(app_id);
+
+ if (!(app_impl.valid())) {
+ LOG4CXX_ERROR(logger_, "Application does not exist");
+ return;
+ }
+
+ auto on_app_exit = [app_impl](plugin_manager::RPCPlugin& plugin) {
+ plugin.OnApplicationEvent(plugin_manager::kApplicationExit, app_impl);
+ };
+
+ application_manager_.GetPluginManager().ForEachPlugin(on_app_exit);
+
+ Common_ApplicationExitReason::eType reason;
+ reason = static_cast<Common_ApplicationExitReason::eType>(
+ (*message_)[strings::msg_params][strings::reason].asInt());
+
+ switch (reason) {
+ case Common_ApplicationExitReason::DRIVER_DISTRACTION_VIOLATION: {
+ break;
+ }
+ case Common_ApplicationExitReason::USER_EXIT: {
+ break;
+ }
+ case Common_ApplicationExitReason::UNAUTHORIZED_TRANSPORT_REGISTRATION: {
+ rpc_service_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_id, AppInterfaceUnregisteredReason::APP_UNAUTHORIZED),
+ SOURCE_SDL);
+ // HMI rejects registration for navi application
+ application_manager_.UnregisterApplication(app_id, Result::SUCCESS);
+ return;
+ }
+ case Common_ApplicationExitReason::UNSUPPORTED_HMI_RESOURCE: {
+ rpc_service_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_id, AppInterfaceUnregisteredReason::UNSUPPORTED_HMI_RESOURCE),
+ SOURCE_SDL);
+ application_manager_.UnregisterApplication(app_id, Result::SUCCESS);
+ return;
+ }
+ default: {
+ LOG4CXX_WARN(logger_, "Unhandled reason");
+ return;
+ }
+ }
+
+ application_manager_.state_controller().SetRegularState(
+ app_impl,
+ HMILevel::HMI_NONE,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ false);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ec680c667d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnFileRemovedNotification::OnFileRemovedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnFileRemovedNotification::~OnFileRemovedNotification() {}
+
+void OnFileRemovedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c74dd70c84
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_find_applications.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnFindApplications::OnFindApplications(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnFindApplications::~OnFindApplications() {}
+
+void OnFindApplications::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // TODO(PV): add UpdateAppsOnDevice to ApplicationManager
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9ff1851e3f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {}
+
+void OnIgnitionCycleOverNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ policy_handler_.OnIgnitionCycleOver();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..20f20ece08
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {}
+
+void OnNaviTBTClientStateNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnTBTClientStateID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..fa8819ca5b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& app_man,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(
+ message, app_man, rpc_service, hmi_capabilities, policy_handle) {}
+
+OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {}
+
+void OnNaviWayPointChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnWayPointChangeID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e069bea740
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc
@@ -0,0 +1,60 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_policy_update.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnPolicyUpdate::OnPolicyUpdate(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnPolicyUpdate::~OnPolicyUpdate() {}
+
+void OnPolicyUpdate::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ policy_handler_.OnPTExchangeNeeded();
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1524aa9ea2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_put_file_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnPutFileNotification::OnPutFileNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnPutFileNotification::~OnPutFileNotification() {}
+
+void OnPutFileNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..76c9115662
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ready_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnReadyNotification::OnReadyNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnReadyNotification::~OnReadyNotification() {}
+
+void OnReadyNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ application_manager_.OnHMIStartedCooperation();
+ event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1eaef0b5e1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc
@@ -0,0 +1,77 @@
+/*
+ * 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 <string>
+#include "sdl_rpc_plugin/commands/hmi/on_received_policy_update.h"
+#include "application_manager/application_manager.h"
+#include "utils/file_system.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnReceivedPolicyUpdate::OnReceivedPolicyUpdate(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {}
+
+void OnReceivedPolicyUpdate::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+#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.");
+ 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.");
+#endif
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..60699e5b9c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_record_start_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnRecordStartdNotification::OnRecordStartdNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnRecordStartdNotification::~OnRecordStartdNotification() {}
+
+void OnRecordStartdNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9f8a713ffe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnResumeAudioSourceNotification::OnResumeAudioSourceNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {}
+
+void OnResumeAudioSourceNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..65879edce6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSDLCloseNotification::OnSDLCloseNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSDLCloseNotification::~OnSDLCloseNotification() {}
+
+void OnSDLCloseNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cf8feb4ca1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc
@@ -0,0 +1,62 @@
+
+/**
+ * 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 "sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSDLConsentNeededNotification::OnSDLConsentNeededNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {}
+
+void OnSDLConsentNeededNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0ac4afd4d2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSDLPersistenceCompleteNotification::~OnSDLPersistenceCompleteNotification() {}
+
+void OnSDLPersistenceCompleteNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2cee7926bd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_start_device_discovery.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnStartDeviceDiscovery::OnStartDeviceDiscovery(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {}
+
+void OnStartDeviceDiscovery::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ application_manager_.StartDevicesDiscovery();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4cb01e7e90
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_status_update_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnStatusUpdateNotification::OnStatusUpdateNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnStatusUpdateNotification::~OnStatusUpdateNotification() {}
+
+void OnStatusUpdateNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..242fb1d8cd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
@@ -0,0 +1,88 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_system_context_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/state_controller.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnSystemContextNotification::OnSystemContextNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSystemContextNotification::~OnSystemContextNotification() {}
+
+void OnSystemContextNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ mobile_api::SystemContext::eType system_context =
+ static_cast<mobile_api::SystemContext::eType>(
+ (*message_)[strings::msg_params][hmi_notification::system_context]
+ .asInt());
+
+ ApplicationSharedPtr app;
+ if ((mobile_api::SystemContext::SYSCTXT_VRSESSION == system_context) ||
+ (mobile_api::SystemContext::SYSCTXT_MENU == system_context) ||
+ (mobile_api::SystemContext::SYSCTXT_HMI_OBSCURED == system_context)) {
+ app = application_manager_.active_application();
+ } else if ((mobile_api::SystemContext::SYSCTXT_ALERT == system_context) ||
+ (mobile_api::SystemContext::SYSCTXT_MAIN == system_context)) {
+ if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
+ app = application_manager_.application(
+ (*message_)[strings::msg_params][strings::app_id].asUInt());
+ }
+ }
+
+ if (app && mobile_api::SystemContext::INVALID_ENUM != system_context) {
+ application_manager_.state_controller().SetRegularState(app,
+ system_context);
+ } else {
+ LOG4CXX_ERROR(logger_, "Application does not exist");
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5591d59355
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_system_error_notification.h"
+#include "application_manager/application_manager.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSystemErrorNotification::OnSystemErrorNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSystemErrorNotification::~OnSystemErrorNotification() {}
+
+void OnSystemErrorNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const int code =
+ (*message_)[strings::msg_params][hmi_notification::error].asInt();
+
+ policy_handler_.OnSystemError(code);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..11b2471294
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc
@@ -0,0 +1,69 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSystemInfoChangedNotification::OnSystemInfoChangedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {}
+
+void OnSystemInfoChangedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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));
+
+ policy_handler_.OnSystemInfoChanged(language);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cfb860a1c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc
@@ -0,0 +1,124 @@
+/*
+ * 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 "application_manager/application_impl.h"
+
+#include "sdl_rpc_plugin/commands/hmi/on_system_request_notification.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/macro.h"
+
+using policy::PolicyHandlerInterface;
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSystemRequestNotification::OnSystemRequestNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnSystemRequestNotification::~OnSystemRequestNotification() {}
+
+void OnSystemRequestNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject& params = (*message_)[strings::params];
+ smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+
+ params[strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
+
+ // According to HMI API, this should be HMI unique id, but during processing
+ // messages from HMI this param is replaced by connection key, so below it
+ // will be treated as connection key
+ 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.");
+ 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.");
+ const PolicyHandlerInterface& policy_handler = policy_handler_;
+ const uint32_t selected_app_id = policy_handler.GetAppIdForSending();
+ if (0 == selected_app_id) {
+ LOG4CXX_WARN(logger_,
+ "Can't select application to forward OnSystemRequest.");
+ return;
+ }
+ app = application_manager_.application(selected_app_id);
+ }
+
+ if (!app.valid()) {
+ LOG4CXX_WARN(logger_,
+ "No valid application found to forward OnSystemRequest.");
+ return;
+ }
+
+ std::string device_mac;
+ application_manager_.connection_handler()
+ .get_session_observer()
+ .GetDataOnDeviceID(app->device(), NULL, NULL, &device_mac, NULL);
+
+ 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.");
+ return;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Sending request with application id " << app->policy_app_id());
+
+ params[strings::connection_key] = app->app_id();
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..b5fd1a007e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_system_time_ready_notification.h"
+
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnSystemTimeReadyNotification::OnSystemTimeReadyNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& app_man,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : NotificationFromHMI(
+ message, app_man, rpc_service, hmi_capabilities, policy_handler) {}
+
+OnSystemTimeReadyNotification::~OnSystemTimeReadyNotification() {}
+
+void OnSystemTimeReadyNotification::Run() {
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnSystemTimeReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5b5cfeefb1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
@@ -0,0 +1,103 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {}
+
+void OnTTSLanguageChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ 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(
+ static_cast<hmi_apis::Common_Language::eType>(
+ (*message_)[strings::msg_params][strings::language].asInt()));
+
+ (*message_)[strings::msg_params][strings::hmi_display_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();
+ ApplicationSetIt it = accessor.begin();
+ for (; accessor.end() != it;) {
+ ApplicationSharedPtr app = *it++;
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ SendNotificationToMobile(message_);
+
+ if (static_cast<int>(app->language()) !=
+ (*message_)[strings::msg_params][strings::language].asInt()) {
+ rpc_service_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app->app_id(),
+ mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
+ SOURCE_SDL);
+ application_manager_.UnregisterApplication(
+ app->app_id(), mobile_apis::Result::SUCCESS, false);
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..701dbe0538
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc
@@ -0,0 +1,69 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {}
+
+void OnTTSResetTimeoutNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..34ba82df1d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnTTSStartedNotification::OnTTSStartedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnTTSStartedNotification::~OnTTSStartedNotification() {}
+
+void OnTTSStartedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::TTS_Started);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0935a36848
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h"
+
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnTTSStoppedNotification::OnTTSStoppedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnTTSStoppedNotification::~OnTTSStoppedNotification() {}
+
+void OnTTSStoppedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::TTS_Stopped);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..21cf0d9628
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc
@@ -0,0 +1,68 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnUICommandNotification::OnUICommandNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnUICommandNotification::~OnUICommandNotification() {}
+
+void OnUICommandNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
+
+ (*message_)[strings::msg_params][strings::trigger_source] =
+ static_cast<int32_t>(mobile_apis::TriggerSource::TS_MENU);
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..fbdd4fce2b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc
@@ -0,0 +1,70 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {}
+
+void OnUIKeyBoardInputNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnKeyboardInputID;
+ SendNotificationToMobile(message_);
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3bf5a5aed4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
@@ -0,0 +1,102 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnUILanguageChangeNotification::OnUILanguageChangeNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {}
+
+void OnUILanguageChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_active_ui_language(
+ static_cast<hmi_apis::Common_Language::eType>(
+ (*message_)[strings::msg_params][strings::language].asInt()));
+
+ (*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();
+
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
+
+ const ApplicationSet& accessor =
+ application_manager_.applications().GetData();
+
+ ApplicationSetConstIt it = accessor.begin();
+ for (; accessor.end() != it;) {
+ ApplicationSharedPtr app = *it++;
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ SendNotificationToMobile(message_);
+
+ if (app->ui_language() !=
+ (*message_)[strings::msg_params][strings::hmi_display_language]
+ .asInt()) {
+ rpc_service_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app->app_id(),
+ mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
+ SOURCE_SDL);
+ application_manager_.UnregisterApplication(
+ app->app_id(), mobile_apis::Result::SUCCESS, false);
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..953932cdb6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc
@@ -0,0 +1,70 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnUIResetTimeoutNotification::OnUIResetTimeoutNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {}
+
+void OnUIResetTimeoutNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e5b321e1ff
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc
@@ -0,0 +1,70 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace hmi {
+
+OnUITouchEventNotification::OnUITouchEventNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnUITouchEventNotification::~OnUITouchEventNotification() {}
+
+void OnUITouchEventNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnTouchEventID;
+ SendNotificationToMobile(message_);
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2a5e6ba797
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc
@@ -0,0 +1,59 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_update_device_list.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnUpdateDeviceList::OnUpdateDeviceList(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnUpdateDeviceList::~OnUpdateDeviceList() {}
+
+void OnUpdateDeviceList::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c8ecba458a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {}
+
+void OnVIAccPedalPositionNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ee909d19dc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIBeltStatusNotification::OnVIBeltStatusNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {}
+
+void OnVIBeltStatusNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f0386646ce
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIBodyInformationNotification::OnVIBodyInformationNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {}
+
+void OnVIBodyInformationNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..549c73065a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIDeviceStatusNotification::OnVIDeviceStatusNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {}
+
+void OnVIDeviceStatusNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..23f0d37068
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIDriverBrakingNotification::OnVIDriverBrakingNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {}
+
+void OnVIDriverBrakingNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..735a225225
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIEngineTorqueNotification::OnVIEngineTorqueNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {}
+
+void OnVIEngineTorqueNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0b4bfa893f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {}
+
+void OnVIExternalTemperatureNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a5e84f1108
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIFuelLevelNotification::OnVIFuelLevelNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {}
+
+void OnVIFuelLevelNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..950b5a36f1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {}
+
+void OnVIFuelLevelStateNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0d94194f76
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIGpsDataNotification::OnVIGpsDataNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIGpsDataNotification::~OnVIGpsDataNotification() {}
+
+void OnVIGpsDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..80edb88e38
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {}
+
+void OnVIHeadLampStatusNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a2b0b1a8fd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
@@ -0,0 +1,68 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIInstantFuelConsumptionNotification::OnVIInstantFuelConsumptionNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIInstantFuelConsumptionNotification::
+ ~OnVIInstantFuelConsumptionNotification() {}
+
+void OnVIInstantFuelConsumptionNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5e3555bbc4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIMyKeyNotification::OnVIMyKeyNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIMyKeyNotification::~OnVIMyKeyNotification() {}
+
+void OnVIMyKeyNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1dbef77fa3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIOdometerNotification::OnVIOdometerNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIOdometerNotification::~OnVIOdometerNotification() {}
+
+void OnVIOdometerNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d4ae93b324
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIPrndlNotification::OnVIPrndlNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIPrndlNotification::~OnVIPrndlNotification() {}
+
+void OnVIPrndlNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..77f694c92e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIRpmNotification::OnVIRpmNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIRpmNotification::~OnVIRpmNotification() {}
+
+void OnVIRpmNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e5860c9eec
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVISpeedNotification::OnVISpeedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVISpeedNotification::~OnVISpeedNotification() {}
+
+void OnVISpeedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..db591d9da3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {}
+
+void OnVISteeringWheelAngleNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..b5c7e18803
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVITirePressureNotification::OnVITirePressureNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVITirePressureNotification::~OnVITirePressureNotification() {}
+
+void OnVITirePressureNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..323fe5b885
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIVinNotification::OnVIVinNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIVinNotification::~OnVIVinNotification() {}
+
+void OnVIVinNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6a3b863e7c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIWiperStatusNotification::OnVIWiperStatusNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {}
+
+void OnVIWiperStatusNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..701dee5385
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc
@@ -0,0 +1,62 @@
+
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVideoDataStreamingNotification::OnVideoDataStreamingNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() {}
+
+void OnVideoDataStreamingNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..386ef1d1c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc
@@ -0,0 +1,113 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h"
+
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/state_controller.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVRCommandNotification::OnVRCommandNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVRCommandNotification::~OnVRCommandNotification() {}
+
+void OnVRCommandNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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 standart VR commands (i.e. "Help")
+ if (cmd_id > max_cmd_id + 1) {
+ LOG4CXX_INFO(logger_, "Switched App");
+ const uint32_t app_id = cmd_id - max_cmd_id;
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+ if (app) {
+ application_manager_.state_controller().SetRegularState(
+ app, mobile_apis::HMILevel::HMI_FULL, true);
+ } else {
+ LOG4CXX_ERROR(logger_, "Unable to find appication " << app_id);
+ }
+ return;
+ }
+
+ // Check if this is "Help"
+ if (cmd_id == max_cmd_id + 1) {
+ return;
+ }
+ const uint32_t app_id =
+ (*message_)[strings::msg_params][strings::app_id].asUInt();
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+ /* check if perform interaction is active
+ * if it is active we should sent to HMI DeleteCommand request
+ * and PerformInterActionResponse to mobile
+ */
+ if (0 != app->is_perform_interaction_active()) {
+ event_engine::Event event(hmi_apis::FunctionID::VR_OnCommand);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+ } else {
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
+
+ (*message_)[strings::msg_params][strings::trigger_source] =
+ static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR);
+ SendNotificationToMobile(message_);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6a58ab9ffa
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc
@@ -0,0 +1,101 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/state_controller.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVRLanguageChangeNotification::OnVRLanguageChangeNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {}
+
+void OnVRLanguageChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_active_vr_language(
+ static_cast<hmi_apis::Common_Language::eType>(
+ (*message_)[strings::msg_params][strings::language].asInt()));
+
+ (*message_)[strings::msg_params][strings::hmi_display_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();
+
+ ApplicationSetConstIt it = accessor.begin();
+ for (; accessor.end() != it;) {
+ ApplicationSharedPtr app = *it++;
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ SendNotificationToMobile(message_);
+ if (static_cast<int32_t>(app->language()) !=
+ (*message_)[strings::msg_params][strings::language].asInt()) {
+ application_manager_.state_controller().SetRegularState(
+ app, mobile_api::HMILevel::HMI_NONE, false);
+
+ rpc_service_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app->app_id(),
+ mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
+ SOURCE_SDL);
+ application_manager_.UnregisterApplication(
+ app->app_id(), mobile_apis::Result::SUCCESS, false);
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..04eb9a9ed0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVRStartedNotification::OnVRStartedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVRStartedNotification::~OnVRStartedNotification() {}
+
+void OnVRStartedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VR_Started);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8fea5ddd1c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVRStoppedNotification::OnVRStoppedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVRStoppedNotification::~OnVRStoppedNotification() {}
+
+void OnVRStoppedNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VR_Stopped);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5947454517
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+RCGetCapabilitiesRequest::RCGetCapabilitiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+RCGetCapabilitiesRequest::~RCGetCapabilitiesRequest() {}
+
+void RCGetCapabilitiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..b14c28426c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc
@@ -0,0 +1,69 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/rc_get_capabilities_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+RCGetCapabilitiesResponse::RCGetCapabilitiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+RCGetCapabilitiesResponse::~RCGetCapabilitiesResponse() {}
+
+void RCGetCapabilitiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ bool capability_exists =
+ (*message_)[strings::msg_params].keyExists(strings::rc_capability);
+
+ if (capability_exists) {
+ hmi_capabilities.set_rc_capability(
+ (*message_)[strings::msg_params][strings::rc_capability]);
+ }
+ hmi_capabilities.set_rc_supported(capability_exists);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4b3d303089
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc
@@ -0,0 +1,108 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+RCIsReadyRequest::RCIsReadyRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+RCIsReadyRequest::~RCIsReadyRequest() {}
+
+void RCIsReadyRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(hmi_apis::FunctionID::RC_IsReady, correlation_id());
+ SendRequest();
+}
+
+void RCIsReadyRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::RC_IsReady: {
+ LOG4CXX_DEBUG(logger_, "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);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities.set_is_rc_cooperating(is_available);
+ if (!is_available) {
+ hmi_capabilities.set_rc_supported(false);
+ }
+
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_RC)) {
+ LOG4CXX_INFO(logger_,
+ "HmiInterfaces::HMI_INTERFACE_RC isn't available");
+ return;
+ }
+ SendMessageToHMI();
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void RCIsReadyRequest::onTimeOut() {
+ // Note(dtrunov): According to new requirment APPLINK-27956
+ SendMessageToHMI();
+}
+
+void RCIsReadyRequest::SendMessageToHMI() {
+ utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::RC_GetCapabilities, application_manager_));
+ rpc_service_.ManageHMICommand(get_capabilities);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7534567204
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/rc_is_ready_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+RCIsReadyResponse::RCIsReadyResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+RCIsReadyResponse::~RCIsReadyResponse() {}
+
+void RCIsReadyResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::RC_IsReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f89ae1f697
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc
@@ -0,0 +1,294 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_activate_app_request.h"
+#include "application_manager/state_controller.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace {
+struct ProtoV4AppsOnDevice : std::unary_function<ApplicationSharedPtr, bool> {
+ connection_handler::DeviceHandle handle_;
+ ProtoV4AppsOnDevice(const connection_handler::DeviceHandle handle)
+ : handle_(handle) {}
+ bool operator()(const ApplicationSharedPtr app) const {
+ return app
+ ? handle_ == app->device() &&
+ Message::is_sufficient_version(
+ protocol_handler::MajorProtocolVersion::
+ PROTOCOL_VERSION_4,
+ app->protocol_version())
+ : false;
+ }
+};
+
+struct ForegroundApp
+ : std::unary_function<SDLActivateAppRequest::V4ProtoApps::value_type,
+ bool> {
+ bool operator()(
+ const SDLActivateAppRequest::V4ProtoApps::value_type ptr) const {
+ return ptr ? ptr->is_foreground() : false;
+ }
+};
+
+struct SendLaunchApp
+ : std::unary_function<SDLActivateAppRequest::V4ProtoApps::value_type,
+ void> {
+ ApplicationConstSharedPtr app_to_launch_;
+ ApplicationManager& application_manager_;
+ SendLaunchApp(ApplicationConstSharedPtr app_to_launch, ApplicationManager& am)
+ : app_to_launch_(app_to_launch), application_manager_(am) {}
+ void operator()(
+ const SDLActivateAppRequest::V4ProtoApps::value_type ptr) const {
+ MessageHelper::SendLaunchApp((*ptr).app_id(),
+ app_to_launch_->SchemaUrl(),
+ app_to_launch_->PackageName(),
+ application_manager_);
+ return;
+ }
+};
+}
+
+SDLActivateAppRequest::SDLActivateAppRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+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.");
+ return 0;
+ }
+ if (!(*message_)[msg_params].keyExists(strings::app_id)) {
+ LOG4CXX_DEBUG(logger_,
+ strings::app_id << " section is absent in the message.");
+ return 0;
+ }
+ return (*message_)[msg_params][strings::app_id].asUInt();
+}
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+void SDLActivateAppRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis::FunctionID;
+
+ if (application_manager_.state_controller().IsStateActive(
+ HmiState::STATE_ID_DEACTIVATE_HMI)) {
+ LOG4CXX_DEBUG(logger_,
+ "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 {
+ const uint32_t application_id = app_id();
+ policy_handler_.OnActivateApp(application_id, correlation_id());
+ }
+}
+
+#else // EXTERNAL_PROPRIETARY_MODE
+void SDLActivateAppRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis::FunctionID;
+ using namespace hmi_apis::Common_Result;
+
+ const uint32_t application_id = app_id();
+
+ ApplicationConstSharedPtr app_to_activate =
+ application_manager_.application(application_id);
+
+ if (!app_to_activate) {
+ LOG4CXX_WARN(
+ logger_,
+ "Can't find application within regular apps: " << application_id);
+
+ // Here is the hack - in fact SDL gets hmi_app_id in appID field and
+ // replaces it with connection_key only for normally registered apps, but
+ // for apps_to_be_registered (waiting) it keeps original value (hmi_app_id)
+ // so method does lookup for hmi_app_id
+ app_to_activate =
+ application_manager_.WaitingApplicationByID(application_id);
+
+ if (!app_to_activate) {
+ LOG4CXX_WARN(
+ logger_,
+ "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());
+
+ 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");
+ SendErrorResponse(correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()),
+ hmi_apis::Common_Result::REJECTED,
+ "HMIDeactivate is active");
+ return;
+ }
+
+ if (app_to_activate->IsRegistered()) {
+ LOG4CXX_DEBUG(logger_, "Application is registered. Activating.");
+ policy_handler_.OnActivateApp(application_id, correlation_id());
+ return;
+ }
+
+ connection_handler::DeviceHandle device_handle = app_to_activate->device();
+ ApplicationSharedPtr foreground_v4_app = get_foreground_app(device_handle);
+ 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);
+ SendErrorResponse(
+ correlation_id(), SDL_ActivateApp, NO_APPS_REGISTERED, "");
+ return;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Application is not registered yet. "
+ "Sending launch request.");
+
+ if (foreground_v4_app) {
+ LOG4CXX_DEBUG(logger_, "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.");
+ std::for_each(v4_proto_apps.begin(),
+ v4_proto_apps.end(),
+ SendLaunchApp(app_to_activate, application_manager_));
+ }
+
+ subscribe_on_event(BasicCommunication_OnAppRegistered);
+}
+
+#endif // EXTERNAL_PROPRIETARY_MODE
+void SDLActivateAppRequest::onTimeOut() {
+ using namespace hmi_apis::FunctionID;
+ using namespace hmi_apis::Common_Result;
+ using namespace application_manager;
+ unsubscribe_from_event(BasicCommunication_OnAppRegistered);
+ SendErrorResponse(
+ correlation_id(), SDL_ActivateApp, APPLICATION_NOT_REGISTERED, "");
+}
+
+void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
+ using namespace hmi_apis::FunctionID;
+ if (event.id() != BasicCommunication_OnAppRegistered) {
+ return;
+ }
+ unsubscribe_from_event(BasicCommunication_OnAppRegistered);
+
+ // Have to use HMI app id from event, since HMI app id from original request
+ // message will be changed after app, initially requested for launch via
+ // SDL.ActivateApp, will be registered
+ const uint32_t hmi_application_id = hmi_app_id(event.smart_object());
+
+ 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);
+ return;
+ }
+ policy_handler_.OnActivateApp(app->app_id(), correlation_id());
+}
+
+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.");
+ return 0;
+ }
+ if (!so[msg_params].keyExists(application)) {
+ LOG4CXX_DEBUG(logger_, 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.");
+ return 0;
+ }
+ return so[msg_params][application][strings::app_id].asUInt();
+}
+
+SDLActivateAppRequest::V4ProtoApps SDLActivateAppRequest::get_v4_proto_apps(
+ const connection_handler::DeviceHandle handle) const {
+ const ApplicationSet app_list = application_manager_.applications().GetData();
+ V4ProtoApps v4_proto_apps;
+ std::copy_if(app_list.begin(),
+ app_list.end(),
+ std::back_inserter(v4_proto_apps),
+ ProtoV4AppsOnDevice(handle));
+ return v4_proto_apps;
+}
+
+ApplicationSharedPtr SDLActivateAppRequest::get_foreground_app(
+ const connection_handler::DeviceHandle handle) const {
+ V4ProtoApps v4_proto_apps = get_v4_proto_apps(handle);
+ V4ProtoApps::iterator foreground_app =
+ std::find_if(v4_proto_apps.begin(), v4_proto_apps.end(), ForegroundApp());
+ return foreground_app != v4_proto_apps.end() ? *foreground_app
+ : ApplicationSharedPtr();
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3262b12759
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLActivateAppResponse::SDLActivateAppResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLActivateAppResponse::~SDLActivateAppResponse() {}
+
+void SDLActivateAppResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6b983d566a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_request.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {}
+
+void SDLGetListOfPermissionsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ uint32_t connection_key = 0;
+ if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
+ connection_key = (*message_)[strings::msg_params][strings::app_id].asUInt();
+ }
+ policy_handler_.OnGetListOfPermissions(
+ connection_key,
+ (*message_)[strings::params][strings::correlation_id].asUInt());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..784b4922d4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLGetListOfPermissionsResponse::SDLGetListOfPermissionsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {}
+
+void SDLGetListOfPermissionsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9a6c0fd520
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_get_status_update_request.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {}
+
+void SDLGetStatusUpdateRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ policy_handler_.OnGetStatusUpdate(
+ (*message_)[strings::params][strings::correlation_id].asUInt());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8fc85da481
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLGetStatusUpdateResponse::SDLGetStatusUpdateResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {}
+
+void SDLGetStatusUpdateResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ab8ec4e3d9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc
@@ -0,0 +1,96 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_request.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLGetUserFriendlyMessageRequest::~SDLGetUserFriendlyMessageRequest() {}
+
+void SDLGetUserFriendlyMessageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const std::string messageCodes = "messageCodes";
+ if (!(*message_)[strings::msg_params].keyExists(messageCodes)) {
+ LOG4CXX_WARN(logger_,
+ "Mandatory parameter '" + messageCodes + "'' is missing");
+ return;
+ }
+ smart_objects::SmartArray* msg =
+ (*message_)[strings::msg_params][messageCodes].asArray();
+
+ std::vector<std::string> msg_codes;
+
+ 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 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));
+ } else {
+ hmi_apis::Common_Language::eType ui_language =
+ hmi_capabilities_.active_ui_language();
+
+ required_language =
+ application_manager::MessageHelper::CommonLanguageToString(ui_language);
+ }
+
+ policy_handler_.OnGetUserFriendlyMessage(
+ msg_codes,
+ required_language,
+ (*message_)[strings::params][strings::correlation_id].asInt());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c5b3450723
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLGetUserFriendlyMessageResponse::SDLGetUserFriendlyMessageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {}
+
+void SDLGetUserFriendlyMessageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..aef2e286d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_policy_update.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDLPolicyUpdate::SDLPolicyUpdate(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLPolicyUpdate::~SDLPolicyUpdate() {}
+
+void SDLPolicyUpdate::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+#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.");
+#endif
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d16fc578ab
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc
@@ -0,0 +1,59 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/sdl_policy_update_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+SDLPolicyUpdateResponse::SDLPolicyUpdateResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {}
+
+void SDLPolicyUpdateResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ // TODO(PV): add some logic here
+}
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..163d749426
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSChangeRegistrationRequest::TTSChangeRegistrationRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {}
+
+void TTSChangeRegistrationRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2c28d615d3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_change_registration_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSChangeRegistratioResponse::TTSChangeRegistratioResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {}
+
+void TTSChangeRegistratioResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::TTS_ChangeRegistration);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..49623e01d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {}
+
+void TTSGetCapabilitiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1cef3daf15
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc
@@ -0,0 +1,72 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_get_capabilities_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {}
+
+void TTSGetCapabilitiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ if ((*message_)[strings::msg_params].keyExists(
+ 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(
+ (*message_)[strings::msg_params]
+ [hmi_response::prerecorded_speech_capabilities]);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5533537b33
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_get_language_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSGetLanguageRequest::TTSGetLanguageRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSGetLanguageRequest::~TTSGetLanguageRequest() {}
+
+void TTSGetLanguageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ac423a2bf3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc
@@ -0,0 +1,80 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_get_language_response.h"
+
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSGetLanguageResponse::TTSGetLanguageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSGetLanguageResponse::~TTSGetLanguageResponse() {}
+
+void TTSGetLanguageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis;
+
+ Common_Language::eType language = Common_Language::INVALID_ENUM;
+
+ if ((*message_).keyExists(strings::msg_params) &&
+ (*message_)[strings::msg_params].keyExists(hmi_response::language)) {
+ language = static_cast<Common_Language::eType>(
+ (*message_)[strings::msg_params][hmi_response::language].asInt());
+ }
+
+ hmi_capabilities_.set_active_tts_language(language);
+
+ LOG4CXX_DEBUG(logger_,
+ "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());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8b87b9c6ea
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {}
+
+void TTSGetSupportedLanguagesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a4e97d9d70
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc
@@ -0,0 +1,72 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_response.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {}
+
+void TTSGetSupportedLanguagesResponse::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());
+
+ if (hmi_apis::Common_Result::SUCCESS == code) {
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_tts_supported_languages(
+ (*message_)[strings::msg_params][hmi_response::languages]);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..32d3cba48a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc
@@ -0,0 +1,115 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSIsReadyRequest::TTSIsReadyRequest(
+ const app_mngr::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+TTSIsReadyRequest::~TTSIsReadyRequest() {}
+
+void TTSIsReadyRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(hmi_apis::FunctionID::TTS_IsReady, correlation_id());
+ SendRequest();
+}
+
+void TTSIsReadyRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::TTS_IsReady: {
+ LOG4CXX_DEBUG(logger_, "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);
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ 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");
+ return;
+ }
+ SendMessageToHMI();
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void TTSIsReadyRequest::onTimeOut() {
+ // Note(dtrunov): According to new requirment APPLINK-27956
+ SendMessageToHMI();
+}
+
+void TTSIsReadyRequest::SendMessageToHMI() {
+ utils::SharedPtr<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);
+ utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ application_manager_));
+ rpc_service_.ManageHMICommand(get_all_languages);
+ utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::TTS_GetCapabilities, application_manager_));
+ rpc_service_.ManageHMICommand(get_capabilities);
+}
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c7d634bee2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_is_ready_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSIsReadyResponse::TTSIsReadyResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSIsReadyResponse::~TTSIsReadyResponse() {}
+
+void TTSIsReadyResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::TTS_IsReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8c7443d465
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {}
+
+void TTSSetGlobalPropertiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dae06d75f9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_set_global_properties_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {}
+
+void TTSSetGlobalPropertiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..96b93b724f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_speak_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSSpeakRequest::TTSSpeakRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSSpeakRequest::~TTSSpeakRequest() {}
+
+void TTSSpeakRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cb2346083b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc
@@ -0,0 +1,67 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_speak_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSSpeakResponse::TTSSpeakResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSSpeakResponse::~TTSSpeakResponse() {}
+
+void TTSSpeakResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..25a05f085b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSStopSpeakingRequest::TTSStopSpeakingRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {}
+
+void TTSStopSpeakingRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a2620c1340
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/tts_stop_speaking_response.h"
+
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+TTSStopSpeakingResponse::TTSStopSpeakingResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {}
+
+void TTSStopSpeakingResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..749b3ad56b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_add_command_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIAddCommandRequest::UIAddCommandRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIAddCommandRequest::~UIAddCommandRequest() {}
+
+void UIAddCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..266dffd225
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_add_command_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIAddCommandResponse::UIAddCommandResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIAddCommandResponse::~UIAddCommandResponse() {}
+
+void UIAddCommandResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_AddCommand);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..de338d4670
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIAddSubmenuRequest::UIAddSubmenuRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIAddSubmenuRequest::~UIAddSubmenuRequest() {}
+
+void UIAddSubmenuRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..85e600c87d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_add_submenu_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIAddSubmenuResponse::UIAddSubmenuResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIAddSubmenuResponse::~UIAddSubmenuResponse() {}
+
+void UIAddSubmenuResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_AddSubMenu);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ae5f861ba6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_alert_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIAlertRequest::UIAlertRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIAlertRequest::~UIAlertRequest() {}
+
+void UIAlertRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3076eabc4c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_alert_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIAlertResponse::UIAlertResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIAlertResponse::~UIAlertResponse() {}
+
+void UIAlertResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_Alert);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d109987009
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIChangeRegistrationRequest::UIChangeRegistrationRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {}
+
+void UIChangeRegistrationRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6557269e49
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_change_registration_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIChangeRegistratioResponse::UIChangeRegistratioResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {}
+
+void UIChangeRegistratioResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_ChangeRegistration);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9e52f5fc18
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIDeleteCommandRequest::UIDeleteCommandRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIDeleteCommandRequest::~UIDeleteCommandRequest() {}
+
+void UIDeleteCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a8f5b59d39
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_delete_command_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIDeleteCommandResponse::UIDeleteCommandResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIDeleteCommandResponse::~UIDeleteCommandResponse() {}
+
+void UIDeleteCommandResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_DeleteCommand);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1b84df8bed
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {}
+
+void UIDeleteSubmenuRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ec4025bea1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_delete_submenu_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIDeleteSubmenuResponse::UIDeleteSubmenuResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {}
+
+void UIDeleteSubmenuResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..fe11185c62
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIEndAudioPassThruRequest::UIEndAudioPassThruRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {}
+
+void UIEndAudioPassThruRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3a6d4efbe4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIEndAudioPassThruResponse::UIEndAudioPassThruResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {}
+
+void UIEndAudioPassThruResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3bd56a0682
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIGetCapabilitiesRequest::UIGetCapabilitiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {}
+
+void UIGetCapabilitiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cd5f3c9a42
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc
@@ -0,0 +1,121 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_get_capabilities_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIGetCapabilitiesResponse::UIGetCapabilitiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {}
+
+void UIGetCapabilitiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ if (msg_params.keyExists(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(
+ msg_params[hmi_response::hmi_zone_capabilities]);
+ }
+
+ if (msg_params.keyExists(hmi_response::soft_button_capabilities)) {
+ hmi_capabilities.set_soft_button_capabilities(
+ msg_params[hmi_response::soft_button_capabilities]);
+ }
+
+ if (msg_params.keyExists(strings::audio_pass_thru_capabilities)) {
+ hmi_capabilities.set_audio_pass_thru_capabilities(
+ msg_params[strings::audio_pass_thru_capabilities]);
+ }
+
+ if (msg_params.keyExists(strings::hmi_capabilities)) {
+ if (msg_params[strings::hmi_capabilities].keyExists(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(
+ 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(
+ 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]);
+ }
+ if (msg_params[strings::system_capabilities].keyExists(
+ strings::phone_capability)) {
+ hmi_capabilities.set_phone_capability(
+ msg_params[strings::system_capabilities][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]);
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8acba42493
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_get_language_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIGetLanguageRequest::UIGetLanguageRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIGetLanguageRequest::~UIGetLanguageRequest() {}
+
+void UIGetLanguageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..27e46e52b4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc
@@ -0,0 +1,81 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_get_language_response.h"
+
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIGetLanguageResponse::UIGetLanguageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIGetLanguageResponse::~UIGetLanguageResponse() {}
+
+void UIGetLanguageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis;
+
+ Common_Language::eType language = Common_Language::INVALID_ENUM;
+
+ if ((*message_).keyExists(strings::msg_params) &&
+ (*message_)[strings::msg_params].keyExists(hmi_response::language)) {
+ language = static_cast<Common_Language::eType>(
+ (*message_)[strings::msg_params][hmi_response::language].asInt());
+ }
+
+ hmi_capabilities_.set_active_ui_language(language);
+
+ LOG4CXX_DEBUG(logger_,
+ "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());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2f8ef12a25
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {}
+
+void UIGetSupportedLanguagesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d20dd8545f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc
@@ -0,0 +1,72 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_response.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {}
+
+void UIGetSupportedLanguagesResponse::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());
+
+ if (hmi_apis::Common_Result::SUCCESS == code) {
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_ui_supported_languages(
+ (*message_)[strings::msg_params][hmi_response::languages]);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3b2c77f16e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
@@ -0,0 +1,115 @@
+/*
+ * 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 "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 {
+using namespace application_manager;
+
+namespace commands {
+
+UIIsReadyRequest::UIIsReadyRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+UIIsReadyRequest::~UIIsReadyRequest() {}
+
+void UIIsReadyRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(hmi_apis::FunctionID::UI_IsReady, correlation_id());
+ SendRequest();
+}
+
+void UIIsReadyRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_IsReady: {
+ LOG4CXX_DEBUG(logger_, "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);
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ 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");
+ return;
+ }
+ SendMessageToHMI();
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void UIIsReadyRequest::onTimeOut() {
+ // Note(dtrunov): According to new requirment APPLINK-27956
+ SendMessageToHMI();
+}
+
+void UIIsReadyRequest::SendMessageToHMI() {
+ utils::SharedPtr<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);
+ utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ application_manager_));
+ rpc_service_.ManageHMICommand(get_all_languages);
+ utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::UI_GetCapabilities, application_manager_));
+ rpc_service_.ManageHMICommand(get_capabilities);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e25e8ee8ab
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_is_ready_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIIsReadyResponse::UIIsReadyResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIIsReadyResponse::~UIIsReadyResponse() {}
+
+void UIIsReadyResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_IsReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cca89e3073
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {}
+
+void UIPerformAudioPassThruRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..057448ab33
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {}
+
+void UIPerformAudioPassThruResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d5696a39e7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIPerformInteractionRequest::UIPerformInteractionRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIPerformInteractionRequest::~UIPerformInteractionRequest() {}
+
+void UIPerformInteractionRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7629faa131
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_perform_interaction_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIPerformInteractionResponse::UIPerformInteractionResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIPerformInteractionResponse::~UIPerformInteractionResponse() {}
+
+void UIPerformInteractionResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::UI_PerformInteraction);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dbe0ceb529
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIScrollableMessageRequest::UIScrollableMessageRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIScrollableMessageRequest::~UIScrollableMessageRequest() {}
+
+void UIScrollableMessageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a96b9fa3ee
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_scrollable_message_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIScrollableMessageResponse::UIScrollableMessageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIScrollableMessageResponse::~UIScrollableMessageResponse() {}
+
+void UIScrollableMessageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f5f8f7bafd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISendHapticDataRequest::UISendHapticDataRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISendHapticDataRequest::~UISendHapticDataRequest() {}
+
+void UISendHapticDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4555d81a0a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISendHapticDataResponse::UISendHapticDataResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISendHapticDataResponse::~UISendHapticDataResponse() {}
+
+void UISendHapticDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::UI_SendHapticData);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d25bbd1cd9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetAppIconRequest::UISetAppIconRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetAppIconRequest::~UISetAppIconRequest() {}
+
+void UISetAppIconRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..711b5767f2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_app_icon_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetAppIconResponse::UISetAppIconResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetAppIconResponse::~UISetAppIconResponse() {}
+
+void UISetAppIconResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..73b813d0eb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {}
+
+void UiSetDisplayLayoutRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d5d2e02e33
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {}
+
+void UiSetDisplayLayoutResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0664404361
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {}
+
+void UISetGlobalPropertiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2e5fecf2af
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_global_properties_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {}
+
+void UISetGlobalPropertiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_icon_request.cc
new file mode 100644
index 0000000000..44049338a8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_icon_request.cc
@@ -0,0 +1,62 @@
+/**
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_icon_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetIconRequest::UISetIconRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetIconRequest::~UISetIconRequest() {}
+
+void UISetIconRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4e87b9ccc3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetMediaClockTimerRequest::UISetMediaClockTimerRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {}
+
+void UISetMediaClockTimerRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..39e7e1c232
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISetMediaClockTimerResponse::UISetMediaClockTimerResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {}
+
+void UISetMediaClockTimerResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5b7568abfe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_show_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIShowRequest::UIShowRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIShowRequest::~UIShowRequest() {}
+
+void UIShowRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3e3c0b79d8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_show_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UIShowResponse::UIShowResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIShowResponse::~UIShowResponse() {}
+
+void UIShowResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_Show);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4df3adbe14
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_slider_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISliderRequest::UISliderRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISliderRequest::~UISliderRequest() {}
+
+void UISliderRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2431c65ddf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/ui_slider_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UISliderResponse::UISliderResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UISliderResponse::~UISliderResponse() {}
+
+void UISliderResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_Slider);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..05b08cb723
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/update_app_list_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateAppListRequest::UpdateAppListRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UpdateAppListRequest::~UpdateAppListRequest() {}
+
+void UpdateAppListRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3dd03993ef
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/update_app_list_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateAppListResponse::UpdateAppListResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UpdateAppListResponse::~UpdateAppListResponse() {}
+
+void UpdateAppListResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // TODO(PV): add check
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7736f2b1e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc
@@ -0,0 +1,103 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/update_device_list_request.h"
+
+#include "interfaces/HMI_API.h"
+
+#include <unistd.h>
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateDeviceListRequest::UpdateDeviceListRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager_.event_dispatcher()) {}
+
+UpdateDeviceListRequest::~UpdateDeviceListRequest() {}
+
+void UpdateDeviceListRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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
+ // exclude
+ // hit code to RTC
+ if (true == application_manager_.get_settings().launch_hmi()) {
+ if (!application_manager_.IsHMICooperating()) {
+ LOG4CXX_INFO(logger_, "Wait for HMI Cooperation");
+ subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
+ termination_condition_.Wait(auto_lock);
+ LOG4CXX_DEBUG(logger_, "HMI Cooperation OK");
+ }
+ }
+
+ SendRequest();
+}
+
+void UpdateDeviceListRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock auto_lock(wait_hmi_lock);
+ switch (event.id()) {
+ case hmi_apis::FunctionID::BasicCommunication_OnReady: {
+ LOG4CXX_INFO(logger_, "received OnReady");
+ unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
+ termination_condition_.Broadcast();
+ break;
+ };
+ default: {
+ LOG4CXX_ERROR(logger_, "Unknown event ");
+ break;
+ };
+ }
+}
+
+bool UpdateDeviceListRequest::CleanUp() {
+ sync_primitives::AutoLock auto_lock(wait_hmi_lock);
+ termination_condition_.Broadcast();
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..25dc9be5bd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc
@@ -0,0 +1,61 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/update_device_list_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateDeviceListResponse::UpdateDeviceListResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UpdateDeviceListResponse::~UpdateDeviceListResponse() {}
+
+void UpdateDeviceListResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // TODO(PV): add check for correctness.
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cafacea28f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc
@@ -0,0 +1,64 @@
+
+/**
+ * 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 "sdl_rpc_plugin/commands/hmi/update_sdl_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateSDLRequest::UpdateSDLRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UpdateSDLRequest::~UpdateSDLRequest() {}
+
+void UpdateSDLRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ policy_handler_.PTExchangeAtUserRequest(
+ (*message_)[strings::params][strings::correlation_id].asInt());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a35571ec26
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/update_sdl_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateSDLResponse::UpdateSDLResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UpdateSDLResponse::~UpdateSDLResponse() {}
+
+void UpdateSDLResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..72ce387f77
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_add_command_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRAddCommandRequest::VRAddCommandRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRAddCommandRequest::~VRAddCommandRequest() {}
+
+void VRAddCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..19d43616ff
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_add_command_response.h"
+#include "application_manager/event_engine/event.h"
+
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRAddCommandResponse::VRAddCommandResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRAddCommandResponse::~VRAddCommandResponse() {}
+
+void VRAddCommandResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9ba5fa3571
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRChangeRegistrationRequest::VRChangeRegistrationRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {}
+
+void VRChangeRegistrationRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..42c5b6d65b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_change_registration_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRChangeRegistrationResponse::VRChangeRegistrationResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {}
+
+void VRChangeRegistrationResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VR_ChangeRegistration);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..efc09dc157
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRDeleteCommandRequest::VRDeleteCommandRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRDeleteCommandRequest::~VRDeleteCommandRequest() {}
+
+void VRDeleteCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f8f7535e68
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_delete_command_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRDeleteCommandResponse::VRDeleteCommandResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRDeleteCommandResponse::~VRDeleteCommandResponse() {}
+
+void VRDeleteCommandResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VR_DeleteCommand);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7e9c846857
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRGetCapabilitiesRequest::VRGetCapabilitiesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {}
+
+void VRGetCapabilitiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..47ffb3a675
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_get_capabilities_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRGetCapabilitiesResponse::VRGetCapabilitiesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {}
+
+void VRGetCapabilitiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_vr_capabilities(
+ (*message_)[strings::msg_params][strings::vr_capabilities]);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d57faa08fd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_get_language_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRGetLanguageRequest::VRGetLanguageRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRGetLanguageRequest::~VRGetLanguageRequest() {}
+
+void VRGetLanguageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..469452d108
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc
@@ -0,0 +1,81 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_get_language_response.h"
+
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRGetLanguageResponse::VRGetLanguageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRGetLanguageResponse::~VRGetLanguageResponse() {}
+
+void VRGetLanguageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis;
+
+ Common_Language::eType language = Common_Language::INVALID_ENUM;
+
+ if ((*message_).keyExists(strings::msg_params) &&
+ (*message_)[strings::msg_params].keyExists(hmi_response::language)) {
+ language = static_cast<Common_Language::eType>(
+ (*message_)[strings::msg_params][hmi_response::language].asInt());
+ }
+
+ hmi_capabilities_.set_active_vr_language(language);
+
+ LOG4CXX_DEBUG(logger_,
+ "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());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..bb27168a77
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {}
+
+void VRGetSupportedLanguagesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..722040388d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
@@ -0,0 +1,72 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_response.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {}
+
+void VRGetSupportedLanguagesResponse::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());
+
+ 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]);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dcf7f35e90
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc
@@ -0,0 +1,115 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRIsReadyRequest::VRIsReadyRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+VRIsReadyRequest::~VRIsReadyRequest() {}
+
+void VRIsReadyRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(hmi_apis::FunctionID::VR_IsReady, correlation_id());
+ SendRequest();
+}
+
+void VRIsReadyRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::VR_IsReady: {
+ LOG4CXX_DEBUG(logger_, "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);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ 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");
+ return;
+ }
+ SendMessageToHMI();
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void VRIsReadyRequest::onTimeOut() {
+ // Note(dtrunov): According to new requirment APPLINK-27956
+ SendMessageToHMI();
+}
+
+void VRIsReadyRequest::SendMessageToHMI() {
+ utils::SharedPtr<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);
+ utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ application_manager_));
+ rpc_service_.ManageHMICommand(get_all_languages);
+ utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VR_GetCapabilities, application_manager_));
+ rpc_service_.ManageHMICommand(get_capabilities);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..48d9c3e075
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_is_ready_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRIsReadyResponse::VRIsReadyResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRIsReadyResponse::~VRIsReadyResponse() {}
+
+void VRIsReadyResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::VR_IsReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..26e308a0bc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRPerformInteractionRequest::VRPerformInteractionRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRPerformInteractionRequest::~VRPerformInteractionRequest() {}
+
+void VRPerformInteractionRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dec371e889
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/hmi/vr_perform_interaction_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VRPerformInteractionResponse::VRPerformInteractionResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VRPerformInteractionResponse::~VRPerformInteractionResponse() {}
+
+void VRPerformInteractionResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::VR_PerformInteraction);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d1cb9763d9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
@@ -0,0 +1,625 @@
+/*
+
+ 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 <string>
+#include "sdl_rpc_plugin/commands/mobile/add_command_request.h"
+
+#include "application_manager/application.h"
+#include "application_manager/message_helper.h"
+#include "utils/file_system.h"
+#include "utils/helpers.h"
+#include "utils/custom_string.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+AddCommandRequest::AddCommandRequest(
+ 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)
+ , send_ui_(false)
+ , send_vr_(false)
+ , is_ui_received_(false)
+ , is_vr_received_(false)
+ , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
+
+AddCommandRequest::~AddCommandRequest() {}
+
+void AddCommandRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ RemoveCommand();
+ CommandRequestImpl::onTimeOut();
+}
+
+bool AddCommandRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+void AddCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(
+ (*message_)[strings::params][strings::connection_key].asUInt());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "No application associated with session key");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) {
+ mobile_apis::Result::eType verification_result = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::cmd_icon],
+ app,
+ application_manager_);
+
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(
+ logger_, "MessageHelper::VerifyImage return " << verification_result);
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+
+ if (!((*message_)[strings::msg_params].keyExists(strings::cmd_id))) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ return;
+ }
+
+ bool data_exist = false;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
+ if (!CheckCommandName(app)) {
+ SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
+ return;
+ }
+ if (((*message_)[strings::msg_params][strings::menu_params].keyExists(
+ hmi_request::parent_id)) &&
+ (0 !=
+ (*message_)[strings::msg_params][strings::menu_params]
+ [hmi_request::parent_id].asUInt())) {
+ if (!CheckCommandParentId(app)) {
+ SendResponse(
+ false, mobile_apis::Result::INVALID_ID, "Parent ID doesn't exist");
+ return;
+ }
+ }
+ data_exist = true;
+ }
+
+ if (((*message_)[strings::msg_params].keyExists(strings::vr_commands)) &&
+ ((*message_)[strings::msg_params][strings::vr_commands].length() > 0)) {
+ if (!CheckCommandVRSynonym(app)) {
+ SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
+ return;
+ }
+
+ data_exist = true;
+ }
+
+ if (!data_exist) {
+ LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_ERROR(logger_, "Incoming add command has contains \t\n \\t \\n");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ app->AddCommand((*message_)[strings::msg_params][strings::cmd_id].asUInt(),
+ (*message_)[strings::msg_params]);
+
+ smart_objects::SmartObject ui_msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
+ ui_msg_params[strings::cmd_id] =
+ (*message_)[strings::msg_params][strings::cmd_id];
+ ui_msg_params[strings::menu_params] =
+ (*message_)[strings::msg_params][strings::menu_params];
+
+ ui_msg_params[strings::app_id] = app->app_id();
+
+ if (((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) &&
+ ((*message_)[strings::msg_params][strings::cmd_icon].keyExists(
+ strings::value)) &&
+ (0 < (*message_)[strings::msg_params][strings::cmd_icon][strings::value]
+ .length())) {
+ ui_msg_params[strings::cmd_icon] =
+ (*message_)[strings::msg_params][strings::cmd_icon];
+ }
+
+ send_ui_ = true;
+ }
+
+ smart_objects::SmartObject vr_msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_commands)) {
+ vr_msg_params[strings::cmd_id] =
+ (*message_)[strings::msg_params][strings::cmd_id];
+ vr_msg_params[strings::vr_commands] =
+ (*message_)[strings::msg_params][strings::vr_commands];
+ vr_msg_params[strings::app_id] = app->app_id();
+
+ vr_msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+ vr_msg_params[strings::grammar_id] = app->get_grammar_id();
+
+ send_vr_ = true;
+ }
+
+ if (send_ui_) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_AddCommand, &ui_msg_params, true);
+ }
+
+ if (send_vr_) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &vr_msg_params, true);
+ }
+}
+
+bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
+ if (!app) {
+ return false;
+ }
+
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& commands = accessor.GetData();
+ CommandsMap::const_iterator i = commands.begin();
+ uint32_t saved_parent_id = 0;
+ uint32_t parent_id = 0;
+ if ((*message_)[strings::msg_params][strings::menu_params].keyExists(
+ hmi_request::parent_id)) {
+ parent_id = (*message_)[strings::msg_params][strings::menu_params]
+ [hmi_request::parent_id].asUInt();
+ }
+
+ for (; commands.end() != i; ++i) {
+ if (!(*i->second).keyExists(strings::menu_params)) {
+ continue;
+ }
+
+ saved_parent_id = 0;
+ if ((*i->second)[strings::menu_params].keyExists(hmi_request::parent_id)) {
+ saved_parent_id =
+ (*i->second)[strings::menu_params][hmi_request::parent_id].asUInt();
+ }
+ if (((*i->second)[strings::menu_params][strings::menu_name].asString() ==
+ (*message_)[strings::msg_params][strings::menu_params]
+ [strings::menu_name].asString()) &&
+ (saved_parent_id == parent_id)) {
+ LOG4CXX_INFO(logger_,
+ "AddCommandRequest::CheckCommandName received"
+ " command name already exist in same level menu");
+ return false;
+ }
+ }
+ return true;
+}
+
+bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
+ if (!app) {
+ return false;
+ }
+
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& commands = accessor.GetData();
+ CommandsMap::const_iterator it = commands.begin();
+
+ for (; commands.end() != it; ++it) {
+ if (!(*it->second).keyExists(strings::vr_commands)) {
+ continue;
+ }
+
+ for (size_t i = 0; i < (*it->second)[strings::vr_commands].length(); ++i) {
+ for (size_t j = 0;
+ j < (*message_)[strings::msg_params][strings::vr_commands].length();
+ ++j) {
+ const custom_str::CustomString& vr_cmd_i =
+ (*it->second)[strings::vr_commands][i].asCustomString();
+ const custom_str::CustomString& vr_cmd_j =
+ (*message_)[strings::msg_params][strings::vr_commands][j]
+ .asCustomString();
+
+ if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) {
+ LOG4CXX_INFO(logger_,
+ "AddCommandRequest::CheckCommandVRSynonym"
+ " received command vr synonym already exist");
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+}
+
+bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
+ if (!app) {
+ return false;
+ }
+
+ const int32_t parent_id =
+ (*message_)[strings::msg_params][strings::menu_params]
+ [hmi_request::parent_id].asInt();
+ smart_objects::SmartObject* parent = app->FindSubMenu(parent_id);
+
+ if (!parent) {
+ LOG4CXX_INFO(logger_,
+ "AddCommandRequest::CheckCommandParentId received"
+ " submenu doesn't exist");
+ return false;
+ }
+ return true;
+}
+
+// TODO(AKUTSAN) APPLINK-26973: Refactor AddCommandRequest
+void AddCommandRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ smart_objects::SmartObject msg_param(smart_objects::SmartType_Map);
+ msg_param[strings::cmd_id] =
+ (*message_)[strings::msg_params][strings::cmd_id];
+ msg_param[strings::app_id] = application->app_id();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_AddCommand: {
+ LOG4CXX_INFO(logger_, "Received UI_AddCommand event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ is_ui_received_ = true;
+ ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, ui_info_);
+ if (hmi_apis::Common_Result::SUCCESS != ui_result_) {
+ (*message_)[strings::msg_params].erase(strings::menu_params);
+ }
+ break;
+ }
+ case hmi_apis::FunctionID::VR_AddCommand: {
+ LOG4CXX_INFO(logger_, "Received VR_AddCommand event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ is_vr_received_ = true;
+ vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, vr_info_);
+ if (hmi_apis::Common_Result::SUCCESS != vr_result_) {
+ (*message_)[strings::msg_params].erase(strings::vr_commands);
+ }
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+
+ if (IsPendingResponseExist()) {
+ return;
+ }
+
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[strings::cmd_id] =
+ (*message_)[strings::msg_params][strings::cmd_id];
+ msg_params[strings::app_id] = application->app_id();
+
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+
+ const bool is_vr_invalid_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ vr_result_,
+ hmi_apis::Common_Result::INVALID_ENUM,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ const bool is_ui_invalid_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_,
+ hmi_apis::Common_Result::INVALID_ENUM,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+ const bool is_vr_unsupported =
+ vr_result_ == hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ const bool is_ui_unsupported =
+ ui_result_ == hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+
+ const bool is_no_ui_error = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_,
+ 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,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ const bool is_no_vr_error = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ vr_result_,
+ 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,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ bool result = (is_no_ui_error && is_no_vr_error) ||
+ (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
+ << " " << is_no_vr_error);
+ const bool is_vr_or_ui_warning =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ hmi_apis::Common_Result::WARNINGS, ui_result_, vr_result_);
+
+ const bool is_vr_or_ui_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ ui_result_,
+ vr_result_);
+
+ const bool is_vr_and_ui_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ALL>(
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ ui_result_,
+ vr_result_);
+
+ if (!result && hmi_apis::Common_Result::REJECTED == ui_result_) {
+ result_code = MessageHelper::HMIToMobileResult(ui_result_);
+ } else if (result && is_vr_or_ui_unsupported) {
+ result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
+ } else if (is_vr_or_ui_warning) {
+ result_code = mobile_apis::Result::WARNINGS;
+ } else {
+ result_code =
+ MessageHelper::HMIToMobileResult(std::max(ui_result_, vr_result_));
+ if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_) {
+ result_code = MessageHelper::HMIToMobileResult(vr_result_);
+ }
+ if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == vr_result_) {
+ result_code = MessageHelper::HMIToMobileResult(ui_result_);
+ }
+ LOG4CXX_DEBUG(logger_, "HMIToMobileResult " << result_code);
+ }
+
+ if (BothSend() && hmi_apis::Common_Result::SUCCESS == vr_result_) {
+ const bool is_ui_not_ok = Compare<hmi_apis::Common_Result::eType, NEQ, ALL>(
+ ui_result_,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ if (is_ui_not_ok) {
+ result_code = ui_result_ == hmi_apis::Common_Result::REJECTED
+ ? mobile_apis::Result::REJECTED
+ : mobile_apis::Result::GENERIC_ERROR;
+
+ msg_params[strings::grammar_id] = application->get_grammar_id();
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
+ application->RemoveCommand(
+ (*message_)[strings::msg_params][strings::cmd_id].asUInt());
+ result = false;
+ LOG4CXX_DEBUG(logger_, "Result " << result);
+ }
+ }
+
+ if (BothSend() && hmi_apis::Common_Result::SUCCESS == ui_result_ &&
+ !is_no_vr_error &&
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != vr_result_) {
+ result_code = vr_result_ == hmi_apis::Common_Result::REJECTED
+ ? mobile_apis::Result::REJECTED
+ : mobile_apis::Result::GENERIC_ERROR;
+
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
+
+ application->RemoveCommand(
+ (*message_)[strings::msg_params][strings::cmd_id].asUInt());
+ result = false;
+ LOG4CXX_DEBUG(logger_, "Result " << result);
+ }
+
+ HmiInterfaces::InterfaceState ui_interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_UI);
+ HmiInterfaces::InterfaceState vr_interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_VR);
+
+ if (!BothSend() &&
+ ((is_vr_unsupported &&
+ 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");
+ result = false;
+ }
+
+ if (is_vr_and_ui_unsupported) {
+ LOG4CXX_DEBUG(logger_, "UI and VR interface both unsupported");
+ result = false;
+ }
+
+ if (!result) {
+ RemoveCommand();
+ }
+
+ const std::string info = GenerateMobileResponseInfo();
+ SendResponse(result,
+ result_code,
+ info.empty() ? NULL : info.c_str(),
+ &(message[strings::msg_params]));
+}
+
+bool AddCommandRequest::IsPendingResponseExist() {
+ return send_ui_ != is_ui_received_ || send_vr_ != is_vr_received_;
+}
+
+bool AddCommandRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
+ str = (*message_)[strings::msg_params][strings::menu_params]
+ [strings::menu_name].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid menu name syntax check failed.");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_commands)) {
+ const size_t len =
+ (*message_)[strings::msg_params][strings::vr_commands].length();
+
+ for (size_t i = 0; i < len; ++i) {
+ str = (*message_)[strings::msg_params][strings::vr_commands][i]
+ .asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) {
+ str = (*message_)[strings::msg_params][strings::cmd_icon][strings::value]
+ .asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid cmd_icon value syntax check failed");
+ return true;
+ }
+ }
+ return false;
+}
+
+bool AddCommandRequest::BothSend() const {
+ return send_vr_ && send_ui_;
+}
+
+const std::string AddCommandRequest::GenerateMobileResponseInfo() {
+ // In case if vr_result_ is UNSUPPORTED_RESOURCE vr_info should be on the
+ // first place
+ // In case if ui_result_ is UNSUPPORTED_RESOURCE ui_info should be on the
+ // first place
+ // Other way order is doesn't matter
+
+ HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ HmiInterfaces::InterfaceState ui_interface_state =
+ hmi_interfaces.GetInterfaceState(HmiInterfaces::HMI_INTERFACE_UI);
+
+ HmiInterfaces::InterfaceState vr_interface_state =
+ hmi_interfaces.GetInterfaceState(HmiInterfaces::HMI_INTERFACE_VR);
+
+ if ((ui_interface_state == HmiInterfaces::STATE_NOT_AVAILABLE) &&
+ (vr_interface_state != HmiInterfaces::STATE_NOT_AVAILABLE) &&
+ !vr_info_.empty()) {
+ return vr_info_;
+ }
+
+ if ((vr_interface_state == HmiInterfaces::STATE_NOT_AVAILABLE) &&
+ (ui_interface_state != HmiInterfaces::STATE_NOT_AVAILABLE) &&
+ !ui_info_.empty()) {
+ return ui_info_;
+ }
+
+ return app_mngr::commands::MergeInfos(ui_info_, vr_info_);
+}
+
+void AddCommandRequest::RemoveCommand() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+ if (!app.valid()) {
+ LOG4CXX_ERROR(logger_, "No application associated with session key");
+ return;
+ }
+
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[strings::cmd_id] =
+ (*message_)[strings::msg_params][strings::cmd_id];
+ msg_params[strings::app_id] = app->app_id();
+
+ app->RemoveCommand(
+ (*message_)[strings::msg_params][strings::cmd_id].asUInt());
+
+ if (BothSend() && !(is_vr_received_ || is_ui_received_)) {
+ // in case we have send bth UI and VR and no one respond
+ // we have nothing to remove from HMI so no DeleteCommand expected
+ return;
+ }
+
+ if (BothSend() && !is_vr_received_) {
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
+ }
+
+ if (BothSend() && !is_ui_received_) {
+ msg_params[strings::grammar_id] = app->get_grammar_id();
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ccb84cecbb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/add_command_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AddCommandResponse::AddCommandResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+AddCommandResponse::~AddCommandResponse() {}
+
+void AddCommandResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3dcc414f9e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
@@ -0,0 +1,189 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/add_sub_menu_request.h"
+
+#include "application_manager/message_helper.h"
+#include "application_manager/application.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AddSubMenuRequest::AddSubMenuRequest(
+ 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) {}
+
+AddSubMenuRequest::~AddSubMenuRequest() {}
+
+void AddSubMenuRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ smart_objects::SmartObject received_msg_params =
+ (*message_)[strings::msg_params];
+ mobile_apis::Result::eType verification_result =
+ mobile_apis::Result::INVALID_ENUM;
+
+ if (received_msg_params.keyExists(strings::menu_icon)) {
+ verification_result = MessageHelper::VerifyImage(
+ received_msg_params[strings::menu_icon], app, application_manager_);
+
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(
+ logger_, "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.");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ 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.");
+ SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
+ return;
+ }
+
+ if (!CheckSubMenuName()) {
+ LOG4CXX_ERROR(logger_, "Sub-menu name is not valid.");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::menu_id] = received_msg_params[strings::menu_id];
+ if (received_msg_params.keyExists(strings::position)) {
+ msg_params[strings::menu_params][strings::position] =
+ received_msg_params[strings::position];
+ }
+ msg_params[strings::menu_params][strings::menu_name] =
+ received_msg_params[strings::menu_name];
+ msg_params[strings::app_id] = app->app_id();
+
+ if (mobile_apis::Result::SUCCESS == verification_result) {
+ msg_params[strings::menu_icon] = received_msg_params[strings::menu_icon];
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_AddSubMenu, &msg_params, true);
+}
+
+void AddSubMenuRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_AddSubMenu: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ if (result) {
+ application->AddSubMenu(
+ (*message_)[strings::msg_params][strings::menu_id].asInt(),
+ (*message_)[strings::msg_params]);
+ }
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+bool AddSubMenuRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+bool AddSubMenuRequest::CheckSubMenuName() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ str = (*message_)[strings::msg_params][strings::menu_name].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_INFO(logger_, "Invalid subMenu name.");
+ return false;
+ }
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d0ec635dd0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/add_sub_menu_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AddSubMenuResponse::AddSubMenuResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+AddSubMenuResponse::~AddSubMenuResponse() {}
+
+void AddSubMenuResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5dda34b743
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc
@@ -0,0 +1,291 @@
+/*
+ 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 <cstring>
+#include <string>
+#include "sdl_rpc_plugin/commands/mobile/alert_maneuver_request.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AlertManeuverRequest::AlertManeuverRequest(
+ 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)
+ , tts_speak_result_code_(hmi_apis::Common_Result::INVALID_ENUM)
+ , navi_alert_maneuver_result_code_(hmi_apis::Common_Result::INVALID_ENUM) {
+ subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+}
+
+AlertManeuverRequest::~AlertManeuverRequest() {}
+
+void AlertManeuverRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if ((!(*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
+ (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) {
+ LOG4CXX_ERROR(logger_, "AlertManeuverRequest::Request without parameters!");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ ApplicationSharedPtr app = application_manager_.application(
+ (*message_)[strings::params][strings::connection_key].asUInt());
+
+ if (NULL == app.get()) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ // 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) {
+ LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
+ SendResponse(false, processing_result);
+ return;
+ }
+
+ // Checking parameters and how many HMI requests should be sent
+ bool tts_is_ok = false;
+
+ // check TTSChunk parameter
+ 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) {
+ LOG4CXX_ERROR(logger_,
+ "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;
+ }
+
+ if (0 < (*message_)[strings::msg_params][strings::tts_chunks].length()) {
+ pending_requests_.Add(hmi_apis::FunctionID::TTS_Speak);
+ tts_is_ok = true;
+ }
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::app_id] = app->app_id();
+
+ 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());
+ }
+
+ pending_requests_.Add(hmi_apis::FunctionID::Navigation_AlertManeuver);
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_AlertManeuver, &msg_params, true);
+
+ if (tts_is_ok) {
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[hmi_request::tts_chunks] =
+ (*message_)[strings::msg_params][strings::tts_chunks];
+ msg_params[hmi_request::speak_type] =
+ hmi_apis::Common_MethodName::ALERT_MANEUVER;
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
+ }
+}
+
+void AlertManeuverRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ pending_requests_.Remove(event_id);
+ navi_alert_maneuver_result_code_ =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, info_navi_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_Speak: {
+ LOG4CXX_INFO(logger_, "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>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, info_tts_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_OnResetTimeout: {
+ LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
+
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SendResponse(
+ 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.");
+ return;
+ }
+ std::string return_info;
+ mobile_apis::Result::eType result_code;
+ const bool result = PrepareResponseParameters(result_code, return_info);
+ bool must_be_empty_info = false;
+ if (return_info.find("\n") != std::string::npos ||
+ return_info.find("\t") != std::string::npos) {
+ must_be_empty_info = true;
+ }
+ SendResponse(result,
+ result_code,
+ (must_be_empty_info) ? NULL : return_info.c_str(),
+ &(message[strings::msg_params]));
+}
+
+bool AlertManeuverRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& return_info) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ app_mngr::commands::ResponseInfo navigation_alert_info(
+ navi_alert_maneuver_result_code_,
+ HmiInterfaces::HMI_INTERFACE_Navigation,
+ application_manager_);
+
+ app_mngr::commands::ResponseInfo tts_alert_info(
+ tts_speak_result_code_,
+ HmiInterfaces::HMI_INTERFACE_TTS,
+ application_manager_);
+ const bool result =
+ PrepareResultForMobileResponse(navigation_alert_info, tts_alert_info);
+
+ if (result && (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE ==
+ tts_speak_result_code_ &&
+ (HmiInterfaces::STATE_AVAILABLE ==
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_TTS)))) {
+ result_code = mobile_apis::Result::WARNINGS;
+ return_info = std::string("Unsupported phoneme type sent in a prompt");
+ return result;
+ }
+ result_code =
+ PrepareResultCodeForResponse(navigation_alert_info, tts_alert_info);
+ return_info = app_mngr::commands::MergeInfos(
+ navigation_alert_info, info_navi_, tts_alert_info, info_tts_);
+ return result;
+}
+
+bool AlertManeuverRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using smart_objects::SmartArray;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
+ const SmartArray* tts_chunks_arr =
+ (*message_)[strings::msg_params][strings::tts_chunks].asArray();
+
+ SmartArray::const_iterator it_tts_chunk = tts_chunks_arr->begin();
+
+ 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");
+ return true;
+ }
+ }
+ }
+ if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ DCHECK_OR_RETURN(
+ (*message_)[strings::msg_params][strings::soft_buttons].getType() ==
+ smart_objects::SmartType_Array,
+ true);
+ const smart_objects::SmartArray* soft_button_array =
+ (*message_)[strings::msg_params][strings::soft_buttons].asArray();
+
+ SmartArray::const_iterator it_soft_button = soft_button_array->begin();
+
+ for (; it_soft_button != soft_button_array->end(); ++it_soft_button) {
+ 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");
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d3e527f6ae
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/alert_maneuver_response.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AlertManeuverResponse::AlertManeuverResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+AlertManeuverResponse::~AlertManeuverResponse() {}
+
+void AlertManeuverResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2806ac1d93
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
@@ -0,0 +1,453 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/alert_request.h"
+
+#include <string.h>
+
+#include "application_manager/message_helper.h"
+#include "application_manager/application_impl.h"
+
+#include "application_manager/policies/policy_handler.h"
+#include "utils/helpers.h"
+#include "smart_objects/smart_object.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AlertRequest::AlertRequest(
+ 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_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) {
+ subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+}
+
+AlertRequest::~AlertRequest() {}
+
+bool AlertRequest::Init() {
+ /* Timeout in milliseconds.
+ If omitted a standard value of 10000 milliseconds is used.*/
+ if ((*message_)[strings::msg_params].keyExists(strings::duration)) {
+ default_timeout_ =
+ (*message_)[strings::msg_params][strings::duration].asUInt();
+ } else {
+ const int32_t def_value = 5000;
+ default_timeout_ = def_value;
+ }
+
+ // If soft buttons are present, SDL will not use initiate timeout tracking for
+ // response.
+ if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ LOG4CXX_INFO(logger_,
+ "Request contains soft buttons - request timeout "
+ "will be set to 0.");
+ default_timeout_ = 0;
+ }
+
+ return true;
+}
+
+void AlertRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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();
+ }
+
+ if ((tts_chunks_exists && length_tts_chunks) ||
+ ((*message_)[strings::msg_params].keyExists(strings::play_tone) &&
+ (*message_)[strings::msg_params][strings::play_tone].asBool())) {
+ awaiting_tts_speak_response_ = true;
+ }
+
+ SendAlertRequest(app_id);
+ if (awaiting_tts_speak_response_) {
+ SendSpeakRequest(app_id, tts_chunks_exists, length_tts_chunks);
+ }
+}
+
+void AlertRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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_);
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ break;
+ }
+ case hmi_apis::FunctionID::UI_Alert: {
+ LOG4CXX_INFO(logger_, "Received UI_Alert event");
+ // Unsubscribe from event to avoid unwanted messages
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ unsubscribe_from_event(hmi_apis::FunctionID::UI_Alert);
+ awaiting_ui_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);
+ }
+ alert_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+
+ // Mobile Alert request is successful when UI_Alert is successful
+ alert_response_params_ = message[strings::msg_params];
+ GetInfo(message, ui_response_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_Speak: {
+ LOG4CXX_INFO(logger_, "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: {
+ LOG4CXX_INFO(logger_, "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: {
+ LOG4CXX_ERROR(logger_, "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(),
+ &alert_response_params_);
+}
+
+bool AlertRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info) {
+ app_mngr::commands::ResponseInfo ui_alert_info(
+ 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_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 responce for
+ * TTS.IsReady.
+ */
+ if (result && ui_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_alert_info.is_ok || ui_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_alert_info, ui_response_info_, tts_alert_info, tts_response_info_);
+ return result;
+ }
+ result_code = PrepareResultCodeForResponse(ui_alert_info, tts_alert_info);
+ info = app_mngr::commands::MergeInfos(
+ ui_alert_info, ui_response_info_, tts_alert_info, tts_response_info_);
+ // Mobile Alert request is successful when UI_Alert is successful
+ if (is_ui_alert_sent_ && !ui_alert_info.is_ok) {
+ return false;
+ }
+ return result;
+}
+
+bool AlertRequest::Validate(uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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() &&
+ app->AreCommandLimitsExceeded(
+ static_cast<mobile_apis::FunctionID::eType>(function_id()),
+ application_manager::TLimitSource::POLICY_TABLE)) {
+ LOG4CXX_ERROR(logger_, "Alert frequency is too high.");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return false;
+ }
+
+ if (!CheckStringsOfAlertRequest()) {
+ 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) {
+ LOG4CXX_ERROR(logger_, "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) &&
+ (1 > (*message_)[strings::msg_params][strings::tts_chunks].length()))) {
+ LOG4CXX_ERROR(logger_, "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) {
+ LOG4CXX_ERROR(logger_,
+ "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 AlertRequest::SendAlertRequest(int32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+
+ 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::alertText1;
+ 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::alertText2;
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::alert_text2];
+ index++;
+ }
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_text3)) {
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
+ hmi_apis::Common_TextFieldName::alertText3;
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::alert_text3];
+ }
+
+ // 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());
+ }
+ // app_id
+ msg_params[strings::app_id] = app_id;
+ msg_params[strings::duration] = default_timeout_;
+
+ // NAVI platform progressIndicator
+ if ((*message_)[strings::msg_params].keyExists(strings::progress_indicator)) {
+ msg_params[strings::progress_indicator] =
+ (*message_)[strings::msg_params][strings::progress_indicator];
+ }
+
+ // 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_alert_response_ = true;
+ is_ui_alert_sent_ = true;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_Alert, &msg_params, true);
+ }
+}
+
+void AlertRequest::SendSpeakRequest(int32_t app_id,
+ bool tts_chunks_exists,
+ size_t length_tts_chunks) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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) &&
+ (*message_)[strings::msg_params][strings::play_tone].asBool()) {
+ msg_params[strings::play_tone] = true;
+ }
+ msg_params[strings::app_id] = app_id;
+ msg_params[hmi_request::speak_type] = Common_MethodName::ALERT;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
+}
+
+bool AlertRequest::CheckStringsOfAlertRequest() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ return false;
+ }
+ }
+
+ 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");
+ return false;
+ }
+ }
+
+ 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");
+ 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)) {
+ LOG4CXX_ERROR(logger_, "Invalid tts_chunks text syntax check failed");
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+bool AlertRequest::HasHmiResponsesToWait() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return awaiting_ui_alert_response_ || awaiting_tts_speak_response_ ||
+ awaiting_tts_stop_speaking_response_;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..bab5e5a5d8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
@@ -0,0 +1,67 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/alert_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+AlertResponse::AlertResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+AlertResponse::~AlertResponse() {}
+
+void AlertResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6af930ea53
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc
@@ -0,0 +1,684 @@
+/*
+
+ 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 <string.h>
+#include <algorithm>
+#include "sdl_rpc_plugin/commands/mobile/change_registration_request.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/message_helper.h"
+
+namespace {
+namespace custom_str = utils::custom_string;
+struct IsSameNickname {
+ 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());
+ }
+
+ private:
+ const custom_str::CustomString& app_id_;
+};
+}
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ChangeRegistrationRequest::ChangeRegistrationRequest(
+ 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)
+ , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , vr_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
+
+ChangeRegistrationRequest::~ChangeRegistrationRequest() {}
+
+void ChangeRegistrationRequest::SendVRRequest(
+ ApplicationSharedPtr app, smart_objects::SmartObject& msg_params) {
+ const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ auto function = hmi_apis::FunctionID::VR_ChangeRegistration;
+ pending_requests_.Add(function);
+ smart_objects::SmartObject vr_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ vr_params[strings::language] = msg_params[strings::language];
+
+ vr_params[strings::app_id] = app->app_id();
+ if (msg_params.keyExists(strings::vr_synonyms)) {
+ vr_params[strings::vr_synonyms] = msg_params[strings::vr_synonyms];
+ app->set_vr_synonyms(msg_params[strings::vr_synonyms]);
+ }
+ StartAwaitForInterface(hmi_interfaces.GetInterfaceFromFunction(function));
+ SendHMIRequest(function, &vr_params, true);
+}
+
+void ChangeRegistrationRequest::SendTTSRequest(
+ ApplicationSharedPtr app, smart_objects::SmartObject& msg_params) {
+ const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ auto function = hmi_apis::FunctionID::TTS_ChangeRegistration;
+ pending_requests_.Add(function);
+
+ smart_objects::SmartObject tts_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ tts_params[strings::language] = msg_params[strings::language];
+
+ tts_params[strings::app_id] = app->app_id();
+ if (msg_params.keyExists(strings::tts_name)) {
+ tts_params[strings::tts_name] = msg_params[strings::tts_name];
+ app->set_tts_name(msg_params[strings::tts_name]);
+ }
+ StartAwaitForInterface(hmi_interfaces.GetInterfaceFromFunction(function));
+ SendHMIRequest(function, &tts_params, true);
+}
+
+void ChangeRegistrationRequest::SendUIRequest(
+ ApplicationSharedPtr app,
+ smart_objects::SmartObject& msg_params,
+ const int32_t hmi_language) {
+ const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ auto function = hmi_apis::FunctionID::UI_ChangeRegistration;
+ pending_requests_.Add(function);
+ // UI processing
+ smart_objects::SmartObject ui_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ ui_params[strings::language] = hmi_language;
+ ui_params[strings::app_id] = app->app_id();
+ if (msg_params.keyExists(strings::app_name)) {
+ ui_params[strings::app_name] = msg_params[strings::app_name];
+ app->set_name(msg_params[strings::app_name].asCustomString());
+ }
+ if (msg_params.keyExists(strings::ngn_media_screen_app_name)) {
+ ui_params[strings::ngn_media_screen_app_name] =
+ msg_params[strings::ngn_media_screen_app_name];
+ app->set_ngn_media_screen_name(
+ msg_params[strings::ngn_media_screen_app_name]);
+ }
+
+ StartAwaitForInterface(hmi_interfaces.GetInterfaceFromFunction(function));
+ SendHMIRequest(function, &ui_params, true);
+}
+
+void ChangeRegistrationRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace smart_objects;
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ if (mobile_apis::Result::SUCCESS != CheckCoincidence()) {
+ SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
+ return;
+ }
+
+ SmartObject& msg_params = (*message_)[strings::msg_params];
+
+ const int32_t hmi_language =
+ msg_params[strings::hmi_display_language].asInt();
+
+ const int32_t language = msg_params[strings::language].asInt();
+
+ if (false == (IsLanguageSupportedByUI(hmi_language) &&
+ IsLanguageSupportedByVR(language) &&
+ IsLanguageSupportedByTTS(language))) {
+ LOG4CXX_ERROR(logger_, "Language is not supported");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ if (msg_params.keyExists(strings::app_name) &&
+ !IsNicknameAllowed(msg_params[strings::app_name].asCustomString())) {
+ LOG4CXX_ERROR(logger_, "Nickname is not allowed.");
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ return;
+ }
+
+ if ((*message_)[strings::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, app, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ LOG4CXX_ERROR(logger_,
+ "MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ SendResponse(false,
+ mobile_apis::Result::FILE_NOT_FOUND,
+ "One or more files needed for tts_name are not present");
+ return;
+ }
+ }
+
+ const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+
+ const HmiInterfaces::InterfaceState vr_state =
+ hmi_interfaces.GetInterfaceState(
+ HmiInterfaces::InterfaceID::HMI_INTERFACE_VR);
+ const HmiInterfaces::InterfaceState ui_state =
+ hmi_interfaces.GetInterfaceState(
+ HmiInterfaces::InterfaceID::HMI_INTERFACE_UI);
+ const HmiInterfaces::InterfaceState tts_state =
+ hmi_interfaces.GetInterfaceState(
+ HmiInterfaces::InterfaceID::HMI_INTERFACE_TTS);
+
+ using helpers::Compare;
+ using helpers::EQ;
+ using helpers::ALL;
+
+ if (Compare<HmiInterfaces::InterfaceState, EQ, ALL>(
+ HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE,
+ vr_state,
+ tts_state,
+ ui_state)) {
+ SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ return;
+ }
+ if (HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE != vr_state) {
+ // VR processing
+ SendVRRequest(app, msg_params);
+ }
+ if (HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE != tts_state) {
+ // TTS processing
+ SendTTSRequest(app, msg_params);
+ }
+
+ if (HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE != ui_state) {
+ SendUIRequest(app, msg_params, hmi_language);
+ }
+}
+
+void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ pending_requests_.Remove(event_id);
+ ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, ui_response_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::VR_ChangeRegistration: {
+ LOG4CXX_INFO(logger_, "Received VR_ChangeRegistration event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ pending_requests_.Remove(event_id);
+ vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, vr_response_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_ChangeRegistration: {
+ LOG4CXX_INFO(logger_, "Received TTS_ChangeRegistration event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ pending_requests_.Remove(event_id);
+ tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, tts_response_info_);
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event_id);
+ return;
+ }
+ }
+
+ if (pending_requests_.IsFinal(event_id)) {
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ if (hmi_apis::Common_Result::SUCCESS == ui_result_) {
+ application->set_ui_language(static_cast<mobile_api::Language::eType>(
+ (*message_)[strings::msg_params][strings::hmi_display_language]
+ .asInt()));
+ }
+
+ if (hmi_apis::Common_Result::SUCCESS == vr_result_ ||
+ hmi_apis::Common_Result::SUCCESS == tts_result_) {
+ application->set_language(static_cast<mobile_api::Language::eType>(
+ (*message_)[strings::msg_params][strings::language].asInt()));
+ }
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ std::string response_info;
+ const bool result = PrepareResponseParameters(result_code, response_info);
+
+ (*message_)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::eType::ChangeRegistrationID;
+
+ SendResponse(result,
+ result_code,
+ 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.");
+ }
+}
+
+namespace {
+void CheckInfo(std::string& str) {
+ if (std::string::npos != str.find("is not supported by system")) {
+ str.clear();
+ }
+}
+} // namespace
+
+bool ChangeRegistrationRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& response_info) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+ const bool is_tts_succeeded_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ tts_result_,
+ 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,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ const bool is_ui_succeeded_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_,
+ 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,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ const bool is_vr_succeeded_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ vr_result_,
+ 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,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ const bool is_tts_ui_vr_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ALL>(
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ tts_result_,
+ ui_result_,
+ vr_result_);
+
+ const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ const HmiInterfaces::InterfaceState tts_state =
+ hmi_interfaces.GetInterfaceState(
+ HmiInterfaces::InterfaceID::HMI_INTERFACE_TTS);
+ const HmiInterfaces::InterfaceState vr_state =
+ hmi_interfaces.GetInterfaceState(
+ HmiInterfaces::InterfaceID::HMI_INTERFACE_VR);
+ const HmiInterfaces::InterfaceState ui_state =
+ hmi_interfaces.GetInterfaceState(
+ HmiInterfaces::InterfaceID::HMI_INTERFACE_UI);
+
+ app_mngr::commands::ResponseInfo ui_properties_info(
+ ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
+
+ app_mngr::commands::ResponseInfo tts_properties_info(
+ tts_result_, HmiInterfaces::HMI_INTERFACE_TTS, application_manager_);
+
+ app_mngr::commands::ResponseInfo vr_properties_info(
+ ui_result_, HmiInterfaces::HMI_INTERFACE_VR, application_manager_);
+
+ bool result = ((!is_tts_ui_vr_unsupported) && is_tts_succeeded_unsupported &&
+ is_ui_succeeded_unsupported && is_vr_succeeded_unsupported);
+
+ const bool is_tts_or_ui_or_vr_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ tts_result_,
+ ui_result_,
+ vr_result_);
+
+ if ((result && is_tts_or_ui_or_vr_unsupported)) {
+ result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
+ result =
+ PrepareResultForMobileResponse(ui_properties_info,
+ tts_properties_info) &&
+ PrepareResultForMobileResponse(tts_properties_info, vr_properties_info);
+ } else {
+ // If response contains erroneous result code SDL need return erroneus
+ // result code.
+ hmi_apis::Common_Result::eType ui_result =
+ hmi_apis::Common_Result::INVALID_ENUM;
+ hmi_apis::Common_Result::eType vr_result =
+ hmi_apis::Common_Result::INVALID_ENUM;
+ hmi_apis::Common_Result::eType tts_result =
+ hmi_apis::Common_Result::INVALID_ENUM;
+ if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != ui_result_) {
+ ui_result = ui_result_;
+ }
+ if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != vr_result_) {
+ vr_result = vr_result_;
+ }
+ if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != tts_result_) {
+ tts_result = tts_result_;
+ }
+ result_code = MessageHelper::HMIToMobileResult(
+ std::max(std::max(ui_result, vr_result), tts_result));
+ if (mobile_api::Result::INVALID_ENUM == result_code) {
+ result_code = mobile_api::Result::UNSUPPORTED_RESOURCE;
+ }
+ }
+
+ const bool is_tts_state_available =
+ tts_state == HmiInterfaces::STATE_AVAILABLE;
+ const bool is_vr_state_available = vr_state == HmiInterfaces::STATE_AVAILABLE;
+ const bool is_ui_state_available = ui_state == HmiInterfaces::STATE_AVAILABLE;
+
+ const bool is_tts_hmi_info =
+ is_tts_state_available && !tts_response_info_.empty();
+ const bool is_vr_hmi_info =
+ is_vr_state_available && !vr_response_info_.empty();
+ const bool is_ui_hmi_info =
+ is_ui_state_available && !ui_response_info_.empty();
+
+ if (is_tts_hmi_info || is_vr_hmi_info || is_ui_hmi_info) {
+ if (!is_tts_hmi_info)
+ CheckInfo(tts_response_info_);
+ if (!is_vr_hmi_info)
+ CheckInfo(ui_response_info_);
+ if (!is_ui_hmi_info)
+ CheckInfo(vr_response_info_);
+ }
+
+ response_info = app_mngr::commands::MergeInfos(
+ ui_response_info_, vr_response_info_, tts_response_info_);
+ return result;
+}
+
+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();
+
+ if (!ui_languages) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return false;
+ }
+
+ for (size_t i = 0; i < ui_languages->length(); ++i) {
+ if (hmi_display_lang == ui_languages->getElement(i).asInt()) {
+ return true;
+ }
+ }
+
+ LOG4CXX_ERROR(logger_, "Language isn't supported by UI");
+
+ return false;
+}
+
+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();
+
+ if (!vr_languages) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return false;
+ }
+
+ for (size_t i = 0; i < vr_languages->length(); ++i) {
+ if (hmi_display_lang == vr_languages->getElement(i).asInt()) {
+ return true;
+ }
+ }
+
+ LOG4CXX_ERROR(logger_, "Language isn't supported by VR");
+
+ return false;
+}
+
+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();
+
+ if (!tts_languages) {
+ LOG4CXX_ERROR(logger_, "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");
+ return false;
+}
+
+bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
+ const char* str = NULL;
+
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::tts_name)) {
+ const smart_objects::SmartArray* tn_array =
+ (*message_)[strings::msg_params][strings::tts_name].asArray();
+
+ smart_objects::SmartArray::const_iterator it_tn = tn_array->begin();
+ smart_objects::SmartArray::const_iterator it_tn_end = tn_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::ngn_media_screen_app_name)) {
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_synonyms)) {
+ const smart_objects::SmartArray* vs_array =
+ (*message_)[strings::msg_params][strings::vr_synonyms].asArray();
+
+ smart_objects::SmartArray::const_iterator it_vs = vs_array->begin();
+ smart_objects::SmartArray::const_iterator it_vs_end = vs_array->end();
+
+ for (; it_vs != it_vs_end; ++it_vs) {
+ str = (*it_vs).asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid vr_synonyms syntax check failed");
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ ApplicationSet accessor = application_manager_.applications().GetData();
+ custom_str::CustomString app_name;
+ uint32_t app_id = connection_key();
+ if (msg_params.keyExists(strings::app_name)) {
+ app_name = msg_params[strings::app_name].asCustomString();
+ }
+
+ ApplicationSetConstIt it = accessor.begin();
+ for (; accessor.end() != it; ++it) {
+ if (app_id == (*it)->app_id()) {
+ continue;
+ }
+
+ const custom_str::CustomString& cur_name = (*it)->name();
+ if (msg_params.keyExists(strings::app_name)) {
+ if (app_name.CompareIgnoreCase(cur_name)) {
+ LOG4CXX_ERROR(logger_, "Application name is known already.");
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+
+ const smart_objects::SmartObject* vr = (*it)->vr_synonyms();
+ const std::vector<smart_objects::SmartObject>* curr_vr = NULL;
+ if (NULL != vr) {
+ curr_vr = vr->asArray();
+ CoincidencePredicateVR v(app_name);
+
+ if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
+ LOG4CXX_ERROR(logger_, "Application name is known already.");
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+ }
+ }
+
+ // vr check
+ if (msg_params.keyExists(strings::vr_synonyms)) {
+ const std::vector<smart_objects::SmartObject>* new_vr =
+ msg_params[strings::vr_synonyms].asArray();
+
+ 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 .");
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+ } // end vr check
+ } // application for end
+ return mobile_apis::Result::SUCCESS;
+}
+
+bool ChangeRegistrationRequest::IsNicknameAllowed(
+ const custom_str::CustomString& app_name) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "Can't find appication with connection key "
+ << connection_key());
+ return false;
+ }
+
+ const std::string policy_app_id = app->policy_app_id();
+
+ policy::StringArray app_nicknames;
+ policy::StringArray app_hmi_types;
+
+ bool init_result = policy_handler_.GetInitialAppData(
+ 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);
+ return false;
+ }
+
+ if (!app_nicknames.empty()) {
+ IsSameNickname compare(app_name);
+ 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.");
+
+ usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
+ policy_handler_.GetStatisticManager(),
+ policy_app_id,
+ usage_statistics::REJECTIONS_NICKNAME_MISMATCH);
+ ++count_of_rejections_nickname_mismatch;
+
+ return false;
+ }
+ }
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2dae92cd9b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/change_registration_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ChangeRegistrationResponse::ChangeRegistrationResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ChangeRegistrationResponse::~ChangeRegistrationResponse() {}
+
+void ChangeRegistrationResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7451ea7905
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -0,0 +1,451 @@
+/*
+
+ 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 <string>
+#include <cstring>
+#include <algorithm>
+#include <vector>
+#include "sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "utils/gen_hash.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
+ 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)
+ , choice_set_id_(0)
+ , expected_chs_count_(0)
+ , received_chs_count_(0)
+ , error_from_hmi_(false)
+ , is_timed_out_(false)
+ , vr_commands_lock_(true) {}
+
+CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+void CreateInteractionChoiceSetRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace mobile_apis;
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+ for (uint32_t i = 0;
+ i < (*message_)[strings::msg_params][strings::choice_set].length();
+ ++i) {
+ Result::eType verification_result_image = Result::SUCCESS;
+ Result::eType verification_result_secondary_image = Result::SUCCESS;
+ if ((*message_)[strings::msg_params][strings::choice_set][i].keyExists(
+ strings::image)) {
+ verification_result_image = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::choice_set][i]
+ [strings::image],
+ app,
+ application_manager_);
+ }
+ if ((*message_)[strings::msg_params][strings::choice_set][i].keyExists(
+ strings::secondary_image)) {
+ verification_result_secondary_image = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::choice_set][i]
+ [strings::secondary_image],
+ app,
+ application_manager_);
+ }
+ if (verification_result_image == Result::INVALID_DATA ||
+ verification_result_secondary_image == Result::INVALID_DATA) {
+ LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SendResponse(false, Result::INVALID_DATA);
+ return;
+ }
+ }
+
+ choice_set_id_ =
+ (*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.");
+ SendResponse(false, Result::INVALID_ID);
+ return;
+ }
+
+ Result::eType result = CheckChoiceSet(app);
+ if (Result::SUCCESS != result) {
+ SendResponse(false, result);
+ return;
+ }
+ uint32_t grammar_id = application_manager_.GenerateGrammarID();
+ (*message_)[strings::msg_params][strings::grammar_id] = grammar_id;
+ app->AddChoiceSet(choice_set_id_, (*message_)[strings::msg_params]);
+ SendVRAddCommandRequests(app);
+}
+
+mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
+ ApplicationConstSharedPtr app) {
+ using namespace smart_objects;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::set<uint32_t> choice_id_set;
+
+ const SmartArray* choice_set =
+ (*message_)[strings::msg_params][strings::choice_set].asArray();
+
+ SmartArray::const_iterator current_choice_set_it = choice_set->begin();
+ SmartArray::const_iterator next_choice_set_it;
+
+ for (; choice_set->end() != current_choice_set_it; ++current_choice_set_it) {
+ std::pair<std::set<uint32_t>::iterator, bool> ins_res =
+ choice_id_set.insert(
+ (*current_choice_set_it)[strings::choice_id].asInt());
+ if (!ins_res.second) {
+ LOG4CXX_ERROR(logger_,
+ "Choise 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");
+ return mobile_apis::Result::INVALID_DATA;
+ }
+ for (next_choice_set_it = current_choice_set_it + 1;
+ choice_set->end() != next_choice_set_it;
+ ++next_choice_set_it) {
+ if (compareSynonyms(*current_choice_set_it, *next_choice_set_it)) {
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+ }
+ }
+ return mobile_apis::Result::SUCCESS;
+}
+
+bool CreateInteractionChoiceSetRequest::compareSynonyms(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2) {
+ smart_objects::SmartArray* vr_cmds_1 =
+ choice1[strings::vr_commands].asArray();
+ DCHECK(vr_cmds_1 != NULL);
+ smart_objects::SmartArray* vr_cmds_2 =
+ choice2[strings::vr_commands].asArray();
+ DCHECK(vr_cmds_2 != NULL);
+
+ smart_objects::SmartArray::iterator it;
+ it = std::find_first_of(vr_cmds_1->begin(),
+ vr_cmds_1->end(),
+ vr_cmds_2->begin(),
+ vr_cmds_2->end(),
+ CreateInteractionChoiceSetRequest::compareStr);
+
+ if (it != vr_cmds_1->end()) {
+ LOG4CXX_INFO(logger_,
+ "Incoming choice set has duplicated VR synonyms "
+ << it->asString());
+ return true;
+ }
+
+ return false;
+}
+
+bool CreateInteractionChoiceSetRequest::compareStr(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2) {
+ return 0 == strcasecmp(str1.asCharArray(), str2.asCharArray());
+}
+
+bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
+ const smart_objects::SmartObject& choice_set) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ str = choice_set[strings::menu_name].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "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");
+ return true;
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ if (choice_set.keyExists(strings::vr_commands)) {
+ const size_t len = choice_set[strings::vr_commands].length();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+ return false;
+}
+
+void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
+ application_manager::ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject& choice_set = (*message_)[strings::msg_params];
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::grammar_id] = choice_set[strings::grammar_id];
+ const uint32_t choice_count = choice_set[strings::choice_set].length();
+ SetAllowedToTerminate(false);
+
+ expected_chs_count_ = choice_count;
+ size_t chs_num = 0;
+ for (; chs_num < choice_count; ++chs_num) {
+ {
+ sync_primitives::AutoLock error_lock(error_from_hmi_lock_);
+ if (error_from_hmi_) {
+ LOG4CXX_WARN(logger_,
+ "Error from HMI received. Stop sending VRCommands");
+ break;
+ }
+ }
+
+ 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_);
+ const uint32_t vr_cmd_id = msg_params[strings::cmd_id].asUInt();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ const uint32_t vr_corr_id =
+ SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &msg_params, true);
+
+ 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);
+ }
+ expected_chs_count_ = chs_num;
+ LOG4CXX_DEBUG(logger_, "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");
+ if (!error_from_hmi_) {
+ error_from_hmi_ = true;
+ std::string info =
+ vr_result == hmi_apis::Common_Result::UNSUPPORTED_RESOURCE
+ ? "VR is not supported by system"
+ : "";
+ SendResponse(false, GetMobileResultCode(vr_result), info.c_str());
+ }
+}
+
+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");
+ return false;
+ }
+ VRCommandInfo& vr_command = it->second;
+ vr_command.succesful_response_received_ = true;
+ return true;
+}
+
+void CreateInteractionChoiceSetRequest::CountReceivedVRResponses() {
+ received_chs_count_++;
+ LOG4CXX_DEBUG(logger_,
+ "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");
+ } else {
+ OnAllHMIResponsesReceived();
+ }
+}
+
+void CreateInteractionChoiceSetRequest::on_event(
+ const event_engine::Event& event) {
+ using namespace hmi_apis;
+ using namespace helpers;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ const Common_Result::eType result = static_cast<Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool is_no_error = Compare<Common_Result::eType, EQ, ONE>(
+ result, Common_Result::SUCCESS, Common_Result::WARNINGS);
+ uint32_t corr_id = static_cast<uint32_t>(
+ message[strings::params][strings::correlation_id].asUInt());
+ if (event.id() == hmi_apis::FunctionID::VR_AddCommand) {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ {
+ sync_primitives::AutoLock commands_lock(vr_commands_lock_);
+ if (is_no_error) {
+ if (!ProcessSuccesfulHMIResponse(corr_id)) {
+ return;
+ }
+ } else {
+ ProcessHmiError(result);
+ }
+ }
+ CountReceivedVRResponses();
+ }
+}
+
+void CreateInteractionChoiceSetRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!error_from_hmi_) {
+ SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
+ }
+ CommandRequestImpl::onTimeOut();
+ DeleteChoices();
+
+ // 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_);
+ is_timed_out_ = true;
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+}
+
+bool CreateInteractionChoiceSetRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+void CreateInteractionChoiceSetRequest::DeleteChoices() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+ application->RemoveChoiceSet(choice_set_id_);
+
+ smart_objects::SmartObject msg_param(smart_objects::SmartType_Map);
+ msg_param[strings::app_id] = application->app_id();
+
+ sync_primitives::AutoLock commands_lock(vr_commands_lock_);
+ SentCommandsMap::const_iterator it = sent_commands_map_.begin();
+ for (; it != sent_commands_map_.end(); ++it) {
+ const VRCommandInfo& vr_command_info = it->second;
+ if (vr_command_info.succesful_response_received_) {
+ 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_);
+ }
+ }
+ sent_commands_map_.clear();
+}
+
+void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!error_from_hmi_) {
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+ } else {
+ DeleteChoices();
+ }
+
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..807770ed12
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc
@@ -0,0 +1,75 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_response.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {}
+
+void CreateInteractionChoiceSetResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // 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");
+ SendResponse(false);
+ return;
+ }
+ }
+
+ SendResponse(true);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..bbe787a123
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc
@@ -0,0 +1,234 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_command_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteCommandRequest::DeleteCommandRequest(
+ 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)
+ , is_ui_send_(false)
+ , is_vr_send_(false)
+ , is_ui_received_(false)
+ , is_vr_received_(false)
+ , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
+
+DeleteCommandRequest::~DeleteCommandRequest() {}
+
+void DeleteCommandRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const int32_t cmd_id =
+ (*message_)[strings::msg_params][strings::cmd_id].asInt();
+
+ smart_objects::SmartObject* command = application->FindCommand(cmd_id);
+
+ if (!command) {
+ LOG4CXX_ERROR(logger_, "Command with id " << cmd_id << " is not found.");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::cmd_id] =
+ (*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)) {
+ is_ui_send_ = true;
+ }
+ // check vr params
+ if ((*command).keyExists(strings::vr_commands)) {
+ is_vr_send_ = true;
+ }
+ if (is_ui_send_) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params, true);
+ }
+ if (is_vr_send_) {
+ // VR params
+ msg_params[strings::grammar_id] = application->get_grammar_id();
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params, true);
+ }
+}
+
+bool DeleteCommandRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info) {
+ using namespace helpers;
+ app_mngr::commands::ResponseInfo ui_delete_info(
+ ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
+ app_mngr::commands::ResponseInfo vr_delete_info(
+ vr_result_, HmiInterfaces::HMI_INTERFACE_VR, application_manager_);
+ const bool result =
+ PrepareResultForMobileResponse(ui_delete_info, vr_delete_info);
+
+ const bool is_vr_or_ui_warning =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ hmi_apis::Common_Result::WARNINGS, ui_result_, vr_result_);
+ info = app_mngr::commands::MergeInfos(
+ 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");
+ 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"));
+ return result;
+}
+
+void DeleteCommandRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_DeleteCommand: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ 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_));
+ GetInfo(message, ui_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::VR_DeleteCommand: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ 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_));
+ GetInfo(message, vr_info_);
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+
+ if (IsPendingResponseExist()) {
+ LOG4CXX_DEBUG(logger_, "Still awaiting for other responses.");
+ return;
+ }
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ return;
+ }
+ smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+
+ const int32_t cmd_id = msg_params[strings::cmd_id].asInt();
+
+ smart_objects::SmartObject* command = application->FindCommand(cmd_id);
+
+ if (!command) {
+ LOG4CXX_ERROR(logger_,
+ "Command id " << cmd_id << " not found for "
+ "application with connection key "
+ << connection_key());
+ return;
+ }
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ std::string info;
+ const bool result = PrepareResponseParameters(result_code, info);
+ if (result) {
+ application->RemoveCommand(msg_params[strings::cmd_id].asInt());
+ }
+ SendResponse(
+ result, result_code, info.empty() ? NULL : info.c_str(), &msg_params);
+}
+
+bool DeleteCommandRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+bool DeleteCommandRequest::IsPendingResponseExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return is_ui_send_ != is_ui_received_ || is_vr_send_ != is_vr_received_;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8f85d50e28
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_command_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteCommandResponse::DeleteCommandResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+DeleteCommandResponse::~DeleteCommandResponse() {}
+
+void DeleteCommandResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..cf8a6d259f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc
@@ -0,0 +1,132 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_file_request.h"
+
+#include "application_manager/application_impl.h"
+
+#include "utils/file_system.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteFileRequest::DeleteFileRequest(
+ 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) {}
+
+DeleteFileRequest::~DeleteFileRequest() {}
+
+void DeleteFileRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ return;
+ }
+
+ if ((mobile_api::HMILevel::HMI_NONE == application->hmi_level()) &&
+ (application_manager_.get_settings().delete_file_in_none() <=
+ 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 ");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ const std::string& sync_file_name =
+ (*message_)[strings::msg_params][strings::sync_file_name].asString();
+
+ if (!file_system::IsFileNameValid(sync_file_name)) {
+ const std::string err_msg = "Sync file name contains forbidden symbols.";
+ LOG4CXX_ERROR(logger_, err_msg);
+ SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
+ return;
+ }
+
+ std::string full_file_path =
+ application_manager_.get_settings().app_storage_folder() + "/";
+ full_file_path += application->folder_name();
+ full_file_path += "/";
+ full_file_path += sync_file_name;
+
+ if (file_system::FileExists(full_file_path)) {
+ if (file_system::DeleteFile(full_file_path)) {
+ const application_manager::AppFile* file =
+ application->GetFile(full_file_path);
+ if (file) {
+ SendFileRemovedNotification(file);
+ }
+
+ application->DeleteFile(full_file_path);
+ application->increment_delete_file_in_none_count();
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+ } else {
+ SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
+ }
+ } else {
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ }
+}
+
+void DeleteFileRequest::SendFileRemovedNotification(
+ const application_manager::AppFile* file) const {
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::app_id] = connection_key();
+ msg_params[strings::file_name] = file->file_name;
+ msg_params[strings::file_type] = file->file_type;
+
+ CreateHMINotification(hmi_apis::FunctionID::BasicCommunication_OnFileRemoved,
+ msg_params);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..66c61c9e4a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc
@@ -0,0 +1,75 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_file_response.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteFileResponse::DeleteFileResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+DeleteFileResponse::~DeleteFileResponse() {}
+
+void DeleteFileResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ (*message_)[strings::msg_params][strings::space_available] =
+ static_cast<uint32_t>(app->GetAvailableDiskSpace());
+ SendResponse((*message_)[strings::msg_params][strings::success].asBool());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a9db3975db
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc
@@ -0,0 +1,168 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest(
+ 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) {}
+
+DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {}
+
+void DeleteInteractionChoiceSetRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "No application associated with connection key "
+ << connection_key());
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const int32_t choice_set_id =
+ (*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.");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ return;
+ }
+
+ if (ChoiceSetInUse(app)) {
+ LOG4CXX_ERROR(logger_, "Choice set currently in use.");
+ SendResponse(false, mobile_apis::Result::IN_USE);
+ return;
+ }
+ SendVrDeleteCommand(app);
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::interaction_choice_set_id] = choice_set_id;
+ msg_params[strings::app_id] = app->app_id();
+
+ app->RemoveChoiceSet(choice_set_id);
+
+ // Checking of HMI responses will be implemented with APPLINK-14600
+ const bool result = true;
+ SendResponse(result, mobile_apis::Result::SUCCESS);
+}
+
+bool DeleteInteractionChoiceSetRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
+ ApplicationConstSharedPtr app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app->is_perform_interaction_active()) {
+ return false;
+ }
+ const DataAccessor<PerformChoiceSetMap> accessor =
+ app->performinteraction_choice_set_map();
+ const PerformChoiceSetMap& choice_set_map = accessor.GetData();
+
+ const uint32_t choice_set_id =
+ (*message_)[strings::msg_params][strings::interaction_choice_set_id]
+ .asUInt();
+
+ PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
+ for (; choice_set_map.end() != it; ++it) {
+ const PerformChoice& choice = it->second;
+ 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.");
+ return true;
+ }
+ }
+ }
+ return true;
+}
+
+void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand(
+ application_manager::ApplicationSharedPtr app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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);
+
+ if (!choice_set) {
+ LOG4CXX_ERROR(logger_,
+ "Choice set with id " << choice_set_id << " is not found.");
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ 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];
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..18ca60f255
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc
@@ -0,0 +1,84 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_response.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {}
+
+void DeleteInteractionChoiceSetResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // 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");
+ SendResponse(false);
+ return;
+ }
+ }
+
+ const int32_t code =
+ (*message_)[strings::msg_params][strings::result_code].asInt();
+
+ if (hmi_apis::Common_Result::SUCCESS == code) {
+ SendResponse(true);
+ } else {
+ // TODO(DK): Some logic
+ SendResponse(false);
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..38113afcc2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc
@@ -0,0 +1,201 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h"
+
+#include "application_manager/message_helper.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/HMI_API.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteSubMenuRequest::DeleteSubMenuRequest(
+ 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) {}
+
+DeleteSubMenuRequest::~DeleteSubMenuRequest() {}
+
+void DeleteSubMenuRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ LOG4CXX_ERROR(logger_, "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.");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::menu_id] =
+ (*message_)[strings::msg_params][strings::menu_id];
+ msg_params[strings::app_id] = app->app_id();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteSubMenu, &msg_params, true);
+}
+
+void DeleteSubMenuRequest::DeleteSubMenuVRCommands(
+ ApplicationConstSharedPtr app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& commands = accessor.GetData();
+ CommandsMap::const_iterator it = commands.begin();
+
+ for (; commands.end() != it; ++it) {
+ if (!(*it->second).keyExists(strings::vr_commands)) {
+ continue;
+ }
+
+ if ((*message_)[strings::msg_params][strings::menu_id].asInt() ==
+ (*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::grammar_id] = app->get_grammar_id();
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
+ }
+ }
+}
+
+void DeleteSubMenuRequest::DeleteSubMenuUICommands(
+ ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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");
+ ++it;
+ continue;
+ }
+
+ if ((*message_)[strings::msg_params][strings::menu_id].asInt() ==
+ (*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
+ app->RemoveCommand((*it->second)[strings::cmd_id].asInt());
+ it = commands.begin(); // Can not relay on
+ // iterators after erase was called
+
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
+ } else {
+ ++it;
+ }
+ }
+}
+
+void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_DeleteSubMenu: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ if (result) {
+ // delete sub menu items from SDL and HMI
+ DeleteSubMenuVRCommands(application);
+ DeleteSubMenuUICommands(application);
+ application->RemoveSubMenu(
+ (*message_)[strings::msg_params][strings::menu_id].asInt());
+ }
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+bool DeleteSubMenuRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6831a66e1e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/delete_sub_menu_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DeleteSubMenuResponse::DeleteSubMenuResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+DeleteSubMenuResponse::~DeleteSubMenuResponse() {}
+
+void DeleteSubMenuResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ee0297ded6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc
@@ -0,0 +1,156 @@
+/*
+ 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 <algorithm>
+#include <string>
+#include "sdl_rpc_plugin/commands/mobile/dial_number_request.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DialNumberRequest::DialNumberRequest(
+ 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) {}
+
+DialNumberRequest::~DialNumberRequest() {}
+
+bool DialNumberRequest::Init() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ default_timeout_ = 0;
+
+ return true;
+}
+
+void DialNumberRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ std::string number =
+ (*message_)[strings::msg_params][strings::number].asString();
+ if (!CheckSyntax(number)) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::number] =
+ (*message_)[strings::msg_params][strings::number].asString();
+ msg_params[strings::app_id] = application->hmi_app_id();
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
+ SendHMIRequest(
+ hmi_apis::FunctionID::BasicCommunication_DialNumber, &msg_params, true);
+}
+
+void DialNumberRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
+ result_code = CommandRequestImpl::GetMobileResultCode(
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt()));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+
+ const bool is_success = mobile_apis::Result::SUCCESS == result_code;
+ const bool is_info_valid =
+ message[strings::msg_params].keyExists(strings::info);
+
+ if (is_info_valid) {
+ const char* info_char_array =
+ message[strings::msg_params][strings::info].asCharArray();
+ SendResponse(is_success, result_code, info_char_array);
+ return;
+ }
+
+ SendResponse(is_success, result_code);
+}
+
+void DialNumberRequest::StripNumberParam(std::string& number) {
+ std::size_t found = 0;
+ while (std::string::npos !=
+ (found = number.find_first_not_of("0123456789*#,;+"))) {
+ number.erase(number.begin() + found);
+ }
+ (*message_)[strings::msg_params][strings::number] = number;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a264f96e0d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc
@@ -0,0 +1,63 @@
+/*
+ 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 "sdl_rpc_plugin/commands/mobile/dial_number_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DialNumberResponse::DialNumberResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+DialNumberResponse::~DialNumberResponse() {}
+
+void DialNumberResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3650a8226c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc
@@ -0,0 +1,100 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_request.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+EndAudioPassThruRequest::EndAudioPassThruRequest(
+ 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) {}
+
+EndAudioPassThruRequest::~EndAudioPassThruRequest() {}
+
+void EndAudioPassThruRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_EndAudioPassThru: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+ if (result) {
+ uint32_t app_id = connection_key();
+ bool ended_successfully = application_manager_.EndAudioPassThru(app_id);
+ if (ended_successfully) {
+ application_manager_.StopAudioPassThru(app_id);
+ }
+ }
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f9f9f89d11
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+EndAudioPassThruResponse::EndAudioPassThruResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+EndAudioPassThruResponse::~EndAudioPassThruResponse() {}
+
+void EndAudioPassThruResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc
new file mode 100644
index 0000000000..eef2750376
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc
@@ -0,0 +1,66 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/generic_response.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+void GenericResponse::Run() {
+ /*NsSmartDeviceLink::NsSmartObjects::SmartObject response;
+
+ response[strings::params][strings::correlation_id] =
+ (*message_)[strings::params][strings::correlation_id];
+ response[strings::params][strings::protocol_version] =
+ (*message_)[strings::params][strings::protocol_version];
+ response[strings::params][strings::connection_key] =
+ (*message_)[strings::params][strings::connection_key];
+
+ response[strings::msg_params][strings::success] = false;
+ */
+
+ (*message_)[strings::params][strings::message_type] = MessageType::kResponse;
+ (*message_)[strings::msg_params][strings::success] = false;
+ (*message_)[strings::msg_params][strings::result_code] =
+ mobile_apis::Result::INVALID_DATA;
+
+ SendResponse(false);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a6c627aad2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
@@ -0,0 +1,143 @@
+/*
+ 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 "sdl_rpc_plugin/commands/mobile/get_system_capability_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetSystemCapabilityRequest::GetSystemCapabilityRequest(
+ 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) {}
+
+GetSystemCapabilityRequest::~GetSystemCapabilityRequest() {}
+
+void GetSystemCapabilityRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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.");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
+ mobile_apis::SystemCapabilityType::eType response_type =
+ static_cast<mobile_apis::SystemCapabilityType::eType>(
+ (*message_)[strings::msg_params][strings::system_capability_type]
+ .asInt());
+ response_params[strings::system_capability][strings::system_capability_type] =
+ response_type;
+
+ const HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ switch (response_type) {
+ case mobile_apis::SystemCapabilityType::NAVIGATION: {
+ if (hmi_capabilities.navigation_capability()) {
+ response_params[strings::system_capability]
+ [strings::navigation_capability] =
+ *hmi_capabilities.navigation_capability();
+ } else {
+ SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+ break;
+ }
+ case mobile_apis::SystemCapabilityType::PHONE_CALL: {
+ if (hmi_capabilities.phone_capability()) {
+ response_params[strings::system_capability][strings::phone_capability] =
+ *hmi_capabilities.phone_capability();
+ } else {
+ SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+ break;
+ }
+ case mobile_apis::SystemCapabilityType::REMOTE_CONTROL: {
+ if (!app->is_remote_control_supported()) {
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ return;
+ }
+ if (!hmi_capabilities.is_rc_cooperating()) {
+ SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ return;
+ }
+ if (hmi_capabilities.rc_capability()) {
+ response_params[strings::system_capability][strings::rc_capability] =
+ *hmi_capabilities.rc_capability();
+ } else {
+ SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+ break;
+ }
+ case mobile_apis::SystemCapabilityType::VIDEO_STREAMING:
+ if (hmi_capabilities.video_streaming_capability()) {
+ response_params[strings::system_capability]
+ [strings::video_streaming_capability] =
+ *hmi_capabilities.video_streaming_capability();
+ } else {
+ SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+ break;
+ default: // Return unsupported resource
+ SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ return;
+ }
+ SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
+}
+
+void GetSystemCapabilityRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_INFO(logger_, "GetSystemCapabilityRequest on_event");
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dd5461081c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc
@@ -0,0 +1,64 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "sdl_rpc_plugin/commands/mobile/get_system_capability_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetSystemCapabilityResponse::GetSystemCapabilityResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+GetSystemCapabilityResponse::~GetSystemCapabilityResponse() {}
+
+void GetSystemCapabilityResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7dc9eb9ad9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc
@@ -0,0 +1,116 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "sdl_rpc_plugin/commands/mobile/get_way_points_request.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetWayPointsRequest::GetWayPointsRequest(
+ 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) {
+ subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
+}
+
+GetWayPointsRequest::~GetWayPointsRequest() {}
+
+void GetWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "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];
+ msg_params[strings::app_id] = app->app_id();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(hmi_apis::FunctionID::Navigation_GetWayPoints,
+ msg_params.empty() ? NULL : &msg_params,
+ true);
+}
+
+void GetWayPointsRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_OnResetTimeout: {
+ LOG4CXX_INFO(logger_, "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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ const hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7581990273
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc
@@ -0,0 +1,64 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "sdl_rpc_plugin/commands/mobile/get_way_points_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetWayPointsResponse::GetWayPointsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+GetWayPointsResponse::~GetWayPointsResponse() {}
+
+void GetWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e671dab463
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc
@@ -0,0 +1,115 @@
+/*
+
+ 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 <string>
+#include "sdl_rpc_plugin/commands/mobile/list_files_request.h"
+
+#include "application_manager/application_impl.h"
+
+#include "sdl_rpc_plugin/mobile_command_factory.h"
+#include "utils/file_system.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ListFilesRequest::ListFilesRequest(
+ 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) {}
+
+ListFilesRequest::~ListFilesRequest() {}
+
+void ListFilesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ return;
+ }
+
+ if ((mobile_api::HMILevel::HMI_NONE == application->hmi_level()) &&
+ (application_manager_.get_settings().list_files_in_none() <=
+ 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 ");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ application->increment_list_files_in_none_count();
+
+ (*message_)[strings::msg_params][strings::space_available] =
+ static_cast<int32_t>(application->GetAvailableDiskSpace());
+ // Enumarating through File system
+ uint32_t i = 0;
+ std::string directory_name =
+ application_manager_.get_settings().app_storage_folder();
+ directory_name += "/" + application->folder_name();
+ std::vector<std::string> persistent_files =
+ file_system::ListFiles(directory_name);
+ 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");
+ (*message_)[strings::msg_params][strings::filenames][i++] = *it;
+ } else {
+ LOG4CXX_DEBUG(logger_,
+ "File " + *it + " not added to ListFiles response");
+ }
+ }
+ (*message_)[strings::params][strings::message_type] =
+ application_manager::MessageType::kResponse;
+ SendResponse(true,
+ mobile_apis::Result::SUCCESS,
+ NULL,
+ &(*message_)[strings::msg_params]);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d025f05358
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/list_files_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ListFilesResponse::ListFilesResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ListFilesResponse::~ListFilesResponse() {}
+
+void ListFilesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..128ce1e3bf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc
@@ -0,0 +1,63 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h"
+#include "application_manager/message.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnAppInterfaceUnregisteredNotification::OnAppInterfaceUnregisteredNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnAppInterfaceUnregisteredNotification::
+ ~OnAppInterfaceUnregisteredNotification() {}
+
+void OnAppInterfaceUnregisteredNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ff88ae96bd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc
@@ -0,0 +1,60 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_audio_pass_thru_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnAudioPassThruNotification::OnAudioPassThruNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnAudioPassThruNotification::~OnAudioPassThruNotification() {}
+
+void OnAudioPassThruNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0dda8b3277
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
@@ -0,0 +1,183 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_button_event_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnButtonEventNotification::OnButtonEventNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnButtonEventNotification::~OnButtonEventNotification() {}
+
+void OnButtonEventNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const uint32_t btn_id = static_cast<uint32_t>(
+ (*message_)[strings::msg_params][hmi_response::button_name].asInt());
+
+ const bool is_app_id_exists =
+ (*message_)[strings::msg_params].keyExists(strings::app_id);
+ ApplicationSharedPtr app;
+
+ // 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 OnButtonEvent 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 OnButtonEvent without custom_button_id.");
+ return;
+ }
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application doesn't exist.");
+ return;
+ }
+
+ uint32_t custom_btn_id = 0;
+ custom_btn_id =
+ (*message_)[strings::msg_params][hmi_response::custom_button_id]
+ .asUInt();
+
+ if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
+ LOG4CXX_ERROR(logger_,
+ "Application doesn't subscribed to this custom_button_id.");
+ return;
+ }
+
+ if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) &&
+ (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) {
+ LOG4CXX_WARN(logger_,
+ "CUSTOM_BUTTON OnButtonEvent notification is allowed only "
+ << "in FULL or LIMITED hmi level");
+ return;
+ }
+
+ SendButtonEvent(app);
+ return;
+ }
+
+ const std::vector<ApplicationSharedPtr>& subscribed_apps =
+ application_manager_.applications_by_button(btn_id);
+
+ std::vector<ApplicationSharedPtr>::const_iterator it =
+ subscribed_apps.begin();
+ for (; subscribed_apps.end() != it; ++it) {
+ ApplicationSharedPtr subscribed_app = *it;
+ if (!subscribed_app) {
+ LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
+ continue;
+ }
+
+ // Send ButtonEvent notification only in HMI_FULL or HMI_LIMITED mode
+ if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
+ (mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
+ LOG4CXX_WARN(logger_,
+ "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()) {
+ SendButtonEvent(subscribed_app);
+ }
+ }
+}
+
+void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer");
+ return;
+ }
+
+ smart_objects::SmartObjectSPtr on_btn_event =
+ new smart_objects::SmartObject();
+
+ if (!on_btn_event) {
+ LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer");
+ return;
+ }
+
+ (*on_btn_event)[strings::params][strings::connection_key] = app->app_id();
+
+ (*on_btn_event)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnButtonEventID);
+
+ (*on_btn_event)[strings::msg_params][strings::button_name] =
+ (*message_)[strings::msg_params][hmi_response::button_name];
+ (*on_btn_event)[strings::msg_params][strings::button_event_mode] =
+ (*message_)[strings::msg_params][hmi_response::button_mode];
+
+ if ((*message_)[strings::msg_params].keyExists(
+ hmi_response::custom_button_id)) {
+ (*on_btn_event)[strings::msg_params][strings::custom_button_id] =
+ (*message_)[strings::msg_params][strings::custom_button_id];
+ }
+
+ message_ = on_btn_event;
+ SendNotification();
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..06ff29134c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
@@ -0,0 +1,190 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_button_press_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnButtonPressNotification::OnButtonPressNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnButtonPressNotification::~OnButtonPressNotification() {}
+
+void OnButtonPressNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const uint32_t btn_id = static_cast<uint32_t>(
+ (*message_)[strings::msg_params][hmi_response::button_name].asInt());
+
+ const bool is_app_id_exists =
+ (*message_)[strings::msg_params].keyExists(strings::app_id);
+ ApplicationSharedPtr app;
+
+ // 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.");
+ 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.");
+ return;
+ }
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application doesn't exist.");
+ return;
+ }
+
+ uint32_t custom_btn_id = 0;
+ custom_btn_id =
+ (*message_)[strings::msg_params][hmi_response::custom_button_id]
+ .asUInt();
+
+ if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
+ LOG4CXX_ERROR(logger_,
+ "Application doesn't subscribed to this custom_button_id.");
+ return;
+ }
+
+ // Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode
+ if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) &&
+ (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) {
+ LOG4CXX_WARN(logger_,
+ "CUSTOM_BUTTON OnButtonPress notification is allowed only "
+ << "in FULL or LIMITED hmi level");
+ return;
+ }
+
+ SendButtonPress(app);
+ return;
+ }
+
+ const std::vector<ApplicationSharedPtr>& subscribed_apps =
+ application_manager_.applications_by_button(btn_id);
+
+ std::vector<ApplicationSharedPtr>::const_iterator it =
+ subscribed_apps.begin();
+ for (; subscribed_apps.end() != it; ++it) {
+ ApplicationSharedPtr subscribed_app = *it;
+ if (!subscribed_app) {
+ LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
+ continue;
+ }
+
+ // Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode
+ if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
+ (mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
+ LOG4CXX_WARN(logger_,
+ "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
+ // LIMITED
+ if (app.valid()) {
+ if (app->app_id() == subscribed_app->app_id()) {
+ SendButtonPress(subscribed_app);
+ }
+ } else if (subscribed_app->IsFullscreen()) {
+ // if No "appID" - send it FULL apps only.
+ SendButtonPress(subscribed_app);
+ }
+ }
+}
+
+void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
+ return;
+ }
+
+ smart_objects::SmartObjectSPtr on_btn_press =
+ new smart_objects::SmartObject();
+
+ if (!on_btn_press) {
+ LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
+ return;
+ }
+
+ (*on_btn_press)[strings::params][strings::connection_key] = app->app_id();
+
+ (*on_btn_press)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnButtonPressID);
+
+ (*on_btn_press)[strings::msg_params][strings::button_name] =
+ (*message_)[strings::msg_params][hmi_response::button_name];
+ (*on_btn_press)[strings::msg_params][strings::button_press_mode] =
+ (*message_)[strings::msg_params][hmi_response::button_mode];
+
+ if ((*message_)[strings::msg_params].keyExists(
+ hmi_response::custom_button_id)) {
+ (*on_btn_press)[strings::msg_params][strings::custom_button_id] =
+ (*message_)[strings::msg_params][strings::custom_button_id];
+ }
+
+ message_ = on_btn_press;
+ SendNotification();
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dff3aa6808
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc
@@ -0,0 +1,87 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_command_notification.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnCommandNotification::OnCommandNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnCommandNotification::~OnCommandNotification() {}
+
+void OnCommandNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(
+ (*message_)[strings::msg_params][strings::app_id].asInt());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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);
+ return;
+ }
+
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ // remove app_id from notification
+ if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
+ (*message_)[strings::msg_params].erase(strings::app_id);
+ }
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ca5d4bfed4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc
@@ -0,0 +1,70 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_driver_distraction_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnDriverDistractionNotification::OnDriverDistractionNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
+
+void OnDriverDistractionNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e252b031e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc
@@ -0,0 +1,84 @@
+
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_hash_change_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include <string>
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnHashChangeNotification::OnHashChangeNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnHashChangeNotification::~OnHashChangeNotification() {}
+
+void OnHashChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+
+ int32_t app_id;
+ app_id = (*message_)[strings::params][strings::connection_key].asInt();
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+ if (app) {
+ (*message_)[strings::msg_params][strings::hash_id] = app->curHash();
+ SendNotification();
+ } else {
+ LOG4CXX_WARN(logger_,
+ "Application with app_id " << app_id << " does not exist");
+ }
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9422bec478
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc
@@ -0,0 +1,95 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_hmi_status_notification.h"
+
+#include "application_manager/message_helper.h"
+#include "application_manager/message.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnHMIStatusNotification::OnHMIStatusNotification(
+ 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) {}
+
+OnHMIStatusNotification::~OnHMIStatusNotification() {}
+
+void OnHMIStatusNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+ if (!app.valid()) {
+ LOG4CXX_ERROR(logger_, "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");
+ return;
+ }
+
+ // NOTE c++ maps default-construct on the [] operator, so if there is no
+ // hmiLevel field this will create one that is invalid
+ mobile_apis::HMILevel::eType hmi_level =
+ static_cast<mobile_apis::HMILevel::eType>(
+ (*message_)[strings::msg_params][strings::hmi_level].asInt());
+ if ((mobile_apis::HMILevel::HMI_FULL == hmi_level) ||
+ (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");
+ application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id());
+ }
+ }
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..45caedfc2e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
@@ -0,0 +1,135 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_hmi_status_notification_from_mobile.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/message.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile(
+ 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)
+ : CommandNotificationFromMobileImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnHMIStatusNotificationFromMobile::~OnHMIStatusNotificationFromMobile() {}
+
+void OnHMIStatusNotificationFromMobile::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app.valid()) {
+ LOG4CXX_ERROR(
+ logger_, "OnHMIStatusNotificationFromMobile application doesn't exist");
+ return;
+ }
+
+ mobile_apis::HMILevel::eType current_hmi_state =
+ static_cast<mobile_apis::HMILevel::eType>(
+ (*message_)[strings::msg_params][strings::hmi_level].asUInt());
+
+ bool is_current_state_foreground =
+ mobile_apis::HMILevel::HMI_FULL == current_hmi_state;
+
+ app->set_foreground(is_current_state_foreground);
+
+ connection_handler::DeviceHandle handle = app->device();
+ 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);
+
+ if (!is_apps_requested_before &&
+ Message::is_sufficient_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
+ app->protocol_version()) &&
+ app->is_foreground()) {
+ // In case this notification will be received from mobile side with
+ // foreground level for app on mobile, this should trigger remote
+ // apps list query for SDL 4.0+ app
+ MessageHelper::SendQueryApps(connection_key(), application_manager_);
+ return;
+ }
+
+ if (is_apps_requested_before) {
+ LOG4CXX_DEBUG(logger_,
+ "Remote apps list had been requested already "
+ " for handle: "
+ << handle);
+
+ if (Message::is_sufficient_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
+ app->protocol_version())) {
+ const ApplicationSet& accessor =
+ application_manager_.applications().GetData();
+
+ bool is_another_foreground_sdl4_app = false;
+ ApplicationSetConstIt it = accessor.begin();
+ for (; accessor.end() != it; ++it) {
+ if (connection_key() != (*it)->app_id() &&
+ Message::is_sufficient_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
+ (*it)->protocol_version()) &&
+ (*it)->is_foreground()) {
+ is_another_foreground_sdl4_app = true;
+ break;
+ }
+ }
+
+ if (!is_another_foreground_sdl4_app) {
+ application_manager_.MarkAppsGreyOut(handle,
+ !is_current_state_foreground);
+ application_manager_.SendUpdateAppList();
+ }
+ }
+ return;
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2065c0b52d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc
@@ -0,0 +1,96 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_keyboard_input_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnKeyBoardInputNotification::OnKeyBoardInputNotification(
+ 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) {}
+
+OnKeyBoardInputNotification::~OnKeyBoardInputNotification() {}
+
+void OnKeyBoardInputNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app_to_notify;
+
+ DataAccessor<ApplicationSet> accessor = application_manager_.applications();
+ ApplicationSetIt it = accessor.GetData().begin();
+ for (; accessor.GetData().end() != it; ++it) {
+ // if there is app with active perform interaction use it for notification
+ ApplicationSharedPtr app = *it;
+ if (app->is_perform_interaction_active() &&
+ (*it)->perform_interaction_layout() ==
+ mobile_apis::LayoutMode::KEYBOARD) {
+ LOG4CXX_INFO(logger_,
+ "There is application with active PerformInteraction");
+ app_to_notify = app;
+ break;
+ }
+
+ if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level()) {
+ LOG4CXX_INFO(logger_, "There is application in HMI_FULL level");
+ app_to_notify = app;
+ }
+ }
+
+ if (app_to_notify.valid()) {
+ (*message_)[strings::params][strings::connection_key] =
+ app_to_notify->app_id();
+ SendNotification();
+ }
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..fdbdd910a0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc
@@ -0,0 +1,63 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_language_change_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnLanguageChangeNotification::OnLanguageChangeNotification(
+ 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) {}
+
+OnLanguageChangeNotification::~OnLanguageChangeNotification() {}
+
+void OnLanguageChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..32d940aca2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h"
+#include "application_manager/message.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnPermissionsChangeNotification::OnPermissionsChangeNotification(
+ 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) {}
+
+OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {}
+
+void OnPermissionsChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendNotification();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..419024f9b0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
@@ -0,0 +1,229 @@
+/*
+ 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 <cstring>
+#include <cstdio>
+#include <string>
+#include "sdl_rpc_plugin/commands/mobile/on_system_request_notification.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/file_system.h"
+#include "policy/policy_table/enums.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/policies/policy_handler_interface.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnSystemRequestNotification::OnSystemRequestNotification(
+ 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) {}
+
+OnSystemRequestNotification::~OnSystemRequestNotification() {}
+
+void OnSystemRequestNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace application_manager;
+ using namespace mobile_apis;
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app.valid()) {
+ LOG4CXX_ERROR(logger_,
+ "Application with connection key " << connection_key()
+ << " is not registered.");
+ return;
+ }
+
+ const mobile_apis::RequestType::eType request_type =
+ static_cast<mobile_apis::RequestType::eType>(
+ (*message_)[strings::msg_params][strings::request_type].asInt());
+ const policy::PolicyHandlerInterface& policy_handler = policy_handler_;
+ const std::string stringified_request_type =
+ rpc::policy_table_interface_base::EnumToJsonString(
+ static_cast<rpc::policy_table_interface_base::RequestType>(
+ request_type));
+
+ if (!policy_handler.IsRequestTypeAllowed(app->policy_app_id(),
+ request_type)) {
+ LOG4CXX_WARN(logger_,
+ "Request type " << stringified_request_type
+ << " is not allowed by policies");
+ return;
+ }
+
+ const bool request_subtype_present =
+ (*message_)[strings::msg_params].keyExists(strings::request_subtype);
+ if (request_subtype_present) {
+ const std::string request_subtype =
+ (*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
+ << " is DISALLOWED by policies");
+ return;
+ }
+ }
+
+ if (mobile_apis::RequestType::PROPRIETARY == request_type) {
+ /* According to requirements:
+ "If the requestType = PROPRIETARY, add to mobile API fileType = JSON
+ If the requestType = HTTP, add to mobile API fileType = BINARY"
+ Also in Genivi SDL we don't save the PT to file - we put it directly in
+ binary_data */
+
+ const std::string filename =
+ (*message_)[strings::msg_params][strings::file_name].asString();
+ BinaryMessage binary_data;
+ file_system::ReadBinaryFile(filename, binary_data);
+#if defined(PROPRIETARY_MODE)
+ AddHeader(binary_data);
+#endif // PROPRIETARY_MODE
+
+#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
+ (*message_)[strings::params][strings::binary_data] = binary_data;
+#endif // PROPRIETARY_MODE
+
+ (*message_)[strings::msg_params][strings::file_type] = FileType::JSON;
+ } else if (mobile_apis::RequestType::HTTP == request_type) {
+ (*message_)[strings::msg_params][strings::file_type] = FileType::BINARY;
+ if ((*message_)[strings::msg_params].keyExists(strings::url)) {
+ (*message_)[strings::msg_params][strings::timeout] =
+ policy_handler.TimeoutExchangeSec();
+ }
+ }
+
+ SendNotification();
+}
+
+#ifdef PROPRIETARY_MODE
+void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const uint32_t timeout = policy_handler_.TimeoutExchangeSec();
+
+ size_t content_length;
+ char size_str[24];
+
+ if (0 > sprintf(size_str, "%zu", static_cast<size_t>(message.size()))) {
+ memset(size_str, 0, sizeof(size_str));
+ }
+
+ char timeout_str[24];
+ if (0 > sprintf(timeout_str, "%d", timeout)) {
+ memset(timeout_str, 0, sizeof(timeout_str));
+ }
+
+ std::string policy_table_string = std::string(message.begin(), message.end());
+
+ /* The Content-Length to be sent in the HTTP Request header should be
+ calculated before additional escape characters are added to the
+ policy table string. The mobile proxy will remove the escape
+ characters after receiving this request. */
+
+ content_length = ParsePTString(policy_table_string);
+
+ if (0 > sprintf(size_str, "%zu", content_length)) {
+ memset(size_str, 0, sizeof(size_str));
+ }
+
+ const std::string header =
+
+ "{"
+ " \"HTTPRequest\": {"
+ "\"headers\": {"
+ "\"ContentType\": \"application/json\","
+ "\"ConnectTimeout\": " +
+ std::string(timeout_str) +
+ ","
+ "\"DoOutput\": true,"
+ "\"DoInput\": true,"
+ "\"UseCaches\": false,"
+ "\"RequestMethod\": \"POST\","
+ "\"ReadTimeout\":" +
+ std::string(timeout_str) +
+ ","
+ "\"InstanceFollowRedirects\": false,"
+ "\"charset\": \"utf-8\","
+ "\"Content-Length\": " +
+ std::string(size_str) +
+ "},"
+ "\"body\": \"" +
+ policy_table_string +
+ "\""
+ "}"
+ "}";
+
+ message.clear();
+ message.assign(header.begin(), header.end());
+
+ LOG4CXX_DEBUG(
+ logger_, "Header added: " << std::string(message.begin(), message.end()));
+}
+
+size_t OnSystemRequestNotification::ParsePTString(
+ std::string& pt_string) const {
+ std::string result;
+ size_t length = pt_string.length();
+ size_t result_length = length;
+ result.reserve(length * 2);
+ for (size_t i = 0; i < length; ++i) {
+ if (pt_string[i] == '\"' || pt_string[i] == '\\') {
+ result += '\\';
+ } else if (pt_string[i] == '\n') {
+ result_length--; // contentLength is adjusted when this character is
+ // not copied to result.
+ continue;
+ }
+ result += pt_string[i];
+ }
+ pt_string = result;
+ return result_length;
+}
+#endif // PROPRIETARY_MODE
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..503f1b04d5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc
@@ -0,0 +1,79 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnTBTClientStateNotification::OnTBTClientStateNotification(
+ 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) {}
+
+OnTBTClientStateNotification::~OnTBTClientStateNotification() {}
+
+void OnTBTClientStateNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+
+ const std::vector<ApplicationSharedPtr>& applications =
+ application_manager_.applications_with_navi();
+
+ std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin();
+ for (; applications.end() != it; ++it) {
+ ApplicationSharedPtr app = *it;
+ if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ SendNotification();
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..502f0ae57d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc
@@ -0,0 +1,96 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace mobile {
+
+OnTouchEventNotification::OnTouchEventNotification(
+ 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) {}
+
+OnTouchEventNotification::~OnTouchEventNotification() {}
+
+void OnTouchEventNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const std::vector<ApplicationSharedPtr>& applications_with_navi =
+ application_manager_.applications_with_navi();
+
+ const std::vector<ApplicationSharedPtr>& projection_applications =
+ application_manager_.applications_with_mobile_projection();
+
+ std::vector<ApplicationSharedPtr>::const_iterator nav_it =
+ applications_with_navi.begin();
+
+ for (; applications_with_navi.end() != nav_it; ++nav_it) {
+ ApplicationSharedPtr app = *nav_it;
+ if (app->IsFullscreen()) {
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ SendNotification();
+ }
+ }
+
+ std::vector<ApplicationSharedPtr>::const_iterator projection_it =
+ projection_applications.begin();
+
+ for (; projection_applications.end() != projection_it; ++projection_it) {
+ ApplicationSharedPtr projection_app = *projection_it;
+ if (projection_app->IsFullscreen()) {
+ (*message_)[strings::params][strings::connection_key] =
+ projection_app->app_id();
+ SendNotification();
+ }
+ }
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e25e4c622b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc
@@ -0,0 +1,70 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/on_way_point_change_notification.h"
+#include "application_manager/application_manager.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+OnWayPointChangeNotification::OnWayPointChangeNotification(
+ 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) {}
+
+OnWayPointChangeNotification::~OnWayPointChangeNotification() {}
+
+void OnWayPointChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::set<int32_t> subscribed_for_way_points =
+ application_manager_.GetAppsSubscribedForWayPoints();
+
+ for (std::set<int32_t>::const_iterator app_id =
+ subscribed_for_way_points.begin();
+ app_id != subscribed_for_way_points.end();
+ ++app_id) {
+ (*message_)[strings::params][strings::connection_key] = *app_id;
+ SendNotification();
+ }
+}
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..86a644a778
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -0,0 +1,460 @@
+/*
+
+ 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 <cstring>
+#include "sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace str = strings;
+
+PerformAudioPassThruRequest::PerformAudioPassThruRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , result_tts_speak_(hmi_apis::Common_Result::INVALID_ENUM)
+ , result_ui_(hmi_apis::Common_Result::INVALID_ENUM) {
+ subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+}
+
+PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {}
+
+void PerformAudioPassThruRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ FinishTTSSpeak();
+ CommandRequestImpl::onTimeOut();
+}
+
+bool PerformAudioPassThruRequest::Init() {
+ default_timeout_ +=
+ (((*message_)[str::msg_params][str::max_duration].asUInt()));
+ return true;
+}
+
+void PerformAudioPassThruRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ // According with new implementation processing of UNSUPPORTE_RESOURCE
+ // need set flag before sending to hmi
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ if ((*message_)[str::msg_params].keyExists(str::initial_prompt)) {
+ smart_objects::SmartObject& initial_prompt =
+ (*message_)[strings::msg_params][strings::initial_prompt];
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(
+ initial_prompt, app, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ LOG4CXX_ERROR(logger_,
+ "MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ SendResponse(
+ false,
+ mobile_apis::Result::FILE_NOT_FOUND,
+ "One or more files needed for initial_prompt are not present");
+ return;
+ }
+
+ // In case TTS Speak, subscribe on notification
+ SendSpeakRequest();
+ SendPerformAudioPassThruRequest();
+ } else {
+ SendPerformAudioPassThruRequest();
+ SendRecordStartNotification();
+ StartMicrophoneRecording();
+ }
+}
+
+void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+
+ result_ui_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt());
+ GetInfo(message, ui_info_);
+
+ // 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");
+ SendResponse(false,
+ MessageHelper::HMIToMobileResult(result_ui_),
+ NULL,
+ &(message[strings::msg_params]));
+ return;
+ }
+ FinishTTSSpeak();
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_Speak: {
+ LOG4CXX_INFO(logger_, "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_);
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ const bool is_tts_speak_success_unsuported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ result_tts_speak_,
+ 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,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ if (is_tts_speak_success_unsuported) {
+ SendRecordStartNotification();
+ StartMicrophoneRecording();
+
+ // update request timeout to get time for perform audio recording
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ }
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_OnResetTimeout: {
+ LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
+
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+ if (IsWaitingHMIResponse()) {
+ return;
+ }
+
+ const ResponseParams response_params = PrepareResponseParameters();
+
+ SendResponse(
+ response_params.success,
+ response_params.result_code,
+ response_params.info.empty() ? NULL : response_params.info.c_str(),
+ &(message[strings::msg_params]));
+}
+
+const PerformAudioPassThruRequest::ResponseParams&
+PerformAudioPassThruRequest::PrepareResponseParameters() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ app_mngr::commands::ResponseInfo ui_perform_info(
+ result_ui_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
+ app_mngr::commands::ResponseInfo tts_perform_info(
+ result_tts_speak_,
+ HmiInterfaces::HMI_INTERFACE_TTS,
+ application_manager_);
+
+ // Note(dtrunov): According to requirment "WARNINGS, success:true on getting
+ // UNSUPPORTED_RESOURCE for "ttsChunks"
+ if (ui_perform_info.is_ok && tts_perform_info.is_unsupported_resource &&
+ HmiInterfaces::STATE_AVAILABLE == tts_perform_info.interface_state) {
+ response_params_.result_code = mobile_apis::Result::WARNINGS;
+ tts_info_ = "Unsupported phoneme type sent in a prompt";
+ response_params_.info = app_mngr::commands::MergeInfos(
+ ui_perform_info, ui_info_, tts_perform_info, tts_info_);
+ response_params_.success = true;
+ return response_params_;
+ }
+
+ response_params_.success =
+ PrepareResultForMobileResponse(ui_perform_info, tts_perform_info);
+ if (IsResultCodeUnsupported(ui_perform_info, tts_perform_info)) {
+ response_params_.result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
+ } else {
+ AudioPassThruResults results = PrepareAudioPassThruResultCodeForResponse(
+ ui_perform_info, tts_perform_info);
+ response_params_.success = results.second;
+ response_params_.result_code = results.first;
+ }
+ response_params_.info = app_mngr::commands::MergeInfos(
+ ui_perform_info, ui_info_, tts_perform_info, tts_info_);
+
+ return response_params_;
+}
+
+bool PerformAudioPassThruRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ NOTREACHED();
+ return false;
+}
+
+void PerformAudioPassThruRequest::SendSpeakRequest() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ using namespace hmi_apis;
+ using namespace smart_objects;
+
+ SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
+ for (uint32_t i = 0;
+ i < (*message_)[str::msg_params][str::initial_prompt].length();
+ ++i) {
+ msg_params[hmi_request::tts_chunks][i][str::text] =
+ (*message_)[str::msg_params][str::initial_prompt][i][str::text];
+ msg_params[hmi_request::tts_chunks][i][str::type] =
+ (*message_)[str::msg_params][str::initial_prompt][i][str::type];
+ }
+ // app_id
+ msg_params[strings::app_id] = connection_key();
+ msg_params[hmi_request::speak_type] = Common_MethodName::AUDIO_PASS_THRU;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
+}
+
+void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[str::app_id] = connection_key();
+
+ msg_params[hmi_request::max_duration] =
+ (*message_)[str::msg_params][str::max_duration];
+
+ msg_params[hmi_request::audio_pass_display_texts] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text1)) {
+ msg_params[hmi_request::audio_pass_display_texts][0]
+ [hmi_request::field_name] = static_cast<int32_t>(
+ hmi_apis::Common_TextFieldName::audioPassThruDisplayText1);
+ msg_params[hmi_request::audio_pass_display_texts][0]
+ [hmi_request::field_text] =
+ (*message_)[str::msg_params][str::audio_pass_display_text1];
+ }
+
+ if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text2)) {
+ msg_params[hmi_request::audio_pass_display_texts][1]
+ [hmi_request::field_name] = static_cast<int32_t>(
+ hmi_apis::Common_TextFieldName::audioPassThruDisplayText2);
+ msg_params[hmi_request::audio_pass_display_texts][1]
+ [hmi_request::field_text] =
+ (*message_)[str::msg_params][str::audio_pass_display_text2];
+ }
+
+ if ((*message_)[str::msg_params].keyExists(str::mute_audio)) {
+ msg_params[str::mute_audio] =
+ (*message_)[str::msg_params][str::mute_audio].asBool();
+ } else {
+ // If omitted, the value is set to true
+ msg_params[str::mute_audio] = true;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_PerformAudioPassThru, &msg_params, true);
+}
+
+void PerformAudioPassThruRequest::SendRecordStartNotification() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = connection_key();
+
+ CreateHMINotification(hmi_apis::FunctionID::UI_OnRecordStart, msg_params);
+}
+
+void PerformAudioPassThruRequest::StartMicrophoneRecording() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ uint32_t app_id = connection_key();
+ application_manager_.BeginAudioPassThru(app_id);
+
+ application_manager_.StartAudioPassThruThread(
+ connection_key(),
+ correlation_id(),
+ (*message_)[str::msg_params][str::max_duration].asInt(),
+ (*message_)[str::msg_params][str::sampling_rate].asInt(),
+ (*message_)[str::msg_params][str::bits_per_sample].asInt(),
+ (*message_)[str::msg_params][str::audio_type].asInt());
+}
+
+bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
+ const smart_objects::SmartArray* ip_array =
+ (*message_)[strings::msg_params][strings::initial_prompt].asArray();
+
+ smart_objects::SmartArray::const_iterator it_ip = ip_array->begin();
+ smart_objects::SmartArray::const_iterator it_ip_end = ip_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::audio_pass_display_text1)) {
+ str = (*message_)[strings::msg_params][strings::audio_pass_display_text1]
+ .asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Invalid audio_pass_display_text1 value syntax check failed");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::audio_pass_display_text2)) {
+ str = (*message_)[strings::msg_params][strings::audio_pass_display_text2]
+ .asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Invalid audio_pass_display_text2 value syntax check failed");
+ return true;
+ }
+ }
+ return false;
+}
+
+void PerformAudioPassThruRequest::FinishTTSSpeak() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ uint32_t app_id = connection_key();
+ if (application_manager_.EndAudioPassThru(app_id)) {
+ LOG4CXX_DEBUG(logger_, "Stop AudioPassThru.");
+ application_manager_.StopAudioPassThru(app_id);
+ }
+ if (!IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS)) {
+ LOG4CXX_WARN(logger_, "TTS Speak is inactive.");
+ return;
+ }
+ SendHMIRequest(hmi_apis::FunctionID::TTS_StopSpeaking, NULL);
+}
+
+PerformAudioPassThruRequest::AudioPassThruResults
+PerformAudioPassThruRequest::PrepareAudioPassThruResultCodeForResponse(
+ const app_mngr::commands::ResponseInfo& ui_response,
+ const app_mngr::commands::ResponseInfo& tts_response) {
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+
+ hmi_apis::Common_Result::eType common_result =
+ hmi_apis::Common_Result::INVALID_ENUM;
+ const hmi_apis::Common_Result::eType ui_result = ui_response.result_code;
+ const hmi_apis::Common_Result::eType tts_result = tts_response.result_code;
+ bool result = false;
+
+ if ((ui_result == hmi_apis::Common_Result::SUCCESS) &&
+ (tts_result == hmi_apis::Common_Result::SUCCESS)) {
+ result = true;
+ }
+
+ if ((ui_result == hmi_apis::Common_Result::SUCCESS) &&
+ (tts_result == hmi_apis::Common_Result::INVALID_ENUM)) {
+ result = true;
+ }
+
+ if ((ui_result == hmi_apis::Common_Result::SUCCESS) &&
+ (tts_result != hmi_apis::Common_Result::SUCCESS) &&
+ (tts_result != hmi_apis::Common_Result::INVALID_ENUM)) {
+ common_result = hmi_apis::Common_Result::WARNINGS;
+ result = true;
+ } else if (ui_response.is_ok &&
+ tts_result == hmi_apis::Common_Result::WARNINGS) {
+ common_result = hmi_apis::Common_Result::WARNINGS;
+ result = true;
+ } else if (ui_result == hmi_apis::Common_Result::INVALID_ENUM) {
+ common_result = tts_result;
+ } else {
+ common_result = ui_result;
+ }
+ result_code = MessageHelper::HMIToMobileResult(common_result);
+ return std::make_pair(result_code, result);
+}
+
+bool PerformAudioPassThruRequest::IsWaitingHMIResponse() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS) ||
+ IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_UI);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a5eb98f2ba
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+PerformAudioPassThruResponse::PerformAudioPassThruResponse(
+ 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) {}
+
+PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {}
+
+void PerformAudioPassThruResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8710f3c3d6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
@@ -0,0 +1,1013 @@
+/*
+
+ 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 <numeric>
+#include <string.h>
+#include <string>
+#include "sdl_rpc_plugin/commands/mobile/perform_interaction_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/file_system.h"
+#include "utils/helpers.h"
+#include "utils/custom_string.h"
+#include "utils/gen_hash.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+uint32_t PerformInteractionRequest::pi_requests_count_ = 0;
+
+PerformInteractionRequest::PerformInteractionRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , interaction_mode_(mobile_apis::InteractionMode::INVALID_ENUM)
+ , ui_response_received_(false)
+ , vr_response_received_(false)
+ , app_pi_was_active_before_(false)
+ , vr_result_code_(hmi_apis::Common_Result::INVALID_ENUM)
+ , ui_result_code_(hmi_apis::Common_Result::INVALID_ENUM) {
+ subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ subscribe_on_event(hmi_apis::FunctionID::VR_OnCommand);
+ subscribe_on_event(hmi_apis::FunctionID::Buttons_OnButtonPress);
+}
+
+PerformInteractionRequest::~PerformInteractionRequest() {}
+
+bool PerformInteractionRequest::Init() {
+ /* Timeout in milliseconds.
+ If omitted a standard value of 10000 milliseconds is used.*/
+ if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
+ default_timeout_ =
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
+ }
+
+ interaction_mode_ = static_cast<mobile_apis::InteractionMode::eType>(
+ (*message_)[strings::msg_params][strings::interaction_mode].asInt());
+
+ if (mobile_apis::InteractionMode::BOTH == interaction_mode_ ||
+ mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) {
+ default_timeout_ *= 2;
+ }
+ return true;
+}
+
+void PerformInteractionRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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");
+ app_pi_was_active_before_ = true;
+ }
+
+ smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+ mobile_apis::LayoutMode::eType interaction_layout =
+ mobile_apis::LayoutMode::INVALID_ENUM;
+
+ if (msg_params.keyExists(hmi_request::interaction_layout)) {
+ interaction_layout = static_cast<mobile_apis::LayoutMode::eType>(
+ msg_params[hmi_request::interaction_layout].asInt());
+ }
+
+ 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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ const size_t choice_set_id_list_length =
+ msg_params[strings::interaction_choice_set_id_list].length();
+
+ 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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ } else {
+ LOG4CXX_ERROR(logger_,
+ "interactionChoiceSetIDList is empty"
+ " and interactionLayout!=KEYBOARD");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ }
+
+ if (!CheckChoiceIDFromRequest(
+ 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");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ return;
+ }
+
+ if (msg_params.keyExists(strings::vr_help)) {
+ if (mobile_apis::Result::SUCCESS !=
+ MessageHelper::VerifyImageVrHelpItems(
+ msg_params[strings::vr_help], app, application_manager_)) {
+ LOG4CXX_ERROR(logger_,
+ "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ switch (interaction_mode_) {
+ case mobile_apis::InteractionMode::BOTH: {
+ LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
+ !CheckVrHelpItemPositions(app)) {
+ return;
+ }
+ break;
+ }
+ case mobile_apis::InteractionMode::MANUAL_ONLY: {
+ LOG4CXX_DEBUG(logger_, "Interaction Mode: MANUAL_ONLY");
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
+ !CheckVrHelpItemPositions(app)) {
+ return;
+ }
+ break;
+ }
+ case mobile_apis::InteractionMode::VR_ONLY: {
+ LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY");
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app)) {
+ return;
+ }
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Unknown interaction mode");
+ return;
+ }
+ }
+
+ app->set_perform_interaction_mode(static_cast<int32_t>(interaction_mode_));
+ app->set_perform_interaction_active(true);
+ app->set_perform_interaction_layout(interaction_layout);
+ // increment amount of active requests
+ ++pi_requests_count_;
+ SendVRPerformInteractionRequest(app);
+ SendUIPerformInteractionRequest(app);
+}
+
+void PerformInteractionRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ smart_objects::SmartObject msg_param =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_OnResetTimeout: {
+ LOG4CXX_DEBUG(logger_, "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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ ui_response_received_ = true;
+ unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
+ ui_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt());
+ GetInfo(message, ui_info_);
+ ProcessUIResponse(event.smart_object(), msg_param);
+ break;
+ }
+ case hmi_apis::FunctionID::VR_PerformInteraction: {
+ LOG4CXX_DEBUG(logger_, "Received VR_PerformInteraction");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ vr_response_received_ = true;
+ unsubscribe_from_event(hmi_apis::FunctionID::VR_PerformInteraction);
+ vr_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt());
+ GetInfo(message, vr_info_);
+ if (ProcessVRResponse(event.smart_object(), msg_param)) {
+ return;
+ }
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+
+ if (!HasHMIResponsesToWait()) {
+ LOG4CXX_DEBUG(logger_, "Send response in BOTH iteraction mode");
+ SendBothModeResponse(msg_param);
+ }
+}
+
+void PerformInteractionRequest::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ switch (interaction_mode_) {
+ case mobile_apis::InteractionMode::BOTH: {
+ LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
+ if (true == vr_response_received_) {
+ unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
+ DisablePerformInteraction();
+ CommandRequestImpl::onTimeOut();
+ } else {
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ }
+ break;
+ }
+ case mobile_apis::InteractionMode::VR_ONLY: {
+ LOG4CXX_DEBUG(logger_, "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");
+ unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
+ DisablePerformInteraction();
+ CommandRequestImpl::onTimeOut();
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "INVALID ENUM");
+ return;
+ }
+ };
+}
+
+bool PerformInteractionRequest::ProcessVRResponse(
+ const smart_objects::SmartObject& message,
+ smart_objects::SmartObject& msg_params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis;
+ using namespace mobile_apis;
+ using namespace smart_objects;
+ using namespace helpers;
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return false;
+ }
+
+ msg_params[strings::trigger_source] =
+ static_cast<int32_t>(TriggerSource::TS_VR);
+
+ const bool is_vr_aborted_timeout = Compare<Common_Result::eType, EQ, ONE>(
+ vr_result_code_, Common_Result::ABORTED, Common_Result::TIMED_OUT);
+
+ if (is_vr_aborted_timeout) {
+ LOG4CXX_DEBUG(logger_, "VR response aborted");
+ if (InteractionMode::VR_ONLY == interaction_mode_) {
+ LOG4CXX_DEBUG(logger_, "Aborted or Timeout Send Close Popup");
+ TerminatePerformInteraction();
+ SendResponse(false, MessageHelper::HMIToMobileResult(vr_result_code_));
+ return true;
+ }
+ LOG4CXX_DEBUG(logger_, "Update timeout for UI");
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ return false;
+ }
+
+ if (Common_Result::SUCCESS == vr_result_code_ &&
+ InteractionMode::MANUAL_ONLY == interaction_mode_) {
+ LOG4CXX_DEBUG(logger_,
+ "VR response SUCCESS in MANUAL_ONLY mode "
+ << "Wait for UI response");
+ // in case MANUAL_ONLY mode VR.PI SUCCESS just return
+ return false;
+ }
+
+ const SmartObject& hmi_msg_params = message[strings::msg_params];
+ if (hmi_msg_params.keyExists(strings::choice_id)) {
+ const int choise_id = hmi_msg_params[strings::choice_id].asInt();
+ if (!CheckChoiceIDFromResponse(app, choise_id)) {
+ LOG4CXX_ERROR(logger_, "Wrong choiceID was received from HMI");
+ TerminatePerformInteraction();
+ SendResponse(
+ false, Result::GENERIC_ERROR, "Wrong choiceID was received from HMI");
+ return true;
+ }
+ msg_params[strings::choice_id] = choise_id;
+ }
+ return false;
+}
+
+void PerformInteractionRequest::ProcessUIResponse(
+ const smart_objects::SmartObject& message,
+ smart_objects::SmartObject& msg_params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+ using namespace smart_objects;
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ HmiInterfaces::InterfaceState ui_interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_UI);
+ bool result = false;
+ result = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_code_,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS);
+
+ result = result ||
+ (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_code_ &&
+ HmiInterfaces::STATE_NOT_AVAILABLE != ui_interface_state);
+
+ const bool is_pi_warning = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_code_, hmi_apis::Common_Result::WARNINGS);
+
+ const bool is_pi_unsupported =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_code_, hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+
+ if (result) {
+ if (is_pi_warning) {
+ ui_result_code_ = hmi_apis::Common_Result::WARNINGS;
+ ui_info_ = message[strings::msg_params][strings::info].asString();
+ if (message.keyExists(strings::params) &&
+ message[strings::params].keyExists(strings::data)) {
+ msg_params = message[strings::params][strings::data];
+ }
+ } else if (is_pi_unsupported) {
+ ui_result_code_ = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ ui_info_ = message[strings::msg_params][strings::info].asString();
+ } else if (message.keyExists(strings::msg_params)) {
+ msg_params = message[strings::msg_params];
+ }
+ // result code must be GENERIC_ERROR in case wrong choice_id
+ if (msg_params.keyExists(strings::choice_id)) {
+ if (!CheckChoiceIDFromResponse(app,
+ msg_params[strings::choice_id].asInt())) {
+ ui_result_code_ = hmi_apis::Common_Result::GENERIC_ERROR;
+ ui_info_ = "Wrong choiceID was received from HMI";
+ } else {
+ msg_params[strings::trigger_source] =
+ mobile_apis::TriggerSource::TS_MENU;
+ }
+ } else if (msg_params.keyExists(strings::manual_text_entry)) {
+ msg_params[strings::trigger_source] =
+ mobile_apis::TriggerSource::TS_KEYBOARD;
+ if (msg_params[strings::manual_text_entry].empty()) {
+ msg_params.erase(strings::manual_text_entry);
+ }
+ }
+ }
+}
+
+void PerformInteractionRequest::SendUIPerformInteractionRequest(
+ application_manager::ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObject& choice_set_id_list =
+ (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ mobile_apis::InteractionMode::eType mode =
+ static_cast<mobile_apis::InteractionMode::eType>(
+ (*message_)[strings::msg_params][strings::interaction_mode].asInt());
+
+ if (mobile_apis::InteractionMode::VR_ONLY != mode) {
+ msg_params[hmi_request::initial_text][hmi_request::field_name] =
+ static_cast<int32_t>(
+ hmi_apis::Common_TextFieldName::initialInteractionText);
+ msg_params[hmi_request::initial_text][hmi_request::field_text] =
+ (*message_)[strings::msg_params][hmi_request::initial_text];
+ }
+ bool is_vr_help_item = false;
+ if (mobile_apis::InteractionMode::MANUAL_ONLY != mode) {
+ msg_params[strings::vr_help_title] =
+ (*message_)[strings::msg_params][strings::initial_text].asString();
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
+ is_vr_help_item = true;
+ msg_params[strings::vr_help] =
+ (*message_)[strings::msg_params][strings::vr_help];
+ }
+ }
+
+ if (mobile_apis::InteractionMode::BOTH == mode ||
+ mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
+ msg_params[strings::timeout] = default_timeout_ / 2;
+ } else {
+ msg_params[strings::timeout] = default_timeout_;
+ }
+ msg_params[strings::app_id] = app->app_id();
+ if (mobile_apis::InteractionMode::VR_ONLY != mode) {
+ msg_params[strings::choice_set] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ }
+ 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 =
+ app->FindChoiceSet(choice_set_id_list[i].asInt());
+ if (choice_set) {
+ // 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) {
+ 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];
+ // 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];
+ if (0 < vr_commands.length()) {
+ // copy only first synonym
+ smart_objects::SmartObject item(smart_objects::SmartType_Map);
+ item[strings::text] = vr_commands[0].asString();
+ item[strings::position] = index_array_of_vr_help + 1;
+ msg_params[strings::vr_help][index_array_of_vr_help++] = item;
+ }
+ }
+ }
+ }
+ }
+ if ((*message_)[strings::msg_params].keyExists(
+ hmi_request::interaction_layout) &&
+ mobile_apis::InteractionMode::VR_ONLY != mode) {
+ msg_params[hmi_request::interaction_layout] =
+ (*message_)[strings::msg_params][hmi_request::interaction_layout]
+ .asInt();
+ }
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_PerformInteraction, &msg_params, true);
+}
+
+void PerformInteractionRequest::SendVRPerformInteractionRequest(
+ application_manager::ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& choice_list =
+ (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
+
+ if (mobile_apis::InteractionMode::MANUAL_ONLY != interaction_mode_) {
+ msg_params[strings::grammar_id] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ 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 choiset");
+ continue;
+ }
+ msg_params[strings::grammar_id][grammar_id_index++] =
+ (*choice_set)[strings::grammar_id].asUInt();
+ }
+ }
+
+ std::vector<std::string> invalid_params;
+ if ((*message_)[strings::msg_params].keyExists(strings::help_prompt)) {
+ smart_objects::SmartObject& help_prompt =
+ (*message_)[strings::msg_params][strings::help_prompt];
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(help_prompt, app, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ LOG4CXX_WARN(logger_,
+ "MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ invalid_params.push_back("help_prompt");
+ } else {
+ msg_params[strings::help_prompt] = help_prompt;
+ }
+ } else {
+ if (choice_list.length() != 0) {
+ msg_params[strings::help_prompt] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ }
+ int32_t 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) {
+ 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];
+ if (0 < vr_commands.length()) {
+ // copy only first synonym
+ smart_objects::SmartObject item(smart_objects::SmartType_Map);
+ // Since there is no custom data from application side, SDL should
+ // construct prompt and append delimiter to each item
+ item[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
+ item[strings::text] =
+ vr_commands[0].asString() +
+ application_manager_.get_settings().tts_delimiter();
+ msg_params[strings::help_prompt][index++] = item;
+ }
+ }
+ } else {
+ LOG4CXX_ERROR(logger_, "Can't found choiceSet!");
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::timeout_prompt)) {
+ smart_objects::SmartObject& timeout_prompt =
+ (*message_)[strings::msg_params][strings::timeout_prompt];
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(
+ timeout_prompt, app, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ LOG4CXX_WARN(logger_,
+ "MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ invalid_params.push_back("timeout_prompt");
+ } else {
+ msg_params[strings::timeout_prompt] = timeout_prompt;
+ }
+ } else {
+ if (msg_params.keyExists(strings::help_prompt)) {
+ msg_params[strings::timeout_prompt] = msg_params[strings::help_prompt];
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
+ smart_objects::SmartObject& initial_prompt =
+ (*message_)[strings::msg_params][strings::initial_prompt];
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(
+ initial_prompt, app, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ LOG4CXX_WARN(logger_,
+ "MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ invalid_params.push_back("initial_prompt");
+ } else {
+ msg_params[strings::initial_prompt] = initial_prompt;
+ }
+ }
+
+ if (!invalid_params.empty()) {
+ const std::string params_list =
+ std::accumulate(std::begin(invalid_params),
+ std::end(invalid_params),
+ std::string(""),
+ [](std::string& first, std::string& second) {
+ return first.empty() ? second : first + ", " + second;
+ });
+ const std::string info =
+ "One or more files needed for " + params_list + " are not present";
+ SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, info.c_str());
+ return;
+ }
+
+ mobile_apis::InteractionMode::eType mode =
+ static_cast<mobile_apis::InteractionMode::eType>(
+ (*message_)[strings::msg_params][strings::interaction_mode].asInt());
+
+ if (mobile_apis::InteractionMode::BOTH == mode ||
+ mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
+ msg_params[strings::timeout] = default_timeout_ / 2;
+ } else {
+ msg_params[strings::timeout] = default_timeout_;
+ }
+ msg_params[strings::app_id] = app->app_id();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
+ SendHMIRequest(
+ hmi_apis::FunctionID::VR_PerformInteraction, &msg_params, true);
+}
+
+bool PerformInteractionRequest::CheckChoiceSetMenuNames(
+ application_manager::ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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 =
+ app->FindChoiceSet(choice_list[i].asInt());
+
+ for (size_t j = 0; j < choice_list.length(); ++j) {
+ smart_objects::SmartObject* j_choice_set =
+ app->FindChoiceSet(choice_list[j].asInt());
+
+ if (i == j) {
+ // skip check the same element
+ continue;
+ }
+
+ if (!i_choice_set || !j_choice_set) {
+ LOG4CXX_ERROR(logger_, "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) {
+ const std::string& ii_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]
+ .asString();
+
+ if (ii_menu_name == jj_menu_name) {
+ LOG4CXX_ERROR(logger_, "Choice set has duplicated menu name");
+ SendResponse(false,
+ mobile_apis::Result::DUPLICATE_NAME,
+ "Choice set has duplicated menu name");
+ return false;
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
+ application_manager::ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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 =
+ app->FindChoiceSet(choice_list[i].asInt());
+
+ for (size_t j = 0; j < choice_list.length(); ++j) {
+ smart_objects::SmartObject* j_choice_set =
+ app->FindChoiceSet(choice_list[j].asInt());
+
+ if (i == j) {
+ // skip check the same element
+ continue;
+ }
+
+ if ((!i_choice_set) || (!j_choice_set)) {
+ LOG4CXX_ERROR(logger_, "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) {
+ // choice_set pointer contains SmartObject msg_params
+ smart_objects::SmartObject& ii_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];
+
+ for (size_t iii = 0; iii < ii_vr_commands.length(); ++iii) {
+ for (size_t jjj = 0; jjj < jj_vr_commands.length(); ++jjj) {
+ const custom_str::CustomString& vr_cmd_i =
+ ii_vr_commands[iii].asCustomString();
+ 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");
+ SendResponse(false,
+ mobile_apis::Result::DUPLICATE_NAME,
+ "Choice set has duplicated VR synonym");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return true;
+}
+
+bool PerformInteractionRequest::CheckVrHelpItemPositions(
+ application_manager::ApplicationSharedPtr const app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!(*message_)[strings::msg_params].keyExists(strings::vr_help)) {
+ LOG4CXX_DEBUG(logger_, strings::vr_help << " is omitted.");
+ return true;
+ }
+
+ smart_objects::SmartObject& vr_help =
+ (*message_)[strings::msg_params][strings::vr_help];
+
+ 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");
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
+ "Non-sequential vrHelp item position");
+ return false;
+ }
+ ++position;
+ }
+ return true;
+}
+
+void PerformInteractionRequest::DisablePerformInteraction() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ if (app->is_perform_interaction_active()) {
+ // decrease amount of active requests
+ --pi_requests_count_;
+ if (!pi_requests_count_) {
+ app->set_perform_interaction_active(false);
+ app->set_perform_interaction_mode(-1);
+ }
+ }
+ app->DeletePerformInteractionChoiceSet(correlation_id());
+}
+
+bool PerformInteractionRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ str = (*message_)[strings::msg_params][strings::initial_text].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid initial_text syntax check failed");
+ return true;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
+ const smart_objects::SmartArray* ip_array =
+ (*message_)[strings::msg_params][strings::initial_prompt].asArray();
+
+ smart_objects::SmartArray::const_iterator it_ip = ip_array->begin();
+ smart_objects::SmartArray::const_iterator it_ip_end = ip_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::help_prompt)) {
+ const smart_objects::SmartArray* hp_array =
+ (*message_)[strings::msg_params][strings::help_prompt].asArray();
+
+ smart_objects::SmartArray::const_iterator it_hp = hp_array->begin();
+ smart_objects::SmartArray::const_iterator it_hp_end = hp_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::timeout_prompt)) {
+ const smart_objects::SmartArray* tp_array =
+ (*message_)[strings::msg_params][strings::timeout_prompt].asArray();
+
+ smart_objects::SmartArray::const_iterator it_tp = tp_array->begin();
+ smart_objects::SmartArray::const_iterator it_tp_end = tp_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
+ const smart_objects::SmartArray* vh_array =
+ (*message_)[strings::msg_params][strings::vr_help].asArray();
+
+ smart_objects::SmartArray::const_iterator it_vh = vh_array->begin();
+ smart_objects::SmartArray::const_iterator it_vh_end = vh_array->end();
+
+ 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");
+ 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");
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+void PerformInteractionRequest::TerminatePerformInteraction() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[hmi_request::method_name] = "UI.PerformInteraction";
+ SendHMIRequest(hmi_apis::FunctionID::UI_ClosePopUp, &msg_params);
+ DisablePerformInteraction();
+}
+
+bool PerformInteractionRequest::CheckChoiceIDFromResponse(
+ ApplicationSharedPtr app, int32_t choice_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const DataAccessor<PerformChoiceSetMap> accessor =
+ app->performinteraction_choice_set_map();
+ const PerformChoiceSetMap& choice_set_map = accessor.GetData();
+
+ PerformChoiceSetMap::const_iterator choice_set_map_it =
+ choice_set_map.find(correlation_id());
+ if (choice_set_map.end() != choice_set_map_it) {
+ const PerformChoice& choice = choice_set_map_it->second;
+ PerformChoice::const_iterator it = choice.begin();
+ for (; choice.end() != it; ++it) {
+ const smart_objects::SmartObject& choice_set =
+ (*it->second).getElement(strings::choice_set);
+ for (size_t j = 0; j < choice_set.length(); ++j) {
+ if (choice_id ==
+ choice_set.getElement(j).getElement(strings::choice_id).asInt()) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+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_);
+
+ 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_,
+ "Couldn't find choiset_id = " << choice_set_id_list[i].asInt());
+ return false;
+ }
+ choice_list_length = (*choice_set)[strings::choice_set].length();
+ const smart_objects::SmartObject& choices_list =
+ (*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_,
+ "Choise with ID "
+ << choices_list[k][strings::choice_id].asInt()
+ << " already exists");
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+const bool PerformInteractionRequest::HasHMIResponsesToWait() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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;
+ 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 =
+ PrepareResultCodeForResponse(ui_perform_info, vr_perform_info);
+ const smart_objects::SmartObject* response_params =
+ msg_param.empty() ? NULL : &msg_param;
+ std::string info = app_mngr::commands::MergeInfos(
+ ui_perform_info, ui_info_, vr_perform_info, vr_info_);
+ DisablePerformInteraction();
+ SendResponse(result,
+ perform_interaction_result_code,
+ info.empty() ? NULL : info.c_str(),
+ response_params);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..85bef9b2ad
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/perform_interaction_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+PerformInteractionResponse::PerformInteractionResponse(
+ 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) {}
+
+PerformInteractionResponse::~PerformInteractionResponse() {}
+
+void PerformInteractionResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..18fe00b54a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
@@ -0,0 +1,326 @@
+/*
+
+ 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 <algorithm>
+#include "sdl_rpc_plugin/commands/mobile/put_file_request.h"
+
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+
+#include "utils/file_system.h"
+#include <boost/crc.hpp>
+
+namespace {
+/**
+* Calculates CRC32 checksum
+* @param binary_data - input data for which CRC32 should be calculated
+* @return calculated CRC32 checksum
+*/
+uint32_t GetCrc32CheckSum(const std::vector<uint8_t>& binary_data) {
+ const std::size_t file_size = binary_data.size();
+ boost::crc_32_type result;
+ result.process_bytes(&binary_data[0], file_size);
+ return result.checksum();
+}
+
+} // namespace
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+PutFileRequest::PutFileRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , offset_(0)
+ , sync_file_name_()
+ , length_(0)
+ , file_type_(mobile_apis::FileType::INVALID_ENUM)
+ , is_persistent_file_(false) {}
+
+PutFileRequest::~PutFileRequest() {}
+
+void PutFileRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+ smart_objects::SmartObject response_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() &&
+ application_manager_.get_settings().put_file_in_none() <=
+ 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 ");
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
+ "Too many requests from the app with HMILevel HMI_NONE",
+ &response_params);
+ return;
+ }
+
+ if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
+ LOG4CXX_ERROR(logger_, "Binary data empty");
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "Binary data empty",
+ &response_params);
+ return;
+ }
+
+ if (!(*message_)[strings::msg_params].keyExists(strings::sync_file_name)) {
+ LOG4CXX_ERROR(logger_, "No file name");
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "No file name",
+ &response_params);
+ return;
+ }
+
+ if (!(*message_)[strings::msg_params].keyExists(strings::file_type)) {
+ LOG4CXX_ERROR(logger_, "No file type");
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "No file type",
+ &response_params);
+ return;
+ }
+ sync_file_name_ =
+ (*message_)[strings::msg_params][strings::sync_file_name].asString();
+
+ if (!file_system::IsFileNameValid(sync_file_name_)) {
+ const std::string err_msg = "Sync file name contains forbidden symbols.";
+ LOG4CXX_ERROR(logger_, err_msg);
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ err_msg.c_str(),
+ &response_params);
+ return;
+ }
+
+ file_type_ = static_cast<mobile_apis::FileType::eType>(
+ (*message_)[strings::msg_params][strings::file_type].asInt());
+ const std::vector<uint8_t> binary_data =
+ (*message_)[strings::params][strings::binary_data].asBinary();
+
+ // Policy table update in json format is currently to be received via PutFile
+ // TODO(PV): after latest discussion has to be changed
+ if (mobile_apis::FileType::JSON == file_type_) {
+ policy_handler_.ReceiveMessageFromSDK(sync_file_name_, binary_data);
+ }
+
+ offset_ = 0;
+ 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);
+
+ if (offset_exist) {
+ offset_ = (*message_)[strings::msg_params][strings::offset].asInt();
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::persistent_file)) {
+ is_persistent_file_ =
+ (*message_)[strings::msg_params][strings::persistent_file].asBool();
+ }
+ if ((*message_)[strings::msg_params].keyExists(strings::system_file)) {
+ is_system_file =
+ (*message_)[strings::msg_params][strings::system_file].asBool();
+ }
+
+ std::string file_path;
+
+ if (is_system_file) {
+ response_params[strings::space_available] = 0;
+ file_path = application_manager_.get_settings().system_files_path();
+ } else {
+ file_path = application_manager_.get_settings().app_storage_folder();
+ file_path += "/" + application->folder_name();
+
+ uint32_t space_available = application->GetAvailableDiskSpace();
+
+ if (binary_data.size() > space_available) {
+ response_params[strings::space_available] =
+ static_cast<uint32_t>(space_available);
+
+ LOG4CXX_ERROR(logger_, "Out of memory");
+ SendResponse(false,
+ mobile_apis::Result::OUT_OF_MEMORY,
+ "Out of memory",
+ &response_params);
+ return;
+ }
+ }
+
+ if (!file_system::CreateDirectoryRecursively(file_path)) {
+ LOG4CXX_ERROR(logger_, "Can't create folder");
+ SendResponse(false,
+ mobile_apis::Result::GENERIC_ERROR,
+ "Can't create folder.",
+ &response_params);
+ return;
+ }
+ const std::string full_path = file_path + "/" + sync_file_name_;
+ const size_t bin_data_size = binary_data.size();
+
+ if ((*message_)[strings::msg_params].keyExists(strings::crc32_check_sum)) {
+ LOG4CXX_TRACE(logger_, "Binary Data Size: " << bin_data_size);
+ const uint32_t crc_received =
+ (*message_)[strings::msg_params][strings::crc32_check_sum].asUInt();
+ LOG4CXX_TRACE(logger_, "CRC32 SUM Received: " << crc_received);
+ const uint32_t crc_calculated = GetCrc32CheckSum(binary_data);
+ LOG4CXX_TRACE(logger_, "CRC32 SUM Calculated: " << crc_calculated);
+ if (crc_calculated != crc_received) {
+ SendResponse(false,
+ mobile_apis::Result::CORRUPTED_DATA,
+ "CRC Check on file failed. File upload has been cancelled, "
+ "please retry.",
+ &response_params);
+ return;
+ }
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Writing " << bin_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 "
+ << file_system::FileSize(full_path) << " bytes");
+ if (!is_system_file) {
+ response_params[strings::space_available] =
+ static_cast<uint32_t>(application->GetAvailableDiskSpace());
+ }
+
+ sync_file_name_ = file_path + "/" + sync_file_name_;
+ switch (save_result) {
+ case mobile_apis::Result::SUCCESS: {
+ LOG4CXX_INFO(logger_, "PutFile is successful");
+ if (!is_system_file) {
+ AppFile file(sync_file_name_,
+ is_persistent_file_,
+ is_download_complete,
+ file_type_);
+
+ if (0 == offset_) {
+ LOG4CXX_INFO(logger_, "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)");
+ /* 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");
+ /* If it is impossible to update file, application doesn't
+ know about existing this file */
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "Couldn't update file",
+ &response_params);
+ return;
+ }
+ } else {
+ /* if file added - increment it's count
+ ( may be application->AddFile have to incapsulate it? )
+ Any way now this method evals not only in "none"*/
+ application->increment_put_file_in_none_count();
+ }
+ }
+ }
+
+ SendResponse(true, save_result, "File was downloaded", &response_params);
+ if (is_system_file) {
+ SendOnPutFileNotification();
+ }
+ break;
+ }
+ default:
+ LOG4CXX_WARN(logger_,
+ "PutFile is unsuccessful. Result = " << save_result);
+ SendResponse(false, save_result, "Can't save file", &response_params);
+ break;
+ }
+}
+
+void PutFileRequest::SendOnPutFileNotification() {
+ LOG4CXX_INFO(logger_, "SendOnPutFileNotification");
+ smart_objects::SmartObjectSPtr notification =
+ new smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& message = *notification;
+ message[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_OnPutFile;
+
+ message[strings::params][strings::message_type] = MessageType::kNotification;
+ message[strings::msg_params][strings::app_id] = connection_key();
+ message[strings::msg_params][strings::sync_file_name] = sync_file_name_;
+ message[strings::msg_params][strings::offset] = offset_;
+ if (0 == offset_) {
+ message[strings::msg_params][strings::file_size] =
+ (*message_)[strings::msg_params][strings::length];
+ }
+ message[strings::msg_params][strings::length] = length_;
+ message[strings::msg_params][strings::persistent_file] = is_persistent_file_;
+ message[strings::msg_params][strings::file_type] = file_type_;
+ rpc_service_.ManageHMICommand(notification);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8c54970a5c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc
@@ -0,0 +1,73 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/put_file_response.h"
+#include "utils/file_system.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+PutFileResponse::PutFileResponse(
+ 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) {}
+
+PutFileResponse::~PutFileResponse() {}
+
+void PutFileResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ SendResponse((*message_)[strings::msg_params][strings::success].asBool());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ea353c8d90
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
@@ -0,0 +1,1379 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/register_app_interface_request.h"
+
+#include <unistd.h>
+#include <algorithm>
+#include <map>
+#include <string.h>
+
+#include <utils/make_shared.h>
+#include "application_manager/application_manager.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/app_launch/app_launch_ctrl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/helpers/application_helper.h"
+#include "application_manager/rpc_service.h"
+#include "config_profile/profile.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/generated_msg_version.h"
+#include "utils/file_system.h"
+
+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)
+ : index_(0), so_array_(so_array) {}
+
+ bool operator()(const std::string& app_hmi_type) {
+ so_array_[index_] = StringToAppHMIType(app_hmi_type);
+ ++index_;
+ return true;
+ }
+
+ private:
+ uint32_t index_;
+ smart_objects::SmartObject& so_array_;
+};
+
+struct CheckMissedTypes {
+ CheckMissedTypes(const policy::StringArray& policy_app_types,
+ std::string& log)
+ : policy_app_types_(policy_app_types), log_(log) {}
+
+ bool operator()(const smart_objects::SmartArray::value_type& value) {
+ std::string app_type_str = AppHMITypeToString(
+ static_cast<mobile_apis::AppHMIType::eType>(value.asInt()));
+ if (!app_type_str.empty()) {
+ policy::StringArray::const_iterator it = policy_app_types_.begin();
+ policy::StringArray::const_iterator it_end = policy_app_types_.end();
+ for (; it != it_end; ++it) {
+ if (app_type_str == *it) {
+ return true;
+ }
+ }
+ }
+
+ log_ += app_type_str;
+ log_ += ",";
+
+ return true;
+ }
+
+ private:
+ const policy::StringArray& policy_app_types_;
+ std::string& log_;
+};
+
+class SmartArrayValueExtractor {
+ public:
+ AppHmiType operator()(const smart_objects::SmartObject& so) const {
+ return static_cast<AppHmiType>(so.asInt());
+ }
+};
+
+struct IsSameNickname {
+ 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());
+ }
+
+ private:
+ const custom_str::CustomString& app_id_;
+};
+}
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , result_code_(mobile_apis::Result::INVALID_ENUM) {}
+
+RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {}
+
+bool RegisterAppInterfaceRequest::Init() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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
+
+ // wait till HMI started
+ 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());
+ sleep(1);
+ // TODO(DK): timer_->StartWait(1);
+ }
+
+ if (application_manager_.IsStopping()) {
+ LOG4CXX_WARN(logger_, "The ApplicationManager is stopping!");
+ return;
+ }
+
+ if (IsApplicationSwitched()) {
+ return;
+ }
+
+ const std::string mobile_app_id =
+ (*message_)[strings::msg_params][strings::app_id].asString();
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (application) {
+ SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY);
+ return;
+ }
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ const std::string policy_app_id = msg_params[strings::app_id].asString();
+ std::string new_policy_app_id = policy_app_id;
+ std::transform(policy_app_id.begin(),
+ policy_app_id.end(),
+ new_policy_app_id.begin(),
+ ::tolower);
+ (*message_)[strings::msg_params][strings::app_id] = new_policy_app_id;
+
+ if (application_manager_.IsApplicationForbidden(connection_key(),
+ policy_app_id)) {
+ SendResponse(false, mobile_apis::Result::TOO_MANY_PENDING_REQUESTS);
+ return;
+ }
+
+ if (IsApplicationWithSameAppIdRegistered()) {
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ return;
+ }
+
+ mobile_apis::Result::eType policy_result = CheckWithPolicyData();
+
+ if (Compare<mobile_apis::Result::eType, NEQ, ALL>(
+ policy_result,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS)) {
+ SendResponse(false, policy_result);
+ return;
+ }
+
+ mobile_apis::Result::eType coincidence_result = CheckCoincidence();
+
+ if (mobile_apis::Result::SUCCESS != coincidence_result) {
+ LOG4CXX_ERROR(logger_, "Coincidence check failed.");
+ if (mobile_apis::Result::DUPLICATE_NAME == coincidence_result) {
+ usage_statistics::AppCounter count_of_rejections_duplicate_name(
+ GetPolicyHandler().GetStatisticManager(),
+ policy_app_id,
+ usage_statistics::REJECTIONS_DUPLICATE_NAME);
+ ++count_of_rejections_duplicate_name;
+ }
+ SendResponse(false, coincidence_result);
+ return;
+ }
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_INFO(logger_,
+ "Incoming register app interface has contains \t\n \\t \\n");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ application = application_manager_.RegisterApplication(message_);
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "Application hasn't been registered!");
+ return;
+ }
+ // For resuming application need to restore hmi_app_id from resumeCtrl
+ resumption::ResumeCtrl& resumer = application_manager_.resume_controller();
+ const std::string& device_mac = application->mac_address();
+
+ // there is side affect with 2 mobile app with the same mobile app_id
+ if (resumer.IsApplicationSaved(policy_app_id, device_mac)) {
+ application->set_hmi_application_id(
+ resumer.GetHMIApplicationID(policy_app_id, device_mac));
+ } else {
+ application->set_hmi_application_id(
+ application_manager_.GenerateNewHMIAppID());
+ }
+
+ 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: {}
+ }
+ }
+ }
+
+ 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]);
+ }
+
+ // 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);
+ }
+
+ GetPolicyHandler().SetDeviceInfo(device_mac, device_info);
+
+ SendRegisterAppInterfaceResponseToMobile(ApplicationType::kNewApplication);
+ smart_objects::SmartObjectSPtr so =
+ GetLockScreenIconUrlNotification(connection_key(), application);
+ rpc_service_.ManageMobileCommand(so, SOURCE_SDL);
+}
+
+smart_objects::SmartObjectSPtr
+RegisterAppInterfaceRequest::GetLockScreenIconUrlNotification(
+ const uint32_t connection_key, ApplicationSharedPtr app) {
+ DCHECK_OR_RETURN(app.get(), smart_objects::SmartObjectSPtr());
+ smart_objects::SmartObjectSPtr message =
+ utils::MakeShared<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();
+ return message;
+}
+
+void FillVRRelatedFields(smart_objects::SmartObject& response_params,
+ const HMICapabilities& hmi_capabilities) {
+ response_params[strings::language] = hmi_capabilities.active_vr_language();
+ if (hmi_capabilities.vr_capabilities()) {
+ response_params[strings::vr_capabilities] =
+ *hmi_capabilities.vr_capabilities();
+ }
+}
+
+void FillVIRelatedFields(smart_objects::SmartObject& response_params,
+ const HMICapabilities& hmi_capabilities) {
+ if (hmi_capabilities.vehicle_type()) {
+ response_params[hmi_response::vehicle_type] =
+ *hmi_capabilities.vehicle_type();
+ }
+}
+
+void FillTTSRelatedFields(smart_objects::SmartObject& response_params,
+ const HMICapabilities& hmi_capabilities) {
+ response_params[strings::language] = hmi_capabilities.active_tts_language();
+ if (hmi_capabilities.speech_capabilities()) {
+ response_params[strings::speech_capabilities] =
+ *hmi_capabilities.speech_capabilities();
+ }
+ if (hmi_capabilities.prerecorded_speech()) {
+ response_params[strings::prerecorded_speech] =
+ *(hmi_capabilities.prerecorded_speech());
+ }
+}
+
+void FillUIRelatedFields(smart_objects::SmartObject& response_params,
+ const HMICapabilities& hmi_capabilities) {
+ response_params[strings::hmi_display_language] =
+ hmi_capabilities.active_ui_language();
+ if (hmi_capabilities.display_capabilities()) {
+ response_params[hmi_response::display_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& display_caps =
+ response_params[hmi_response::display_capabilities];
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::display_type)) {
+ display_caps[hmi_response::display_type] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::display_type);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::display_name)) {
+ display_caps[hmi_response::display_name] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::display_name);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::text_fields)) {
+ display_caps[hmi_response::text_fields] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::text_fields);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::image_fields)) {
+ display_caps[hmi_response::image_fields] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::image_fields);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::media_clock_formats)) {
+ display_caps[hmi_response::media_clock_formats] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::media_clock_formats);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::templates_available)) {
+ display_caps[hmi_response::templates_available] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::templates_available);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::screen_params)) {
+ display_caps[hmi_response::screen_params] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::screen_params);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::num_custom_presets_available)) {
+ display_caps[hmi_response::num_custom_presets_available] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::num_custom_presets_available);
+ }
+
+ if (hmi_capabilities.display_capabilities()->keyExists(
+ hmi_response::image_capabilities)) {
+ display_caps[hmi_response::graphic_supported] =
+ (hmi_capabilities.display_capabilities()
+ ->getElement(hmi_response::image_capabilities)
+ .length() > 0);
+ }
+ }
+
+ if (hmi_capabilities.audio_pass_thru_capabilities()) {
+ if (smart_objects::SmartType_Array ==
+ hmi_capabilities.audio_pass_thru_capabilities()->getType()) {
+ // hmi_capabilities json contains array and HMI response object
+ response_params[strings::audio_pass_thru_capabilities] =
+ *hmi_capabilities.audio_pass_thru_capabilities();
+ } else {
+ response_params[strings::audio_pass_thru_capabilities][0] =
+ *hmi_capabilities.audio_pass_thru_capabilities();
+ }
+ }
+ response_params[strings::hmi_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ response_params[strings::hmi_capabilities][strings::navigation] =
+ hmi_capabilities.navigation_supported();
+ response_params[strings::hmi_capabilities][strings::phone_call] =
+ hmi_capabilities.phone_call_supported();
+ response_params[strings::hmi_capabilities][strings::video_streaming] =
+ hmi_capabilities.video_streaming_supported();
+ response_params[strings::hmi_capabilities][strings::remote_control] =
+ hmi_capabilities.rc_supported();
+}
+
+void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
+ ApplicationType app_type) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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;
+ }
+
+ response_params[strings::sync_msg_version][strings::major_version] =
+ major_version; // From generated file interfaces/generated_msg_version.h
+ response_params[strings::sync_msg_version][strings::minor_version] =
+ minor_version; // From generated file interfaces/generated_msg_version.h
+ response_params[strings::sync_msg_version][strings::patch_version] =
+ patch_version; // From generated file interfaces/generated_msg_version.h
+
+ 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)) {
+ FillTTSRelatedFields(response_params, hmi_capabilities);
+ }
+
+ if (HmiInterfaces::STATE_NOT_AVAILABLE !=
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_VR)) {
+ FillVRRelatedFields(response_params, hmi_capabilities);
+ }
+
+ if (HmiInterfaces::STATE_NOT_AVAILABLE !=
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_UI)) {
+ FillUIRelatedFields(response_params, hmi_capabilities);
+ }
+
+ if (HmiInterfaces::STATE_NOT_AVAILABLE !=
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_VehicleInfo)) {
+ FillVIRelatedFields(response_params, hmi_capabilities);
+ }
+
+ if (hmi_capabilities.button_capabilities()) {
+ response_params[hmi_response::button_capabilities] =
+ *hmi_capabilities.button_capabilities();
+ }
+
+ if (hmi_capabilities.soft_button_capabilities()) {
+ response_params[hmi_response::soft_button_capabilities] =
+ *hmi_capabilities.soft_button_capabilities();
+ }
+
+ if (hmi_capabilities.preset_bank_capabilities()) {
+ response_params[hmi_response::preset_bank_capabilities] =
+ *hmi_capabilities.preset_bank_capabilities();
+ }
+
+ 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_capabilities.hmi_zone_capabilities();
+ } else {
+ response_params[hmi_response::hmi_zone_capabilities][0] =
+ *hmi_capabilities.hmi_zone_capabilities();
+ }
+ }
+
+ if (hmi_capabilities.pcm_stream_capabilities()) {
+ response_params[strings::pcm_stream_capabilities] =
+ *hmi_capabilities.pcm_stream_capabilities();
+ }
+
+ const std::vector<uint32_t>& diag_modes =
+ application_manager_.get_settings().supported_diag_modes();
+ if (!diag_modes.empty()) {
+ std::vector<uint32_t>::const_iterator it = diag_modes.begin();
+ uint32_t index = 0;
+ for (; it != diag_modes.end(); ++it) {
+ response_params[strings::supported_diag_modes][index] = *it;
+ ++index;
+ }
+ }
+
+ response_params[strings::sdl_version] =
+ application_manager_.get_settings().sdl_version();
+ const std::string ccpu_version = hmi_capabilities_.ccpu_version();
+ if (!ccpu_version.empty()) {
+ response_params[strings::system_software_version] = ccpu_version;
+ }
+
+ if (ApplicationType::kSwitchedApplicationWrongHashId == app_type) {
+ LOG4CXX_DEBUG(logger_,
+ "Application has been switched from another transport, "
+ "but doesn't have correct hashID.");
+
+ application_manager::DeleteApplicationData(application,
+ application_manager_);
+
+ SendResponse(
+ true, mobile_apis::Result::RESUME_FAILED, NULL, &response_params);
+ return;
+ }
+
+ if (ApplicationType::kSwitchedApplicationHashOk == app_type) {
+ LOG4CXX_DEBUG(logger_,
+ "Application has been switched from another transport "
+ "and has correct hashID.");
+ SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
+ return;
+ }
+
+ bool resumption =
+ (*message_)[strings::msg_params].keyExists(strings::hash_id);
+
+ bool need_restore_vr = resumption;
+
+ std::string hash_id;
+ std::string add_info;
+ if (resumption) {
+ hash_id = (*message_)[strings::msg_params][strings::hash_id].asString();
+ 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.";
+ }
+ }
+ 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
+ if (false == resumption) {
+ resumption = resumer.IsApplicationSaved(application->policy_app_id(),
+ application->mac_address());
+ }
+
+ 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->policy_app_id(), hmi_types);
+
+ response_params[strings::icon_resumed] =
+ file_system::FileExists(application->app_icon_path());
+
+ SendResponse(true, result_code, add_info.c_str(), &response_params);
+ SendOnAppRegisteredNotificationToHMI(
+ *(application.get()), resumption, need_restore_vr);
+ if (msg_params.keyExists(strings::app_hmi_type)) {
+ GetPolicyHandler().SetDefaultHmiTypes(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);
+ (*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->policy_app_id());
+
+ if (result_code != mobile_apis::Result::RESUME_FAILED) {
+ resumer.StartResumption(application, hash_id);
+ } else {
+ resumer.StartResumptionOnlyHMILevel(application);
+ }
+
+ // By default app subscribed to CUSTOM_BUTTON
+ SendSubscribeCustomButtonNotification();
+ SendChangeRegistrationOnHMI(application);
+}
+
+DEPRECATED void
+RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
+ SendRegisterAppInterfaceResponseToMobile(ApplicationType::kNewApplication);
+}
+
+void RegisterAppInterfaceRequest::SendChangeRegistration(
+ const hmi_apis::FunctionID::eType function_id,
+ const int32_t language,
+ const uint32_t app_id) {
+ using helpers::Compare;
+ using helpers::EQ;
+ using helpers::ONE;
+ const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ const HmiInterfaces::InterfaceID interface =
+ hmi_interfaces.GetInterfaceFromFunction(function_id);
+ if (hmi_interfaces.GetInterfaceState(interface) !=
+ HmiInterfaces::STATE_NOT_AVAILABLE) {
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[strings::language] = language;
+ msg_params[strings::app_id] = app_id;
+ SendHMIRequest(function_id, &msg_params);
+ } else {
+ LOG4CXX_DEBUG(logger_, "Interface " << interface << "is not avaliable");
+ }
+}
+
+void RegisterAppInterfaceRequest::SendChangeRegistrationOnHMI(
+ ApplicationConstSharedPtr app) {
+ using namespace hmi_apis::FunctionID;
+ DCHECK_OR_RETURN_VOID(app);
+ DCHECK_OR_RETURN_VOID(mobile_apis::Language::INVALID_ENUM != app->language());
+ SendChangeRegistration(VR_ChangeRegistration, app->language(), app->app_id());
+ SendChangeRegistration(
+ TTS_ChangeRegistration, app->language(), app->app_id());
+ SendChangeRegistration(UI_ChangeRegistration, app->language(), app->app_id());
+}
+
+void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
+ const app_mngr::Application& application_impl,
+ bool resumption,
+ bool need_restore_vr) {
+ using namespace smart_objects;
+ SmartObjectSPtr notification = utils::MakeShared<SmartObject>(SmartType_Map);
+ if (!notification) {
+ LOG4CXX_ERROR(logger_, "Failed to create smart object");
+ return;
+ }
+
+ (*notification)[strings::params] = SmartObject(SmartType_Map);
+ smart_objects::SmartObject& params = (*notification)[strings::params];
+ params[strings::function_id] = static_cast<int32_t>(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
+ params[strings::message_type] = static_cast<int32_t>(kNotification);
+ params[strings::protocol_version] = protocol_version_;
+ params[strings::protocol_type] = hmi_protocol_type_;
+
+ (*notification)[strings::msg_params] = SmartObject(SmartType_Map);
+ smart_objects::SmartObject& msg_params = (*notification)[strings::msg_params];
+ // 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;
+ }
+
+ if (application_impl.vr_synonyms()) {
+ msg_params[strings::vr_synonyms] = *(application_impl.vr_synonyms());
+ }
+
+ if (application_impl.tts_name()) {
+ msg_params[strings::tts_name] = *(application_impl.tts_name());
+ }
+
+ const std::string policy_app_id = application_impl.policy_app_id();
+ std::string priority;
+ GetPolicyHandler().GetPriority(policy_app_id, &priority);
+
+ if (!priority.empty()) {
+ msg_params[strings::priority] = MessageHelper::GetPriorityCode(priority);
+ }
+
+ msg_params[strings::msg_params] = SmartObject(SmartType_Map);
+ smart_objects::SmartObject& application = msg_params[strings::application];
+ application[strings::app_name] = application_impl.name();
+ application[strings::app_id] = application_impl.app_id();
+ application[hmi_response::policy_app_id] = policy_app_id;
+ if (file_system::FileExists(application_impl.app_icon_path())) {
+ application[strings::icon] = application_impl.app_icon_path();
+ }
+
+ const smart_objects::SmartObject* ngn_media_screen_name =
+ application_impl.ngn_media_screen_name();
+ if (ngn_media_screen_name) {
+ application[strings::ngn_media_screen_app_name] = *ngn_media_screen_name;
+ }
+
+ application[strings::hmi_display_language_desired] =
+ static_cast<int32_t>(application_impl.ui_language());
+
+ application[strings::is_media_application] =
+ application_impl.is_media_application();
+
+ const smart_objects::SmartObject* app_type = application_impl.app_types();
+ if (app_type) {
+ application[strings::app_type] = *app_type;
+ }
+
+ const policy::RequestType::State app_request_types_state =
+ GetPolicyHandler().GetAppRequestTypeState(policy_app_id);
+ if (policy::RequestType::State::AVAILABLE == app_request_types_state) {
+ const auto request_types =
+ GetPolicyHandler().GetAppRequestTypes(policy_app_id);
+ application[strings::request_type] = SmartObject(SmartType_Array);
+ smart_objects::SmartObject& request_types_array =
+ application[strings::request_type];
+
+ size_t index = 0;
+ for (auto it : request_types) {
+ request_types_array[index] = it;
+ ++index;
+ }
+ } else if (policy::RequestType::State::EMPTY == app_request_types_state) {
+ application[strings::request_type] = SmartObject(SmartType_Array);
+ }
+
+ const policy::RequestSubType::State app_request_subtypes_state =
+ GetPolicyHandler().GetAppRequestSubTypeState(policy_app_id);
+ if (policy::RequestSubType::State::AVAILABLE == app_request_subtypes_state) {
+ const auto request_subtypes =
+ GetPolicyHandler().GetAppRequestSubTypes(policy_app_id);
+ application[strings::request_subtype] = SmartObject(SmartType_Array);
+ smart_objects::SmartObject& request_subtypes_array =
+ application[strings::request_subtype];
+
+ size_t index = 0;
+ for (auto it : request_subtypes) {
+ request_subtypes_array[index] = it;
+ ++index;
+ }
+ } else if (policy::RequestSubType::State::EMPTY ==
+ app_request_subtypes_state) {
+ application[strings::request_subtype] = SmartObject(SmartType_Array);
+ }
+
+ application[strings::device_info] = SmartObject(SmartType_Map);
+ smart_objects::SmartObject& device_info = application[strings::device_info];
+ const protocol_handler::SessionObserver& session_observer =
+ application_manager_.connection_handler().get_session_observer();
+ std::string device_name;
+ std::string mac_address;
+ std::string transport_type;
+ const connection_handler::DeviceHandle handle = application_impl.device();
+ if (-1 ==
+ session_observer.GetDataOnDeviceID(
+ handle, &device_name, NULL, &mac_address, &transport_type)) {
+ LOG4CXX_ERROR(logger_,
+ "Failed to extract information for device " << handle);
+ }
+
+ device_info[strings::name] = device_name;
+ device_info[strings::id] = mac_address;
+
+ const policy::DeviceConsent device_consent =
+ GetPolicyHandler().GetUserConsentForDevice(mac_address);
+ device_info[strings::isSDLAllowed] =
+ policy::DeviceConsent::kDeviceAllowed == device_consent;
+
+ device_info[strings::transport_type] =
+ application_manager_.GetDeviceTransportType(transport_type);
+
+ const smart_objects::SmartObject* day_color_scheme =
+ application_impl.day_color_scheme();
+ if (day_color_scheme) {
+ application[strings::day_color_scheme] = *day_color_scheme;
+ }
+
+ const smart_objects::SmartObject* night_color_scheme =
+ application_impl.night_color_scheme();
+ if (night_color_scheme) {
+ application[strings::night_color_scheme] = *night_color_scheme;
+ }
+
+ DCHECK(rpc_service_.ManageHMICommand(notification));
+}
+
+mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ ApplicationSet accessor = application_manager_.applications().GetData();
+
+ ApplicationSetConstIt it = accessor.begin();
+ const custom_str::CustomString& app_name =
+ msg_params[strings::app_name].asCustomString();
+
+ for (; accessor.end() != it; ++it) {
+ // name check
+ const custom_str::CustomString& cur_name = (*it)->name();
+ if (app_name.CompareIgnoreCase(cur_name)) {
+ LOG4CXX_ERROR(logger_, "Application name is known already.");
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+
+ const smart_objects::SmartObject* vr = (*it)->vr_synonyms();
+ const std::vector<smart_objects::SmartObject>* curr_vr = NULL;
+ if (NULL != vr) {
+ curr_vr = vr->asArray();
+ CoincidencePredicateVR v(app_name);
+
+ if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
+ LOG4CXX_ERROR(logger_, "Application name is known already.");
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+ }
+
+ // vr check
+ if (msg_params.keyExists(strings::vr_synonyms)) {
+ const std::vector<smart_objects::SmartObject>* new_vr =
+ msg_params[strings::vr_synonyms].asArray();
+
+ 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 .");
+ return mobile_apis::Result::DUPLICATE_NAME;
+ }
+ } // end vr check
+
+ } // application for end
+
+ return mobile_apis::Result::SUCCESS;
+} // method end
+
+mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ // TODO(AOleynik): Check is necessary to allow register application in case
+ // of disabled policy
+ // Remove this check, when HMI will support policy
+ if (!GetPolicyHandler().PolicyEnabled()) {
+ return mobile_apis::Result::WARNINGS;
+ }
+
+ smart_objects::SmartObject& message = *message_;
+ policy::StringArray app_nicknames;
+ policy::StringArray app_hmi_types;
+
+ const std::string mobile_app_id =
+ message[strings::msg_params][strings::app_id].asString();
+ const bool init_result = GetPolicyHandler().GetInitialAppData(
+ mobile_app_id, &app_nicknames, &app_hmi_types);
+
+ if (!init_result) {
+ LOG4CXX_ERROR(logger_, "Error during initial application data check.");
+ return mobile_apis::Result::INVALID_DATA;
+ }
+
+ if (!app_nicknames.empty()) {
+ IsSameNickname compare(
+ message[strings::msg_params][strings::app_name].asCustomString());
+ 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.");
+ // App should be unregistered, if its name is not present in nicknames
+ // list
+ usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
+ GetPolicyHandler().GetStatisticManager(),
+ mobile_app_id,
+ usage_statistics::REJECTIONS_NICKNAME_MISMATCH);
+ ++count_of_rejections_nickname_mismatch;
+ return mobile_apis::Result::DISALLOWED;
+ }
+ }
+
+ mobile_apis::Result::eType 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;
+ }
+ }
+ // 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;
+}
+
+void RegisterAppInterfaceRequest::FillDeviceInfo(
+ policy::DeviceInfo* device_info) {
+ const std::string hardware = "hardware";
+ const std::string firmware_rev = "firmwareRev";
+ const std::string os = "os";
+ const std::string os_ver = "osVersion";
+ const std::string carrier = "carrier";
+ const std::string max_number_rfcom_ports = "maxNumberRFCOMMPorts";
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ const smart_objects::SmartObject& device_info_so =
+ msg_params[strings::device_info];
+
+ if (device_info_so.keyExists(hardware)) {
+ device_info->hardware =
+ msg_params[strings::device_info][hardware].asString();
+ }
+ if (device_info_so.keyExists(firmware_rev)) {
+ device_info->firmware_rev =
+ msg_params[strings::device_info][firmware_rev].asString();
+ }
+ if (device_info_so.keyExists(os)) {
+ device_info->os = device_info_so[os].asString();
+ }
+ if (device_info_so.keyExists(os_ver)) {
+ device_info->os_ver = device_info_so[os_ver].asString();
+ }
+ if (device_info_so.keyExists(carrier)) {
+ device_info->carrier = device_info_so[carrier].asString();
+ }
+ if (device_info_so.keyExists(max_number_rfcom_ports)) {
+ device_info->max_number_rfcom_ports =
+ device_info_so[max_number_rfcom_ports].asInt();
+ }
+}
+
+bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const custom_string::CustomString mobile_app_id =
+ (*message_)[strings::msg_params][strings::app_id].asCustomString();
+
+ const ApplicationSet& applications =
+ application_manager_.applications().GetData();
+
+ ApplicationSetConstIt it = applications.begin();
+ ApplicationSetConstIt it_end = applications.end();
+
+ for (; it != it_end; ++it) {
+ if (mobile_app_id.CompareIgnoreCase((*it)->policy_app_id().c_str())) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ str = (*message_)[strings::msg_params][strings::app_name].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid app_name syntax check failed");
+ return true;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::tts_name)) {
+ const smart_objects::SmartArray* tn_array =
+ (*message_)[strings::msg_params][strings::tts_name].asArray();
+
+ smart_objects::SmartArray::const_iterator it_tn = tn_array->begin();
+ smart_objects::SmartArray::const_iterator it_tn_end = tn_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::ngn_media_screen_app_name)) {
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_synonyms)) {
+ const smart_objects::SmartArray* vs_array =
+ (*message_)[strings::msg_params][strings::vr_synonyms].asArray();
+
+ smart_objects::SmartArray::const_iterator it_vs = vs_array->begin();
+ smart_objects::SmartArray::const_iterator it_vs_end = vs_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
+ if ((*message_)[strings::msg_params][strings::device_info].keyExists(
+ strings::hardware)) {
+ str = (*message_)[strings::msg_params][strings::device_info]
+ [strings::hardware].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid device_info hardware syntax check failed");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params][strings::device_info].keyExists(
+ strings::firmware_rev)) {
+ str = (*message_)[strings::msg_params][strings::device_info]
+ [strings::firmware_rev].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid device_info firmware_rev syntax check failed");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params][strings::device_info].keyExists(
+ strings::os)) {
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params][strings::device_info].keyExists(
+ strings::os_version)) {
+ str = (*message_)[strings::msg_params][strings::device_info]
+ [strings::os_version].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid device_info os_version syntax check failed");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params][strings::device_info].keyExists(
+ strings::carrier)) {
+ str = (*message_)[strings::msg_params][strings::device_info]
+ [strings::carrier].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid device_info carrier syntax check failed");
+ return true;
+ }
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void RegisterAppInterfaceRequest::CheckResponseVehicleTypeParam(
+ smart_objects::SmartObject& vehicle_type,
+ const std::string& param,
+ const std::string& backup_value) {
+ using namespace hmi_response;
+ if (!vehicle_type.keyExists(param) || vehicle_type[param].empty()) {
+ if (!backup_value.empty()) {
+ LOG4CXX_DEBUG(logger_,
+ param << " is missing."
+ "Will be replaced with policy table value.");
+ vehicle_type[param] = backup_value;
+ } else {
+ vehicle_type.erase(param);
+ }
+ }
+}
+
+void RegisterAppInterfaceRequest::SendSubscribeCustomButtonNotification() {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+
+ SmartObject msg_params = SmartObject(SmartType_Map);
+ msg_params[strings::app_id] = connection_key();
+ msg_params[strings::name] = Common_ButtonName::CUSTOM_BUTTON;
+ msg_params[strings::is_suscribed] = true;
+ CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
+}
+
+bool RegisterAppInterfaceRequest::IsApplicationSwitched() {
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ const std::string& policy_app_id = msg_params[strings::app_id].asString();
+
+ LOG4CXX_DEBUG(logger_, "Looking for application id " << policy_app_id);
+
+ auto app = application_manager_.application_by_policy_id(policy_app_id);
+
+ if (!app) {
+ LOG4CXX_DEBUG(logger_,
+ "Application with policy id " << policy_app_id
+ << " is not found.");
+ return false;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Application with policy id " << policy_app_id << " is found.");
+ if (!application_manager_.IsAppInReconnectMode(policy_app_id)) {
+ LOG4CXX_DEBUG(logger_,
+ "Policy id " << policy_app_id
+ << " is not found in reconnection list.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY);
+ return false;
+ }
+
+ LOG4CXX_DEBUG(logger_, "Application is found in reconnection list.");
+
+ auto app_type = ApplicationType::kSwitchedApplicationWrongHashId;
+ if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) {
+ const auto hash_id =
+ (*message_)[strings::msg_params][strings::hash_id].asString();
+
+ auto& resume_ctrl = application_manager_.resume_controller();
+ if (resume_ctrl.CheckApplicationHash(app, hash_id)) {
+ app_type = ApplicationType::kSwitchedApplicationHashOk;
+ }
+ }
+
+ application_manager_.ProcessReconnection(app, connection_key());
+ SendRegisterAppInterfaceResponseToMobile(app_type);
+
+ application_manager_.SendHMIStatusNotification(app);
+
+ application_manager_.OnApplicationSwitched(app);
+
+ return true;
+}
+
+policy::PolicyHandlerInterface&
+RegisterAppInterfaceRequest::GetPolicyHandler() {
+ return policy_handler_;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..73b38823d8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc
@@ -0,0 +1,99 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/register_app_interface_response.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "connection_handler/connection_handler.h"
+#include "application_manager/policies/policy_handler_interface.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+void RegisterAppInterfaceResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
+ bool success = (*message_)[strings::msg_params][strings::success].asBool();
+ bool last_message = !success;
+ // Do not close connection in case of APPLICATION_NOT_REGISTERED despite it is
+ // an error
+ if (!success &&
+ (*message_)[strings::msg_params].keyExists(strings::result_code)) {
+ result_code = static_cast<mobile_apis::Result::eType>(
+ (*message_)[strings::msg_params][strings::result_code].asInt());
+ if (result_code == mobile_apis::Result::APPLICATION_REGISTERED_ALREADY) {
+ last_message = false;
+ }
+ }
+
+ SendResponse(success, result_code, last_message);
+
+ if (mobile_apis::Result::SUCCESS != result_code) {
+ return;
+ }
+
+ // 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
+ application_manager::ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+ if (!application) {
+ LOG4CXX_ERROR(logger_,
+ "Application with connection key " << connection_key()
+ << " is not registered.");
+ return;
+ }
+
+ SetHeartBeatTimeout(connection_key(), application->policy_app_id());
+}
+
+void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
+ uint32_t connection_key, const std::string& mobile_app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ policy::PolicyHandlerInterface& policy_handler = policy_handler_;
+ if (policy_handler.PolicyEnabled()) {
+ const uint32_t timeout = policy_handler.HeartBeatTimeout(mobile_app_id);
+ if (timeout > 0) {
+ application_manager_.connection_handler().SetHeartBeatTimeout(
+ connection_key, timeout);
+ }
+ } else {
+ LOG4CXX_INFO(logger_, "Policy is turn off");
+ }
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ab6e1cc143
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc
@@ -0,0 +1,336 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
+
+ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {}
+
+void ResetGlobalPropertiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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");
+ 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;
+ }
+ }
+
+ if (vr_help_title_items || menu_name || menu_icon ||
+ is_key_board_properties) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ }
+
+ if (timeout_prompt || helpt_promt) {
+ 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_text] = "";
+ 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) {
+ // 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());
+ }
+
+ 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;
+}
+
+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;
+ }
+ app->reset_vr_help_title();
+ app->reset_vr_help();
+
+ return true;
+}
+
+void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetGlobalProperties: {
+ LOG4CXX_INFO(logger_, "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());
+ GetInfo(message, ui_response_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
+ LOG4CXX_INFO(logger_, "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());
+ GetInfo(message, tts_response_info_);
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+
+ if (IsPendingResponseExist()) {
+ LOG4CXX_DEBUG(logger_, "Waiting for remaining responses");
+ return;
+ }
+
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ std::string response_info;
+ const bool result = PrepareResponseParameters(result_code, response_info);
+
+ SendResponse(result,
+ static_cast<mobile_apis::Result::eType>(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+}
+
+bool ResetGlobalPropertiesRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+bool ResetGlobalPropertiesRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& out_result_code,
+ std::string& out_response_info) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ bool result = false;
+ app_mngr::commands::ResponseInfo ui_properties_info(
+ ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
+ app_mngr::commands::ResponseInfo tts_properties_info(
+ tts_result_, HmiInterfaces::HMI_INTERFACE_TTS, application_manager_);
+
+ HmiInterfaces::InterfaceState tts_interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_TTS);
+
+ if (hmi_apis::Common_Result::SUCCESS == ui_result_ &&
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_ &&
+ HmiInterfaces::STATE_AVAILABLE == tts_interface_state) {
+ result = true;
+ out_result_code = mobile_apis::Result::WARNINGS;
+ out_response_info = "Unsupported phoneme type sent in a prompt";
+ } else {
+ result =
+ PrepareResultForMobileResponse(ui_properties_info, tts_properties_info);
+ out_result_code =
+ PrepareResultCodeForResponse(ui_properties_info, tts_properties_info);
+ out_response_info = app_mngr::commands::MergeInfos(tts_properties_info,
+ tts_response_info_,
+ ui_properties_info,
+ ui_response_info_);
+ }
+
+ return result;
+}
+
+bool ResetGlobalPropertiesRequest::IsPendingResponseExist() {
+ return IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS) ||
+ IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_UI);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f5542ab26b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/reset_global_properties_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse(
+ 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) {}
+
+ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {}
+
+void ResetGlobalPropertiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0b28e09210
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc
@@ -0,0 +1,163 @@
+/*
+
+ 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 <string.h>
+#include "sdl_rpc_plugin/commands/mobile/scrollable_message_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ScrollableMessageRequest::ScrollableMessageRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {
+ subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
+}
+
+ScrollableMessageRequest::~ScrollableMessageRequest() {}
+
+bool ScrollableMessageRequest::Init() {
+ /* Timeout in milliseconds.
+ If omitted a standard value of 10000 milliseconds is used.*/
+ if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
+ default_timeout_ =
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
+ } else {
+ const int32_t def_value = 30000;
+ default_timeout_ = def_value;
+ }
+
+ return true;
+}
+
+void ScrollableMessageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ // 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) {
+ LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
+ SendResponse(false, processing_result);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[hmi_request::message_text][hmi_request::field_name] =
+ static_cast<int32_t>(
+ hmi_apis::Common_TextFieldName::scrollableMessageBody);
+ msg_params[hmi_request::message_text][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::scroll_message_body];
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::timeout] = default_timeout_;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ msg_params[strings::soft_buttons] =
+ (*message_)[strings::msg_params][strings::soft_buttons];
+ MessageHelper::SubscribeApplicationToSoftButton(
+ (*message_)[strings::msg_params], app, function_id());
+ }
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_ScrollableMessage, &msg_params, true);
+}
+
+void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_OnResetTimeout: {
+ LOG4CXX_INFO(logger_, "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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4eee819497
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
@@ -0,0 +1,72 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/scrollable_message_response.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ScrollableMessageResponse::ScrollableMessageResponse(
+ 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) {}
+
+void ScrollableMessageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ mobile_apis::Result::eType result_code =
+ static_cast<mobile_apis::Result::eType>(
+ (*message_)[strings::msg_params][strings::result_code].asInt());
+ ApplicationSharedPtr application = application_manager_.application(
+ (*message_)[strings::params][strings::connection_key].asInt());
+ if ((mobile_apis::Result::REJECTED != result_code) && application) {
+ application->UnsubscribeFromSoftButtons(
+ (*message_)[strings::params][strings::function_id].asInt());
+ }
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a09434ebb6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc
@@ -0,0 +1,108 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/mobile/send_haptic_data_request.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+SendHapticDataRequest::SendHapticDataRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SendHapticDataRequest::~SendHapticDataRequest() {}
+
+void SendHapticDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (app->is_navi() || app->mobile_projection_enabled()) {
+ SendHMIRequest(hmi_apis::FunctionID::UI_SendHapticData, &msg_params, true);
+ } else {
+ SendResponse(false,
+ mobile_apis::Result::DISALLOWED,
+ "Application is not of type Navigation or Mobile Projection");
+ }
+}
+
+void SendHapticDataRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SendHapticData: {
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
+
+ const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_api::Result::SUCCESS,
+ mobile_api::Result::WARNINGS);
+
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f4515472a4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "sdl_rpc_plugin/commands/mobile/send_haptic_data_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SendHapticDataResponse::SendHapticDataResponse(
+ 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) {}
+
+SendHapticDataResponse::~SendHapticDataResponse() {}
+
+void SendHapticDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ab8de5923a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc
@@ -0,0 +1,284 @@
+/*
+
+ 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 <algorithm>
+#include "sdl_rpc_plugin/commands/mobile/send_location_request.h"
+#include "application_manager/message_helper.h"
+#include "utils/custom_string.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SendLocationRequest::SendLocationRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SendLocationRequest::~SendLocationRequest() {}
+
+void SendLocationRequest::Run() {
+ using namespace hmi_apis;
+ using smart_objects::SmartObject;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+ if (msg_params.keyExists(strings::delivery_mode)) {
+ const RPCParams& allowed_params = parameters_permissions().allowed_params;
+
+ if (helpers::in_range(allowed_params, strings::delivery_mode)) {
+ msg_params.erase(strings::delivery_mode);
+ }
+ }
+
+ std::vector<Common_TextFieldName::eType> fields_to_check;
+ if (msg_params.keyExists(strings::location_name)) {
+ fields_to_check.push_back(Common_TextFieldName::locationName);
+ }
+ if (msg_params.keyExists(strings::location_description)) {
+ fields_to_check.push_back(Common_TextFieldName::locationDescription);
+ }
+ if (msg_params.keyExists(strings::address_lines)) {
+ fields_to_check.push_back(Common_TextFieldName::addressLines);
+ }
+ if (msg_params.keyExists(strings::phone_number)) {
+ fields_to_check.push_back(Common_TextFieldName::phoneNumber);
+ }
+
+ if (!CheckHMICapabilities(fields_to_check)) {
+ SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ return;
+ }
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_ERROR(logger_, "Strings contain invalid characters");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ if (msg_params.keyExists(strings::address)) {
+ const utils::custom_string::CustomString& address =
+ msg_params[strings::address].asCustomString();
+ if (address.empty()) {
+ msg_params.erase(strings::address);
+ }
+ }
+
+ if (!CheckFieldsCompatibility()) {
+ LOG4CXX_ERROR(logger_, "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(
+ (*message_)[strings::msg_params][strings::location_image],
+ app,
+ application_manager_);
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+
+ SmartObject request_msg_params = SmartObject(smart_objects::SmartType_Map);
+ request_msg_params = msg_params;
+ request_msg_params[strings::app_id] = app->hmi_app_id();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_SendLocation, &request_msg_params, true);
+}
+
+void SendLocationRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ const Common_Result::eType result_code = static_cast<Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::params]));
+ return;
+ }
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+}
+
+bool SendLocationRequest::CheckFieldsCompatibility() {
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+ MessageHelper::PrintSmartObject(msg_params);
+ const bool longitude_degrees_exist =
+ msg_params.keyExists(strings::longitude_degrees);
+ const bool latitude_degrees_exist =
+ msg_params.keyExists(strings::latitude_degrees);
+ 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");
+ return false;
+ }
+
+ if (!address_exist && !longitude_degrees_exist && !latitude_degrees_exist) {
+ LOG4CXX_DEBUG(logger_,
+ "address or latitude/longtitude should should be provided");
+ return false;
+ }
+ return true;
+}
+void insert_if_contains(
+ const smart_objects::SmartObject& msg_params,
+ const std::string& param_key,
+ std::vector<utils::custom_string::CustomString>& output_vector) {
+ if (msg_params.keyExists(param_key)) {
+ output_vector.push_back(msg_params[param_key].asCustomString());
+ }
+}
+
+bool SendLocationRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ std::vector<utils::custom_string::CustomString> fields_to_check;
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+ insert_if_contains(msg_params, strings::location_name, fields_to_check);
+ insert_if_contains(
+ msg_params, strings::location_description, fields_to_check);
+ insert_if_contains(msg_params, strings::phone_number, fields_to_check);
+
+ if (msg_params.keyExists(strings::address_lines)) {
+ const smart_objects::SmartArray* al_array =
+ msg_params[strings::address_lines].asArray();
+ smart_objects::SmartArray::const_iterator it_al = al_array->begin();
+ smart_objects::SmartArray::const_iterator it_al_end = al_array->end();
+ for (; it_al != it_al_end; ++it_al) {
+ const utils::custom_string::CustomString& val = (*it_al).asCustomString();
+ fields_to_check.push_back(val);
+ }
+ }
+
+ if (msg_params.keyExists(strings::address)) {
+ const smart_objects::SmartObject& address_so = msg_params[strings::address];
+ insert_if_contains(address_so, strings::country_name, fields_to_check);
+ insert_if_contains(address_so, strings::country_code, fields_to_check);
+ insert_if_contains(address_so, strings::postal_code, fields_to_check);
+ insert_if_contains(
+ address_so, strings::administrative_area, fields_to_check);
+ insert_if_contains(address_so, strings::locality, fields_to_check);
+ insert_if_contains(address_so, strings::sub_locality, fields_to_check);
+ insert_if_contains(address_so, strings::thoroughfare, fields_to_check);
+ insert_if_contains(address_so, strings::sub_thoroughfare, fields_to_check);
+ }
+
+ std::vector<utils::custom_string::CustomString>::iterator it =
+ fields_to_check.begin();
+ 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");
+ return true;
+ }
+ }
+ return false;
+}
+
+bool SendLocationRequest::CheckHMICapabilities(
+ std::vector<hmi_apis::Common_TextFieldName::eType>& fields_names) {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+ if (fields_names.empty()) {
+ return true;
+ }
+
+ const HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ if (!hmi_capabilities.is_ui_cooperating()) {
+ LOG4CXX_ERROR(logger_, "UI is not supported.");
+ return false;
+ }
+
+ if (hmi_capabilities.display_capabilities()) {
+ const SmartObject disp_cap = (*hmi_capabilities.display_capabilities());
+ const SmartObject& text_fields =
+ disp_cap.getElement(hmi_response::text_fields);
+ const size_t len = text_fields.length();
+ for (size_t i = 0; i < len; ++i) {
+ const SmartObject& text_field = text_fields[i];
+ const Common_TextFieldName::eType filed_name =
+ static_cast<Common_TextFieldName::eType>(
+ text_field.getElement(strings::name).asInt());
+ const std::vector<Common_TextFieldName::eType>::iterator it =
+ std::find(fields_names.begin(), fields_names.end(), filed_name);
+ if (it != fields_names.end()) {
+ fields_names.erase(it);
+ }
+ }
+ }
+
+ if (!fields_names.empty()) {
+ LOG4CXX_ERROR(logger_, "Some fields are not supported by capabilities");
+ return false;
+ }
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..59dab4a9a7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc
@@ -0,0 +1,66 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/send_location_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SendLocationResponse::SendLocationResponse(
+ 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) {}
+
+SendLocationResponse::~SendLocationResponse() {}
+
+void SendLocationResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3cb57c90e8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
@@ -0,0 +1,296 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_app_icon_request.h"
+#include <algorithm>
+
+#include "application_manager/message_helper.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/file_system.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetAppIconRequest::SetAppIconRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , is_icons_saving_enabled_(false) {
+ const std::string path =
+ application_manager_.get_settings().app_icons_folder();
+ is_icons_saving_enabled_ = file_system::IsWritingAllowed(path) &&
+ file_system::IsReadingAllowed(path);
+}
+
+SetAppIconRequest::~SetAppIconRequest() {}
+
+void SetAppIconRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const std::string& sync_file_name =
+ (*message_)[strings::msg_params][strings::sync_file_name].asString();
+
+ if (!file_system::IsFileNameValid(sync_file_name)) {
+ const std::string err_msg = "Sync file name contains forbidden symbols.";
+ LOG4CXX_ERROR(logger_, err_msg);
+ SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
+ return;
+ }
+
+ std::string full_file_path =
+ application_manager_.get_settings().app_storage_folder() + "/";
+ full_file_path += app->folder_name();
+ full_file_path += "/";
+ full_file_path += sync_file_name;
+
+ if (!file_system::FileExists(full_file_path)) {
+ LOG4CXX_ERROR(logger_, "No such file " << full_file_path);
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::sync_file_name] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ // Panasonic requres unchanged path value without encoded special characters
+ const std::string full_file_path_for_hmi =
+ file_system::ConvertPathForURL(full_file_path);
+
+ msg_params[strings::sync_file_name][strings::value] = full_file_path_for_hmi;
+
+ // TODO(VS): research why is image_type hardcoded
+ msg_params[strings::sync_file_name][strings::image_type] =
+ static_cast<int32_t>(SetAppIconRequest::ImageType::DYNAMIC);
+
+ // for further use in on_event function
+ (*message_)[strings::msg_params][strings::sync_file_name] =
+ msg_params[strings::sync_file_name];
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_SetAppIcon, &msg_params, true);
+}
+
+void SetAppIconRequest::CopyToIconStorage(
+ const std::string& path_to_file) const {
+ 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.");
+ 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);
+ return;
+ }
+
+ const std::string icon_storage =
+ application_manager_.get_settings().app_icons_folder();
+ const uint64_t storage_max_size = static_cast<uint64_t>(
+ application_manager_.get_settings().app_icons_folder_max_size());
+ const uint64_t file_size = file_system::FileSize(path_to_file);
+
+ if (storage_max_size < file_size) {
+ LOG4CXX_ERROR(logger_,
+ "Icon size (" << file_size << ") is bigger, than "
+ " icons storage maximum size ("
+ << storage_max_size << ")."
+ "Copying skipped.");
+ return;
+ }
+
+ const uint64_t storage_size =
+ static_cast<uint64_t>(file_system::DirectorySize(icon_storage));
+ 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.");
+ return;
+ }
+
+ while (!IsEnoughSpaceForIcon(file_size)) {
+ RemoveOldestIcons(icon_storage, icons_amount);
+ }
+ }
+ ApplicationConstSharedPtr app =
+ application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Can't get application for connection key: " << connection_key());
+ return;
+ }
+
+ const std::string icon_path = icon_storage + "/" + app->policy_app_id();
+ if (!file_system::CreateFile(icon_path)) {
+ LOG4CXX_ERROR(logger_, "Can't create icon: " << icon_path);
+ return;
+ }
+
+ if (!file_system::Write(icon_path, file_content)) {
+ LOG4CXX_ERROR(logger_, "Can't write icon: " << icon_path);
+ return;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Icon was successfully copied from :" << path_to_file << " to "
+ << icon_path);
+
+ return;
+}
+
+void SetAppIconRequest::RemoveOldestIcons(const std::string& storage,
+ const uint32_t icons_amount) const {
+ const std::vector<std::string> icons_list = file_system::ListFiles(storage);
+ std::map<uint64_t, std::string> icon_modification_time;
+ std::vector<std::string>::const_iterator it = icons_list.begin();
+ for (; it != icons_list.end(); ++it) {
+ const std::string file_name = *it;
+ const std::string file_path = storage + "/" + file_name;
+ if (!file_system::FileExists(file_path)) {
+ continue;
+ }
+ const uint64_t time = file_system::GetFileModificationTime(file_path);
+ icon_modification_time[time] = file_name;
+ }
+
+ for (size_t counter = 0; counter < icons_amount; ++counter) {
+ if (!icon_modification_time.size()) {
+ LOG4CXX_ERROR(logger_, "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);
+ }
+ icon_modification_time.erase(icon_modification_time.begin());
+ LOG4CXX_DEBUG(logger_,
+ "Old icon " << file_path << " was deleted successfully.");
+ }
+}
+
+bool SetAppIconRequest::IsEnoughSpaceForIcon(const uint64_t icon_size) const {
+ const std::string icon_storage =
+ application_manager_.get_settings().app_icons_folder();
+ const uint64_t storage_max_size = static_cast<uint64_t>(
+ application_manager_.get_settings().app_icons_folder_max_size());
+ const uint64_t storage_size =
+ static_cast<uint64_t>(file_system::DirectorySize(icon_storage));
+ return storage_max_size >= (icon_size + storage_size);
+}
+
+void SetAppIconRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetAppIcon: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+ std::string response_info;
+ GetInfo(message, response_info);
+ if (result) {
+ ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+
+ if (!message_.valid() || !app.valid()) {
+ LOG4CXX_ERROR(logger_, "NULL pointer.");
+ return;
+ }
+
+ const std::string& path =
+ (*message_)[strings::msg_params][strings::sync_file_name]
+ [strings::value].asString();
+
+ if (is_icons_saving_enabled_) {
+ CopyToIconStorage(path);
+ }
+
+ app->set_app_icon_path(path);
+
+ LOG4CXX_INFO(logger_,
+ "Icon path was set to '" << app->app_icon_path() << "'");
+ }
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..aa8731f062
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_app_icon_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetAppIconResponse::SetAppIconResponse(
+ 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) {}
+
+SetAppIconResponse::~SetAppIconResponse() {}
+
+void SetAppIconResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..32164b8f0e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc
@@ -0,0 +1,173 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_display_layout_request.h"
+
+#include "application_manager/message_helper.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetDisplayLayoutRequest::SetDisplayLayoutRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {}
+
+void SetDisplayLayoutRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ std::string old_layout = app->display_layout();
+ std::string new_layout = "";
+
+ if (msg_params.keyExists(strings::display_layout)) {
+ new_layout = msg_params[strings::display_layout].asString();
+ }
+
+ if (new_layout != old_layout &&
+ !new_layout.empty()) { // Template switched, allow any color change
+ LOG4CXX_DEBUG(logger_,
+ "SetDisplayLayoutRequest New Layout: " << new_layout);
+ app->set_display_layout(new_layout);
+ } else {
+ LOG4CXX_DEBUG(logger_, "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) &&
+ app->day_color_scheme() != NULL &&
+ !(msg_params[strings::day_color_scheme] ==
+ *(app->day_color_scheme()))) {
+ // Color scheme param exists and has been previously set, do not allow
+ // color change
+ LOG4CXX_DEBUG(logger_, "Reject Day Color Scheme Change");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ if (msg_params.keyExists(strings::night_color_scheme) &&
+ app->night_color_scheme() != NULL &&
+ !(msg_params[strings::night_color_scheme] ==
+ *(app->night_color_scheme()))) {
+ // Color scheme param exists and has been previously set, do not allow
+ // color change
+ LOG4CXX_DEBUG(logger_, "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");
+ 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");
+ app->set_night_color_scheme(msg_params[strings::night_color_scheme]);
+ }
+
+ (*message_)[strings::msg_params][strings::app_id] = app->app_id();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_SetDisplayLayout,
+ &((*message_)[strings::msg_params]),
+ true);
+}
+
+void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetDisplayLayout: {
+ LOG4CXX_INFO(logger_, "Received UI_SetDisplayLayout event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool response_success = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+ std::string info;
+ GetInfo(message, info);
+ smart_objects::SmartObject msg_params = message[strings::msg_params];
+ if (response_success) {
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ // in case templates_available is empty copy from hmi capabilities
+ if (msg_params.keyExists(hmi_response::display_capabilities)) {
+ if (0 ==
+ msg_params[hmi_response::display_capabilities]
+ [hmi_response::templates_available].length()) {
+ msg_params[hmi_response::display_capabilities]
+ [hmi_response::templates_available] =
+ hmi_capabilities.display_capabilities()->getElement(
+ hmi_response::templates_available);
+ }
+ }
+ }
+ SendResponse(response_success,
+ MessageHelper::HMIToMobileResult(result_code),
+ info.empty() ? NULL : info.c_str(),
+ &msg_params);
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4bab4a3e5b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_display_layout_response.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetDisplayLayoutResponse::SetDisplayLayoutResponse(
+ 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) {}
+
+SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {}
+
+void SetDisplayLayoutResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3123787562
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc
@@ -0,0 +1,614 @@
+/*
+ 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 <string.h>
+#include <numeric>
+#include <algorithm>
+#include "sdl_rpc_plugin/commands/mobile/set_global_properties_request.h"
+
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetGlobalPropertiesRequest::SetGlobalPropertiesRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , is_ui_send_(false)
+ , is_tts_send_(false)
+ , is_ui_received_(false)
+ , is_tts_received_(false)
+ , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
+
+SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {}
+
+void SetGlobalPropertiesRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const 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());
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (!ValidateConditionalMandatoryParameters(msg_params)) {
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "There are no parameters present in request.");
+ return;
+ }
+
+ mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::menu_icon)) {
+ verification_result = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::menu_icon],
+ app,
+ application_manager_);
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(
+ logger_, "MessageHelper::VerifyImage return " << verification_result);
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+ // Check for image file(s) in vrHelpItem
+ if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
+ if (mobile_apis::Result::SUCCESS !=
+ MessageHelper::VerifyImageVrHelpItems(
+ (*message_)[strings::msg_params][strings::vr_help],
+ app,
+ application_manager_)) {
+ LOG4CXX_ERROR(logger_, "MessageHelper::VerifyImage return INVALID_DATA!");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ }
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_ERROR(logger_, "White spaces found");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ // if application waits for sending ttsGlobalProperties need to remove this
+ // application from tts_global_properties_app_list_
+ application_manager_.RemoveAppFromTTSGlobalPropertiesList(connection_key());
+ bool is_help_prompt_present = msg_params.keyExists(strings::help_prompt);
+ bool is_timeout_prompt_present =
+ msg_params.keyExists(strings::timeout_prompt);
+ bool is_vr_help_title_present = msg_params.keyExists(strings::vr_help_title);
+ bool is_vr_help_present = msg_params.keyExists(strings::vr_help);
+
+ // 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");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ /* Need to set flags before sending request to HMI
+ * for correct processing this flags in method on_event */
+ if (is_help_prompt_present || is_timeout_prompt_present) {
+ is_tts_send_ = true;
+ }
+ if (is_vr_help_title_present && is_vr_help_present) {
+ LOG4CXX_DEBUG(logger_, "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");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ smart_objects::SmartObject params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ PrepareUIRequestVRHelpData(app, msg_params, params);
+ PrepareUIRequestMenuAndKeyboardData(app, msg_params, params);
+
+ params[strings::app_id] = app->app_id();
+ SendUIRequest(params, true);
+
+ auto& help_prompt_manager = app->help_prompt_manager();
+ help_prompt_manager.OnSetGlobalPropertiesReceived(params, false);
+ } else {
+ LOG4CXX_DEBUG(logger_, "VRHelp params does not present");
+ DCHECK_OR_RETURN_VOID(!is_vr_help_title_present && !is_vr_help_present);
+
+ smart_objects::SmartObject params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ PrepareUIRequestMenuAndKeyboardData(app, msg_params, params);
+
+ // Preparing data
+ if (params.empty()) {
+ LOG4CXX_DEBUG(logger_, "No UI info provided");
+ } else {
+ params[strings::app_id] = app->app_id();
+ SendUIRequest(params, true);
+ }
+ }
+
+ // check TTS params
+ if (is_help_prompt_present || is_timeout_prompt_present) {
+ LOG4CXX_DEBUG(logger_, "TTS params presents");
+ smart_objects::SmartObject 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];
+ 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);
+ invalid_params.push_back("help_prompt");
+ } else {
+ app->set_help_prompt(help_prompt);
+ params[strings::help_prompt] = (*app->help_prompt());
+ }
+ }
+
+ if (is_timeout_prompt_present) {
+ smart_objects::SmartObject& timeout_prompt =
+ (*message_)[strings::msg_params][strings::timeout_prompt];
+ 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);
+ invalid_params.push_back("timeout_prompt");
+ } else {
+ app->set_timeout_prompt(timeout_prompt);
+ params[strings::timeout_prompt] = (*app->timeout_prompt());
+ }
+ }
+
+ if (!invalid_params.empty()) {
+ std::string params_list = std::accumulate(
+ std::begin(invalid_params),
+ std::end(invalid_params),
+ std::string(""),
+ [](std::string& first, std::string& second) {
+ return first.empty() ? second : first + ", " + second;
+ });
+ const std::string info =
+ "One or more files needed for " + params_list + " are not present";
+ SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, info.c_str());
+ return;
+ }
+
+ params[strings::app_id] = app->app_id();
+ SendTTSRequest(params, true);
+
+ auto& help_prompt_manager = app->help_prompt_manager();
+ help_prompt_manager.OnSetGlobalPropertiesReceived(params, false);
+ }
+}
+
+bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
+ const smart_objects::SmartObject& vr_help) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+
+ for (size_t j = 0; j < vr_help_length; ++j) {
+ const size_t position =
+ 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);
+ return false;
+ }
+ }
+ return true;
+}
+
+void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetGlobalProperties: {
+ LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ is_ui_received_ = true;
+ ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, ui_response_info_);
+ if (application.valid()) {
+ auto& help_prompt_manager = application->help_prompt_manager();
+ help_prompt_manager.OnSetGlobalPropertiesReceived(message, true);
+ }
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
+ LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ is_tts_received_ = true;
+ tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, tts_response_info_);
+ if (application.valid()) {
+ auto& help_prompt_manager = application->help_prompt_manager();
+ help_prompt_manager.OnSetGlobalPropertiesReceived(message, true);
+ }
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+
+ if (IsPendingResponseExist()) {
+ LOG4CXX_DEBUG(logger_, "Continue waiting for response");
+ return;
+ }
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ std::string response_info;
+ const bool result = PrepareResponseParameters(result_code, response_info);
+
+ SendResponse(result,
+ result_code,
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+}
+
+bool SetGlobalPropertiesRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+bool SetGlobalPropertiesRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ app_mngr::commands::ResponseInfo ui_properties_info(
+ ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
+
+ app_mngr::commands::ResponseInfo tts_properties_info(
+ tts_result_, HmiInterfaces::HMI_INTERFACE_TTS, application_manager_);
+ const bool result =
+ PrepareResultForMobileResponse(ui_properties_info, tts_properties_info);
+ if (result &&
+ (HmiInterfaces::STATE_AVAILABLE == tts_properties_info.interface_state) &&
+ (tts_properties_info.is_unsupported_resource)) {
+ result_code = mobile_apis::Result::WARNINGS;
+ tts_response_info_ = "Unsupported phoneme type sent in a prompt";
+ info = app_mngr::commands::MergeInfos(tts_properties_info,
+ tts_response_info_,
+ ui_properties_info,
+ ui_response_info_);
+ return result;
+ }
+ result_code =
+ PrepareResultCodeForResponse(ui_properties_info, tts_properties_info);
+ info = app_mngr::commands::MergeInfos(tts_properties_info,
+ tts_response_info_,
+ ui_properties_info,
+ ui_response_info_);
+ return result;
+}
+
+bool SetGlobalPropertiesRequest::ValidateVRHelpTitle(
+ const smart_objects::SmartObject* const vr_help_so_ptr) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (vr_help_so_ptr) {
+ const std::string& vr_help = vr_help_so_ptr->asString();
+ LOG4CXX_TRACE(logger_, "App contains vr_help_title: \"" << vr_help << '"');
+ return !vr_help.empty();
+ }
+ return false;
+}
+
+void SetGlobalPropertiesRequest::PrepareUIRequestVRHelpData(
+ const ApplicationSharedPtr app,
+ const smart_objects::SmartObject& msg_params,
+ smart_objects::SmartObject& out_params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ DCHECK_OR_RETURN_VOID(app);
+
+ app->set_vr_help_title(msg_params.getElement(strings::vr_help_title));
+ app->set_vr_help(msg_params.getElement(strings::vr_help));
+
+ out_params[strings::vr_help_title] = (*app->vr_help_title());
+ out_params[strings::vr_help] = (*app->vr_help());
+}
+
+bool SetGlobalPropertiesRequest::PrepareUIRequestDefaultVRHelpData(
+ const ApplicationSharedPtr app, smart_objects::SmartObject& out_params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ DCHECK_OR_RETURN(app, false);
+
+ LOG4CXX_DEBUG(logger_, "Generate default VRHelp data");
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& cmdMap = accessor.GetData();
+
+ int32_t index = 0;
+ smart_objects::SmartObject vr_help_items;
+ for (CommandsMap::const_iterator command_it = cmdMap.begin();
+ cmdMap.end() != command_it;
+ ++command_it) {
+ const smart_objects::SmartObject& command = *command_it->second;
+ if (!command.keyExists(strings::vr_commands)) {
+ LOG4CXX_ERROR(logger_, "VR synonyms are empty");
+ return false;
+ }
+ // use only first
+ vr_help_items[index][strings::position] = (index + 1);
+ vr_help_items[index++][strings::text] =
+ (*command_it->second)[strings::vr_commands][0];
+ }
+
+ app->set_vr_help_title(smart_objects::SmartObject(app->name()));
+
+ out_params[strings::vr_help_title] = (*app->vr_help_title());
+ if (vr_help_items.length() > 0) {
+ app->set_vr_help(vr_help_items);
+ out_params[strings::vr_help] = (*app->vr_help());
+ }
+ return true;
+}
+
+void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
+ const ApplicationSharedPtr app,
+ const smart_objects::SmartObject& msg_params,
+ smart_objects::SmartObject& out_params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ DCHECK_OR_RETURN_VOID(app);
+
+ const bool is_menu_title_present =
+ msg_params.keyExists(hmi_request::menu_title);
+ const bool is_menu_icon_present =
+ msg_params.keyExists(hmi_request::menu_icon);
+ const bool is_keyboard_props_present =
+ msg_params.keyExists(hmi_request::keyboard_properties);
+
+ if (is_menu_title_present) {
+ out_params[hmi_request::menu_title] =
+ msg_params[hmi_request::menu_title].asString();
+ app->set_menu_title(msg_params[hmi_request::menu_title]);
+ }
+ if (is_menu_icon_present) {
+ out_params[hmi_request::menu_icon] = msg_params[hmi_request::menu_icon];
+ app->set_menu_icon(msg_params[hmi_request::menu_icon]);
+ }
+ if (is_keyboard_props_present) {
+ out_params[hmi_request::keyboard_properties] =
+ msg_params[hmi_request::keyboard_properties];
+ app->set_keyboard_props(msg_params[hmi_request::keyboard_properties]);
+ }
+}
+
+void SetGlobalPropertiesRequest::SendTTSRequest(
+ const smart_objects::SmartObject& params, bool use_events) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ is_tts_send_ = true;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties, &params, use_events);
+}
+
+void SetGlobalPropertiesRequest::SendUIRequest(
+ const smart_objects::SmartObject& params, bool use_events) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ is_ui_send_ = true;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_SetGlobalProperties, &params, use_events);
+}
+
+bool SetGlobalPropertiesRequest::IsPendingResponseExist() {
+ return is_ui_send_ != is_ui_received_ || is_tts_send_ != is_tts_received_;
+}
+
+bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
+ const smart_objects::SmartObject& params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return params.keyExists(strings::help_prompt) ||
+ params.keyExists(strings::timeout_prompt) ||
+ params.keyExists(strings::vr_help_title) ||
+ params.keyExists(strings::vr_help) ||
+ params.keyExists(strings::menu_title) ||
+ params.keyExists(strings::menu_icon) ||
+ params.keyExists(strings::keyboard_properties);
+}
+
+bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str;
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+
+ if (msg_params.keyExists(strings::help_prompt)) {
+ const smart_objects::SmartArray* hp_array =
+ msg_params[strings::help_prompt].asArray();
+
+ smart_objects::SmartArray::const_iterator it_hp = hp_array->begin();
+ smart_objects::SmartArray::const_iterator it_hp_end = hp_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if (msg_params.keyExists(strings::timeout_prompt)) {
+ const smart_objects::SmartArray* tp_array =
+ msg_params[strings::timeout_prompt].asArray();
+
+ smart_objects::SmartArray::const_iterator it_tp = tp_array->begin();
+ smart_objects::SmartArray::const_iterator it_tp_end = tp_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if (msg_params.keyExists(strings::vr_help)) {
+ const smart_objects::SmartArray* vh_array =
+ msg_params[strings::vr_help].asArray();
+
+ smart_objects::SmartArray::const_iterator it_vh = vh_array->begin();
+ smart_objects::SmartArray::const_iterator it_vh_end = vh_array->end();
+
+ 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");
+ 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");
+ return true;
+ }
+ } // if image exists
+ } // for - vh_array iteration
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ if (msg_params.keyExists(strings::keyboard_properties)) {
+ if (msg_params[strings::keyboard_properties].keyExists(
+ strings::limited_character_list)) {
+ const smart_objects::SmartArray* lcl_array =
+ msg_params[strings::keyboard_properties]
+ [strings::limited_character_list].asArray();
+
+ smart_objects::SmartArray::const_iterator it_lcl = lcl_array->begin();
+ smart_objects::SmartArray::const_iterator it_lcl_end = lcl_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+
+ if (msg_params[strings::keyboard_properties].keyExists(
+ strings::auto_complete_text)) {
+ str =
+ msg_params[strings::keyboard_properties][strings::auto_complete_text]
+ .asCharArray();
+
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid keyboard_properties "
+ "auto_complete_text syntax check failed");
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..567a1a088b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_global_properties_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetGlobalPropertiesResponse::SetGlobalPropertiesResponse(
+ 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) {}
+
+SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {}
+
+void SetGlobalPropertiesResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_request.cc
new file mode 100644
index 0000000000..54c202f7b0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_request.cc
@@ -0,0 +1,149 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_icon_request.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/application_impl.h"
+#include "config_profile/profile.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/file_system.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetIconRequest::SetIconRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SetIconRequest::~SetIconRequest() {}
+
+void SetIconRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const std::string& sync_file_name =
+ (*message_)[strings::msg_params][strings::sync_file_name].asString();
+
+ std::string full_file_path =
+ application_manager_.get_settings().app_storage_folder() + "/";
+ full_file_path += app->folder_name();
+ full_file_path += "/";
+ full_file_path += sync_file_name;
+
+ if (!file_system::FileExists(full_file_path)) {
+ LOG4CXX_ERROR(logger_, "No such file " << full_file_path);
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::sync_file_name] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ // Panasonic requres unchanged path value without encoded special characters
+ const std::string full_file_path_for_hmi =
+ file_system::ConvertPathForURL(full_file_path);
+
+ msg_params[strings::sync_file_name][strings::value] = full_file_path_for_hmi;
+
+ // TODO(VS): research why is image_type hardcoded
+ msg_params[strings::sync_file_name][strings::image_type] =
+ static_cast<int32_t>(SetIconRequest::ImageType::DYNAMIC);
+
+ // for further use in on_event function
+ (*message_)[strings::msg_params][strings::sync_file_name] =
+ msg_params[strings::sync_file_name];
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_SetAppIcon, &msg_params, true);
+}
+
+void SetIconRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetAppIcon: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ mobile_apis::Result::eType result_code =
+ static_cast<mobile_apis::Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+
+ bool result = mobile_apis::Result::SUCCESS == result_code;
+
+ if (result) {
+ ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+
+ const std::string path =
+ (*message_)[strings::msg_params][strings::sync_file_name]
+ [strings::value].asString();
+ app->set_app_icon_path(path);
+
+ LOG4CXX_INFO(logger_,
+ "Icon path was set to '" << app->app_icon_path() << "'");
+ }
+
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_response.cc
new file mode 100644
index 0000000000..514c6ad6d4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_icon_response.cc
@@ -0,0 +1,62 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_icon_response.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetIconResponse::SetIconResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& app_man,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(
+ message, app_man, rpc_service, hmi_capabilities, policy_handler) {}
+
+SetIconResponse::~SetIconResponse() {}
+
+void SetIconResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..55bd164368
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc
@@ -0,0 +1,166 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h"
+
+#include "application_manager/message_helper.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetMediaClockRequest::SetMediaClockRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SetMediaClockRequest::~SetMediaClockRequest() {}
+
+void SetMediaClockRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ return;
+ }
+
+ if (!app->is_media_application()) {
+ LOG4CXX_ERROR(logger_, "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];
+ msg_params[strings::app_id] = app->app_id();
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_SetMediaClockTimer, &msg_params, true);
+ } else {
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ }
+}
+
+void SetMediaClockRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+ std::string response_info;
+ GetInfo(message, response_info);
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+bool SetMediaClockRequest::isDataValid() {
+ smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
+ mobile_apis::UpdateMode::eType update_mode =
+ static_cast<mobile_apis::UpdateMode::eType>(
+ msg_params[strings::update_mode].asUInt());
+
+ 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");
+ return false;
+ }
+
+ if (msg_params.keyExists(strings::end_time)) {
+ unsigned int start_time_in_seconds = 0;
+ start_time_in_seconds =
+ (msg_params[strings::start_time][strings::hours].asUInt()) * 3600;
+ start_time_in_seconds +=
+ (msg_params[strings::start_time][strings::minutes].asUInt()) * 60;
+ start_time_in_seconds +=
+ (msg_params[strings::start_time][strings::seconds].asUInt());
+
+ unsigned int end_time_in_seconds = 0;
+ end_time_in_seconds =
+ (msg_params[strings::end_time][strings::hours].asUInt()) * 3600;
+ end_time_in_seconds +=
+ (msg_params[strings::end_time][strings::minutes].asUInt()) * 60;
+ end_time_in_seconds +=
+ (msg_params[strings::end_time][strings::seconds].asUInt());
+
+ if (((end_time_in_seconds > start_time_in_seconds) &&
+ (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");
+ return false;
+ }
+ }
+ }
+
+ LOG4CXX_INFO(logger_, "Data is valid");
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e777533ce4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SetMediaClockTimerResponse::SetMediaClockTimerResponse(
+ 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) {}
+
+SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {}
+
+void SetMediaClockTimerResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..c2eb067e18
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
@@ -0,0 +1,292 @@
+/*
+
+ 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 <cstring>
+#include "sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h"
+
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ShowConstantTBTRequest::ShowConstantTBTRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ShowConstantTBTRequest::~ShowConstantTBTRequest() {}
+
+void ShowConstantTBTRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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");
+ return;
+ }
+ // SDLAQ-CRS-664, VC3.1
+ if ((*message_)[strings::msg_params].empty()) {
+ LOG4CXX_ERROR(logger_, "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];
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_ERROR(logger_,
+ "Incoming show constant TBT has contains \t\n \\t \\n");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ // ProcessSoftButtons checks strings on the contents incorrect character
+
+ mobile_apis::Result::eType processing_result =
+ MessageHelper::ProcessSoftButtons(
+ msg_params, app, policy_handler_, application_manager_);
+
+ if (mobile_apis::Result::SUCCESS != processing_result) {
+ LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SendResponse(false, processing_result);
+ return;
+ }
+
+ mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
+ if (msg_params.keyExists(strings::turn_icon)) {
+ verification_result = MessageHelper::VerifyImage(
+ msg_params[strings::turn_icon], app, application_manager_);
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+
+ if (msg_params.keyExists(strings::next_turn_icon)) {
+ verification_result = MessageHelper::VerifyImage(
+ msg_params[strings::next_turn_icon], app, application_manager_);
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+
+ msg_params[strings::app_id] = app->app_id();
+
+ msg_params[hmi_request::navi_texts] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ int32_t index = 0;
+ if (msg_params.keyExists(strings::navigation_text_1)) {
+ // erase useless parametr
+ msg_params.erase(strings::navigation_text_1);
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::navigationText1);
+ msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::navigation_text_1];
+ }
+
+ if (msg_params.keyExists(strings::navigation_text_2)) {
+ // erase useless param
+ msg_params.erase(strings::navigation_text_2);
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::navigationText2);
+ msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::navigation_text_2];
+ }
+
+ if (msg_params.keyExists(strings::eta)) {
+ // erase useless param
+ msg_params.erase(strings::eta);
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::ETA);
+ msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::eta];
+ }
+
+ if (msg_params.keyExists(strings::total_distance)) {
+ // erase useless param
+ msg_params.erase(strings::total_distance);
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::totalDistance);
+ msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::total_distance];
+ }
+
+ if (msg_params.keyExists(strings::time_to_destination)) {
+ // erase useless param
+ msg_params.erase(strings::time_to_destination);
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::timeToDestination);
+ msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::time_to_destination];
+ }
+
+ if (msg_params.keyExists(strings::soft_buttons)) {
+ MessageHelper::SubscribeApplicationToSoftButton(
+ msg_params, app, function_id());
+ }
+
+ app->set_tbt_show_command(msg_params);
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_ShowConstantTBT, &msg_params, true);
+}
+
+void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ const Common_Result::eType result_code =
+ static_cast<Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::next_turn_icon)) {
+ str = (*message_)[strings::msg_params][strings::next_turn_icon]
+ [strings::value].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid next_turn_icon value syntax check failed");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::navigation_text_1)) {
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::navigation_text_2)) {
+ 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");
+ return true;
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::total_distance)) {
+ str =
+ (*message_)[strings::msg_params][strings::total_distance].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid total_distance value syntax check failed");
+ return true;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::time_to_destination)) {
+ 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");
+ return true;
+ }
+ }
+ return false;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..239040a3b3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
@@ -0,0 +1,66 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ShowConstantTBTResponse::ShowConstantTBTResponse(
+ 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) {}
+
+ShowConstantTBTResponse::~ShowConstantTBTResponse() {}
+
+void ShowConstantTBTResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..80a28b288c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
@@ -0,0 +1,413 @@
+/*
+
+ 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 <string.h>
+#include "sdl_rpc_plugin/commands/mobile/show_request.h"
+
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/application.h"
+#include "application_manager/message_helper.h"
+#include "utils/file_system.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ShowRequest::ShowRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , core_result_code_(mobile_apis::Result::INVALID_ENUM) {}
+
+ShowRequest::~ShowRequest() {}
+
+void ShowRequest::HandleMetadata(const char* field_id,
+ int32_t field_index,
+ smart_objects::SmartObject& msg_params) {
+ smart_objects::SmartObject& metadata_tags =
+ (*message_)[strings::msg_params][strings::metadata_tags];
+
+ if (metadata_tags.keyExists(field_id)) {
+ if (field_index != -1) {
+ msg_params[hmi_request::show_strings][field_index]
+ [hmi_request::field_types] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ const size_t num_tags = metadata_tags[field_id].length();
+ for (size_t i = 0; i < num_tags; ++i) {
+ const int32_t current_tag = metadata_tags[field_id][i].asInt();
+ msg_params[hmi_request::show_strings][field_index]
+ [hmi_request::field_types][i] = current_tag;
+ }
+ } else {
+ LOG4CXX_INFO(logger_,
+ "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;
+ core_response_info_ =
+ "Metadata tag was provided for a field with no data.";
+ }
+ }
+ } else {
+ LOG4CXX_INFO(logger_,
+ "No metadata tagging provided for field: " << field_id);
+ }
+}
+
+void ShowRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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.");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ if (!CheckStringsOfShowRequest()) {
+ LOG4CXX_ERROR(logger_, "Incorrect characters in string");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ // ProcessSoftButtons checks strings on the contents incorrect character
+
+ mobile_apis::Result::eType processing_result = mobile_apis::Result::SUCCESS;
+ if (((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
+ ((*message_)[strings::msg_params][strings::soft_buttons].length() > 0)) {
+ processing_result =
+ MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
+ app,
+ policy_handler_,
+ application_manager_);
+ }
+
+ if (mobile_apis::Result::SUCCESS != processing_result) {
+ LOG4CXX_ERROR(logger_, "Processing of soft buttons failed.");
+ SendResponse(false, processing_result);
+ return;
+ }
+
+ mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
+ if (((*message_)[strings::msg_params].keyExists(strings::graphic)) &&
+ ((*message_)[strings::msg_params][strings::graphic][strings::value]
+ .asString()).length()) {
+ verification_result = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::graphic],
+ app,
+ application_manager_);
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
+ verification_result = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::secondary_graphic],
+ app,
+ application_manager_);
+ if (mobile_apis::Result::SUCCESS != verification_result) {
+ LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SendResponse(false, verification_result);
+ return;
+ }
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = app->app_id();
+
+ msg_params[hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ int32_t index = 0;
+ int32_t main_field_1_index = -1;
+ if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField1);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::main_field_1];
+ main_field_1_index = index;
+ ++index;
+ }
+
+ int32_t main_field_2_index = -1;
+ if ((*message_)[strings::msg_params].keyExists(strings::main_field_2)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField2);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::main_field_2];
+ main_field_2_index = index;
+ ++index;
+ }
+
+ int32_t main_field_3_index = -1;
+ if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField3);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::main_field_3];
+ main_field_3_index = index;
+ ++index;
+ }
+
+ int32_t main_field_4_index = -1;
+ if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField4);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::main_field_4];
+ main_field_4_index = index;
+ ++index;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::metadata_tags)) {
+ HandleMetadata(strings::main_field_1, main_field_1_index, msg_params);
+ HandleMetadata(strings::main_field_2, main_field_2_index, msg_params);
+ HandleMetadata(strings::main_field_3, main_field_3_index, msg_params);
+ HandleMetadata(strings::main_field_4, main_field_4_index, msg_params);
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::mediaClock);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::media_clock];
+ ++index;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::media_track)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::mediaTrack);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::media_track];
+ ++index;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::statusBar);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::status_bar];
+ ++index;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::alignment)) {
+ msg_params[strings::alignment] =
+ (*message_)[strings::msg_params][strings::alignment];
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::graphic)) {
+ msg_params[strings::graphic] =
+ (*message_)[strings::msg_params][strings::graphic];
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
+ msg_params[strings::secondary_graphic] =
+ (*message_)[strings::msg_params][strings::secondary_graphic];
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ msg_params[strings::soft_buttons] =
+ (*message_)[strings::msg_params][strings::soft_buttons];
+ if ((*message_)[strings::msg_params][strings::soft_buttons].length() == 0) {
+ app->UnsubscribeFromSoftButtons(function_id());
+ } else {
+ MessageHelper::SubscribeApplicationToSoftButton(
+ (*message_)[strings::msg_params], app, function_id());
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::custom_presets)) {
+ msg_params[strings::custom_presets] =
+ (*message_)[strings::msg_params][strings::custom_presets];
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_Show, &msg_params, true);
+
+ app_mngr::commands::MessageSharedPtr persistentData =
+ new smart_objects::SmartObject(msg_params);
+ app->set_show_command(*persistentData);
+}
+
+void ShowRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_Show: {
+ LOG4CXX_DEBUG(logger_, "Received UI_Show event.");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ std::string response_info;
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+ GetInfo(message, response_info);
+ if (hmi_apis::Common_Result::WARNINGS == result_code &&
+ message[strings::params].keyExists(hmi_response::message)) {
+ response_info =
+ message[strings::params][hmi_response::message].asString();
+ }
+ mobile_apis::Result::eType converted_result_code =
+ MessageHelper::HMIToMobileResult(result_code);
+ if (mobile_apis::Result::SUCCESS == converted_result_code &&
+ mobile_apis::Result::INVALID_ENUM != core_result_code_) {
+ converted_result_code = core_result_code_;
+ response_info = core_response_info_;
+ }
+ SendResponse(result,
+ converted_result_code,
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event " << event.id());
+ break;
+ }
+ }
+}
+
+bool ShowRequest::CheckStringsOfShowRequest() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ 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");
+ 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");
+ 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");
+ 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");
+ 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");
+ 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");
+ return false;
+ }
+ }
+ if ((*message_)[strings::msg_params].keyExists(strings::custom_presets)) {
+ smart_objects::SmartObject& custom_presets_array =
+ (*message_)[strings::msg_params][strings::custom_presets];
+ 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");
+ return false;
+ }
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::graphic)) {
+ str = (*message_)[strings::msg_params][strings::graphic][strings::value]
+ .asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid graphic value syntax check failed");
+ return false;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
+ str = (*message_)[strings::msg_params][strings::secondary_graphic]
+ [strings::value].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_,
+ "Invalid secondary_graphic value syntax check failed");
+ return false;
+ }
+ }
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4e167e7531
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc
@@ -0,0 +1,66 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/show_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ShowResponse::ShowResponse(
+ 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) {}
+
+ShowResponse::~ShowResponse() {}
+
+void ShowResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..08b4775d3f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc
@@ -0,0 +1,207 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/slider_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "utils/helpers.h"
+#include "config_profile/profile.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SliderRequest::SliderRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {
+ subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
+}
+
+SliderRequest::~SliderRequest() {}
+
+bool SliderRequest::Init() {
+ /* Timeout in milliseconds.
+ If omitted a standard value of 10000 milliseconds is used.*/
+ if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
+ default_timeout_ =
+ application_manager_.get_settings().default_timeout() +
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
+ }
+
+ return true;
+}
+
+void SliderRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application = application_manager_.application(
+ (*message_)[strings::params][strings::connection_key].asUInt());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::slider_footer)) {
+ 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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ }
+ }
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_ERROR(logger_, "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];
+ msg_params[strings::app_id] = application->app_id();
+
+ if (!(*message_)[strings::msg_params].keyExists(strings::timeout)) {
+ msg_params[strings::timeout] = default_timeout_;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_Slider, &msg_params, true);
+}
+
+void SliderRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+ using namespace smart_objects;
+ using namespace hmi_apis;
+
+ const SmartObject& message = event.smart_object();
+
+ const event_engine::Event::EventID event_id = event.id();
+ if (event_id == FunctionID::UI_OnResetTimeout) {
+ LOG4CXX_INFO(logger_, "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());
+ return;
+ }
+
+ LOG4CXX_DEBUG(logger_, "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());
+
+ SmartObject response_msg_params = message[strings::msg_params];
+
+ const bool is_timeout_aborted = Compare<Common_Result::eType, EQ, ONE>(
+ response_code, Common_Result::TIMED_OUT, Common_Result::ABORTED);
+
+ if (is_timeout_aborted) {
+ if (message[strings::params][strings::data].keyExists(
+ strings::slider_position)) {
+ // Copy slider_position info to msg_params section
+ response_msg_params[strings::slider_position] =
+ message[strings::params][strings::data][strings::slider_position];
+ } else {
+ LOG4CXX_ERROR(logger_,
+ strings::slider_position << " field is absent"
+ " in response.");
+ response_msg_params[strings::slider_position] = 0;
+ }
+ }
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool is_response_success = PrepareResultForMobileResponse(
+ response_code, HmiInterfaces::HMI_INTERFACE_UI);
+
+ SendResponse(is_response_success,
+ MessageHelper::HMIToMobileResult(response_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &response_msg_params);
+}
+
+bool SliderRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ str = (*message_)[strings::msg_params][strings::slider_header].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid slider_header value syntax check failed");
+ return true;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::slider_footer)) {
+ const smart_objects::SmartArray* sf_array =
+ (*message_)[strings::msg_params][strings::slider_footer].asArray();
+
+ smart_objects::SmartArray::const_iterator it_sf = sf_array->begin();
+ smart_objects::SmartArray::const_iterator it_sf_end = sf_array->end();
+
+ for (; it_sf != it_sf_end; ++it_sf) {
+ str = (*it_sf).asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid slider_footer syntax check failed");
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4d6e714e88
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/slider_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SliderResponse::SliderResponse(
+ 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) {}
+
+SliderResponse::~SliderResponse() {}
+
+void SliderResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e14321c488
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc
@@ -0,0 +1,184 @@
+/*
+
+ 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 <string.h>
+#include "sdl_rpc_plugin/commands/mobile/speak_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SpeakRequest::SpeakRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {
+ subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+}
+
+SpeakRequest::~SpeakRequest() {}
+
+void SpeakRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ 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) {
+ LOG4CXX_ERROR(logger_,
+ "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;
+ }
+
+ (*message_)[strings::msg_params][strings::app_id] = app->app_id();
+ (*message_)[strings::msg_params][hmi_request::speak_type] =
+ hmi_apis::Common_MethodName::SPEAK;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(hmi_apis::FunctionID::TTS_Speak,
+ &message_->getElement(strings::msg_params),
+ true);
+}
+
+void SpeakRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ switch (event.id()) {
+ case hmi_apis::FunctionID::TTS_Speak: {
+ LOG4CXX_INFO(logger_, "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");
+
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+void SpeakRequest::ProcessTTSSpeakResponse(
+ const smart_objects::SmartObject& message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ hmi_apis::Common_Result::eType hmi_result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+
+ mobile_apis::Result::eType result_code =
+ MessageHelper::HMIToMobileResult(hmi_result_code);
+
+ const bool result = PrepareResultForMobileResponse(
+ hmi_result_code, HmiInterfaces::HMI_INTERFACE_TTS);
+
+ (*message_)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::SpeakID;
+
+ const char* return_info = NULL;
+
+ SendResponse(
+ result, result_code, return_info, &(message[strings::msg_params]));
+}
+
+bool SpeakRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
+ const smart_objects::SmartArray* tc_array =
+ (*message_)[strings::msg_params][strings::tts_chunks].asArray();
+
+ smart_objects::SmartArray::const_iterator it_tc = tc_array->begin();
+ smart_objects::SmartArray::const_iterator it_tc_end = tc_array->end();
+
+ 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");
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f57bd91cd5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc
@@ -0,0 +1,66 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/speak_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SpeakResponse::SpeakResponse(
+ 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) {}
+
+SpeakResponse::~SpeakResponse() {}
+
+void SpeakResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..908a251962
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
@@ -0,0 +1,132 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/subscribe_button_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace str = strings;
+
+SubscribeButtonRequest::SubscribeButtonRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SubscribeButtonRequest::~SubscribeButtonRequest() {}
+
+void SubscribeButtonRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const mobile_apis::ButtonName::eType btn_id =
+ static_cast<mobile_apis::ButtonName::eType>(
+ (*message_)[str::msg_params][str::button_name].asInt());
+
+ if (!IsSubscriptionAllowed(app, btn_id)) {
+ LOG4CXX_ERROR(logger_,
+ "Subscribe on button " << btn_id << " isn't allowed");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ if (!CheckHMICapabilities(btn_id)) {
+ LOG4CXX_ERROR(logger_,
+ "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);
+ SendResponse(false, mobile_apis::Result::IGNORED);
+ return;
+ }
+
+ app->SubscribeToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id));
+ SendSubscribeButtonNotification();
+
+ const bool is_succedeed = true;
+ SendResponse(is_succedeed, mobile_apis::Result::SUCCESS);
+}
+
+bool SubscribeButtonRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+bool SubscribeButtonRequest::IsSubscriptionAllowed(
+ ApplicationSharedPtr app, mobile_apis::ButtonName::eType btn_id) {
+ if (!app->is_media_application() &&
+ ((mobile_apis::ButtonName::SEEKLEFT == btn_id) ||
+ (mobile_apis::ButtonName::SEEKRIGHT == btn_id) ||
+ (mobile_apis::ButtonName::TUNEUP == btn_id) ||
+ (mobile_apis::ButtonName::TUNEDOWN == btn_id))) {
+ return false;
+ }
+ return true;
+}
+
+void SubscribeButtonRequest::SendSubscribeButtonNotification() {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+
+ // send OnButtonSubscription notification
+ SmartObject msg_params = SmartObject(SmartType_Map);
+ msg_params[strings::app_id] = connection_key();
+ msg_params[strings::name] = static_cast<Common_ButtonName::eType>(
+ (*message_)[strings::msg_params][strings::button_name].asUInt());
+ msg_params[strings::is_suscribed] = true;
+ CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..1350cfb66e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc
@@ -0,0 +1,73 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/subscribe_button_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SubscribeButtonResponse::SubscribeButtonResponse(
+ 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) {}
+
+SubscribeButtonResponse::~SubscribeButtonResponse() {}
+
+void SubscribeButtonResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // 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");
+ SendResponse(false);
+ return;
+ }
+ }
+
+ // TODO(DK): Some logic
+ SendResponse(true);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..eb4ca42568
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc
@@ -0,0 +1,123 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "sdl_rpc_plugin/commands/mobile/subscribe_way_points_request.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SubscribeWayPointsRequest::SubscribeWayPointsRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {}
+
+void SubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (application_manager_.IsAppSubscribedForWayPoints(app)) {
+ SendResponse(false, mobile_apis::Result::IGNORED);
+ return;
+ }
+
+ if (application_manager_.IsAnyAppSubscribedForWayPoints()) {
+ application_manager_.SubscribeAppForWayPoints(app);
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+ return;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_SubscribeWayPoints, NULL, true);
+}
+
+void SubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ const hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
+ if (result) {
+ application_manager_.SubscribeAppForWayPoints(app);
+ }
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+bool SubscribeWayPointsRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7d051df7e9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc
@@ -0,0 +1,64 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "sdl_rpc_plugin/commands/mobile/subscribe_way_points_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SubscribeWayPointsResponse::SubscribeWayPointsResponse(
+ 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) {}
+
+SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {}
+
+void SubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..62eb2d59c5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
@@ -0,0 +1,700 @@
+/*
+
+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 "sdl_rpc_plugin/commands/mobile/system_request.h"
+
+#include <vector>
+#include <string>
+#include <stdio.h>
+#include <algorithm>
+#include <sstream>
+#include "application_manager/policies/policy_handler_interface.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/file_system.h"
+#include "policy/policy_table/enums.h"
+#include "formatters/CFormatterJsonBase.h"
+#include "json/json.h"
+#include "utils/helpers.h"
+#include "utils/custom_string.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+CREATE_LOGGERPTR_LOCAL(logger_, "ApplicationManager")
+namespace {
+
+#ifdef ENABLE_LOG
+const char* kQueryAppsValidationFailedPrefix =
+ ":QUERY_APPS_VALIDATION_FAILED: ";
+#endif
+
+const unsigned int kVrSynonymLengthMax = 40U;
+const unsigned int kVrSynonymLengthMin = 1U;
+const unsigned int kTtsNameLengthMax = 500U;
+const unsigned int kVrArraySizeMax = 100U;
+const unsigned int kVrArraySizeMin = 1U;
+const unsigned int kUrlSchemaLengthMax = 255U;
+const unsigned int kPackageNameLengthMax = 255U;
+const unsigned int kAppIdLengthMax = 40U;
+const unsigned int kAppNameLengthMax = 100U;
+const unsigned int kLanguageArraySizeMax = 100U;
+
+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_);
+ if (!data_.isValid()) {
+ LOG4CXX_ERROR(logger_,
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not valid.");
+ return false;
+ }
+ if (!HasResponseKey()) {
+ return false;
+ }
+ return ValidateAppDataAndOsAndLanguagesData();
+ }
+
+ private:
+ bool HasResponseKey() const {
+ if (!data_.keyExists(json::response)) {
+ LOG4CXX_WARN(logger_,
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response does not contain '"
+ << json::response << "' parameter.");
+ return false;
+ }
+ return true;
+ }
+
+ bool ValidateAppDataAndOsAndLanguagesData() {
+ smart_objects::SmartArray* objects_array = data_[json::response].asArray();
+
+ if (!objects_array) {
+ LOG4CXX_WARN(logger_,
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not array.");
+ return false;
+ }
+
+ SynonymsMap synonyms_map;
+ bool has_response_valid_application = false;
+
+ smart_objects::SmartArray::iterator applications_iterator =
+ objects_array->begin();
+
+ for (; applications_iterator != objects_array->end();) {
+ const smart_objects::SmartObject& app_data = *applications_iterator;
+
+ if (!app_data.isValid()) {
+ LOG4CXX_WARN(logger_,
+ 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.");
+
+ applications_iterator = objects_array->erase(applications_iterator);
+ continue;
+ }
+
+ if (!ValidateAppIdAndAppName(app_data)) {
+ return false;
+ }
+
+ // If we dont have any of android/ios field
+ // we skip this json in CheckMandatoryParametersPresent
+ const std::string os_type =
+ (app_data.keyExists(json::android)) ? json::android : json::ios;
+
+ // Verify os and dependent languages data
+ if (json::ios == os_type) {
+ if (app_data[json::ios][json::urlScheme].asString().length() >
+ kUrlSchemaLengthMax) {
+ LOG4CXX_WARN(
+ logger_,
+ kQueryAppsValidationFailedPrefix
+ << "An urlscheme length exceeds maximum allowed ["
+ << app_data[json::ios][json::urlScheme].asString().length()
+ << "]>[" << kUrlSchemaLengthMax << "]");
+ return false;
+ }
+ }
+
+ 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.");
+ return false;
+ }
+ }
+
+ // Languages verification
+ if (!app_data[os_type].keyExists(json::languages)) {
+ LOG4CXX_WARN(logger_,
+ kQueryAppsValidationFailedPrefix
+ << "'languages' doesn't exist");
+ return false;
+ }
+ if (!ValidateLanguages(app_data[os_type][json::languages],
+ synonyms_map)) {
+ return false;
+ }
+ has_response_valid_application = true;
+ ++applications_iterator;
+ }
+ return has_response_valid_application;
+ }
+
+ bool ValidateAppIdAndAppName(const smart_objects::SmartObject& app_data) {
+ // 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 << "]");
+ 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 << "]");
+ return false;
+ }
+ applications_id_set_.insert(app_id);
+
+ // Verify that app is not registered yet
+ 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.");
+ }
+ // 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
+ << "].");
+ return false;
+ }
+ return true;
+ }
+
+ bool ValidateLanguages(const smart_objects::SmartObject& languages,
+ SynonymsMap& synonyms_map) const {
+ 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
+ << "]");
+ 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.");
+ return false;
+ }
+ if (language.length() != 1) {
+ LOG4CXX_WARN(logger_,
+ 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");
+ return false;
+ }
+ // Verify default language defined
+ if (!(language_name).compare(json::default_)) {
+ default_language_found = true;
+ }
+ // Add set for synonyms' duplicates validation
+ if (synonyms_map.find(language_name) == synonyms_map.end()) {
+ synonyms_map[language_name] = SynonymsSet();
+ }
+ // ttsName verification
+ if (!language[language_name].keyExists(json::ttsName)) {
+ LOG4CXX_WARN(logger_,
+ kQueryAppsValidationFailedPrefix
+ << "'languages.ttsName' doesn't exist");
+ return false;
+ }
+ const smart_objects::SmartObject& ttsNameObject =
+ language[language_name][json::ttsName];
+ // ttsName is string
+ if (smart_objects::SmartType_String == ttsNameObject.getType()) {
+ 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
+ << "]");
+ return false;
+ }
+ } else {
+ LOG4CXX_WARN(logger_,
+ kQueryAppsValidationFailedPrefix
+ << "ttsName is not the string type.");
+ return false;
+ }
+
+ if (!ValidateSynonymsAtLanguage(language, language_name, synonyms_map)) {
+ return false;
+ }
+ }
+ 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
+ << "]");
+ 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;
+ }
+
+ smart_objects::SmartObject& data_;
+ std::set<std::string> applications_id_set_;
+ const ApplicationManager& manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(QueryAppsDataValidator);
+};
+}
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+uint32_t SystemRequest::index = 0;
+
+const std::string kSYNC = "SYNC";
+const std::string kIVSU = "IVSU";
+
+SystemRequest::SystemRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SystemRequest::~SystemRequest() {}
+
+void SystemRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!(application.valid())) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const mobile_apis::RequestType::eType request_type =
+ static_cast<mobile_apis::RequestType::eType>(
+ (*message_)[strings::msg_params][strings::request_type].asInt());
+
+ const policy::PolicyHandlerInterface& policy_handler = policy_handler_;
+
+ const std::string stringified_request_type =
+ rpc::policy_table_interface_base::EnumToJsonString(
+ static_cast<rpc::policy_table_interface_base::RequestType>(
+ request_type));
+
+ if (!policy_handler.IsRequestTypeAllowed(application->policy_app_id(),
+ request_type)) {
+ LOG4CXX_ERROR(logger_,
+ "RequestType " << stringified_request_type
+ << " is DISALLOWED by policies");
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ return;
+ }
+ LOG4CXX_TRACE(logger_,
+ "RequestType " << stringified_request_type << " is ALLOWED");
+
+ const bool request_subtype_present =
+ (*message_)[strings::msg_params].keyExists(strings::request_subtype);
+ if (request_subtype_present) {
+ const std::string request_subtype =
+ (*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
+ << " is DISALLOWED by policies");
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ return;
+ }
+ LOG4CXX_TRACE(logger_,
+ "Request subtype: " << request_subtype << " is ALLOWED");
+ }
+
+ std::string file_name = kSYNC;
+ if ((*message_)[strings::msg_params].keyExists(strings::file_name)) {
+ file_name = (*message_)[strings::msg_params][strings::file_name].asString();
+ } else {
+ file_name = kSYNC;
+ }
+
+ if (!CheckSyntax(file_name)) {
+ LOG4CXX_ERROR(logger_,
+ "Incoming request contains \t\n \\t \\n or whitespace");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ if (!file_system::IsFileNameValid(file_name)) {
+ const std::string err_msg = "Sync file name contains forbidden symbols.";
+ LOG4CXX_ERROR(logger_, err_msg);
+ SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
+ return;
+ }
+
+ const bool is_system_file = std::string::npos != file_name.find(kSYNC) ||
+ std::string::npos != file_name.find(kIVSU);
+
+ // to avoid override existing file
+ if (is_system_file) {
+ const uint8_t max_size = 255;
+ char buf[max_size] = {'\0'};
+ snprintf(buf, max_size - 1, "%d%s", index++, file_name.c_str());
+ file_name = buf;
+ }
+
+ std::vector<uint8_t> binary_data;
+ std::string binary_data_folder;
+ if ((*message_)[strings::params].keyExists(strings::binary_data)) {
+ binary_data = (*message_)[strings::params][strings::binary_data].asBinary();
+ binary_data_folder =
+ application_manager_.get_settings().system_files_path();
+ } else {
+ binary_data_folder =
+ application_manager_.get_settings().app_storage_folder();
+ binary_data_folder += "/";
+ binary_data_folder += application->folder_name();
+ binary_data_folder += "/";
+ }
+
+ std::string file_dst_path =
+ application_manager_.get_settings().system_files_path();
+ file_dst_path += "/";
+ file_dst_path += file_name;
+
+ if ((*message_)[strings::params].keyExists(strings::binary_data)) {
+ LOG4CXX_DEBUG(
+ logger_,
+ "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.");
+ SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
+ return;
+ }
+ } else {
+ 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);
+
+ 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.");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+ processing_file_ = file_dst_path;
+ }
+
+ LOG4CXX_DEBUG(logger_, "Binary data ok.");
+
+ if (mobile_apis::RequestType::HTTP == request_type &&
+ (*message_)[strings::msg_params].keyExists(strings::file_name)) {
+ const std::string& file =
+ (*message_)[strings::msg_params][strings::file_name].asString();
+ policy_handler_.ReceiveMessageFromSDK(file, binary_data);
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+ return;
+ } else if (mobile_apis::RequestType::QUERY_APPS == request_type) {
+ using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
+
+ smart_objects::SmartObject sm_object;
+ Json::Reader reader;
+ std::string json(binary_data.begin(), binary_data.end());
+ Json::Value root;
+ if (!reader.parse(json.c_str(), root)) {
+ LOG4CXX_DEBUG(logger_, "Unable to parse query_app json file.");
+ return;
+ }
+
+ CFormatterJsonBase::jsonValueToObj(root, sm_object);
+ if (!ValidateQueryAppData(sm_object)) {
+ SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
+ return;
+ }
+
+ application_manager_.ProcessQueryApp(sm_object, connection_key());
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ if (std::string::npos != file_name.find(kIVSU)) {
+ msg_params[strings::file_name] = file_name;
+ } else {
+ msg_params[strings::file_name] = file_dst_path;
+ }
+
+ // expected int, mandatory=true, all Policies flow (HTTP,Proprietary,External)
+ msg_params[strings::app_id] = application->hmi_app_id();
+
+ msg_params[strings::request_type] =
+ (*message_)[strings::msg_params][strings::request_type];
+ if (request_subtype_present) {
+ msg_params[strings::request_subtype] =
+ (*message_)[strings::msg_params][strings::request_subtype];
+ }
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
+ SendHMIRequest(hmi_apis::FunctionID::BasicCommunication_SystemRequest,
+ &msg_params,
+ true);
+}
+
+void SystemRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace helpers;
+
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::BasicCommunication_SystemRequest: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
+
+ const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_api::Result::SUCCESS,
+ mobile_api::Result::WARNINGS);
+
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ if (!(application.valid())) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ if (!processing_file_.empty()) {
+ file_system::DeleteFile(processing_file_);
+ processing_file_.clear();
+ }
+
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+bool SystemRequest::ValidateQueryAppData(
+ smart_objects::SmartObject& data) const {
+ if (!data.isValid()) {
+ LOG4CXX_ERROR(logger_,
+ 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.");
+ return false;
+ }
+
+ QueryAppsDataValidator validator(data, application_manager_);
+ return validator.Validate();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..dc2e3ea3f5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/system_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SystemResponse::SystemResponse(
+ 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) {}
+
+SystemResponse::~SystemResponse() {}
+
+void SystemResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9119fb48da
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+void UnregisterAppInterfaceRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!application_manager_.application(connection_key())) {
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ LOG4CXX_ERROR(logger_, "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);
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4e7c879b58
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc
@@ -0,0 +1,48 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/unregister_app_interface_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+void UnregisterAppInterfaceResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendResponse((*message_)[strings::msg_params][strings::success].asBool());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6537f0e7b2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc
@@ -0,0 +1,112 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/unsubscribe_button_request.h"
+
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace str = strings;
+
+UnsubscribeButtonRequest::UnsubscribeButtonRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {}
+
+void UnsubscribeButtonRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const mobile_apis::ButtonName::eType btn_id =
+ static_cast<mobile_apis::ButtonName::eType>(
+ (*message_)[str::msg_params][str::button_name].asInt());
+
+ if (!CheckHMICapabilities(btn_id)) {
+ LOG4CXX_ERROR(logger_,
+ "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 subscibe to button " << btn_id);
+ SendResponse(false, mobile_apis::Result::IGNORED);
+ return;
+ }
+
+ SendUnsubscribeButtonNotification();
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+}
+
+bool UnsubscribeButtonRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+void UnsubscribeButtonRequest::SendUnsubscribeButtonNotification() {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+
+ // send OnButtonSubscription notification
+ SmartObject msg_params = SmartObject(SmartType_Map);
+ msg_params[strings::app_id] = connection_key();
+ msg_params[strings::name] = static_cast<Common_ButtonName::eType>(
+ (*message_)[strings::msg_params][strings::button_name].asInt());
+ msg_params[strings::is_suscribed] = false;
+ CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..592b91851e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc
@@ -0,0 +1,74 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/unsubscribe_button_response.h"
+#include "smart_objects/smart_object.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UnsubscribeButtonResponse::UnsubscribeButtonResponse(
+ 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) {}
+
+UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {}
+
+void UnsubscribeButtonResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // 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");
+ SendResponse(false);
+ return;
+ }
+ }
+
+ // TODO(DK): Some logic
+ SendResponse(true);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..0d0836878f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc
@@ -0,0 +1,117 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_request.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UnSubscribeWayPointsRequest::UnSubscribeWayPointsRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UnSubscribeWayPointsRequest::~UnSubscribeWayPointsRequest() {}
+
+void UnSubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (!application_manager_.IsAppSubscribedForWayPoints(app)) {
+ SendResponse(false, mobile_apis::Result::IGNORED);
+ return;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints, NULL, true);
+}
+
+void UnSubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ const hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
+ if (result) {
+ application_manager_.UnsubscribeAppFromWayPoints(app);
+ }
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+bool UnSubscribeWayPointsRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..67e3466a44
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc
@@ -0,0 +1,64 @@
+/*
+ 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 "application_manager/application_manager.h"
+#include "sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse(
+ 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) {}
+
+UnsubscribeWayPointsResponse::~UnsubscribeWayPointsResponse() {}
+
+void UnsubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..69379135b5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc
@@ -0,0 +1,243 @@
+/*
+
+ 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 <string>
+#include "sdl_rpc_plugin/commands/mobile/update_turn_list_request.h"
+
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/custom_string.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace custom_str = utils::custom_string;
+
+UpdateTurnListRequest::UpdateTurnListRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UpdateTurnListRequest::~UpdateTurnListRequest() {}
+
+void UpdateTurnListRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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");
+ return;
+ }
+
+ if (IsWhiteSpaceExist()) {
+ LOG4CXX_ERROR(logger_,
+ "Incoming update turn list has contains \t\n \\t \\n");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ // 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) {
+ LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SendResponse(false, processing_result);
+ return;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
+ smart_objects::SmartObject& turn_list_array =
+ ((*message_)[strings::msg_params][strings::turn_list]);
+ for (uint32_t i = 0; i < turn_list_array.length(); ++i) {
+ if ((turn_list_array[i].keyExists(strings::turn_icon)) &&
+ (mobile_apis::Result::SUCCESS !=
+ MessageHelper::VerifyImage(turn_list_array[i][strings::turn_icon],
+ app,
+ application_manager_))) {
+ LOG4CXX_ERROR(logger_,
+ "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];
+
+ if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
+ if (!CheckTurnListArray()) {
+ LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ for (uint32_t i = 0; i < msg_params[strings::turn_list].length(); ++i) {
+ if (msg_params[strings::turn_list][i].keyExists(hmi_request::navi_text)) {
+ const custom_str::CustomString& navigation_text =
+ msg_params[strings::turn_list][i][hmi_request::navi_text]
+ .asCustomString();
+ msg_params[strings::turn_list][i].erase(hmi_request::navi_text);
+ msg_params[strings::turn_list][i][hmi_request::navi_text]
+ [hmi_request::field_name] = static_cast<int>(
+ hmi_apis::Common_TextFieldName::turnText);
+ msg_params[strings::turn_list][i][hmi_request::navi_text]
+ [hmi_request::field_text] = navigation_text;
+ }
+ }
+ }
+
+ msg_params[strings::app_id] = app->app_id();
+
+ if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ MessageHelper::SubscribeApplicationToSoftButton(
+ (*message_)[strings::msg_params], app, function_id());
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::turn_list) ||
+ (*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_UpdateTurnList, &msg_params, true);
+ } else {
+ // conditional mandatory
+ LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ }
+}
+
+void UpdateTurnListRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
+ LOG4CXX_INFO(logger_, "Received Navigation_UpdateTurnList event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
+ const hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+bool UpdateTurnListRequest::CheckTurnListArray() {
+ int32_t length =
+ (*message_)[strings::msg_params][strings::turn_list].length();
+ if (0 == length) {
+ return false;
+ }
+
+ for (int32_t i = 0; i < length; ++i) {
+ if (!((*message_)[strings::msg_params][strings::turn_list][i].keyExists(
+ hmi_request::navi_text)) &&
+ !((*message_)[strings::msg_params][strings::turn_list][i].keyExists(
+ strings::turn_icon))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+bool UpdateTurnListRequest::IsWhiteSpaceExist() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const char* str = NULL;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
+ const smart_objects::SmartArray* tl_array =
+ (*message_)[strings::msg_params][strings::turn_list].asArray();
+
+ smart_objects::SmartArray::const_iterator it_tl = tl_array->begin();
+ smart_objects::SmartArray::const_iterator it_tl_end = tl_array->end();
+
+ for (; it_tl != it_tl_end; ++it_tl) {
+ if ((*it_tl).keyExists(strings::navigation_text)) {
+ str = (*it_tl)[strings::navigation_text].asCharArray();
+ if (!CheckSyntax(str)) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Invalid turn_list navigation_text text syntax check failed");
+ return true;
+ }
+ }
+
+ 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");
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5ddf355f88
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "sdl_rpc_plugin/commands/mobile/update_turn_list_response.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/HMI_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+UpdateTurnListResponse::UpdateTurnListResponse(
+ 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) {}
+
+UpdateTurnListResponse::~UpdateTurnListResponse() {}
+
+void UpdateTurnListResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..bb621f814c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
@@ -0,0 +1,1703 @@
+/*
+ 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 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/hmi_command_factory.h"
+
+#include "application_manager/message.h"
+#include "interfaces/HMI_API.h"
+
+#include "sdl_rpc_plugin/commands/hmi/update_device_list_request.h"
+#include "sdl_rpc_plugin/commands/hmi/update_device_list_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_update_device_list.h"
+#include "sdl_rpc_plugin/commands/hmi/on_start_device_discovery.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/on_find_applications.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_all_apps_response.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_app_request.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_app_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_request.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_request.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_status_update_request.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_status_update_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/update_sdl_request.h"
+#include "sdl_rpc_plugin/commands/hmi/update_sdl_response.h"
+#include "sdl_rpc_plugin/commands/hmi/activate_app_request.h"
+#include "sdl_rpc_plugin/commands/hmi/activate_app_response.h"
+#include "sdl_rpc_plugin/commands/hmi/mixing_audio_supported_request.h"
+#include "sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_exit_application_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_put_file_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/get_system_info_request.h"
+#include "sdl_rpc_plugin/commands/hmi/get_system_info_response.h"
+#include "sdl_rpc_plugin/commands/hmi/close_popup_request.h"
+#include "sdl_rpc_plugin/commands/hmi/close_popup_response.h"
+#include "sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/button_get_capabilities_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_add_command_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_add_command_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_delete_command_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_add_submenu_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_delete_submenu_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_language_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_language_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_capabilities_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_change_registration_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_show_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_show_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_alert_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_alert_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_is_ready_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_set_media_clock_timer_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_global_properties_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_scrollable_message_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_app_icon_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_perform_interaction_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_is_ready_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_add_command_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_add_command_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_delete_command_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_change_registration_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_language_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_language_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_capabilities_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_is_ready_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_change_registration_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_language_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_language_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_stop_speaking_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_speak_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_speak_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_set_global_properties_response.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_capabilities_response.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_perform_interaction_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_activate_app_request.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h"
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+#include "sdl_rpc_plugin/commands/hmi/decrypt_certificate_request.h"
+#include "sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h"
+#endif // EXTERNAL_PROPRIETARY_MODE
+
+#ifdef HMI_DBUS_API
+#include "sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_request_template.h"
+#include "sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_response_template.h"
+#include "sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_request_template.h"
+#include "sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_response_template.h"
+#include "sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h"
+#include "sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h"
+#endif // #ifdef HMI_DBUS_API
+
+#include "sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_is_ready_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_update_turn_list_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_get_way_points_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ready_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_time_ready_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_context_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_button_event_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_button_press_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_set_video_config_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_set_video_config_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_start_stream_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_stop_stream_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_response.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_request_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_record_start_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/add_statistics_info_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_error_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_system_response.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_request.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_on_awake_sdl.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_policy_update.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_policy_update_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_received_policy_update.h"
+#include "sdl_rpc_plugin/commands/hmi/on_policy_update.h"
+#include "sdl_rpc_plugin/commands/hmi/get_urls.h"
+#include "sdl_rpc_plugin/commands/hmi/get_urls_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_send_location_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_send_location_response.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/dial_number_request.h"
+#include "sdl_rpc_plugin/commands/hmi/dial_number_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h"
+
+#include "sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/rc_is_ready_response.h"
+#include "sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/rc_get_capabilities_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+HMICommandFactory::HMICommandFactory(
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {}
+
+CommandSharedPtr HMICommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ 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);
+
+ 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");
+ } else if ((*message)[strings::params][strings::message_type] ==
+ hmi_apis::messageType::error_response) {
+ LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand error response");
+ } else {
+ LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand request");
+ }
+
+ return get_creator_factory(function_id, message_type, source).create(message);
+}
+
+bool HMICommandFactory::IsAbleToProcess(
+ const int32_t function_id,
+ const application_manager::commands::Command::CommandSource message_source)
+ const {
+ using app_mngr::commands::Command;
+ return get_creator_factory(
+ static_cast<hmi_apis::FunctionID::eType>(function_id),
+ hmi_apis::messageType::INVALID_ENUM,
+ message_source).CanBeCreated();
+}
+
+CommandCreator& HMICommandFactory::get_creator_factory(
+ hmi_apis::FunctionID::eType id,
+ hmi_apis::messageType::eType message_type,
+ application_manager::commands::Command::CommandSource source) const {
+ CommandCreatorFactory factory(
+ application_manager_, rpc_service_, hmi_capabilities_, policy_handler_);
+
+ switch (static_cast<int32_t>(id)) {
+ case hmi_apis::FunctionID::BasicCommunication_OnStartDeviceDiscovery: {
+ return factory.GetCreator<commands::OnStartDeviceDiscovery>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_UpdateDeviceList: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UpdateDeviceListRequest>()
+ : factory.GetCreator<commands::UpdateDeviceListResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_ActivateApp: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ActivateAppRequest>()
+ : factory.GetCreator<commands::ActivateAppResponse>();
+ }
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ case hmi_apis::FunctionID::BasicCommunication_DecryptCertificate: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::DecryptCertificateRequest>()
+ : factory.GetCreator<commands::DecryptCertificateResponse>();
+ }
+#endif // EXTERNAL_PROPRIETARY_MODE
+ case hmi_apis::FunctionID::BasicCommunication_GetSystemInfo: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::GetSystemInfoRequest>()
+ : factory.GetCreator<commands::GetSystemInfoResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_ActivateApp: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::SDLActivateAppRequest>()
+ : factory.GetCreator<commands::SDLActivateAppResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_PolicyUpdate: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::SDLPolicyUpdate>()
+ : factory.GetCreator<commands::SDLPolicyUpdateResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_GetURLS: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::GetUrls>()
+ : factory.GetCreator<commands::GetUrlsResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_OnAppPermissionChanged: {
+ return factory.GetCreator<commands::OnAppPermissionChangedNotification>();
+ }
+ case hmi_apis::FunctionID::SDL_GetListOfPermissions: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::SDLGetListOfPermissionsRequest>()
+ : factory
+ .GetCreator<commands::SDLGetListOfPermissionsResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_GetUserFriendlyMessage: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::SDLGetUserFriendlyMessageRequest>()
+ : factory.GetCreator<
+ commands::SDLGetUserFriendlyMessageResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_GetStatusUpdate: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::SDLGetStatusUpdateRequest>()
+ : factory.GetCreator<commands::SDLGetStatusUpdateResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_OnStatusUpdate: {
+ return factory.GetCreator<commands::OnStatusUpdateNotification>();
+ }
+ case hmi_apis::FunctionID::SDL_OnAppPermissionConsent: {
+ return factory.GetCreator<commands::OnAppPermissionConsentNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::MixingAudioSupportedRequest>()
+ : factory.GetCreator<commands::MixingAudioSupportedResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnExitAllApplications: {
+ return factory.GetCreator<commands::OnExitAllApplicationsNotification>();
+ }
+ case hmi_apis::FunctionID::UI_AddCommand: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIAddCommandRequest>()
+ : factory.GetCreator<commands::UIAddCommandResponse>();
+ }
+ case hmi_apis::FunctionID::UI_DeleteCommand: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIDeleteCommandRequest>()
+ : factory.GetCreator<commands::UIDeleteCommandResponse>();
+ }
+ case hmi_apis::FunctionID::UI_AddSubMenu: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIAddSubmenuRequest>()
+ : factory.GetCreator<commands::UIAddSubmenuResponse>();
+ }
+ case hmi_apis::FunctionID::UI_DeleteSubMenu: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIDeleteSubmenuRequest>()
+ : factory.GetCreator<commands::UIDeleteSubmenuResponse>();
+ }
+ case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UISetMediaClockTimerRequest>()
+ : factory.GetCreator<commands::UISetMediaClockTimerResponse>();
+ }
+ case hmi_apis::FunctionID::UI_PerformInteraction: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIPerformInteractionRequest>()
+ : factory.GetCreator<commands::UIPerformInteractionResponse>();
+ }
+ case hmi_apis::FunctionID::UI_SetGlobalProperties: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UISetGlobalPropertiesRequest>()
+ : factory
+ .GetCreator<commands::UISetGlobalPropertiesResponse>();
+ }
+ case hmi_apis::FunctionID::UI_ScrollableMessage: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIScrollableMessageRequest>()
+ : factory.GetCreator<commands::UIScrollableMessageResponse>();
+ }
+ case hmi_apis::FunctionID::UI_SetAppIcon: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UISetAppIconRequest>()
+ : factory.GetCreator<commands::UISetAppIconResponse>();
+ }
+ case hmi_apis::FunctionID::UI_GetSupportedLanguages: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::UIGetSupportedLanguagesRequest>()
+ : factory
+ .GetCreator<commands::UIGetSupportedLanguagesResponse>();
+ }
+ case hmi_apis::FunctionID::UI_GetLanguage: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIGetLanguageRequest>()
+ : factory.GetCreator<commands::UIGetLanguageResponse>();
+ }
+ case hmi_apis::FunctionID::UI_GetCapabilities: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIGetCapabilitiesRequest>()
+ : factory.GetCreator<commands::UIGetCapabilitiesResponse>();
+ }
+ case hmi_apis::FunctionID::UI_ChangeRegistration: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIChangeRegistrationRequest>()
+ : factory.GetCreator<commands::UIChangeRegistratioResponse>();
+ }
+ case hmi_apis::FunctionID::UI_PerformAudioPassThru: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIPerformAudioPassThruRequest>()
+ : factory
+ .GetCreator<commands::UIPerformAudioPassThruResponse>();
+ }
+ case hmi_apis::FunctionID::UI_EndAudioPassThru: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIEndAudioPassThruRequest>()
+ : factory.GetCreator<commands::UIEndAudioPassThruResponse>();
+ }
+ case hmi_apis::FunctionID::UI_Alert: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIAlertRequest>()
+ : factory.GetCreator<commands::UIAlertResponse>();
+ }
+ case hmi_apis::FunctionID::VR_IsReady: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRIsReadyRequest>()
+ : factory.GetCreator<commands::VRIsReadyResponse>();
+ }
+ case hmi_apis::FunctionID::VR_AddCommand: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRAddCommandRequest>()
+ : factory.GetCreator<commands::VRAddCommandResponse>();
+ }
+ case hmi_apis::FunctionID::VR_DeleteCommand: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRDeleteCommandRequest>()
+ : factory.GetCreator<commands::VRDeleteCommandResponse>();
+ }
+ case hmi_apis::FunctionID::VR_ChangeRegistration: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRChangeRegistrationRequest>()
+ : factory.GetCreator<commands::VRChangeRegistrationResponse>();
+ }
+ case hmi_apis::FunctionID::VR_GetSupportedLanguages: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::VRGetSupportedLanguagesRequest>()
+ : factory
+ .GetCreator<commands::VRGetSupportedLanguagesResponse>();
+ }
+ case hmi_apis::FunctionID::VR_GetLanguage: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRGetLanguageRequest>()
+ : factory.GetCreator<commands::VRGetLanguageResponse>();
+ }
+ case hmi_apis::FunctionID::VR_GetCapabilities: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRGetCapabilitiesRequest>()
+ : factory.GetCreator<commands::VRGetCapabilitiesResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_IsReady: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSIsReadyRequest>()
+ : factory.GetCreator<commands::TTSIsReadyResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_ChangeRegistration: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSChangeRegistrationRequest>()
+ : factory.GetCreator<commands::TTSChangeRegistratioResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_GetSupportedLanguages: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::TTSGetSupportedLanguagesRequest>()
+ : factory.GetCreator<
+ commands::TTSGetSupportedLanguagesResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_StopSpeaking: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSStopSpeakingRequest>()
+ : factory.GetCreator<commands::TTSStopSpeakingResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_GetLanguage: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSGetLanguageRequest>()
+ : factory.GetCreator<commands::TTSGetLanguageResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_Speak: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSSpeakRequest>()
+ : factory.GetCreator<commands::TTSSpeakResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSSetGlobalPropertiesRequest>()
+ : factory
+ .GetCreator<commands::TTSSetGlobalPropertiesResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_GetCapabilities: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::TTSGetCapabilitiesRequest>()
+ : factory.GetCreator<commands::TTSGetCapabilitiesResponse>();
+ }
+ case hmi_apis::FunctionID::TTS_Started: {
+ return factory.GetCreator<commands::OnTTSStartedNotification>();
+ }
+ case hmi_apis::FunctionID::TTS_Stopped: {
+ return factory.GetCreator<commands::OnTTSStoppedNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnAppActivated: {
+ return factory.GetCreator<commands::OnAppActivatedNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnAwakeSDL: {
+ return factory.GetCreator<commands::OnAwakeSDLNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnExitApplication: {
+ return factory.GetCreator<commands::OnExitApplicationNotification>();
+ }
+ case hmi_apis::FunctionID::UI_Show: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIShowRequest>()
+ : factory.GetCreator<commands::UIShowResponse>();
+ }
+ case hmi_apis::FunctionID::UI_Slider: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UISliderRequest>()
+ : factory.GetCreator<commands::UISliderResponse>();
+ }
+ case hmi_apis::FunctionID::UI_ClosePopUp: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ClosePopupRequest>()
+ : factory.GetCreator<commands::ClosePopupResponse>();
+ }
+ case hmi_apis::FunctionID::UI_IsReady: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIIsReadyRequest>()
+ : factory.GetCreator<commands::UIIsReadyResponse>();
+ }
+#ifdef HMI_DBUS_API
+ case hmi_apis::FunctionID::VehicleInfo_GetGpsData: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetGpsData> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetGpsData> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetSpeed: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetSpeed> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetSpeed> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetRpm: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehitcleInfo_GetRpm> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetRpm> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetFuelLevel: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetFuelLevel> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetFuelLevel> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState> >();
+ : factory.GetCreator<
+ commands::VIGetVehicleDataResponseTemplate<hmi_apis::
+ FunctionID::VehicleInfo_GetFuelLevelState>> ()
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetInstantFuelConsumption> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetInstantFuelConsumption> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetExternalTemperature> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetExternalTemperature> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetPrndl: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetPrndl> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetPrndl> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetVin: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetVin> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetVin> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetTirePressure: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetTirePressure> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetTirePressure> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetOdometer: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetOdometer> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetOdometer> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetBeltStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetBeltStatus> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetBeltStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetBodyInformation: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetBodyInformation> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetBodyInformation> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetDeviceStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetDriverBraking: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetDriverBraking> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetDriverBraking> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetWiperStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetWiperStatus> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetWiperStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetHeadLampStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetEngineTorque: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetEngineTorque> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetEngineTorque> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetAccPedalPosition> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetAccPedalPosition> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetSteeringWheelAngle> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetSteeringWheelAngle> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetECallInfo: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetECallInfo> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetECallInfo> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetAirbagStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetEmergencyEvent> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetClusterModeStatus> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_GetClusterModeStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_GetMyKey: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetMyKey> >()
+ : factory
+ .GetCreator<commands::VIGetVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_GetMyKey> >();
+ }
+#endif // #ifdef HMI_DBUS_API
+ case hmi_apis::FunctionID::Navigation_IsReady: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviIsReadyRequest>()
+ : factory.GetCreator<commands::NaviIsReadyResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_AlertManeuver: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviAlertManeuverRequest>()
+ : factory.GetCreator<commands::NaviAlertManeuverResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_GetWayPoints: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviGetWayPointsRequest>()
+ : factory.GetCreator<commands::NaviGetWayPointsResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviUpdateTurnListRequest>()
+ : factory.GetCreator<commands::NaviUpdateTurnListResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_ShowConstantTBT: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviShowConstantTBTRequest>()
+ : factory.GetCreator<commands::NaviShowConstantTBTResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_SubscribeWayPoints: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviSubscribeWayPointsRequest>()
+ : factory
+ .GetCreator<commands::NaviSubscribeWayPointsResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::NaviUnSubscribeWayPointsRequest>()
+ : factory.GetCreator<
+ commands::NaviUnsubscribeWayPointsResponse>();
+ }
+ case hmi_apis::FunctionID::Buttons_GetCapabilities: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ButtonGetCapabilitiesRequest>()
+ : factory
+ .GetCreator<commands::ButtonGetCapabilitiesResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_OnAllowSDLFunctionality: {
+ return factory
+ .GetCreator<commands::OnAllowSDLFunctionalityNotification>();
+ }
+ case hmi_apis::FunctionID::SDL_OnSDLConsentNeeded: {
+ return factory.GetCreator<commands::OnSDLConsentNeededNotification>();
+ }
+ case hmi_apis::FunctionID::SDL_UpdateSDL: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UpdateSDLRequest>()
+ : factory.GetCreator<commands::UpdateSDLResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnIgnitionCycleOver: {
+ return factory.GetCreator<commands::OnIgnitionCycleOverNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnSystemInfoChanged: {
+ return factory.GetCreator<commands::OnSystemInfoChangedNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnReady: {
+ return factory.GetCreator<commands::OnReadyNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnSystemTimeReady: {
+ return factory.GetCreator<commands::OnSystemTimeReadyNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnDeviceChosen: {
+ return factory.GetCreator<commands::OnDeviceChosenNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnSystemContext: {
+ return factory.GetCreator<commands::OnSystemContextNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnDriverDistraction: {
+ return factory
+ .GetCreator<commands::hmi::OnDriverDistractionNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnUpdateDeviceList: {
+ return factory.GetCreator<commands::OnUpdateDeviceList>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnAppRegistered: {
+ return factory.GetCreator<commands::OnAppRegisteredNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered: {
+ return factory.GetCreator<commands::OnAppUnregisteredNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnFindApplications: {
+ return factory.GetCreator<commands::OnFindApplications>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_UpdateAppList: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UpdateAppListRequest>()
+ : factory.GetCreator<commands::UpdateAppListResponse>();
+ }
+ case hmi_apis::FunctionID::VR_Started: {
+ return factory.GetCreator<commands::OnVRStartedNotification>();
+ }
+ case hmi_apis::FunctionID::VR_Stopped: {
+ return factory.GetCreator<commands::OnVRStoppedNotification>();
+ }
+ case hmi_apis::FunctionID::VR_OnCommand: {
+ return factory.GetCreator<commands::OnVRCommandNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnCommand: {
+ return factory.GetCreator<commands::OnUICommandNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated: {
+ return factory.GetCreator<commands::OnAppDeactivatedNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnLanguageChange: {
+ return factory.GetCreator<commands::OnUILanguageChangeNotification>();
+ }
+ case hmi_apis::FunctionID::VR_OnLanguageChange: {
+ return factory.GetCreator<commands::OnVRLanguageChangeNotification>();
+ }
+ case hmi_apis::FunctionID::TTS_OnLanguageChange: {
+ return factory.GetCreator<commands::OnTTSLanguageChangeNotification>();
+ }
+ case hmi_apis::FunctionID::Buttons_OnButtonEvent: {
+ return factory.GetCreator<commands::hmi::OnButtonEventNotification>();
+ }
+ case hmi_apis::FunctionID::Buttons_OnButtonPress: {
+ return factory.GetCreator<commands::hmi::OnButtonPressNotification>();
+ }
+ case hmi_apis::FunctionID::Buttons_OnButtonSubscription: {
+ return factory
+ .GetCreator<commands::hmi::OnButtonSubscriptionNotification>();
+ }
+#ifdef HMI_DBUS_API
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeGps: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeGps> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeGps> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeSpeed> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeRpm: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeRpm> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeRpm> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeFuelLevel> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeFuelLevel> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeFuelLevel_State> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeFuelLevel_State> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeInstantFuelConsumption> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeInstantFuelConsumption> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeExternalTemperature> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeExternalTemperature> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribePrndl: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribePrndl> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribePrndl> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeVin: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVin> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVin> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeTirePressure> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeTirePressure> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeOdometer> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeOdometer> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeBeltStatus> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeBeltStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeBodyInformation> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeBodyInformation> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeDeviceStatus> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeDeviceStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeDriverBraking> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeDriverBraking> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeWiperStatus> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeWiperStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeHeadLampStatus> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeHeadLampStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeEngineTorque> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeEngineTorque> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeAccPedalPosition> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeAccPedalPosition> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeSteeringWheelAngle> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeSteeringWheelAngle> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeECallInfo> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeECallInfo> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeAirbagStatus> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeAirbagStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeEmergencyEvent> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeEmergencyEvent> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeClusterModeStatus> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeClusterModeStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VISubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey> >()
+ : factory.GetCreator<
+ commands::VISubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_SubscribeMyKey> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator <
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps>()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeGps> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeSpeed> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeSpeed> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeRpm> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeFuelLevel> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeFuelLevel> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeFuelLevel_State> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeFuelLevel_State> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeInstantFuelConsumption> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeInstantFuelConsumption> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeExternalTemperature> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeExternalTemperature> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribePrndl> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribePrndl> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeVin> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeTirePressure> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeTirePressure> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeOdometer> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeOdometer> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeBeltStatus> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeBeltStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeBodyInformation> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeBodyInformation> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeDeviceStatus> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeDeviceStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeDriverBraking> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeDriverBraking> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeWiperStatus> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeWiperStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeHeadLampStatus> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeHeadLampStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeEngineTorque> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeEngineTorque> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeAccPedalPosition> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeAccPedalPosition> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeSteeringWheelAngle> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeSteeringWheelAngle> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeECallInfo> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeECallInfo> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeAirbagStatus> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeAirbagStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeEmergencyEvent> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeEmergencyEvent> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeClusterModeStatus> >()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeClusterModeStatus> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::>(
+ VIUnsubscribeVehicleDataRequestTemplate<
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey>)
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponseTemplate<
+ hmi_apis::FunctionID::
+ VehicleInfo_UnsubscribeMyKey> >();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnGpsData: {
+ return factory.GetCreator<commands::OnVIGpsDataNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnSpeed: {
+ return factory.GetCreator<commands::OnVISpeedNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnRpm: {
+ return factory.GetCreator<commands::OnVIRpmNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnFuelLevel: {
+ return factory.GetCreator<commands::OnVifuelLevelNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnFuelLevelState: {
+ return factory.GetCreator<commands::OnVifuelLevelStateNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnInstantFuelConsumption: {
+ return factory
+ .GetCreator<commands::OnVIInstantFuelConsumptionNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnExternalTemperature: {
+ return factory
+ .GetCreator<commands::OnVIExternalTemperatureNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnVin: {
+ return factory.GetCreator<commands::OnVIVinNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnPrndl: {
+ return factory.GetCreator<commands::OnVIPrndlNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnTirePressure: {
+ return factory.GetCreator<commands::OnVITirePressureNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnOdometer: {
+ return factory.GetCreator<commands::OnVIOdometerNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnBeltStatus: {
+ return factory.GetCreator<commands::OnVIBeltStatusNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnBodyInformation: {
+ return factory.GetCreator<commands::OnVIBodyInformationNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnDeviceStatus: {
+ return factory.GetCreator<commands::OnVIDeviceStatusNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnDriverBraking: {
+ return factory.GetCreator<commands::OnVIDriverBrakingNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnWiperStatus: {
+ return factory.GetCreator<commands::OnVIWiperStatusNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnHeadLampStatus: {
+ return factory.GetCreator<commands::OnVIHeadLampStatusNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnEngineTorque: {
+ return factory.GetCreator<commands::OnVIEngineTorqueNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnAccPedalPosition: {
+ return factory.GetCreator<commands::OnVIAccPedalPositionNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnSteeringWheelAngle: {
+ return factory.GetCreator<commands::OnVISteeringWheelAngleNotification>();
+ }
+ case hmi_apis::FunctionID::VehicleInfo_OnMyKey: {
+ return factory.GetCreator<commands::OnVIMyKeyNotification>();
+ }
+#endif // #ifdef HMI_DBUS_API
+ case hmi_apis::FunctionID::Navigation_OnTBTClientState: {
+ return factory.GetCreator<commands::OnNaviTBTClientStateNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnKeyboardInput: {
+ return factory.GetCreator<commands::hmi::OnUIKeyBoardInputNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnTouchEvent: {
+ return factory.GetCreator<commands::hmi::OnUITouchEventNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnResetTimeout: {
+ return factory.GetCreator<commands::hmi::OnUIResetTimeoutNotification>();
+ }
+ case hmi_apis::FunctionID::Navigation_SetVideoConfig: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviSetVideoConfigRequest>()
+ : factory.GetCreator<commands::NaviSetVideoConfigResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_StartStream: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviStartStreamRequest>()
+ : factory.GetCreator<commands::NaviStartStreamResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_StopStream: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviStopStreamRequest>()
+ : factory.GetCreator<commands::NaviStopStreamResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_StartAudioStream: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::AudioStartStreamRequest>()
+ : factory.GetCreator<commands::AudioStartStreamResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_StopAudioStream: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::AudioStopStreamRequest>()
+ : factory.GetCreator<commands::AudioStopStreamResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_OnAudioDataStreaming: {
+ return factory.GetCreator<commands::OnAudioDataStreamingNotification>();
+ }
+ case hmi_apis::FunctionID::Navigation_OnVideoDataStreaming: {
+ return factory.GetCreator<commands::OnVideoDataStreamingNotification>();
+ }
+ case hmi_apis::FunctionID::VR_PerformInteraction: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VRPerformInteractionRequest>()
+ : factory.GetCreator<commands::VRPerformInteractionResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnSystemRequest: {
+ return factory.GetCreator<commands::OnSystemRequestNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnPutFile: {
+ return factory.GetCreator<commands::OnPutFileNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnResumeAudioSource: {
+ return factory.GetCreator<commands::OnResumeAudioSourceNotification>();
+ }
+ case hmi_apis::FunctionID::UI_SetDisplayLayout: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UiSetDisplayLayoutRequest>()
+ : factory.GetCreator<commands::UiSetDisplayLayoutResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnSDLClose: {
+ return factory.GetCreator<commands::OnSDLCloseNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete: {
+ return factory
+ .GetCreator<commands::OnSDLPersistenceCompleteNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnFileRemoved: {
+ return factory.GetCreator<commands::OnFileRemovedNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnRecordStart: {
+ return factory.GetCreator<commands::OnRecordStartdNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_SystemRequest: {
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::BasicCommunicationSystemRequest>()
+ : factory.GetCreator<
+ commands::BasicCommunicationSystemResponse>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_GetSystemTime: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::BasicCommunicationGetSystemTimeRequest>()
+ : factory.GetCreator<
+ commands::BasicCommunicationGetSystemTimeResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_SendLocation: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::NaviSendLocationRequest>()
+ : factory.GetCreator<commands::NaviSendLocationResponse>();
+ }
+ case hmi_apis::FunctionID::SDL_AddStatisticsInfo: {
+ return factory.GetCreator<commands::AddStatisticsInfoNotification>();
+ }
+ case hmi_apis::FunctionID::SDL_OnSystemError: {
+ return factory.GetCreator<commands::OnSystemErrorNotification>();
+ }
+ case hmi_apis::FunctionID::SDL_OnReceivedPolicyUpdate: {
+ return factory.GetCreator<commands::OnReceivedPolicyUpdate>();
+ }
+ case hmi_apis::FunctionID::SDL_OnPolicyUpdate: {
+ return factory.GetCreator<commands::OnPolicyUpdate>();
+ }
+ case hmi_apis::FunctionID::SDL_OnDeviceStateChanged: {
+ return factory.GetCreator<commands::OnDeviceStateChangedNotification>();
+ }
+ case hmi_apis::FunctionID::TTS_OnResetTimeout: {
+ return factory.GetCreator<commands::hmi::OnTTSResetTimeoutNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_OnEventChanged: {
+ return factory.GetCreator<commands::OnEventChangedNotification>();
+ }
+ case hmi_apis::FunctionID::BasicCommunication_DialNumber: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::hmi::DialNumberRequest>()
+ : factory.GetCreator<commands::hmi::DialNumberResponse>();
+ }
+ case hmi_apis::FunctionID::Navigation_OnWayPointChange: {
+ return factory.GetCreator<commands::OnNaviWayPointChangeNotification>();
+ }
+ case hmi_apis::FunctionID::RC_IsReady: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::RCIsReadyRequest>()
+ : factory.GetCreator<commands::RCIsReadyResponse>();
+ }
+ case hmi_apis::FunctionID::RC_GetCapabilities: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::RCGetCapabilitiesRequest>()
+ : factory.GetCreator<commands::RCGetCapabilitiesResponse>();
+ }
+ case hmi_apis::FunctionID::UI_SendHapticData: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UISendHapticDataRequest>()
+ : factory.GetCreator<commands::UISendHapticDataResponse>();
+ }
+ default: { return factory.GetCreator<InvalidCommand>(); }
+ }
+}
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..d27161ff77
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
@@ -0,0 +1,443 @@
+/*
+ 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 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/mobile_command_factory.h"
+#include "sdl_rpc_plugin/commands/mobile/add_command_request.h"
+#include "sdl_rpc_plugin/commands/mobile/add_command_response.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_command_request.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_command_response.h"
+#include "sdl_rpc_plugin/commands/mobile/add_sub_menu_request.h"
+#include "sdl_rpc_plugin/commands/mobile/add_sub_menu_response.h"
+#include "sdl_rpc_plugin/commands/mobile/alert_request.h"
+#include "sdl_rpc_plugin/commands/mobile/alert_response.h"
+#include "sdl_rpc_plugin/commands/mobile/alert_maneuver_request.h"
+#include "sdl_rpc_plugin/commands/mobile/alert_maneuver_response.h"
+#include "sdl_rpc_plugin/commands/mobile/change_registration_request.h"
+#include "sdl_rpc_plugin/commands/mobile/change_registration_response.h"
+#include "sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h"
+#include "sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_response.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_file_request.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_file_response.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_response.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h"
+#include "sdl_rpc_plugin/commands/mobile/delete_sub_menu_response.h"
+#include "sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_request.h"
+#include "sdl_rpc_plugin/commands/mobile/end_audio_pass_thru_response.h"
+#include "sdl_rpc_plugin/commands/mobile/generic_response.h"
+#include "sdl_rpc_plugin/commands/mobile/get_system_capability_request.h"
+#include "sdl_rpc_plugin/commands/mobile/get_system_capability_response.h"
+#include "sdl_rpc_plugin/commands/mobile/get_way_points_request.h"
+#include "sdl_rpc_plugin/commands/mobile/get_way_points_response.h"
+#include "sdl_rpc_plugin/commands/mobile/list_files_request.h"
+#include "sdl_rpc_plugin/commands/mobile/list_files_response.h"
+#include "sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_audio_pass_thru_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_button_event_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_button_press_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_driver_distraction_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_hmi_status_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_hmi_status_notification_from_mobile.h"
+#include "sdl_rpc_plugin/commands/mobile/on_language_change_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_command_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_hash_change_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"
+#include "sdl_rpc_plugin/commands/mobile/perform_interaction_request.h"
+#include "sdl_rpc_plugin/commands/mobile/perform_interaction_response.h"
+#include "sdl_rpc_plugin/commands/mobile/put_file_request.h"
+#include "sdl_rpc_plugin/commands/mobile/put_file_response.h"
+#include "sdl_rpc_plugin/commands/mobile/register_app_interface_request.h"
+#include "sdl_rpc_plugin/commands/mobile/register_app_interface_response.h"
+#include "sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h"
+#include "sdl_rpc_plugin/commands/mobile/reset_global_properties_response.h"
+#include "sdl_rpc_plugin/commands/mobile/scrollable_message_request.h"
+#include "sdl_rpc_plugin/commands/mobile/scrollable_message_response.h"
+#include "sdl_rpc_plugin/commands/mobile/set_display_layout_request.h"
+#include "sdl_rpc_plugin/commands/mobile/set_display_layout_response.h"
+#include "sdl_rpc_plugin/commands/mobile/set_global_properties_request.h"
+#include "sdl_rpc_plugin/commands/mobile/set_global_properties_response.h"
+#include "sdl_rpc_plugin/commands/mobile/set_app_icon_request.h"
+#include "sdl_rpc_plugin/commands/mobile/set_app_icon_response.h"
+#include "sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h"
+#include "sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h"
+#include "sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h"
+#include "sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h"
+#include "sdl_rpc_plugin/commands/mobile/show_request.h"
+#include "sdl_rpc_plugin/commands/mobile/show_response.h"
+#include "sdl_rpc_plugin/commands/mobile/slider_request.h"
+#include "sdl_rpc_plugin/commands/mobile/slider_response.h"
+#include "sdl_rpc_plugin/commands/mobile/speak_request.h"
+#include "sdl_rpc_plugin/commands/mobile/speak_response.h"
+#include "sdl_rpc_plugin/commands/mobile/subscribe_button_request.h"
+#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/unsubscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/mobile/unsubscribe_way_points_response.h"
+#include "sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h"
+#include "sdl_rpc_plugin/commands/mobile/unregister_app_interface_response.h"
+#include "sdl_rpc_plugin/commands/mobile/unsubscribe_button_request.h"
+#include "sdl_rpc_plugin/commands/mobile/unsubscribe_button_response.h"
+#include "sdl_rpc_plugin/commands/mobile/update_turn_list_request.h"
+#include "sdl_rpc_plugin/commands/mobile/update_turn_list_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/on_keyboard_input_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_system_request_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/send_location_request.h"
+#include "sdl_rpc_plugin/commands/mobile/send_location_response.h"
+#include "sdl_rpc_plugin/commands/mobile/dial_number_request.h"
+#include "sdl_rpc_plugin/commands/mobile/dial_number_response.h"
+#include "sdl_rpc_plugin/commands/mobile/send_haptic_data_request.h"
+#include "sdl_rpc_plugin/commands/mobile/send_haptic_data_response.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/make_shared.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+CommandCreator& MobileCommandFactory::get_creator_factory(
+ mobile_apis::FunctionID::eType id,
+ mobile_apis::messageType::eType message_type,
+ app_mngr::commands::Command::CommandSource source) const {
+ CommandCreatorFactory factory(
+ application_manager_, rpc_service_, hmi_capabilities_, policy_handler_);
+
+ switch (id) {
+ case mobile_apis::FunctionID::RegisterAppInterfaceID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::RegisterAppInterfaceRequest>()
+ : factory.GetCreator<commands::RegisterAppInterfaceResponse>();
+ }
+ case mobile_apis::FunctionID::UnregisterAppInterfaceID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::UnregisterAppInterfaceRequest>()
+ : factory
+ .GetCreator<commands::UnregisterAppInterfaceResponse>();
+ }
+ case mobile_apis::FunctionID::SetGlobalPropertiesID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SetGlobalPropertiesRequest>()
+ : factory.GetCreator<commands::SetGlobalPropertiesResponse>();
+ }
+ case mobile_apis::FunctionID::ResetGlobalPropertiesID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ResetGlobalPropertiesRequest>()
+ : factory
+ .GetCreator<commands::ResetGlobalPropertiesResponse>();
+ }
+ case mobile_apis::FunctionID::AddCommandID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::AddCommandRequest>()
+ : factory.GetCreator<commands::AddCommandResponse>();
+ }
+ case mobile_apis::FunctionID::DeleteCommandID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::DeleteCommandRequest>()
+ : factory.GetCreator<commands::DeleteCommandResponse>();
+ }
+ case mobile_apis::FunctionID::AddSubMenuID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::AddSubMenuRequest>()
+ : factory.GetCreator<commands::AddSubMenuResponse>();
+ }
+
+ case mobile_apis::FunctionID::DeleteSubMenuID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::DeleteSubMenuRequest>()
+ : factory.GetCreator<commands::DeleteSubMenuResponse>();
+ }
+ case mobile_apis::FunctionID::DeleteInteractionChoiceSetID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::DeleteInteractionChoiceSetRequest>()
+ : factory.GetCreator<
+ commands::DeleteInteractionChoiceSetResponse>();
+ }
+ case mobile_apis::FunctionID::AlertID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::AlertRequest>()
+ : factory.GetCreator<commands::AlertResponse>();
+ }
+ case mobile_apis::FunctionID::SpeakID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SpeakRequest>()
+ : factory.GetCreator<commands::SpeakResponse>();
+ }
+ case mobile_apis::FunctionID::SliderID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SliderRequest>()
+ : factory.GetCreator<commands::SliderResponse>();
+ }
+ case mobile_apis::FunctionID::PerformAudioPassThruID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::PerformAudioPassThruRequest>()
+ : factory.GetCreator<commands::PerformAudioPassThruResponse>();
+ }
+
+ case mobile_apis::FunctionID::CreateInteractionChoiceSetID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<
+ commands::CreateInteractionChoiceSetRequest>()
+ : factory.GetCreator<
+ commands::CreateInteractionChoiceSetResponse>();
+ }
+ case mobile_apis::FunctionID::PerformInteractionID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::PerformInteractionRequest>()
+ : factory.GetCreator<commands::PerformInteractionResponse>();
+ }
+ case mobile_apis::FunctionID::EndAudioPassThruID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::EndAudioPassThruRequest>()
+ : factory.GetCreator<commands::EndAudioPassThruResponse>();
+ }
+ case mobile_apis::FunctionID::PutFileID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::PutFileRequest>()
+ : factory.GetCreator<commands::PutFileResponse>();
+ }
+ case mobile_apis::FunctionID::DeleteFileID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::DeleteFileRequest>()
+ : factory.GetCreator<commands::DeleteFileResponse>();
+ }
+ case mobile_apis::FunctionID::ListFilesID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ListFilesRequest>()
+ : factory.GetCreator<commands::ListFilesResponse>();
+ }
+ case mobile_apis::FunctionID::SubscribeButtonID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SubscribeButtonRequest>()
+ : factory.GetCreator<commands::SubscribeButtonResponse>();
+ }
+ case mobile_apis::FunctionID::UnsubscribeButtonID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::UnsubscribeButtonRequest>()
+ : factory.GetCreator<commands::UnsubscribeButtonResponse>();
+ }
+ case mobile_apis::FunctionID::ShowConstantTBTID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ShowConstantTBTRequest>()
+ : factory.GetCreator<commands::ShowConstantTBTResponse>();
+ }
+ case mobile_apis::FunctionID::ShowID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ShowRequest>()
+ : factory.GetCreator<commands::ShowResponse>();
+ }
+ case mobile_apis::FunctionID::GetWayPointsID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ShowConstantTBTRequest>()
+ : factory.GetCreator<commands::GetWayPointsResponse>();
+ }
+ case mobile_apis::FunctionID::SubscribeWayPointsID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SubscribeWayPointsRequest>()
+ : factory.GetCreator<commands::SubscribeWayPointsResponse>();
+ }
+ case mobile_apis::FunctionID::UnsubscribeWayPointsID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ShowConstantTBTRequest>()
+ : factory.GetCreator<commands::ShowConstantTBTResponse>();
+ }
+ case mobile_apis::FunctionID::GetSystemCapabilityID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::GetSystemCapabilityRequest>()
+ : factory.GetCreator<commands::GetSystemCapabilityResponse>();
+ }
+ case mobile_apis::FunctionID::ScrollableMessageID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ScrollableMessageRequest>()
+ : factory.GetCreator<commands::ScrollableMessageResponse>();
+ }
+
+ case mobile_apis::FunctionID::AlertManeuverID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::AlertManeuverRequest>()
+ : factory.GetCreator<commands::AlertManeuverResponse>();
+ }
+ case mobile_apis::FunctionID::SetAppIconID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SetAppIconRequest>()
+ : factory.GetCreator<commands::SetAppIconResponse>();
+ }
+ case mobile_apis::FunctionID::SetDisplayLayoutID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SetDisplayLayoutRequest>()
+ : factory.GetCreator<commands::SetDisplayLayoutResponse>();
+ }
+ case mobile_apis::FunctionID::UpdateTurnListID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::UpdateTurnListRequest>()
+ : factory.GetCreator<commands::UpdateTurnListResponse>();
+ }
+ case mobile_apis::FunctionID::ChangeRegistrationID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ChangeRegistrationRequest>()
+ : factory.GetCreator<commands::ChangeRegistrationResponse>();
+ }
+ case mobile_apis::FunctionID::SetMediaClockTimerID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SetMediaClockRequest>()
+ : factory.GetCreator<commands::SetMediaClockTimerResponse>();
+ }
+ case mobile_apis::FunctionID::SystemRequestID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SystemRequest>()
+ : factory.GetCreator<commands::SystemResponse>();
+ }
+ case mobile_apis::FunctionID::SendLocationID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SendLocationRequest>()
+ : factory.GetCreator<commands::SendLocationResponse>();
+ }
+ case mobile_apis::FunctionID::DialNumberID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::DialNumberRequest>()
+ : factory.GetCreator<commands::DialNumberResponse>();
+ }
+ case mobile_apis::FunctionID::SendHapticDataID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SendHapticDataRequest>()
+ : factory.GetCreator<commands::SendHapticDataResponse>();
+ }
+ case mobile_apis::FunctionID::OnButtonEventID: {
+ return factory.GetCreator<commands::mobile::OnButtonEventNotification>();
+ }
+ case mobile_apis::FunctionID::OnButtonPressID: {
+ return factory.GetCreator<commands::mobile::OnButtonPressNotification>();
+ }
+ case mobile_apis::FunctionID::OnAudioPassThruID: {
+ return factory.GetCreator<commands::OnAudioPassThruNotification>();
+ }
+ case mobile_apis::FunctionID::OnAppInterfaceUnregisteredID: {
+ return factory
+ .GetCreator<commands::OnAppInterfaceUnregisteredNotification>();
+ }
+ case mobile_apis::FunctionID::OnCommandID: {
+ return factory.GetCreator<commands::OnCommandNotification>();
+ }
+ case mobile_apis::FunctionID::OnTBTClientStateID: {
+ return factory.GetCreator<commands::OnTBTClientStateNotification>();
+ }
+ case mobile_apis::FunctionID::OnDriverDistractionID: {
+ return factory
+ .GetCreator<commands::mobile::OnDriverDistractionNotification>();
+ }
+ case mobile_apis::FunctionID::OnLanguageChangeID: {
+ return factory.GetCreator<commands::OnLanguageChangeNotification>();
+ }
+ case mobile_apis::FunctionID::OnPermissionsChangeID: {
+ return factory.GetCreator<commands::OnPermissionsChangeNotification>();
+ }
+ case mobile_apis::FunctionID::OnHMIStatusID: {
+ using app_mngr::commands::Command;
+ return Command::CommandSource::SOURCE_MOBILE == source
+ ? factory.GetCreator<
+ commands::OnHMIStatusNotificationFromMobile>()
+ : factory.GetCreator<commands::OnHMIStatusNotification>();
+ }
+ case mobile_apis::FunctionID::OnKeyboardInputID: {
+ return factory
+ .GetCreator<commands::mobile::OnKeyBoardInputNotification>();
+ }
+ case mobile_apis::FunctionID::OnTouchEventID: {
+ return factory.GetCreator<commands::mobile::OnTouchEventNotification>();
+ }
+ case mobile_apis::FunctionID::OnSystemRequestID: {
+ return factory
+ .GetCreator<commands::mobile::OnSystemRequestNotification>();
+ }
+ case mobile_apis::FunctionID::OnHashChangeID: {
+ using app_mngr::commands::Command;
+ return factory.GetCreator<commands::mobile::OnHashChangeNotification>();
+ }
+ case mobile_apis::FunctionID::OnWayPointChangeID: {
+ using app_mngr::commands::Command;
+ return factory.GetCreator<commands::OnWayPointChangeNotification>();
+ }
+ case mobile_apis::FunctionID::GenericResponseID: {
+ using app_mngr::commands::Command;
+ return factory.GetCreator<commands::GenericResponse>();
+ }
+ default: { return factory.GetCreator<InvalidCommand>(); }
+ }
+}
+
+MobileCommandFactory::MobileCommandFactory(
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {}
+
+bool MobileCommandFactory::IsAbleToProcess(
+ const int32_t function_id,
+ const application_manager::commands::Command::CommandSource message_source)
+ const {
+ using app_mngr::commands::Command;
+ return get_creator_factory(
+ static_cast<mobile_apis::FunctionID::eType>(function_id),
+ mobile_apis::messageType::INVALID_ENUM,
+ message_source).CanBeCreated();
+}
+
+CommandSharedPtr MobileCommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ mobile_apis::messageType::eType message_type =
+ static_cast<mobile_apis::messageType::eType>(
+ (*message)[strings::params][strings::message_type].asInt());
+
+ mobile_apis::FunctionID::eType function_id =
+ static_cast<mobile_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ LOG4CXX_DEBUG(
+ logger_,
+ "MobileCommandFactory::CreateCommand function_id: " << function_id);
+
+ return get_creator_factory(function_id, message_type, source).create(message);
+}
+
+} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_command_factory.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_command_factory.cc
new file mode 100644
index 0000000000..efdcde7526
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_command_factory.cc
@@ -0,0 +1,78 @@
+/*
+ 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 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/sdl_command_factory.h"
+#include "sdl_rpc_plugin/hmi_command_factory.h"
+#include "sdl_rpc_plugin/mobile_command_factory.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+SDLCommandFactory::SDLCommandFactory(
+ app_mngr::ApplicationManager& app_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : app_manager_(app_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {
+ hmi_command_factory_.reset(new HMICommandFactory(
+ app_manager, rpc_service, hmi_capabilities, policy_handler));
+ mobile_command_factory_.reset(new MobileCommandFactory(
+ app_manager, rpc_service, hmi_capabilities, policy_handler));
+}
+
+app_mngr::CommandSharedPtr SDLCommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ if (app_mngr::commands::Command::SOURCE_HMI == source) {
+ return hmi_command_factory_->CreateCommand(message, source);
+ } else {
+ return mobile_command_factory_->CreateCommand(message, source);
+ }
+}
+
+bool SDLCommandFactory::IsAbleToProcess(
+ const int32_t FunctionID,
+ const application_manager::commands::Command::CommandSource source) const {
+ bool is_hmi_command_factory_able_to_process =
+ hmi_command_factory_->IsAbleToProcess(FunctionID, source);
+ bool is_mobile_command_factory_able_to_process =
+ mobile_command_factory_->IsAbleToProcess(FunctionID, source);
+
+ return app_mngr::commands::Command::SOURCE_HMI == source
+ ? is_hmi_command_factory_able_to_process
+ : is_mobile_command_factory_able_to_process;
+}
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..22b818f5e0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc
@@ -0,0 +1,75 @@
+/*
+ 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 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/sdl_rpc_plugin.h"
+#include "sdl_rpc_plugin/sdl_command_factory.h"
+
+namespace sdl_rpc_plugin {
+namespace plugins = application_manager::plugin_manager;
+
+bool SDLRPCPlugin::Init(
+ application_manager::ApplicationManager& app_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) {
+ command_factory_.reset(new sdl_rpc_plugin::SDLCommandFactory(
+ app_manager, rpc_service, hmi_capabilities, policy_handler));
+ return true;
+}
+
+bool SDLRPCPlugin::IsAbleToProcess(
+ const int32_t function_id,
+ const application_manager::commands::Command::CommandSource
+ message_source) {
+ return command_factory_->IsAbleToProcess(function_id, message_source);
+}
+
+std::string SDLRPCPlugin::PluginName() {
+ return "SDL RPC Plugin";
+}
+
+application_manager::CommandFactory& SDLRPCPlugin::GetCommandFactory() {
+ return *command_factory_;
+}
+
+void SDLRPCPlugin::OnPolicyEvent(
+ application_manager::plugin_manager::PolicyEvent event) {}
+
+void SDLRPCPlugin::OnApplicationEvent(
+ application_manager::plugin_manager::ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application) {}
+
+} // namespace sdl_rpc_plugin
+
+extern "C" application_manager::plugin_manager::RPCPlugin* Create() {
+ return new sdl_rpc_plugin::SDLRPCPlugin();
+}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/CMakeLists.txt b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/CMakeLists.txt
new file mode 100644
index 0000000000..da51c3e4e4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/CMakeLists.txt
@@ -0,0 +1,36 @@
+include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
+
+include_directories(
+ ${GMOCK_INCLUDE_DIRECTORY}
+ ${COMPONENTS_DIR}/application_manager/rpc_plugins/sdl_rpc_plugin/include
+ ${COMPONENTS_DIR}/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/
+ ${COMPONENTS_DIR}/application_manager/test/include/
+ ${POLICY_MOCK_INCLUDE_PATH}/
+)
+
+
+set(COMMANDS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/commands)
+
+file(GLOB SOURCES
+ ${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
+ ${COMPONENTS_DIR}/application_manager/test/mock_application_helper.cc
+ ${COMPONENTS_DIR}/application_manager/src/smart_object_keys.cc
+ ${COMMANDS_TEST_DIR}/hmi/*
+ ${COMMANDS_TEST_DIR}/mobile/*
+ ${COMPONENTS_DIR}/application_manager/src/message.cc
+ ${COMPONENTS_DIR}/application_manager/src/event_engine/*
+)
+
+set(LIBRARIES
+ gmock
+ Utils
+ SmartObjects
+ HMI_API
+ MOBILE_API
+ connectionHandler
+ sdl_rpc_plugin
+ jsoncpp
+ Policy
+)
+
+create_cotired_test("sdl_commands_test" "${SOURCES}" "${LIBRARIES}" )
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/activate_app_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/activate_app_request_test.cc
new file mode 100644
index 0000000000..dcbd21dbe0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/activate_app_request_test.cc
@@ -0,0 +1,125 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/activate_app_request.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace activate_app_request {
+
+using ::testing::_;
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::ActivateAppRequest;
+using am::commands::CommandImpl;
+
+using ::test::components::application_manager_test::MockApplication;
+
+typedef SharedPtr<MockApplication> MockAppPtr;
+typedef ::utils::SharedPtr<ActivateAppRequest> ActivateAppRequestPtr;
+
+MATCHER_P(CheckMessage, level, "") {
+ return level ==
+ static_cast<mobile_apis::HMILevel::eType>(
+ (*arg)[strings::msg_params][strings::activate_app_hmi_level]
+ .asInt());
+}
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kCorrelationId = 2u;
+} // namespace
+
+class ActivateAppRequestTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateMsgParams() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = kAppId;
+ msg_params[strings::correlation_id] = kCorrelationId;
+ (*msg)[strings::msg_params] = msg_params;
+ (*msg)[strings::params][strings::app_id] = kAppId;
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationId;
+ (*msg)[strings::app_id] = kAppId;
+ return msg;
+ }
+};
+
+TEST_F(ActivateAppRequestTest, Run_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ MockAppPtr app = CreateMockApp();
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
+
+ ON_CALL(*app, hmi_app_id()).WillByDefault(Return(kAppId));
+
+// TODO(OKozlov) Investigate and fix issue with using log
+#ifdef ENABLE_LOG
+ (*msg)[strings::msg_params][strings::activate_app_hmi_level] =
+ mobile_apis::HMILevel::HMI_FULL;
+#endif
+ ActivateAppRequestPtr command(CreateCommand<ActivateAppRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, set_application_id(kCorrelationId, kAppId));
+#ifdef ENABLE_LOG
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToHMI(CheckMessage(mobile_apis::HMILevel::HMI_FULL)));
+#else
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToHMI(msg)));
+#endif
+ command->Run();
+
+#ifndef ENABLE_LOG
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*msg)[strings::params][strings::protocol_version].asInt());
+#endif
+}
+
+} // namespace activate_app_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/add_statistics_info_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/add_statistics_info_notification_test.cc
new file mode 100644
index 0000000000..d43d70b5ca
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/add_statistics_info_notification_test.cc
@@ -0,0 +1,85 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/add_statistics_info_notification.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace add_statistics_info_notification {
+
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_notification = ::application_manager::hmi_notification;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::AddStatisticsInfoNotification;
+using am::commands::CommandImpl;
+using policy::PolicyHandler;
+using policy_test::MockPolicyHandlerInterface;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+typedef ::utils::SharedPtr<AddStatisticsInfoNotification> NotificationPtr;
+
+namespace {
+const uint32_t kStatisticType = 1u;
+} // namespace
+
+class AddStatisticsInfoNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(AddStatisticsInfoNotificationTest, Run_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::msg_params][am::hmi_notification::statistic_type] =
+ kStatisticType;
+ NotificationPtr command(CreateCommand<AddStatisticsInfoNotification>(msg));
+
+ EXPECT_CALL(mock_policy_handler_, AddStatisticsInfo(kStatisticType));
+
+ command->Run();
+}
+
+} // namespace add_statistics_info_notification
+} // 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/allow_all_apps_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/allow_all_apps_response_test.cc
new file mode 100644
index 0000000000..4b7fb0fc09
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/allow_all_apps_response_test.cc
@@ -0,0 +1,76 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/allow_all_apps_response.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace allow_all_apps_response {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::AllowAllAppsResponse;
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+typedef ::utils::SharedPtr<AllowAllAppsResponse> ResponsePtr;
+
+namespace {
+const bool kResponseIsAllowed = true;
+} //
+
+class AllowAllAppsResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(AllowAllAppsResponseTest, Run_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::msg_params][hmi_response::allowed] = kResponseIsAllowed;
+
+ ResponsePtr command(CreateCommand<AllowAllAppsResponse>(msg));
+
+ EXPECT_CALL(app_mngr_, SetAllAppsAllowed(kResponseIsAllowed));
+
+ command->Run();
+}
+
+} // namespace allow_all_apps_response
+} // 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/allow_app_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/allow_app_response_test.cc
new file mode 100644
index 0000000000..3681bf01b6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/allow_app_response_test.cc
@@ -0,0 +1,95 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/allow_app_response.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace allow_app_response {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::AllowAppResponse;
+using ::testing::_;
+using ::testing::Return;
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const bool kIsResponseAllowed = true;
+}
+
+typedef ::utils::SharedPtr<AllowAppResponse> ResponsePtr;
+
+class AllowAppResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(AllowAppResponseTest, Run_AppCreated_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][hmi_response::allowed] = kIsResponseAllowed;
+
+ ResponsePtr command(CreateCommand<AllowAppResponse>(msg));
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_app_allowed(kIsResponseAllowed));
+
+ command->Run();
+}
+
+TEST_F(AllowAppResponseTest, Run_AppNotCreated_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][hmi_response::allowed] = kIsResponseAllowed;
+
+ ResponsePtr command(CreateCommand<AllowAppResponse>(msg));
+
+ MockAppPtr mock_app;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+
+ command->Run();
+}
+
+} // namespace allow_app_response
+} // 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/basic_communication_get_system_time_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/basic_communication_get_system_time_request_test.cc
new file mode 100644
index 0000000000..78fec997e9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/basic_communication_get_system_time_request_test.cc
@@ -0,0 +1,72 @@
+/*
+ * 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 names of the copyright holders 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/basic_communication_get_system_time_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/command_request_test.h"
+#include "protocol_handler/mock_protocol_handler.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace basic_communication_get_system_time_request {
+
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::BasicCommunicationGetSystemTimeRequest;
+using namespace ::protocol_handler;
+
+class BasicCommunicationGetSystemTimeRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(BasicCommunicationGetSystemTimeRequestTest, OnTimeout) {
+ MessageSharedPtr msg = CreateMessage();
+ protocol_handler_test::MockProtocolHandler mock_protocol_handler;
+
+ auto command = CreateCommand<BasicCommunicationGetSystemTimeRequest>(msg);
+
+ ON_CALL(app_mngr_, protocol_handler())
+ .WillByDefault(ReturnRef(mock_protocol_handler));
+ EXPECT_CALL(mock_protocol_handler, NotifyOnFailedHandshake());
+
+ command->onTimeOut();
+}
+
+} // namespace basic_communication_get_system_time_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/basic_communication_get_system_time_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/basic_communication_get_system_time_response_test.cc
new file mode 100644
index 0000000000..8f56c6462c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/basic_communication_get_system_time_response_test.cc
@@ -0,0 +1,79 @@
+/*
+ * 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 names of the copyright holders 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 "application_manager/commands/commands_test.h"
+#include "hmi/basic_communication_get_system_time_response.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/smart_object_keys.h"
+#include "interfaces/HMI_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace basic_communication_get_system_time_response {
+
+using sdl_rpc_plugin::commands::BasicCommunicationGetSystemTimeResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+using testing::ReturnRef;
+
+ACTION_P(GetEventId, event_id) {
+ *event_id = arg0.id();
+}
+
+class BasicCommunicationGetSystemTimeResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(BasicCommunicationGetSystemTimeResponseTest, Run_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ MockEventDispatcher mock_event_dispatcher;
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+
+ auto command(CreateCommand<BasicCommunicationGetSystemTimeResponse>(msg));
+
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+
+ command->Run();
+
+ EXPECT_EQ(hmi_apis::FunctionID::BasicCommunication_GetSystemTime, event_id);
+}
+
+} // namespace basic_communication_get_system_time_response
+} // 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
new file mode 100644
index 0000000000..930e024b4b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc
@@ -0,0 +1,112 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/button_get_capabilities_response.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace button_get_capabilities_response {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::ButtonGetCapabilitiesResponse;
+using ::testing::ReturnRef;
+using ::testing::NiceMock;
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+typedef ::utils::SharedPtr<ButtonGetCapabilitiesResponse> ResponsePtr;
+
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+class ButtonGetCapabilitiesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateMsgParams() {
+ capabilities_[strings::name] = hmi_apis::Common_ButtonName::OK;
+ preset_bank_capabilities_ = true;
+
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::msg_params][hmi_response::capabilities] = (capabilities_);
+ (*msg)[strings::msg_params][hmi_response::preset_bank_capabilities] =
+ (preset_bank_capabilities_);
+
+ return msg;
+ }
+
+ SmartObject capabilities_;
+ SmartObject preset_bank_capabilities_;
+};
+
+TEST_F(ButtonGetCapabilitiesResponseTest, Run_CodeSuccess_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ ResponsePtr command(CreateCommand<ButtonGetCapabilitiesResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_button_capabilities(capabilities_));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_preset_bank_capabilities(preset_bank_capabilities_));
+
+ command->Run();
+}
+
+TEST_F(ButtonGetCapabilitiesResponseTest, Run_CodeAborted_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ ResponsePtr command(CreateCommand<ButtonGetCapabilitiesResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_button_capabilities(capabilities_))
+ .Times(0);
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_preset_bank_capabilities(preset_bank_capabilities_)).Times(0);
+
+ command->Run();
+}
+
+} // namespace button_get_capabilities_response
+} // 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/close_popup_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/close_popup_response_test.cc
new file mode 100644
index 0000000000..1bae77bb30
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/close_popup_response_test.cc
@@ -0,0 +1,74 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "hmi/close_popup_response.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace close_popup_response {
+
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+using application_manager::commands::ResponseFromHMI;
+using sdl_rpc_plugin::commands::ClosePopupResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+
+class ClosePopupResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+};
+
+TEST_F(ClosePopupResponseTest, RUN_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ ResponseFromHMIPtr command(CreateCommand<ClosePopupResponse>(command_msg));
+
+ command->Run();
+}
+
+} // namespace close_popup_response
+} // 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/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
new file mode 100644
index 0000000000..2374609774
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
@@ -0,0 +1,583 @@
+/*
+ * 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 "application_manager/commands/command_request_test.h"
+
+#include <stdint.h>
+#include <string>
+#include <vector>
+#include "gtest/gtest.h"
+
+#include "hmi/allow_all_apps_request.h"
+#include "hmi/allow_all_apps_response.h"
+#include "hmi/allow_app_request.h"
+#include "hmi/allow_app_response.h"
+#include "hmi/navi_audio_start_stream_request.h"
+#include "hmi/navi_audio_start_stream_response.h"
+#include "hmi/navi_audio_stop_stream_request.h"
+#include "hmi/navi_audio_stop_stream_response.h"
+#include "hmi/update_device_list_request.h"
+#include "hmi/update_device_list_response.h"
+#include "hmi/on_update_device_list.h"
+#include "hmi/on_start_device_discovery.h"
+#include "hmi/update_app_list_request.h"
+#include "hmi/update_app_list_response.h"
+#include "hmi/on_find_applications.h"
+#include "hmi/sdl_get_list_of_permissions_request.h"
+#include "hmi/sdl_get_list_of_permissions_response.h"
+#include "hmi/sdl_get_user_friendly_message_request.h"
+#include "hmi/sdl_get_user_friendly_message_response.h"
+#include "hmi/sdl_get_status_update_request.h"
+#include "hmi/sdl_get_status_update_response.h"
+#include "hmi/on_status_update_notification.h"
+#include "hmi/update_sdl_request.h"
+#include "hmi/update_sdl_response.h"
+#include "hmi/activate_app_request.h"
+#include "hmi/activate_app_response.h"
+#include "hmi/mixing_audio_supported_request.h"
+#include "hmi/mixing_audio_supported_response.h"
+#include "hmi/on_allow_sdl_functionality_notification.h"
+#include "hmi/on_app_permission_changed_notification.h"
+#include "hmi/on_app_permission_consent_notification.h"
+#include "hmi/on_app_activated_notification.h"
+#include "hmi/on_audio_data_streaming_notification.h"
+#include "hmi/on_video_data_streaming_notification.h"
+#include "hmi/on_sdl_consent_needed_notification.h"
+#include "hmi/on_exit_all_applications_notification.h"
+#include "hmi/on_exit_application_notification.h"
+#include "hmi/on_put_file_notification.h"
+#include "hmi/on_resume_audio_source_notification.h"
+#include "hmi/on_ignition_cycle_over_notification.h"
+#include "hmi/on_system_info_changed_notification.h"
+#include "hmi/get_system_info_request.h"
+#include "hmi/get_system_info_response.h"
+#include "hmi/close_popup_request.h"
+#include "hmi/close_popup_response.h"
+#include "hmi/button_get_capabilities_request.h"
+#include "hmi/button_get_capabilities_response.h"
+#include "hmi/ui_add_command_request.h"
+#include "hmi/ui_add_command_response.h"
+#include "hmi/ui_delete_command_request.h"
+#include "hmi/ui_delete_command_response.h"
+#include "hmi/ui_add_submenu_request.h"
+#include "hmi/ui_add_submenu_response.h"
+#include "hmi/ui_delete_submenu_request.h"
+#include "hmi/ui_delete_submenu_response.h"
+#include "hmi/ui_get_supported_languages_request.h"
+#include "hmi/ui_get_supported_languages_response.h"
+#include "hmi/ui_get_language_request.h"
+#include "hmi/ui_get_language_response.h"
+#include "hmi/ui_get_capabilities_request.h"
+#include "hmi/ui_get_capabilities_response.h"
+#include "hmi/ui_change_registration_request.h"
+#include "hmi/ui_change_registration_response.h"
+#include "hmi/ui_show_request.h"
+#include "hmi/ui_show_response.h"
+#include "hmi/ui_alert_request.h"
+#include "hmi/ui_alert_response.h"
+#include "hmi/ui_is_ready_request.h"
+#include "hmi/ui_is_ready_response.h"
+#include "hmi/ui_slider_request.h"
+#include "hmi/ui_slider_response.h"
+#include "hmi/ui_set_media_clock_timer_request.h"
+#include "hmi/ui_set_media_clock_timer_response.h"
+#include "hmi/ui_set_global_properties_request.h"
+#include "hmi/ui_set_global_properties_response.h"
+#include "hmi/ui_scrollable_message_request.h"
+#include "hmi/ui_scrollable_message_response.h"
+#include "hmi/ui_set_app_icon_request.h"
+#include "hmi/ui_set_app_icon_response.h"
+#include "hmi/ui_perform_audio_pass_thru_response.h"
+#include "hmi/ui_perform_audio_pass_thru_request.h"
+#include "hmi/ui_end_audio_pass_thru_request.h"
+#include "hmi/ui_end_audio_pass_thru_response.h"
+#include "hmi/ui_perform_interaction_request.h"
+#include "hmi/ui_perform_interaction_response.h"
+#include "hmi/vr_is_ready_request.h"
+#include "hmi/vr_is_ready_response.h"
+#include "hmi/vr_add_command_request.h"
+#include "hmi/vr_add_command_response.h"
+#include "hmi/vr_delete_command_request.h"
+#include "hmi/vr_delete_command_response.h"
+#include "hmi/vr_change_registration_request.h"
+#include "hmi/vr_change_registration_response.h"
+#include "hmi/vr_get_supported_languages_request.h"
+#include "hmi/vr_get_supported_languages_response.h"
+#include "hmi/vr_get_language_request.h"
+#include "hmi/vr_get_language_response.h"
+#include "hmi/vr_get_capabilities_request.h"
+#include "hmi/vr_get_capabilities_response.h"
+#include "hmi/tts_is_ready_request.h"
+#include "hmi/tts_is_ready_response.h"
+#include "hmi/tts_change_registration_request.h"
+#include "hmi/tts_change_registration_response.h"
+#include "hmi/tts_get_supported_languages_request.h"
+#include "hmi/tts_get_supported_languages_response.h"
+#include "hmi/tts_get_language_request.h"
+#include "hmi/tts_get_language_response.h"
+#include "hmi/tts_stop_speaking_request.h"
+#include "hmi/tts_stop_speaking_response.h"
+#include "hmi/tts_speak_request.h"
+#include "hmi/tts_speak_response.h"
+#include "hmi/tts_set_global_properties_request.h"
+#include "hmi/tts_set_global_properties_response.h"
+#include "hmi/tts_get_capabilities_request.h"
+#include "hmi/tts_get_capabilities_response.h"
+#include "hmi/vr_perform_interaction_request.h"
+#include "hmi/vr_perform_interaction_response.h"
+#include "hmi/sdl_activate_app_request.h"
+#include "hmi/sdl_activate_app_response.h"
+#include "hmi/on_app_permission_changed_notification.h"
+#include "hmi/on_event_changed_notification.h"
+#include "hmi/navi_is_ready_request.h"
+#include "hmi/navi_show_constant_tbt_request.h"
+#include "hmi/navi_show_constant_tbt_response.h"
+#include "hmi/navi_is_ready_response.h"
+#include "hmi/navi_alert_maneuver_request.h"
+#include "hmi/navi_alert_maneuver_response.h"
+#include "hmi/navi_update_turn_list_request.h"
+#include "hmi/navi_update_turn_list_response.h"
+#include "hmi/navi_subscribe_way_points_request.h"
+#include "hmi/navi_subscribe_way_points_response.h"
+#include "hmi/navi_unsubscribe_way_points_request.h"
+#include "hmi/navi_unsubscribe_way_points_response.h"
+#include "hmi/navi_get_way_points_request.h"
+#include "hmi/navi_get_way_points_response.h"
+#include "hmi/on_ready_notification.h"
+#include "hmi/on_device_chosen_notification.h"
+#include "hmi/on_file_removed_notification.h"
+#include "hmi/on_system_context_notification.h"
+#include "hmi/on_app_registered_notification.h"
+#include "hmi/on_app_unregistered_notification.h"
+#include "hmi/on_driver_distraction_notification.h"
+#include "hmi/on_tts_started_notification.h"
+#include "hmi/on_tts_stopped_notification.h"
+#include "hmi/on_vr_started_notification.h"
+#include "hmi/on_vr_stopped_notification.h"
+#include "hmi/on_vr_command_notification.h"
+#include "hmi/on_ui_command_notification.h"
+#include "hmi/on_app_deactivated_notification.h"
+#include "hmi/on_ui_language_change_notification.h"
+#include "hmi/on_vr_language_change_notification.h"
+#include "hmi/on_tts_language_change_notification.h"
+#include "hmi/on_navi_tbt_client_state_notification.h"
+#include "hmi/on_navi_way_point_change_notification.h"
+#include "hmi/on_button_event_notification.h"
+#include "hmi/on_button_press_notification.h"
+#include "hmi/on_button_subscription_notification.h"
+#include "hmi/on_ui_keyboard_input_notification.h"
+#include "hmi/on_ui_touch_event_notification.h"
+#include "hmi/on_ui_reset_timeout_notification.h"
+#include "hmi/navi_start_stream_request.h"
+#include "hmi/navi_start_stream_response.h"
+#include "hmi/navi_stop_stream_request.h"
+#include "hmi/navi_stop_stream_response.h"
+#include "hmi/on_system_request_notification.h"
+#include "hmi/ui_set_display_layout_request.h"
+#include "hmi/ui_set_display_layout_response.h"
+#include "hmi/on_sdl_close_notification.h"
+#include "hmi/on_sdl_persistence_complete_notification.h"
+#include "hmi/on_record_start_notification.h"
+#include "hmi/add_statistics_info_notification.h"
+#include "hmi/on_system_error_notification.h"
+#include "hmi/basic_communication_system_request.h"
+#include "hmi/basic_communication_system_response.h"
+#include "hmi/sdl_policy_update.h"
+#include "hmi/sdl_policy_update_response.h"
+#include "hmi/on_received_policy_update.h"
+#include "hmi/on_policy_update.h"
+#include "hmi/get_urls.h"
+#include "hmi/get_urls_response.h"
+#include "hmi/on_device_state_changed_notification.h"
+#include "hmi/navi_send_location_request.h"
+#include "hmi/navi_send_location_response.h"
+#include "hmi/on_tts_reset_timeout_notification.h"
+#include "hmi/dial_number_request.h"
+#include "hmi/dial_number_response.h"
+#include "hmi/on_vi_gps_data_notification.h"
+#include "hmi/on_vi_speed_notification.h"
+#include "hmi/on_vi_rpm_notification.h"
+#include "hmi/on_vi_fuel_level_notification.h"
+#include "hmi/on_vi_fuel_level_state_notification.h"
+#include "hmi/on_vi_instant_fuel_consumption_notification.h"
+#include "hmi/on_vi_external_temperature_notification.h"
+#include "hmi/on_vi_vin_notification.h"
+#include "hmi/on_vi_prndl_notification.h"
+#include "hmi/on_vi_tire_pressure_notification.h"
+#include "hmi/on_vi_odometer_notification.h"
+#include "hmi/on_vi_belt_status_notification.h"
+#include "hmi/on_vi_body_information_notification.h"
+#include "hmi/on_vi_device_status_notification.h"
+#include "hmi/on_vi_driver_braking_notification.h"
+#include "hmi/on_vi_wiper_status_notification.h"
+#include "hmi/on_vi_head_lamp_status_notification.h"
+#include "hmi/on_vi_engine_torque_notification.h"
+#include "hmi/on_vi_acc_pedal_position_notification.h"
+#include "hmi/on_vi_steering_wheel_angle_notification.h"
+#include "hmi/on_vi_my_key_notification.h"
+#include "hmi/ui_set_icon_request.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 {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace dummy_hmi_commands_test {
+
+namespace commands = sdl_rpc_plugin::commands;
+
+using ::testing::_;
+using ::testing::NotNull;
+using ::testing::Types;
+using application_manager::commands::MessageSharedPtr;
+using ::test::components::event_engine_test::MockEventDispatcher;
+using ::test::components::application_manager_test::MockApplicationManager;
+using ::test::components::application_manager_test::
+ MockApplicationManagerSettings;
+using ::application_manager::ApplicationSharedPtr;
+using ::test::components::application_manager_test::MockApplication;
+
+template <class Command>
+class HMICommandsTest : public components::commands_test::CommandRequestTest<
+ CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+
+ void InitCommand(const uint32_t& timeout) OVERRIDE {
+ stream_retry_.first = 0;
+ stream_retry_.second = 0;
+ EXPECT_CALL(app_mngr_settings_, default_timeout())
+ .WillOnce(ReturnRef(timeout));
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_));
+ ON_CALL(app_mngr_, get_settings())
+ .WillByDefault(ReturnRef(app_mngr_settings_));
+ ON_CALL(app_mngr_settings_, start_stream_retry_amount())
+ .WillByDefault(ReturnRef(stream_retry_));
+ }
+
+ protected:
+ std::pair<uint32_t, int32_t> stream_retry_;
+};
+
+template <class Command>
+class HMICommandsTestFirst : public HMICommandsTest<Command> {
+ public:
+ using typename HMICommandsTest<Command>::CommandType;
+};
+
+template <class Command>
+class HMICommandsTestSecond : public HMICommandsTest<Command> {
+ public:
+ using typename HMICommandsTest<Command>::CommandType;
+};
+
+template <class Command>
+class HMICommandsTestThird : public HMICommandsTest<Command> {
+ public:
+ using typename HMICommandsTest<Command>::CommandType;
+};
+
+template <class Command>
+class HMICommandsTestFourth : public HMICommandsTest<Command> {
+ public:
+ using typename HMICommandsTest<Command>::CommandType;
+};
+
+template <class Command>
+class HMICommandsTestFifth : public HMICommandsTest<Command> {
+ public:
+ using typename HMICommandsTest<Command>::CommandType;
+};
+
+/* macro TYPED_TEST_CASE takes max 50 args. That is why there are few
+ * TYPED_TEST_CASE for HMI and mobile commands
+ */
+
+typedef Types<commands::OnStartDeviceDiscovery,
+ commands::UpdateDeviceListResponse,
+ commands::UpdateDeviceListRequest,
+ commands::ActivateAppResponse,
+ commands::ActivateAppRequest,
+ commands::GetSystemInfoResponse,
+ commands::GetSystemInfoRequest,
+ commands::SDLActivateAppResponse,
+ commands::SDLActivateAppRequest,
+ commands::SDLPolicyUpdateResponse,
+ commands::SDLPolicyUpdate,
+ commands::GetUrlsResponse,
+ commands::GetUrls,
+ commands::OnAppPermissionChangedNotification,
+ commands::SDLGetListOfPermissionsResponse,
+ commands::SDLGetListOfPermissionsRequest,
+ commands::SDLGetUserFriendlyMessageResponse,
+ commands::SDLGetUserFriendlyMessageRequest,
+ commands::SDLGetStatusUpdateResponse,
+ commands::SDLGetStatusUpdateRequest,
+ commands::OnStatusUpdateNotification,
+ commands::OnAppPermissionConsentNotification,
+ commands::MixingAudioSupportedResponse,
+ commands::MixingAudioSupportedRequest,
+ commands::OnExitAllApplicationsNotification,
+ commands::UIAddCommandResponse,
+ commands::UIAddCommandRequest,
+ commands::UIDeleteCommandResponse,
+ commands::UIDeleteCommandRequest,
+ commands::UIAddSubmenuResponse,
+ commands::UIAddSubmenuRequest,
+ commands::UIDeleteSubmenuResponse,
+ commands::UIDeleteSubmenuRequest,
+ commands::UISetMediaClockTimerResponse,
+ commands::UISetMediaClockTimerRequest,
+ commands::UIPerformInteractionResponse,
+ commands::UIPerformInteractionRequest,
+ commands::UISetGlobalPropertiesResponse,
+ commands::UISetGlobalPropertiesRequest,
+ commands::UIScrollableMessageResponse,
+ commands::UIScrollableMessageRequest,
+ commands::UISetAppIconResponse,
+ commands::UISetAppIconRequest,
+ commands::UIGetSupportedLanguagesResponse,
+ commands::UIGetSupportedLanguagesRequest,
+ commands::UIGetLanguageResponse,
+ commands::UIGetLanguageRequest,
+ commands::UIGetCapabilitiesResponse,
+ commands::UIGetCapabilitiesRequest,
+ commands::UIChangeRegistratioResponse> HMICommandsListFirst;
+
+typedef Types<commands::UIChangeRegistrationRequest,
+ commands::UIPerformAudioPassThruResponse,
+ commands::UIPerformAudioPassThruRequest,
+ commands::UIEndAudioPassThruResponse,
+ commands::UIEndAudioPassThruRequest,
+ commands::UIAlertResponse,
+ commands::UIAlertRequest,
+ commands::VRIsReadyResponse,
+ commands::VRIsReadyRequest,
+ commands::VRAddCommandResponse,
+ commands::VRAddCommandRequest,
+ commands::VRDeleteCommandResponse,
+ commands::VRDeleteCommandRequest,
+ commands::VRChangeRegistrationResponse,
+ commands::VRChangeRegistrationRequest,
+ commands::VRGetSupportedLanguagesResponse,
+ commands::VRGetSupportedLanguagesRequest,
+ commands::VRGetLanguageResponse,
+ commands::VRGetLanguageRequest,
+ commands::VRGetCapabilitiesResponse,
+ commands::VRGetCapabilitiesRequest,
+ commands::TTSIsReadyResponse,
+ commands::TTSIsReadyRequest,
+ commands::TTSChangeRegistratioResponse,
+ commands::TTSChangeRegistrationRequest,
+ commands::TTSGetSupportedLanguagesResponse,
+ commands::TTSGetSupportedLanguagesRequest,
+ commands::TTSStopSpeakingResponse,
+ commands::TTSStopSpeakingRequest,
+ commands::TTSGetLanguageResponse,
+ commands::TTSGetLanguageRequest,
+ commands::TTSSpeakResponse,
+ commands::TTSSpeakRequest,
+ commands::TTSSetGlobalPropertiesResponse,
+ commands::TTSSetGlobalPropertiesRequest,
+ commands::TTSGetCapabilitiesResponse,
+ commands::TTSGetCapabilitiesRequest,
+ commands::OnTTSStartedNotification,
+ commands::OnTTSStoppedNotification,
+ commands::OnAppActivatedNotification,
+ commands::OnExitApplicationNotification,
+ commands::UIShowResponse,
+ commands::UIShowRequest,
+ commands::UISliderResponse,
+ commands::UISliderRequest,
+ commands::ClosePopupResponse,
+ commands::ClosePopupRequest,
+ commands::UIIsReadyResponse,
+ commands::UIIsReadyRequest> HMICommandsListSecond;
+
+typedef Types<commands::NaviIsReadyResponse,
+ commands::NaviIsReadyRequest,
+ commands::NaviAlertManeuverResponse,
+ commands::NaviAlertManeuverRequest,
+ commands::NaviGetWayPointsResponse,
+ commands::NaviGetWayPointsRequest,
+ commands::NaviUpdateTurnListResponse,
+ commands::NaviUpdateTurnListRequest,
+ commands::NaviShowConstantTBTResponse,
+ commands::NaviShowConstantTBTRequest,
+ commands::NaviSubscribeWayPointsResponse,
+ commands::NaviSubscribeWayPointsRequest,
+ commands::NaviUnsubscribeWayPointsResponse,
+ commands::NaviUnSubscribeWayPointsRequest,
+ commands::ButtonGetCapabilitiesResponse,
+ commands::ButtonGetCapabilitiesRequest,
+ commands::OnAllowSDLFunctionalityNotification,
+ commands::OnSDLConsentNeededNotification,
+ commands::UpdateSDLResponse,
+ commands::UpdateSDLRequest,
+ commands::OnIgnitionCycleOverNotification,
+ commands::OnSystemInfoChangedNotification,
+ commands::OnReadyNotification,
+ commands::OnDeviceChosenNotification,
+ commands::OnSystemContextNotification,
+ sdl_rpc_plugin::commands::hmi::OnDriverDistractionNotification,
+ commands::OnUpdateDeviceList,
+ commands::OnAppRegisteredNotification,
+ commands::OnAppUnregisteredNotification,
+ commands::OnFindApplications,
+ commands::UpdateAppListResponse,
+ commands::UpdateAppListRequest,
+ commands::OnVRStartedNotification,
+ commands::OnVRStoppedNotification,
+ commands::OnVRCommandNotification,
+ commands::OnUICommandNotification,
+ commands::OnAppDeactivatedNotification> HMICommandsListThird;
+
+typedef Types<commands::hmi::OnButtonEventNotification,
+ commands::hmi::OnButtonPressNotification,
+ commands::hmi::OnButtonSubscriptionNotification,
+ commands::OnNaviTBTClientStateNotification,
+ commands::hmi::OnUIKeyBoardInputNotification,
+ commands::hmi::OnUITouchEventNotification,
+ commands::hmi::OnUIResetTimeoutNotification,
+ commands::NaviStartStreamResponse,
+ commands::NaviStartStreamRequest,
+ commands::NaviStopStreamResponse,
+ commands::NaviStopStreamRequest,
+ commands::AudioStartStreamResponse,
+ commands::AudioStartStreamRequest,
+ commands::AudioStopStreamResponse,
+ commands::AudioStopStreamRequest,
+ commands::OnAudioDataStreamingNotification,
+ commands::OnVideoDataStreamingNotification,
+ commands::VRPerformInteractionResponse,
+ commands::VRPerformInteractionRequest,
+ commands::OnSystemRequestNotification,
+ commands::OnPutFileNotification,
+ commands::OnResumeAudioSourceNotification,
+ commands::UiSetDisplayLayoutResponse,
+ commands::UiSetDisplayLayoutRequest,
+ commands::OnSDLCloseNotification,
+ commands::OnSDLPersistenceCompleteNotification,
+ commands::OnFileRemovedNotification,
+ commands::OnRecordStartdNotification,
+ commands::BasicCommunicationSystemResponse,
+ commands::BasicCommunicationSystemRequest,
+ commands::NaviSendLocationResponse,
+ commands::NaviSendLocationRequest,
+ commands::AddStatisticsInfoNotification,
+ commands::OnSystemErrorNotification,
+ commands::OnReceivedPolicyUpdate,
+ commands::OnPolicyUpdate,
+ commands::OnDeviceStateChangedNotification,
+ commands::hmi::OnTTSResetTimeoutNotification,
+ commands::hmi::DialNumberResponse,
+ commands::hmi::DialNumberRequest,
+ commands::OnEventChangedNotification,
+ commands::OnNaviWayPointChangeNotification,
+ commands::OnUILanguageChangeNotification,
+ commands::OnVRLanguageChangeNotification,
+ commands::OnTTSLanguageChangeNotification> HMICommandsListFourth;
+
+typedef Types<commands::OnVIGpsDataNotification,
+ commands::OnVISpeedNotification,
+ commands::OnVIRpmNotification,
+ commands::OnVIFuelLevelNotification,
+ commands::OnVIFuelLevelStateNotification,
+ commands::OnVIInstantFuelConsumptionNotification,
+ commands::OnVIExternalTemperatureNotification,
+ commands::OnVIVinNotification,
+ commands::OnVIPrndlNotification,
+ commands::OnVITirePressureNotification,
+ commands::OnVIOdometerNotification,
+ commands::OnVIBeltStatusNotification,
+ commands::OnVIBodyInformationNotification,
+ commands::OnVIDeviceStatusNotification,
+ commands::OnVIDriverBrakingNotification,
+ commands::OnVIWiperStatusNotification,
+ commands::OnVIHeadLampStatusNotification,
+ commands::OnVIEngineTorqueNotification,
+ commands::OnVIAccPedalPositionNotification,
+ commands::OnVISteeringWheelAngleNotification,
+ commands::OnVIMyKeyNotification,
+ commands::AllowAllAppsRequest,
+ commands::AllowAllAppsResponse,
+ commands::AllowAppRequest,
+ commands::AllowAppResponse> HMICommandsListFifth;
+
+TYPED_TEST_CASE(HMICommandsTestFirst, HMICommandsListFirst);
+TYPED_TEST_CASE(HMICommandsTestSecond, HMICommandsListSecond);
+TYPED_TEST_CASE(HMICommandsTestThird, HMICommandsListThird);
+TYPED_TEST_CASE(HMICommandsTestFourth, HMICommandsListFourth);
+TYPED_TEST_CASE(HMICommandsTestFifth, HMICommandsListFifth);
+
+TYPED_TEST(HMICommandsTestFirst, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+
+TYPED_TEST(HMICommandsTestSecond, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+TYPED_TEST(HMICommandsTestThird, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+
+TYPED_TEST(HMICommandsTestFourth, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+
+TYPED_TEST(HMICommandsTestFifth, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+
+} // namespace dummy_hmi_commands_test
+} // 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/get_system_info_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_request_test.cc
new file mode 100644
index 0000000000..6262e1dd8a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_request_test.cc
@@ -0,0 +1,99 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "hmi/get_system_info_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace get_system_info_request {
+
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::GetSystemInfoRequest;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 1u;
+} // namespace
+
+class GetSystemInfoRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(GetSystemInfoRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][strings::correlation_id] = kCorrelationId;
+
+ RequestToHMIPtr command(CreateCommand<GetSystemInfoRequest>(command_msg));
+
+ const uint32_t kAppId = command->application_id();
+
+ EXPECT_CALL(app_mngr_, set_application_id(kCorrelationId, kAppId));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::msg_params][strings::app_id].asUInt(),
+ kAppId);
+ EXPECT_EQ((*command_msg)[strings::params][strings::correlation_id].asUInt(),
+ kCorrelationId);
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+} // namespace get_system_info_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/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
new file mode 100644
index 0000000000..3a68264e2a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc
@@ -0,0 +1,140 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "hmi/get_system_info_response.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/commands/commands_test.h"
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace get_system_info_response {
+
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using application_manager::commands::ResponseFromHMI;
+using sdl_rpc_plugin::commands::GetSystemInfoResponse;
+using sdl_rpc_plugin::commands::SystemInfo;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+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 = "";
+} // namespace
+
+class GetSystemInfoResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::msg_params]["ccpu_version"] = ccpu_version;
+ (*command_msg)[strings::msg_params]["wersCountryCode"] = wers_country_code;
+ (*command_msg)[strings::msg_params]["language"] = lang_code;
+
+ return command_msg;
+ }
+
+ SmartObject capabilities_;
+};
+
+TEST_F(GetSystemInfoResponseTest, GetSystemInfo_SUCCESS) {
+ 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));
+
+ 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));
+
+ command->Run();
+}
+
+TEST_F(GetSystemInfoResponseTest, GetSystemInfo_UNSUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::WRONG_LANGUAGE;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ 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_policy_handler_, OnGetSystemInfo("", "", ""));
+
+ command->Run();
+}
+
+} // namespace get_system_info_response
+} // 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/get_urls_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_response_test.cc
new file mode 100644
index 0000000000..05169e5067
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_response_test.cc
@@ -0,0 +1,90 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/commands/response_to_hmi.h"
+#include "hmi/get_urls_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace get_urls_response {
+
+using ::testing::_;
+using ::testing::Return;
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using sdl_rpc_plugin::commands::GetUrlsResponse;
+using am::commands::ResponseToHMI;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<ResponseToHMI> ResponseToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class GetUrlResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(GetUrlResponseTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+
+ ResponseToHMIPtr command(CreateCommand<GetUrlsResponse>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+} // namespace get_urls_response
+} // 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/get_urls_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc
new file mode 100644
index 0000000000..7788cb2ebe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc
@@ -0,0 +1,336 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/message.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command.h"
+#include "hmi/get_urls.h"
+#include "application_manager/policies/policy_handler.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/request_from_hmi.h"
+#include "policy/mock_policy_manager.h"
+#include "application_manager/event_engine/event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace get_urls {
+
+using namespace hmi_apis;
+using namespace policy;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+using ::testing::_;
+using ::testing::SetArgReferee;
+using ::test::components::application_manager_test::MockApplication;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::RequestFromHMI;
+using sdl_rpc_plugin::commands::GetUrls;
+using am::commands::CommandImpl;
+using policy::PolicyHandler;
+using policy_test::MockPolicyHandlerInterface;
+
+typedef SharedPtr<RequestFromHMI> RequestFromHMIPtr;
+
+namespace {
+const uint32_t kInvalidAppId_ = 0u;
+const uint32_t kAppIdForSending = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kServiceType = 0u;
+const std::string kInitialService = "0x0";
+const std::string kPolicyService = "7";
+const std::string kDefaultUrl = "URL is not found";
+const std::string kDefaultId = "default";
+const std::string kPolicyAppId = "policy_app_id";
+} // namespace
+
+class GetUrlsTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr command_msg_;
+ RequestFromHMIPtr request_command_;
+
+ GetUrlsTest() {
+ command_msg_ =
+ CreateMessage(NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
+ (*command_msg_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
+ kInitialService;
+
+ request_command_ = CreateCommand<GetUrls>(command_msg_);
+ }
+};
+
+TEST_F(GetUrlsTest, RUN_SUCCESS) {
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+ // EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(_, _));
+
+ request_command_->Run();
+}
+
+TEST_F(GetUrlsTest, RUN_PolicyNotEnabled_UNSUCCESS) {
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(command_msg_))
+ .WillOnce(Return(true));
+
+ request_command_->Run();
+
+ EXPECT_EQ(am::MessageType::kResponse,
+ (*command_msg_)[strings::params][strings::message_type].asInt());
+ EXPECT_EQ(Common_Result::DATA_NOT_AVAILABLE,
+ (*command_msg_)[strings::params][am::hmi_response::code].asInt());
+}
+
+TEST_F(GetUrlsTest, RUN_EmptyEndpoints_UNSUCCESS) {
+ EndpointUrls endpoints_;
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kServiceType, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(command_msg_))
+ .WillOnce(Return(true));
+
+ request_command_->Run();
+
+ EXPECT_EQ(am::MessageType::kResponse,
+ (*command_msg_)[strings::params][strings::message_type].asInt());
+ EXPECT_EQ(Common_Result::DATA_NOT_AVAILABLE,
+ (*command_msg_)[strings::params][am::hmi_response::code].asInt());
+}
+
+#ifdef EXTENDED_POLICY
+TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_SUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
+ kPolicyService;
+
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+
+ EndpointUrls endpoints_;
+ EndpointData data(kDefaultUrl);
+ endpoints_.push_back(data);
+
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+
+ MockAppPtr mock_app = CreateMockApp();
+
+ EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
+ .WillOnce(Return(kAppIdForSending));
+
+ EXPECT_CALL(app_mngr_, application(kAppIdForSending))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppIdForSending));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(command_msg_))
+ .WillOnce(Return(true));
+
+ request_command_->Run();
+
+ EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
+ am::hmi_request::service));
+
+ EXPECT_EQ(am::MessageType::kResponse,
+ (*command_msg_)[strings::params][strings::message_type].asInt());
+ EXPECT_EQ(Common_Result::SUCCESS,
+ (*command_msg_)[strings::params][am::hmi_response::code].asInt());
+
+ EXPECT_EQ(kAppIdForSending,
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ [strings::app_id].asInt());
+ EXPECT_EQ(kDefaultUrl,
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ [strings::url].asString());
+}
+
+TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_IncorrectIdForSending_UNSUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
+ kPolicyService;
+
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+
+ EndpointUrls endpoints_;
+ EndpointData data(kDefaultUrl);
+ endpoints_.push_back(data);
+
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+
+ EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
+ .WillOnce(Return(kInvalidAppId_));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(command_msg_))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_, application(kInvalidAppId_)).Times(0);
+
+ request_command_->Run();
+}
+
+TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_ApplicationIsNotValid_UNSUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
+ kPolicyService;
+
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+
+ EndpointUrls endpoints_;
+ EndpointData data(kDefaultUrl);
+ endpoints_.push_back(data);
+
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+
+ MockAppPtr invalid_mock_app;
+
+ EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
+ .WillOnce(Return(kAppIdForSending));
+
+ EXPECT_CALL(app_mngr_, application(kAppIdForSending))
+ .WillOnce(Return(invalid_mock_app));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(command_msg_))
+ .WillOnce(Return(true));
+
+ request_command_->Run();
+
+ EXPECT_EQ(am::MessageType::kResponse,
+ (*command_msg_)[strings::params][strings::message_type].asInt());
+ EXPECT_EQ(Common_Result::DATA_NOT_AVAILABLE,
+ (*command_msg_)[strings::params][am::hmi_response::code].asInt());
+}
+
+TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_FoundURLForApplication_SUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
+ kPolicyService;
+
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+
+ EndpointUrls endpoints_;
+ EndpointData data(kDefaultUrl);
+ data.app_id = kPolicyAppId;
+ endpoints_.push_back(data);
+
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+
+ MockAppPtr mock_app = CreateMockApp();
+
+ EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
+ .WillOnce(Return(kAppIdForSending));
+
+ EXPECT_CALL(app_mngr_, application(kAppIdForSending))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, policy_app_id()).WillOnce(Return(kPolicyAppId));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(command_msg_))
+ .WillOnce(Return(true));
+
+ request_command_->Run();
+
+ EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
+ am::hmi_request::service));
+
+ EXPECT_EQ(am::MessageType::kResponse,
+ (*command_msg_)[strings::params][strings::message_type].asInt());
+ EXPECT_EQ(Common_Result::SUCCESS,
+ (*command_msg_)[strings::params][am::hmi_response::code].asInt());
+}
+#endif
+
+TEST_F(GetUrlsTest, DISABLED_ProcessServiceURLs_SUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0] =
+ kDefaultUrl;
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ [am::hmi_response::policy_app_id] = "1";
+
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+
+ EndpointUrls endpoints_;
+ EndpointData data(kDefaultUrl);
+ data.app_id = "1";
+ endpoints_.push_back(data);
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kServiceType, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+
+ request_command_->Run();
+
+ EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
+ am::hmi_request::service));
+ EXPECT_EQ(kDefaultUrl,
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ [am::strings::url].asString());
+ EXPECT_EQ(endpoints_[0].app_id,
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ [am::hmi_response::policy_app_id].asString());
+}
+
+TEST_F(GetUrlsTest, ProcessServiceURLs_PolicyDefaultId_SUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0] =
+ kDefaultUrl;
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ [am::hmi_response::policy_app_id] = kDefaultId;
+
+ EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
+ EndpointUrls endpoints_;
+ EndpointData data(kDefaultUrl);
+ endpoints_.push_back(data);
+ EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kServiceType, _))
+ .WillOnce(SetArgReferee<1>(endpoints_));
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application_by_policy_id(_))
+ .WillOnce(Return(mock_app));
+ request_command_->Run();
+
+ EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
+ am::hmi_request::service));
+ EXPECT_TRUE(
+ (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
+ .keyExists(am::hmi_response::policy_app_id));
+}
+
+} // namespace get_urls
+} // 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/hmi_notifications_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc
new file mode 100644
index 0000000000..b498d07d99
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc
@@ -0,0 +1,1886 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+#include "gtest/gtest.h"
+#include "application_manager/commands/commands_test.h"
+
+#include "sdl_rpc_plugin/commands/hmi/on_button_event_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_navi_tbt_client_state_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_navi_way_point_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_button_subscription_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_file_removed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_put_file_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_resume_audio_source_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_sdl_close_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_sdl_consent_needed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_sdl_persistence_complete_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_status_update_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_record_start_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_activated_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_deactivated_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_unregistered_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_button_press_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_event_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ready_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_reset_timeout_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_started_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_stopped_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_vr_stopped_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_app_permission_consent_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ignition_cycle_over_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_policy_update.h"
+#include "sdl_rpc_plugin/commands/hmi/on_received_policy_update.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_error_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_info_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_allow_sdl_functionality_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_device_state_changed_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_exit_all_applications_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_exit_application_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_start_device_discovery.h"
+#include "sdl_rpc_plugin/commands/hmi/on_device_chosen_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_context_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_system_request_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_tts_language_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_driver_distraction_notification.h"
+
+#include "utils/lock.h"
+#include "utils/data_accessor.h"
+#include "utils/signals.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+#include "utils/file_system.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
+#include "application_manager/mock_state_controller.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/hmi_capabilities_impl.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "transport_manager/mock_transport_manager.h"
+#include "connection_handler/mock_connection_handler.h"
+#include "connection_handler/mock_connection_handler_settings.h"
+#include "test/application_manager/mock_application_manager_settings.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "protocol_handler/mock_session_observer.h"
+#include "application_manager/mock_resume_ctrl.h"
+
+namespace am = application_manager;
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace hmi_notifications_test {
+
+using ::testing::_;
+using ::testing::Test;
+using ::testing::Types;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::NiceMock;
+using ::testing::InSequence;
+using ::utils::SharedPtr;
+using ::smart_objects::SmartObject;
+using ::application_manager::commands::MessageSharedPtr;
+using ::test::components::application_manager_test::MockApplicationManager;
+using ::test::components::application_manager_test::
+ MockApplicationManagerSettings;
+using ::application_manager::ApplicationSharedPtr;
+using ::test::components::application_manager_test::MockApplication;
+using ::test::components::event_engine_test::MockEventDispatcher;
+using ::application_manager::MockMessageHelper;
+using namespace sdl_rpc_plugin::commands;
+using namespace am::commands;
+
+typedef SharedPtr<MockApplication> MockAppPtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+#define MEDIA true
+#define NOT_MEDIA false
+#define VC true
+#define NOT_VC false
+#define NAVI true
+#define NOT_NAVI false
+
+ACTION_P(GetEventId, event_id) {
+ *event_id = arg0.id();
+}
+ACTION_P(GetArg, arg) {
+ *arg = arg0;
+}
+
+ACTION_P(GetArg3, result) {
+ arg3 = *result;
+}
+
+ACTION_P2(GetConnectIdPermissionConsent, connect_id, consent) {
+ *connect_id = arg0;
+ std::vector<policy::FunctionalGroupPermission>::const_iterator it =
+ arg1.group_permissions.begin();
+ for (; it != arg1.group_permissions.end(); ++it) {
+ consent->group_permissions.push_back(*it);
+ }
+ consent->consent_source = arg1.consent_source;
+}
+ACTION_P2(GetBoolValueAndString, value, str) {
+ *value = arg0;
+ *str = arg1;
+}
+ACTION_P(GetMessage, message) {
+ (*message)[am::strings::params][am::strings::function_id] =
+ (*arg0)[am::strings::params][am::strings::function_id].asInt();
+ (*message)[am::strings::params][am::strings::message_type] =
+ (*arg0)[am::strings::params][am::strings::message_type].asInt();
+ (*message)[am::strings::params][am::strings::correlation_id] =
+ (*arg0)[am::strings::params][am::strings::correlation_id].asInt();
+ (*message)[am::strings::params][am::strings::connection_key] =
+ (*arg0)[am::strings::params][am::strings::connection_key].asInt();
+ return (*message)[am::strings::params][am::strings::correlation_id].asInt();
+}
+
+namespace {
+const uint32_t kCountCommandsManageMobile_ = 22u;
+const uint32_t kCountCommandsToHmi_ = 12u;
+const int32_t kHmiProtocolType_ = 1;
+const int32_t kMobileProtocolType_ = 0;
+const int32_t kProtocolVersion_ = 3;
+const uint32_t kCorrelationId_ = 1939u;
+const uint32_t kAppId_ = 2014u;
+} // namespace
+
+class HMICommandsNotificationsTest
+ : public components::commands_test::CommandsTest<
+ CommandsTestMocks::kIsNice> {
+ public:
+ HMICommandsNotificationsTest()
+ : applications_lock_(std::make_shared<sync_primitives::Lock>())
+ , applications_(application_set_, applications_lock_)
+ , app_ptr_(NULL) {}
+
+ ~HMICommandsNotificationsTest() {
+ // Fix DataAccessor release and WinQt crash
+ Mock::VerifyAndClearExpectations(&app_mngr_);
+ }
+ typedef Command CommandType;
+
+ protected:
+ am::ApplicationSet application_set_;
+ std::shared_ptr<sync_primitives::Lock> applications_lock_;
+ DataAccessor<am::ApplicationSet> applications_;
+
+ NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
+
+ application_manager_test::MockStateController mock_state_controller_;
+
+ am::ApplicationSharedPtr app_;
+ NiceMock<MockApplication>* app_ptr_;
+
+ typedef IsNiceMock<connection_handler_test::MockConnectionHandler,
+ kMocksAreNice>::Result MockConnectionHandler;
+
+ typedef IsNiceMock<protocol_handler_test::MockSessionObserver,
+ kMocksAreNice>::Result MockSessionObserver;
+
+ MockConnectionHandler mock_connection_handler_;
+ MockSessionObserver mock_session_observer_;
+
+ void InitCommand(const uint32_t& default_timeout) OVERRIDE {
+ app_ = ConfigureApp(&app_ptr_, kAppId_, NOT_MEDIA, NOT_NAVI, NOT_VC);
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ EXPECT_CALL(app_mngr_settings_, default_timeout())
+ .WillOnce(ReturnRef(default_timeout));
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(mock_event_dispatcher_));
+ ON_CALL(app_mngr_, application_by_hmi_app(_)).WillByDefault(Return(app_));
+ ON_CALL(*app_ptr_, app_id()).WillByDefault(Return(kAppId_));
+ }
+
+ am::ApplicationSharedPtr ConfigureApp(NiceMock<MockApplication>** app_mock,
+ uint32_t app_id,
+ bool media,
+ bool navi,
+ bool vc) {
+ *app_mock = new NiceMock<MockApplication>;
+
+ Mock::AllowLeak(*app_mock); // WorkAround for gogletest bug
+ am::ApplicationSharedPtr app(*app_mock);
+
+ ON_CALL(**app_mock, app_id()).WillByDefault(Return(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, is_voice_communication_supported())
+ .WillByDefault(Return(vc));
+ ON_CALL(**app_mock, IsAudioApplication())
+ .WillByDefault(Return(media || navi || vc));
+ return app;
+ }
+#if defined(OS_POSIX)
+ void SubscribeForSignal() {
+ sigset_t signal_set;
+ sigemptyset(&signal_set);
+ sigaddset(&signal_set, SIGINT);
+ sigaddset(&signal_set, SIGTERM);
+ pthread_sigmask(SIG_BLOCK, &signal_set, NULL);
+ }
+#endif
+};
+
+namespace {
+void sig_handler(int sig) {
+ switch (sig) {
+ case SIGINT:
+ break;
+ case SIGTERM:
+ break;
+ case SIGSEGV:
+ abort();
+ default:
+ exit(EXIT_FAILURE);
+ }
+}
+} // namespace
+
+template <class Command>
+class HMIOnViNotifications : public commands_test::CommandsTest<kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+template <class Command>
+class HMIOnNotificationsListToHMI
+ : public commands_test::CommandsTest<kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+template <class CommandT, hmi_apis::FunctionID::eType kCommandId>
+struct CommandPair {
+ typedef CommandT CommandType;
+ enum { kHMICommandId = kCommandId };
+};
+
+template <class Command>
+class HMIOnNotificationsEventDispatcher
+ : public commands_test::CommandsTest<kIsNice> {
+ public:
+ typedef Command CommandType;
+ NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
+};
+
+typedef Types<OnAppPermissionChangedNotification,
+ OnAudioDataStreamingNotification,
+ hmi::OnButtonSubscriptionNotification,
+ OnFileRemovedNotification,
+ OnPutFileNotification,
+ OnResumeAudioSourceNotification,
+ OnSDLCloseNotification,
+ OnSDLConsentNeededNotification,
+ OnSDLPersistenceCompleteNotification,
+ OnStatusUpdateNotification,
+ OnVideoDataStreamingNotification,
+ OnRecordStartdNotification> HMIOnNotificationsListToHMITypes;
+
+typedef Types<
+ CommandPair<OnAppActivatedNotification,
+ hmi_apis::FunctionID::BasicCommunication_OnAppActivated>,
+ CommandPair<OnAppDeactivatedNotification,
+ hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated>,
+ CommandPair<OnEventChangedNotification,
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged>,
+ CommandPair<hmi::OnTTSResetTimeoutNotification,
+ hmi_apis::FunctionID::TTS_OnResetTimeout>,
+ CommandPair<OnTTSStartedNotification, hmi_apis::FunctionID::TTS_Started>,
+ CommandPair<OnTTSStoppedNotification, hmi_apis::FunctionID::TTS_Stopped>,
+ CommandPair<hmi::OnUIResetTimeoutNotification,
+ hmi_apis::FunctionID::UI_OnResetTimeout>,
+ CommandPair<OnVRStartedNotification, hmi_apis::FunctionID::VR_Started>,
+ CommandPair<OnVRStoppedNotification, hmi_apis::FunctionID::VR_Stopped> >
+ HMIOnNotificationsEventDispatcherTypes;
+
+TYPED_TEST_CASE(HMIOnNotificationsListToHMI, HMIOnNotificationsListToHMITypes);
+TYPED_TEST_CASE(HMIOnNotificationsEventDispatcher,
+ HMIOnNotificationsEventDispatcherTypes);
+
+TYPED_TEST(HMIOnNotificationsListToHMI, CommandsSendNotificationToHmi) {
+ MessageSharedPtr message =
+ commands_test::CommandsTest<kIsNice>::CreateMessage();
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>(message);
+ EXPECT_CALL(commands_test::CommandsTest<kIsNice>::mock_rpc_service_,
+ SendMessageToHMI(_));
+ command->Run();
+ EXPECT_EQ(
+ static_cast<int32_t>(kHmiProtocolType_),
+ (*message)[am::strings::params][am::strings::protocol_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kProtocolVersion_),
+ (*message)[am::strings::params][am::strings::protocol_version].asInt());
+}
+
+TYPED_TEST(HMIOnNotificationsEventDispatcher,
+ CommandsNotificationEventDispatcher) {
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr message =
+ commands_test::CommandsTest<kIsNice>::CreateMessage();
+ utils::SharedPtr<typename TestFixture::CommandType::CommandType> command =
+ this->template CreateCommand<
+ typename TestFixture::CommandType::CommandType>(message);
+ EXPECT_CALL(commands_test::CommandsTest<kIsNice>::app_mngr_,
+ event_dispatcher())
+ .WillOnce(ReturnRef(this->mock_event_dispatcher_));
+ EXPECT_CALL(this->mock_event_dispatcher_, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+ command->Run();
+ EXPECT_EQ(TestFixture::CommandType::kHMICommandId, event_id);
+}
+
+// notifications(SendNotificationToMobile)
+TEST_F(HMICommandsNotificationsTest, OnButtonEventSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnButtonEventNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID),
+ (*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, OnNaviTBTClientSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnNaviTBTClientStateNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnTBTClientStateID),
+ (*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,
+ OnNaviWayPointChangeSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnNaviWayPointChangeNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnWayPointChangeID),
+ (*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, OnUICommandSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnUICommandNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::TriggerSource::TS_MENU),
+ (*message)[am::strings::msg_params][am::strings::trigger_source].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnUIKeyBoardInputSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnUIKeyBoardInputNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnKeyboardInputID),
+ (*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, OnUITouchEventSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnUITouchEventNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnTouchEventID),
+ (*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();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAppRegisteredNotification>(message);
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(_));
+ EXPECT_CALL(app_mngr_, event_dispatcher());
+ EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered),
+ event_id);
+ EXPECT_EQ(
+ kHmiProtocolType_,
+ (*message)[am::strings::params][am::strings::protocol_type].asInt());
+ EXPECT_EQ(
+ kProtocolVersion_,
+ (*message)[am::strings::params][am::strings::protocol_version].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAppUnregisteredNotificationEventDispatcher) {
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAppUnregisteredNotification>(message);
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(_));
+ EXPECT_CALL(app_mngr_, event_dispatcher());
+ EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(
+ hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered),
+ event_id);
+ EXPECT_EQ(
+ kHmiProtocolType_,
+ (*message)[am::strings::params][am::strings::protocol_type].asInt());
+ EXPECT_EQ(
+ kProtocolVersion_,
+ (*message)[am::strings::params][am::strings::protocol_version].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest, OnButtonPressNotificationEventDispatcher) {
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnButtonPressNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_, event_dispatcher());
+ EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(hmi_apis::FunctionID::Buttons_OnButtonPress),
+ event_id);
+ EXPECT_EQ(static_cast<int>(mobile_apis::FunctionID::eType::OnButtonPressID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest, OnReadyNotificationEventDispatcher) {
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnReadyNotification>(message);
+
+ EXPECT_CALL(app_mngr_, OnHMIStartedCooperation());
+ EXPECT_CALL(app_mngr_, event_dispatcher());
+ EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+ command->Run();
+ EXPECT_EQ(hmi_apis::FunctionID::BasicCommunication_OnReady, event_id);
+}
+
+// policy handler
+TEST_F(HMICommandsNotificationsTest,
+ OnIgnitionCycleOverNotificationPolicyHandler) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnIgnitionCycleOverNotification>(message);
+
+ EXPECT_CALL(mock_policy_handler_, OnIgnitionCycleOver());
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest, OnPolicyUpdateNotificationPolicyHandler) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command = CreateCommand<OnPolicyUpdate>(message);
+
+ EXPECT_CALL(mock_policy_handler_, OnPTExchangeNeeded());
+ command->Run();
+}
+
+#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
+TEST_F(HMICommandsNotificationsTest,
+ OnReceivePolicyUpdateNotification_SUCCESS) {
+ const std::string kFile = "./test_file.txt";
+ EXPECT_TRUE(file_system::CreateFile(kFile));
+ uint8_t tmp[] = {1u, 2u, 3u, 4u};
+ std::vector<uint8_t> data(tmp, tmp + 4);
+ EXPECT_TRUE(file_system::WriteBinaryFile(kFile, data));
+
+ MessageSharedPtr message = CreateMessage(smart_objects::SmartType_String);
+ (*message)[am::strings::msg_params][am::hmi_notification::policyfile] = kFile;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnReceivedPolicyUpdate>(message);
+
+ EXPECT_CALL(mock_policy_handler_, ReceiveMessageFromSDK(kFile, data));
+ command->Run();
+ EXPECT_TRUE(file_system::DeleteFile(kFile));
+}
+#endif
+
+TEST_F(HMICommandsNotificationsTest,
+ OnReceivePolicyUpdateNotification_UNSUCCESS) {
+ MessageSharedPtr message = CreateMessage(smart_objects::SmartType_String);
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnReceivedPolicyUpdate>(message);
+
+ EXPECT_CALL(mock_policy_handler_, ReceiveMessageFromSDK(_, _)).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAppPermissionConsentNotificationPolicyHandlerNoAppId) {
+ MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
+ (*message)[am::strings::msg_params]["consentedFunctions"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ SmartObject& applications =
+ (*message)[am::strings::msg_params]["consentedFunctions"];
+
+ smart_objects::SmartObject hmi_application_temp(smart_objects::SmartType_Map);
+ applications[0] = hmi_application_temp;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAppPermissionConsentNotification>(message);
+
+ int32_t connection_id = -1;
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _, _))
+#else
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _))
+#endif
+ .WillOnce(GetArg(&connection_id));
+ command->Run();
+ EXPECT_EQ(0, connection_id);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAppPermissionConsentNotificationPolicyHandlerWithAppId) {
+ MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ (*message)[am::strings::msg_params]["consentedFunctions"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ smart_objects::SmartObjectSPtr consented_function =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*message)[am::strings::msg_params]["consentedFunctions"][0] =
+ *consented_function;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAppPermissionConsentNotification>(message);
+
+ int32_t connection_id = -1;
+ policy::PermissionConsent permission_consent;
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _, _))
+#else
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _))
+#endif
+ .WillOnce(
+ GetConnectIdPermissionConsent(&connection_id, &permission_consent));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(kAppId_), connection_id);
+ std::vector<policy::FunctionalGroupPermission>::const_iterator it =
+ permission_consent.group_permissions.begin();
+ for (; it != permission_consent.group_permissions.end(); ++it) {
+ EXPECT_EQ(policy::kGroupUndefined, (*it).state);
+ }
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAppPermissionConsentNotificationPolicyHandlerAppIdAllowTrue) {
+ MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
+ (*message)[am::strings::msg_params]["consentedFunctions"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ (*message)[am::strings::msg_params]["source"] = "test_content_source";
+
+ smart_objects::SmartObjectSPtr consented_function =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*consented_function)["allowed"] = true;
+ (*consented_function)[am::strings::id] = 999;
+ (*consented_function)[am::strings::name] = "test_group_alias";
+ (*message)[am::strings::msg_params]["consentedFunctions"][0] =
+ *consented_function;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAppPermissionConsentNotification>(message);
+
+ int32_t connection_id = -1;
+ policy::PermissionConsent permission_consent;
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _, _))
+#else
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _))
+#endif
+ .WillOnce(
+ GetConnectIdPermissionConsent(&connection_id, &permission_consent));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(kAppId_), connection_id);
+
+ std::vector<policy::FunctionalGroupPermission>::const_iterator it =
+ permission_consent.group_permissions.begin();
+ for (; it != permission_consent.group_permissions.end(); ++it) {
+ EXPECT_EQ(999, (*it).group_id);
+ EXPECT_EQ("test_group_alias", (*it).group_alias);
+ EXPECT_EQ(policy::kGroupAllowed, (*it).state);
+ }
+ EXPECT_EQ("test_content_source", permission_consent.consent_source);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAppPermissionConsentNotificationPolicyHandlerAppIdAllowFalse) {
+ MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
+ (*message)[am::strings::msg_params]["consentedFunctions"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ (*message)[am::strings::msg_params]["source"] = "test_content_source";
+
+ smart_objects::SmartObjectSPtr consented_function =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*consented_function)["allowed"] = false;
+ (*consented_function)[am::strings::id] = 999;
+ (*consented_function)[am::strings::name] = "test_group_alias";
+ (*message)[am::strings::msg_params]["consentedFunctions"][0] =
+ *consented_function;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAppPermissionConsentNotification>(message);
+
+ int32_t connection_id = -1;
+ policy::PermissionConsent permission_consent;
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _, _))
+#else
+ EXPECT_CALL(mock_policy_handler_, OnAppPermissionConsent(_, _))
+#endif
+ .WillOnce(
+ GetConnectIdPermissionConsent(&connection_id, &permission_consent));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(kAppId_), connection_id);
+
+ std::vector<policy::FunctionalGroupPermission>::const_iterator it =
+ permission_consent.group_permissions.begin();
+ for (; it != permission_consent.group_permissions.end(); ++it) {
+ EXPECT_EQ(999, (*it).group_id);
+ EXPECT_EQ("test_group_alias", (*it).group_alias);
+ EXPECT_EQ(policy::kGroupDisallowed, (*it).state);
+ }
+ EXPECT_EQ("test_content_source", permission_consent.consent_source);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemErrorNotificationOnSystemErrorCode) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_notification::error] =
+ hmi_apis::Common_SystemError::SYNC_REBOOTED;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemErrorNotification>(message);
+
+ int32_t code = hmi_apis::Common_SystemError::INVALID_ENUM;
+ EXPECT_CALL(mock_policy_handler_, OnSystemError(_)).WillOnce(GetArg(&code));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(hmi_apis::Common_SystemError::SYNC_REBOOTED),
+ code);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemInfoChangedNotificationCheckLanguage) {
+ const uint32_t kLangCode = 5u;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLangCode;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemInfoChangedNotification>(message);
+
+ EXPECT_CALL(mock_message_helper_, CommonLanguageToString(_));
+ EXPECT_CALL(mock_policy_handler_, OnSystemInfoChanged(_));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAllowSDLFunctionalityNotificationDeviceKeyNotExist) {
+ const std::string kDeviceId = "";
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_response::allowed] = true;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAllowSDLFunctionalityNotification>(message);
+
+ bool value = false;
+ std::string str;
+ EXPECT_CALL(mock_policy_handler_, OnAllowSDLFunctionalityNotification(_, _))
+ .WillOnce(GetBoolValueAndString(&value, &str));
+ command->Run();
+ EXPECT_EQ(true, value);
+ EXPECT_EQ(kDeviceId, str);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnAllowSDLFunctionalityNotificationDeviceKeyExist) {
+ const std::string kDeviceId = "device_id";
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_response::allowed] = true;
+ (*message)[am::strings::msg_params]["device"]["id"] = kDeviceId;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnAllowSDLFunctionalityNotification>(message);
+
+ bool value;
+ std::string str;
+ EXPECT_CALL(mock_policy_handler_, OnAllowSDLFunctionalityNotification(_, _))
+ .WillOnce(GetBoolValueAndString(&value, &str));
+ command->Run();
+ EXPECT_EQ(true, value);
+ EXPECT_EQ(kDeviceId, str);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDeviceStateChangedNotificationDeviceStateNotUnpaired) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params]["deviceState"] =
+ hmi_apis::Common_DeviceState::INVALID_ENUM;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnDeviceStateChangedNotification>(message);
+
+ EXPECT_CALL(mock_policy_handler_, RemoveDevice(_)).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDeviceStateChangedNotificationDeviceStateUnpaired) {
+ // Random MAC adress for test. It must contain 12 symbols.
+ const std::string device_id = "AA15F2204D6B";
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params]["deviceState"] =
+ hmi_apis::Common_DeviceState::UNPAIRED;
+ (*message)[am::strings::msg_params]["deviceInternalId"] = device_id;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnDeviceStateChangedNotification>(message);
+
+ EXPECT_CALL(mock_policy_handler_, RemoveDevice(_));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDeviceStateChangedNotificationDeviceStateEmptyDeviceId) {
+ const std::string empty_device_id = "";
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params]["deviceState"] =
+ hmi_apis::Common_DeviceState::UNPAIRED;
+ (*message)[am::strings::msg_params]["deviceInternalId"] = empty_device_id;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnDeviceStateChangedNotification>(message);
+
+ std::string device_id = "default_id";
+ EXPECT_CALL(mock_policy_handler_, RemoveDevice(_))
+ .WillOnce(GetArg(&device_id));
+ command->Run();
+ EXPECT_EQ(empty_device_id, device_id);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDeviceStateChangedNotificationDeviceStateDeviceIdFromId) {
+ const std::string empty_device_id = "";
+ const std::string id = "id_string";
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params]["deviceState"] =
+ hmi_apis::Common_DeviceState::UNPAIRED;
+ (*message)[am::strings::msg_params]["deviceInternalId"] = empty_device_id;
+ (*message)[am::strings::msg_params]["deviceId"]["id"] = id;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnDeviceStateChangedNotification>(message);
+
+ std::string device_id = "default_id";
+ EXPECT_CALL(mock_policy_handler_, RemoveDevice(_))
+ .WillOnce(GetArg(&device_id));
+ command->Run();
+ EXPECT_EQ(id, device_id);
+}
+
+//~policy_handler
+TEST_F(HMICommandsNotificationsTest,
+ OnExitAllApplicationsNotificationReasonIgnitionOff) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_request::reason] =
+ hmi_apis::Common_ApplicationsCloseReason::IGNITION_OFF;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitAllApplicationsNotification>(message);
+#if defined(OS_POSIX)
+ am::mobile_api::AppInterfaceUnregisteredReason::eType mob_reason;
+
+ EXPECT_CALL(app_mngr_, SetUnregisterAllApplicationsReason(_))
+ .WillOnce(GetArg(&mob_reason));
+ EXPECT_CALL(app_mngr_, HeadUnitReset(_)).Times(0);
+
+ SubscribeForSignal();
+ command->Run();
+ utils::WaitTerminationSignals(sig_handler);
+
+ EXPECT_EQ(am::mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF,
+ mob_reason);
+#endif
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnExitAllApplicationsNotificationReasonMasterResetAndFactoryDefaults) {
+ MessageSharedPtr message = CreateMessage();
+
+ std::vector<hmi_apis::Common_ApplicationsCloseReason::eType> reason_list;
+ reason_list.push_back(hmi_apis::Common_ApplicationsCloseReason::MASTER_RESET);
+ reason_list.push_back(
+ hmi_apis::Common_ApplicationsCloseReason::FACTORY_DEFAULTS);
+
+ std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>
+ mob_reason_list;
+ mob_reason_list.push_back(
+ mobile_apis::AppInterfaceUnregisteredReason::MASTER_RESET);
+ mob_reason_list.push_back(
+ mobile_apis::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS);
+
+ std::vector<hmi_apis::Common_ApplicationsCloseReason::eType>::iterator
+ it_reason = reason_list.begin();
+ std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>::iterator
+ it_mob_reason = mob_reason_list.begin();
+
+ for (; it_reason != reason_list.end(); ++it_reason, ++it_mob_reason) {
+ (*message)[am::strings::msg_params][am::hmi_request::reason] = *it_reason;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitAllApplicationsNotification>(message);
+#if defined(OS_POSIX)
+ am::mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
+ *it_mob_reason;
+
+ EXPECT_CALL(app_mngr_, SetUnregisterAllApplicationsReason(mob_reason));
+ EXPECT_CALL(app_mngr_, HeadUnitReset(mob_reason));
+
+ SubscribeForSignal();
+ command->Run();
+ utils::WaitTerminationSignals(sig_handler);
+#endif
+ }
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnExitAllApplicationsNotificationReasonSuspend) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_request::reason] =
+ hmi_apis::Common_ApplicationsCloseReason::SUSPEND;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitAllApplicationsNotification>(message);
+
+ MessageSharedPtr ethalon_message =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*ethalon_message)[am::strings::params][am::strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete;
+ (*ethalon_message)[am::strings::params][am::strings::message_type] =
+ am::MessageType::kNotification;
+ (*ethalon_message)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId_;
+ MessageSharedPtr temp_message = CreateMessage();
+
+ resumprion_test::MockResumeCtrl mock_resume_ctrl;
+ EXPECT_CALL(app_mngr_, resume_controller())
+ .WillOnce(ReturnRef(mock_resume_ctrl));
+ EXPECT_CALL(mock_resume_ctrl, OnSuspend());
+
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(kCorrelationId_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(GetMessage(temp_message));
+
+ command->Run();
+ EXPECT_EQ(
+ static_cast<uint32_t>(
+ hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete),
+ (*temp_message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<uint32_t>(am::MessageType::kNotification),
+ (*temp_message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(static_cast<uint32_t>(kCorrelationId_),
+ (*temp_message)[am::strings::params][am::strings::correlation_id]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnExitAllApplicationsNotificationReasonInvalidEnum) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_request::reason] =
+ hmi_apis::Common_ApplicationsCloseReason::INVALID_ENUM;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitAllApplicationsNotification>(message);
+
+ EXPECT_CALL(app_mngr_, SetUnregisterAllApplicationsReason(_)).Times(0);
+ EXPECT_CALL(app_mngr_, HeadUnitReset(_)).Times(0);
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnExitApplicationNotificationManageMobileCommand) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ smart_objects::SmartObjectSPtr notification =
+ utils::MakeShared<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_;
+
+ 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);
+
+ 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);
+
+ std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>::iterator
+ it_mobile_reason = mobile_reason_list.begin();
+ std::vector<hmi_apis::Common_ApplicationExitReason::eType>::iterator
+ it_reason = reason_list.begin();
+
+ for (; it_reason != reason_list.end(); ++it_reason, ++it_mobile_reason) {
+ (*message)[am::strings::msg_params][am::strings::reason] = *it_reason;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitApplicationNotification>(message);
+
+ (*notification)[am::strings::msg_params][am::strings::reason] =
+ static_cast<int32_t>(*it_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_, *it_mobile_reason)).WillOnce(Return(notification));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(notification, Command::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_,
+ UnregisterApplication(
+ kAppId_, mobile_apis::Result::SUCCESS, false, false));
+ command->Run();
+ }
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnExitApplicationNotificationUnhandledReason) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+
+ (*message)[am::strings::msg_params][am::strings::reason] =
+ hmi_apis::Common_ApplicationExitReason::INVALID_ENUM;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitApplicationNotification>(message);
+
+ am::plugin_manager::MockRPCPluginManager mock_rpc_plugin_manager_;
+
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(app_));
+ EXPECT_CALL(app_mngr_, GetPluginManager())
+ .WillOnce(ReturnRef(mock_rpc_plugin_manager_));
+ EXPECT_CALL(mock_rpc_plugin_manager_, ForEachPlugin(_)).Times(1);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest, OnExitApplicationNotificationInvalidApp) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitApplicationNotification>(message);
+
+ am::ApplicationSharedPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(invalid_app));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ DISABLED_OnExitApplicationNotificationDriverDistractionValidApp) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ (*message)[am::strings::msg_params][am::strings::reason] =
+ hmi_apis::Common_ApplicationExitReason::DRIVER_DISTRACTION_VIOLATION;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitApplicationNotification>(message);
+
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillRepeatedly(Return(app_));
+
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ SetRegularState(app_,
+ mobile_apis::HMILevel::HMI_NONE,
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
+ false));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnExitApplicationNotificationrUserExitValidApp) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ (*message)[am::strings::msg_params][am::strings::reason] =
+ hmi_apis::Common_ApplicationExitReason::USER_EXIT;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnExitApplicationNotification>(message);
+ am::plugin_manager::MockRPCPluginManager mock_rpc_plugin_manager_;
+ EXPECT_CALL(app_mngr_, GetPluginManager())
+ .WillOnce(ReturnRef(mock_rpc_plugin_manager_));
+ EXPECT_CALL(mock_rpc_plugin_manager_, ForEachPlugin(_)).Times(1);
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ SetRegularState(app_,
+ mobile_apis::HMILevel::HMI_NONE,
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
+ false));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRCommandNotificationSwitchedAndValidApp) {
+ const uint32_t cmd_id = 12u;
+ const uint32_t max_cmd_id = 10u;
+
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::cmd_id] = cmd_id;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRCommandNotification>(message);
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ SetRegularState(_, mobile_apis::HMILevel::HMI_FULL, true));
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(max_cmd_id));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRCommandNotificationSwitchedAndInvalidApp) {
+ const uint32_t kCmdId = 12u;
+ const uint32_t kMaxCmdId = 10u;
+
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRCommandNotification>(message);
+
+ am::ApplicationSharedPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(invalid_app));
+ EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRCommandNotificationCmdIdEqualToMaxCmdId) {
+ const uint32_t kCmdId = 11u;
+ const uint32_t kMaxCmdId = 10u;
+
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRCommandNotification>(message);
+
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRCommandNotificationCmdIdLessMaxCmdIsInvalidApp) {
+ const uint32_t kCmdId = 8u;
+ const uint32_t kMaxCmdId = 10u;
+
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRCommandNotification>(message);
+
+ am::ApplicationSharedPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+ EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ EXPECT_CALL(app_mngr_, event_dispatcher()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRCommandNotificationActivePerformIteraction) {
+ const uint32_t kCmdId = 8u;
+ const uint32_t kMaxCmdId = 10u;
+ const uint32_t kIsPerformInteractionActive = 1u;
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRCommandNotification>(message);
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
+ EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ EXPECT_CALL(*app_ptr_, is_perform_interaction_active())
+ .WillOnce(Return(kIsPerformInteractionActive));
+ EXPECT_CALL(app_mngr_, event_dispatcher());
+ EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->Run();
+ EXPECT_EQ(hmi_apis::FunctionID::VR_OnCommand, event_id);
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRCommandNotificationNotActivePerformIteraction) {
+ const uint32_t kCmdId = 8u;
+ const uint32_t kMaxCmdId = 10u;
+ const uint32_t kIsPerformInteractionActive = 0u;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ (*message)[am::strings::msg_params][am::strings::function_id] =
+ mobile_apis::FunctionID::eType::OnCommandID;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRCommandNotification>(message);
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
+ EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ EXPECT_CALL(*app_ptr_, is_perform_interaction_active())
+ .WillOnce(Return(kIsPerformInteractionActive));
+
+ EXPECT_CALL(app_mngr_, event_dispatcher()).Times(0);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR),
+ (*message)[am::strings::msg_params][am::strings::trigger_source].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest, OnVRLanguageChangeNotificationEmptyData) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLang;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRLanguageChangeNotification>(message);
+
+ EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(*app_ptr_, app_id()).Times(0);
+ EXPECT_CALL(*app_ptr_, language()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRLanguageChangeNotificationAppLangEqualMessageLang) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLang;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRLanguageChangeNotification>(message);
+
+ application_set_.insert(app_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_ptr_, app_id()).WillOnce(Return(kAppId_));
+ EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
+
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
+ (*message)[am::strings::msg_params][am::strings::hmi_display_language]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnVRLanguageChangeNotificationAppLangNotEqualMessageLang) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] =
+ mobile_apis::Language::EN_US;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnVRLanguageChangeNotification>(message);
+
+ application_set_.insert(app_);
+ smart_objects::SmartObjectSPtr notification =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*notification)[am::strings::params][am::strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
+ (*notification)[am::strings::params][am::strings::message_type] =
+ static_cast<int32_t>(am::MessageType::kNotification);
+ (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
+ (*notification)[am::strings::msg_params][am::strings::reason] =
+ static_cast<int32_t>(
+ mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
+
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
+ EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ SetRegularState(app_, mobile_apis::HMILevel::HMI_NONE, false));
+ EXPECT_CALL(mock_message_helper_,
+ GetOnAppInterfaceUnregisteredNotificationToMobile(
+ kAppId_,
+ mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(notification, Command::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_,
+ UnregisterApplication(
+ kAppId_, mobile_apis::Result::SUCCESS, false, false));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
+ (*message)[am::strings::msg_params][am::strings::hmi_display_language]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest, OnStartDeviceDiscoveryRun) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnStartDeviceDiscovery>(message);
+ EXPECT_CALL(app_mngr_, StartDevicesDiscovery());
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDeviceChosenNotificationDeviceInfoExists) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::device_info]
+ [am::strings::id] = "2014";
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnDeviceChosenNotification>(message);
+ EXPECT_CALL(app_mngr_,
+ ConnectToDevice(
+ (*message)[am::strings::msg_params][am::strings::device_info]
+ [am::strings::id].asString()));
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDeviceChosenNotificationDeviceInfoNotExists) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnDeviceChosenNotification>(message);
+ EXPECT_CALL(app_mngr_, ConnectToDevice(_)).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemContextNotificationValidActiveApplication) {
+ MessageSharedPtr message = CreateMessage();
+ std::vector<am::mobile_api::SystemContext::eType> system_context_list;
+ system_context_list.push_back(
+ am::mobile_api::SystemContext::SYSCTXT_VRSESSION);
+ system_context_list.push_back(am::mobile_api::SystemContext::SYSCTXT_MENU);
+ system_context_list.push_back(
+ am::mobile_api::SystemContext::SYSCTXT_HMI_OBSCURED);
+
+ std::vector<am::mobile_api::SystemContext::eType>::iterator it =
+ system_context_list.begin();
+ for (; it != system_context_list.end(); ++it) {
+ (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
+ *it;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemContextNotification>(message);
+ EXPECT_CALL(app_mngr_, active_application()).WillOnce(Return(app_));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(app_, *it));
+ command->Run();
+ }
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemContextNotificationInvalidActiveApplication) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
+ am::mobile_api::SystemContext::SYSCTXT_VRSESSION;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemContextNotification>(message);
+ ApplicationSharedPtr invalid_app;
+ EXPECT_CALL(app_mngr_, active_application()).WillOnce(Return(invalid_app));
+ EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemContextNotificationInvalidSystemContext) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
+ am::mobile_api::SystemContext::INVALID_ENUM;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemContextNotification>(message);
+ EXPECT_CALL(app_mngr_, active_application()).Times(0);
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemContextNotificationValidApplication) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ std::vector<am::mobile_api::SystemContext::eType> system_context_list;
+ system_context_list.push_back(am::mobile_api::SystemContext::SYSCTXT_ALERT);
+ system_context_list.push_back(am::mobile_api::SystemContext::SYSCTXT_MAIN);
+
+ std::vector<am::mobile_api::SystemContext::eType>::iterator it =
+ system_context_list.begin();
+ for (; it != system_context_list.end(); ++it) {
+ (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
+ *it;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemContextNotification>(message);
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(app_, *it));
+ command->Run();
+ }
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemContextNotificationAppIdDoesntExists) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
+ am::mobile_api::SystemContext::SYSCTXT_ALERT;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemContextNotification>(message);
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemRequestNotificationAppIdExistsAndValidApp) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemRequestNotification>(message);
+
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(app_));
+ ON_CALL(app_mngr_, connection_handler())
+ .WillByDefault(ReturnRef(mock_connection_handler_));
+ ON_CALL(mock_connection_handler_, get_session_observer())
+ .WillByDefault(ReturnRef(mock_session_observer_));
+ const int32_t device_id = 1;
+ ON_CALL(
+ mock_session_observer_,
+ GetDataOnDeviceID(
+ testing::An<transport_manager::DeviceHandle>(), NULL, NULL, _, NULL))
+ .WillByDefault(Return(device_id));
+
+ EXPECT_CALL(mock_policy_handler_, GetUserConsentForDevice(_))
+ .WillOnce(Return(policy::kDeviceAllowed));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemRequestNotificationAppIdExistsAndInvalidApp) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemRequestNotification>(message);
+ ApplicationSharedPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(invalid_app));
+ EXPECT_CALL(*app_ptr_, app_id()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->Run();
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemRequestNotificationAppIdDoesntExistsAndValidApp) {
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemRequestNotification>(message);
+
+ EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
+ .WillOnce(Return(kAppId_));
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
+ ON_CALL(app_mngr_, connection_handler())
+ .WillByDefault(ReturnRef(mock_connection_handler_));
+ ON_CALL(mock_connection_handler_, get_session_observer())
+ .WillByDefault(ReturnRef(mock_session_observer_));
+ const int32_t device_id = 1;
+ ON_CALL(
+ mock_session_observer_,
+ GetDataOnDeviceID(
+ testing::An<transport_manager::DeviceHandle>(), NULL, NULL, _, NULL))
+ .WillByDefault(Return(device_id));
+
+ EXPECT_CALL(mock_policy_handler_, GetUserConsentForDevice(_))
+ .WillOnce(Return(policy::kDeviceAllowed));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnSystemRequestNotificationAppIdDoesntExistsAndNullAppId) {
+ const uint32_t kNullApppId = 0u;
+ MessageSharedPtr message = CreateMessage();
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnSystemRequestNotification>(message);
+
+ EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
+ .WillOnce(Return(kNullApppId));
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest, OnTTSLanguageChangeNotificationEmptyData) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLang;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnTTSLanguageChangeNotification>(message);
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(_));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(*app_ptr_, app_id()).Times(0);
+ EXPECT_CALL(*app_ptr_, language()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnTTSLanguageChangeNotificationAppLangEqualMessageLang) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLang;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnTTSLanguageChangeNotification>(message);
+
+ application_set_.insert(app_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_ptr_, app_id()).WillOnce(Return(kAppId_));
+ EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
+
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
+ (*message)[am::strings::msg_params][am::strings::hmi_display_language]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnTTSLanguageChangeNotificationAppLangNotEqualMessageLang) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] =
+ mobile_apis::Language::EN_US;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnTTSLanguageChangeNotification>(message);
+
+ application_set_.insert(app_);
+ smart_objects::SmartObjectSPtr notification =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*notification)[am::strings::params][am::strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
+ (*notification)[am::strings::params][am::strings::message_type] =
+ static_cast<int32_t>(am::MessageType::kNotification);
+ (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
+ (*notification)[am::strings::msg_params][am::strings::reason] =
+ static_cast<int32_t>(
+ mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
+
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
+ EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
+ EXPECT_CALL(mock_message_helper_,
+ GetOnAppInterfaceUnregisteredNotificationToMobile(
+ kAppId_,
+ mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(notification, Command::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_,
+ UnregisterApplication(
+ kAppId_, mobile_apis::Result::SUCCESS, false, false));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
+ (*message)[am::strings::msg_params][am::strings::hmi_display_language]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest, OnUILanguageChangeNotificationEmptyData) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLang;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnUILanguageChangeNotification>(message);
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_vr_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(*app_ptr_, app_id()).Times(0);
+ EXPECT_CALL(*app_ptr_, ui_language()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnUILanguageChangeNotificationAppLangEqualMessageLang) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] = kLang;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnUILanguageChangeNotification>(message);
+
+ application_set_.insert(app_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_vr_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_ptr_, app_id()).WillOnce(Return(kAppId_));
+ EXPECT_CALL(*app_ptr_, ui_language()).WillRepeatedly(ReturnRef(kLang));
+
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kLang),
+ (*message)[am::strings::msg_params][am::strings::hmi_display_language]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnUILanguageChangeNotificationAppLangNotEqualMessageLang) {
+ const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::language] =
+ mobile_apis::Language::EN_US;
+ utils::SharedPtr<Command> command =
+ CreateCommand<OnUILanguageChangeNotification>(message);
+
+ application_set_.insert(app_);
+ smart_objects::SmartObjectSPtr notification =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*notification)[am::strings::params][am::strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
+ (*notification)[am::strings::params][am::strings::message_type] =
+ static_cast<int32_t>(am::MessageType::kNotification);
+ (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
+ (*notification)[am::strings::msg_params][am::strings::reason] =
+ static_cast<int32_t>(
+ mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
+
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_hmi_capabilities_, active_vr_language())
+ .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
+ EXPECT_CALL(*app_ptr_, ui_language()).WillRepeatedly(ReturnRef(kLang));
+ EXPECT_CALL(mock_message_helper_,
+ GetOnAppInterfaceUnregisteredNotificationToMobile(
+ kAppId_,
+ mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(notification, Command::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_,
+ UnregisterApplication(
+ kAppId_, mobile_apis::Result::SUCCESS, false, false));
+ command->Run();
+ EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::Language::EN_US),
+ (*message)[am::strings::msg_params][am::strings::hmi_display_language]
+ .asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationEmptyData) {
+ const hmi_apis::Common_DriverDistractionState::eType state =
+ hmi_apis::Common_DriverDistractionState::DD_ON;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_notification::state] = state;
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnDriverDistractionNotification>(message);
+
+ EXPECT_CALL(app_mngr_, set_driver_distraction_state(state));
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(*app_ptr_, app_id()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
+ OnDriverDistractionNotificationInvalidApp) {
+ const hmi_apis::Common_DriverDistractionState::eType state =
+ hmi_apis::Common_DriverDistractionState::DD_ON;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::hmi_notification::state] = state;
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnDriverDistractionNotification>(message);
+
+ ApplicationSharedPtr invalid_app;
+ application_set_.insert(invalid_app);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(*app_ptr_, app_id()).Times(0);
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationValidApp) {
+ const hmi_apis::Common_DriverDistractionState::eType state =
+ hmi_apis::Common_DriverDistractionState::DD_ON;
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::mobile_notification::state] = state;
+ utils::SharedPtr<Command> command =
+ CreateCommand<hmi::OnDriverDistractionNotification>(message);
+
+ application_set_.insert(app_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
+ policy::CheckPermissionResult result;
+ result.hmi_level_permitted = policy::kRpcAllowed;
+ EXPECT_CALL(app_mngr_, GetPolicyHandler())
+ .WillOnce(ReturnRef(mock_policy_handler_));
+ EXPECT_CALL(mock_policy_handler_, CheckPermissions(_, _, _, _))
+ .WillOnce(GetArg3(&result));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL))
+ .WillOnce(GetMessage(message));
+ EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
+
+ command->Run();
+ EXPECT_EQ(
+ static_cast<int32_t>(am::mobile_api::FunctionID::OnDriverDistractionID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(
+ static_cast<int32_t>(kAppId_),
+ (*message)[am::strings::params][am::strings::connection_key].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+}
+
+} // namespace hmi_notifications_test
+} // 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/mixing_audio_supported_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/mixing_audio_supported_request_test.cc
new file mode 100644
index 0000000000..7759dace96
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/mixing_audio_supported_request_test.cc
@@ -0,0 +1,91 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "hmi/mixing_audio_supported_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace mixing_audio_supported_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::MixingAudioSupportedRequest;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class MixingAudioSupportedRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(MixingAudioSupportedRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = "123";
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ RequestToHMIPtr command(
+ CreateCommand<MixingAudioSupportedRequest>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+} // namespace mixing_audio_supported_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/mixing_audio_supported_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/mixing_audio_supported_response_test.cc
new file mode 100644
index 0000000000..9c8c30f493
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/mixing_audio_supported_response_test.cc
@@ -0,0 +1,102 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "sdl_rpc_plugin/commands/hmi/mixing_audio_supported_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace mixing_audio_supported_response {
+
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::NiceMock;
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using sdl_rpc_plugin::commands::MixingAudioSupportedResponse;
+using application_manager::commands::ResponseFromHMI;
+using am::commands::CommandImpl;
+using am::HMICapabilities;
+namespace hmi_response = ::application_manager::hmi_response;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class MixingAudioSupportedResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(MixingAudioSupportedResponseTest, RUN_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = "123";
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<MixingAudioSupportedResponse>(command_msg));
+
+ const bool hmiResponse =
+ (*command_msg)[strings::msg_params][hmi_response::attenuated_supported]
+ .asBool();
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_attenuated_supported(hmiResponse));
+
+ command->Run();
+}
+
+} // namespace mixing_audio_supported_response
+} // 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/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
new file mode 100644
index 0000000000..69cb04f073
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc
@@ -0,0 +1,121 @@
+/*
+ * 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 <utility>
+
+#include "hmi/navi_audio_start_stream_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/commands/commands_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_audio_start_stream_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+namespace commands = am::commands;
+using commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::AudioStartStreamRequest;
+using am::event_engine::Event;
+
+namespace {
+const uint32_t kHmiAppId = 13u;
+const am::HmiInterfaces::InterfaceID kHmiInterface =
+ am::HmiInterfaces::HMI_INTERFACE_Navigation;
+} // namespace
+
+class AudioStartStreamRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ AudioStartStreamRequestTest() {
+ ON_CALL(app_mngr_settings_, start_stream_retry_amount())
+ .WillByDefault(ReturnRef(start_stream_retry_amount_));
+ msg_ = CreateMessage();
+ command_ = CreateCommand<AudioStartStreamRequest>(msg_);
+ }
+
+ std::pair<uint32_t, int32_t> start_stream_retry_amount_;
+ MessageSharedPtr msg_;
+ SharedPtr<AudioStartStreamRequest> command_;
+};
+
+TEST_F(AudioStartStreamRequestTest, Run_HmiInterfaceNotAvailable_NoRequest) {
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(_)).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(AudioStartStreamRequestTest,
+ Run_HmiInterfaceAvailableButNoApp_NoRequest) {
+ (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(_)).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(AudioStartStreamRequestTest, Run_HmiInterfaceAvailable_SentRequest) {
+ (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_audio_streaming_allowed(true));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(msg_));
+
+ command_->Run();
+}
+
+} // namespace navi_audio_start_stream_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/navi_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_is_ready_request_test.cc
new file mode 100644
index 0000000000..49145d1644
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_is_ready_request_test.cc
@@ -0,0 +1,135 @@
+/*
+ * 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 "hmi/navi_is_ready_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/commands/commands_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_is_ready_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::NaviIsReadyRequest;
+using am::event_engine::Event;
+
+namespace {
+const hmi_apis::FunctionID::eType kEventID =
+ hmi_apis::FunctionID::Navigation_IsReady;
+} // namespace
+
+typedef SharedPtr<NaviIsReadyRequest> NaviIsReadyRequestPtr;
+
+class NaviIsReadyRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ NaviIsReadyRequestTest() : command_(CreateCommand<NaviIsReadyRequest>()) {}
+
+ NaviIsReadyRequestPtr command_;
+};
+
+TEST_F(NaviIsReadyRequestTest,
+ OnEvent_HmiInterfaceIsAvailable_NaviCooperatingIsAvailable) {
+ const bool is_hmi_interface_available = true;
+
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[am::strings::msg_params][am::strings::available] =
+ is_hmi_interface_available;
+
+ Event event(kEventID);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation,
+ am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_navi_cooperating(is_hmi_interface_available));
+
+ command_->on_event(event);
+}
+
+TEST_F(NaviIsReadyRequestTest,
+ OnEvent_HmiInterfaceIsNotAvailable_NaviCooperatingIsNotAvailable) {
+ const bool is_hmi_interface_available = false;
+
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[am::strings::msg_params][am::strings::available] =
+ is_hmi_interface_available;
+
+ Event event(kEventID);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_navi_cooperating(is_hmi_interface_available));
+
+ command_->on_event(event);
+}
+
+TEST_F(NaviIsReadyRequestTest,
+ OnEvent_AvailabilityFieldMissing_NaviCooperatingIsNotAvailable) {
+ const bool is_hmi_interface_available = false;
+
+ MessageSharedPtr event_msg = CreateMessage();
+ Event event(kEventID);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_navi_cooperating(is_hmi_interface_available));
+
+ command_->on_event(event);
+}
+
+} // namespace navi_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/navi_is_ready_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_is_ready_response_test.cc
new file mode 100644
index 0000000000..3bcea20be7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_is_ready_response_test.cc
@@ -0,0 +1,76 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "hmi/navi_is_ready_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_is_ready_responce {
+
+namespace am = ::application_manager;
+namespace commands = sdl_rpc_plugin::commands;
+
+using ::testing::ReturnRef;
+using ::utils::SharedPtr;
+using application_manager::commands::ResponseFromHMI;
+using test::components::event_engine_test::MockEventDispatcher;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+
+class NaviIsReadyResponseTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(NaviIsReadyResponseTest, NaviIsReadyResponse_Run_SUCCESS) {
+ ResponseFromHMIPtr command(CreateCommand<commands::NaviIsReadyResponse>());
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ command->Run();
+}
+
+} // namespace navi_is_ready_responce
+} // 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/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
new file mode 100644
index 0000000000..c7287c024a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc
@@ -0,0 +1,216 @@
+/*
+ * 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 names of the copyright holders 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 "hmi/navi_set_video_config_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_set_video_config_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::NaviSetVideoConfigRequest;
+using am::event_engine::Event;
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kHmiAppId = 13u;
+const hmi_apis::FunctionID::eType kEventID =
+ hmi_apis::FunctionID::Navigation_SetVideoConfig;
+} // namespace
+
+typedef SharedPtr<NaviSetVideoConfigRequest> NaviSetVideoConfigRequestPtr;
+
+class NaviSetVideoConfigRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ NaviSetVideoConfigRequestTest() {
+ mock_app_ptr_ = CreateMockApp();
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(mock_hmi_interfaces_));
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_ptr_));
+ ON_CALL(app_mngr_, application_by_hmi_app(_))
+ .WillByDefault(Return(mock_app_ptr_));
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(mock_event_dispatcher_));
+ ON_CALL(*mock_app_ptr_, app_id()).WillByDefault(Return(kAppId));
+ ON_CALL(*mock_app_ptr_, hmi_app_id()).WillByDefault(Return(kHmiAppId));
+ }
+
+ MOCK(am::MockHmiInterfaces) mock_hmi_interfaces_;
+ MockAppPtr mock_app_ptr_;
+ MockEventDispatcher mock_event_dispatcher_;
+};
+
+TEST_F(NaviSetVideoConfigRequestTest, OnEventWithSuccessResponse) {
+ MessageSharedPtr request_msg = CreateMessage();
+ (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+
+ NaviSetVideoConfigRequestPtr command =
+ CreateCommand<NaviSetVideoConfigRequest>(request_msg);
+
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ 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))
+ .Times(1);
+
+ command->on_event(event);
+}
+
+static bool ValidateList(std::vector<std::string>& expected,
+ std::vector<std::string>& actual) {
+ std::sort(expected.begin(), expected.end());
+ std::sort(actual.begin(), actual.end());
+ return std::equal(expected.begin(), expected.end(), actual.begin());
+}
+
+TEST_F(NaviSetVideoConfigRequestTest, OnEventWithRejectedResponse) {
+ MessageSharedPtr request_msg = CreateMessage();
+ (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*request_msg)[am::strings::msg_params][am::strings::config] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*request_msg)[am::strings::msg_params][am::strings::config]
+ [am::strings::protocol] =
+ hmi_apis::Common_VideoStreamingProtocol::RTP;
+ (*request_msg)[am::strings::msg_params][am::strings::config]
+ [am::strings::codec] =
+ hmi_apis::Common_VideoStreamingCodec::H265;
+ (*request_msg)[am::strings::msg_params][am::strings::config]
+ [am::strings::height] = 640;
+ (*request_msg)[am::strings::msg_params][am::strings::config]
+ [am::strings::width] = 480;
+
+ NaviSetVideoConfigRequestPtr command =
+ CreateCommand<NaviSetVideoConfigRequest>(request_msg);
+
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::REJECTED;
+
+ (*event_msg)[am::strings::msg_params][am::strings::rejected_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*event_msg)[am::strings::msg_params][am::strings::rejected_params][0] =
+ "codec";
+ (*event_msg)[am::strings::msg_params][am::strings::rejected_params][1] =
+ "protocol";
+ Event event(kEventID);
+ 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));
+
+ command->on_event(event);
+
+ ASSERT_EQ(2u, rejected_params.size());
+ std::vector<std::string> expected_list;
+ expected_list.push_back(std::string("protocol"));
+ expected_list.push_back(std::string("codec"));
+ ASSERT_TRUE(ValidateList(expected_list, rejected_params));
+}
+
+TEST_F(NaviSetVideoConfigRequestTest,
+ OnEventWithRejectedResponseWithoutParams) {
+ MessageSharedPtr request_msg = CreateMessage();
+ (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+
+ NaviSetVideoConfigRequestPtr command =
+ CreateCommand<NaviSetVideoConfigRequest>(request_msg);
+
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::REJECTED;
+
+ Event event(kEventID);
+ event.set_smart_object(*event_msg);
+
+ std::vector<std::string> empty;
+ EXPECT_CALL(
+ app_mngr_,
+ OnStreamingConfigured(
+ kAppId, protocol_handler::ServiceType::kMobileNav, false, empty))
+ .WillOnce(Return());
+
+ command->on_event(event);
+}
+
+TEST_F(NaviSetVideoConfigRequestTest, OnTimeout) {
+ MessageSharedPtr request_msg = CreateMessage();
+ (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+
+ NaviSetVideoConfigRequestPtr command =
+ CreateCommand<NaviSetVideoConfigRequest>(request_msg);
+
+ std::vector<std::string> empty;
+ EXPECT_CALL(
+ app_mngr_,
+ OnStreamingConfigured(
+ kAppId, protocol_handler::ServiceType::kMobileNav, false, empty))
+ .WillOnce(Return());
+
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(1);
+
+ command->onTimeOut();
+}
+
+} // namespace navi_set_video_config_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/navi_set_video_config_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_response_test.cc
new file mode 100644
index 0000000000..6469966ca2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_response_test.cc
@@ -0,0 +1,79 @@
+/*
+ * 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 names of the copyright holders 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 "application_manager/commands/commands_test.h"
+#include "hmi/navi_set_video_config_response.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/smart_object_keys.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_set_video_config_response {
+
+using utils::SharedPtr;
+using sdl_rpc_plugin::commands::NaviSetVideoConfigResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+using testing::_;
+using testing::ReturnRef;
+using ::testing::NiceMock;
+
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+class NaviSetVideoConfigResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(NaviSetVideoConfigResponseTest, RUN_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<NaviSetVideoConfigResponse> command(
+ CreateCommand<NaviSetVideoConfigResponse>(msg));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace navi_set_video_config_response
+} // 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/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
new file mode 100644
index 0000000000..6700aa68ab
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc
@@ -0,0 +1,120 @@
+/*
+ * 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 <utility>
+
+#include "hmi/navi_start_stream_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_start_stream_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+namespace commands = am::commands;
+using commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::NaviStartStreamRequest;
+using am::event_engine::Event;
+
+namespace {
+const uint32_t kHmiAppId = 13u;
+const am::HmiInterfaces::InterfaceID kHmiInterface =
+ am::HmiInterfaces::HMI_INTERFACE_Navigation;
+} // namespace
+
+class NaviStartStreamRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ NaviStartStreamRequestTest() {
+ ON_CALL(app_mngr_settings_, start_stream_retry_amount())
+ .WillByDefault(ReturnRef(start_stream_retry_amount_));
+ msg_ = CreateMessage();
+ command_ = CreateCommand<NaviStartStreamRequest>(msg_);
+ }
+
+ std::pair<uint32_t, int32_t> start_stream_retry_amount_;
+ MessageSharedPtr msg_;
+ SharedPtr<NaviStartStreamRequest> command_;
+};
+
+TEST_F(NaviStartStreamRequestTest, Run_HmiInterfaceNotAvailable_NoRequest) {
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(_)).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(NaviStartStreamRequestTest,
+ Run_HmiInterfaceAvailableButNoApp_NoRequest) {
+ (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(_)).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(NaviStartStreamRequestTest, Run_HmiInterfaceAvailable_SentRequest) {
+ (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_video_streaming_allowed(true));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(msg_));
+
+ command_->Run();
+}
+
+} // namespace navi_start_stream_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/navi_stop_stream_requests_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_stop_stream_requests_test.cc
new file mode 100644
index 0000000000..0ef903224b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_stop_stream_requests_test.cc
@@ -0,0 +1,105 @@
+/*
+ * 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 "hmi/navi_stop_stream_request.h"
+#include "hmi/navi_audio_stop_stream_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace navi_stop_stream_requests {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+namespace commands = sdl_rpc_plugin::commands;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+
+namespace {
+const am::HmiInterfaces::InterfaceID kHmiInterface =
+ am::HmiInterfaces::HMI_INTERFACE_Navigation;
+} // namespace
+
+template <typename Command>
+class NaviStopStreamRequestsTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ NaviStopStreamRequestsTest() {
+ ON_CALL(this->app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(mock_hmi_interfaces_));
+ msg_ = CreateMessage();
+ command_ = CreateCommand<Command>(msg_);
+ }
+
+ MessageSharedPtr msg_;
+ SharedPtr<Command> command_;
+};
+
+typedef testing::Types<commands::AudioStopStreamRequest,
+ commands::NaviStopStreamRequest> RequestCommandsList;
+TYPED_TEST_CASE(NaviStopStreamRequestsTest, RequestCommandsList);
+
+TYPED_TEST(NaviStopStreamRequestsTest, Run_HmiInterfaceNotAvailable_NoRequest) {
+ EXPECT_CALL(TestFixture::mock_hmi_interfaces_,
+ GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(TestFixture::mock_rpc_service_, SendMessageToHMI(_)).Times(0);
+
+ TestFixture::command_->Run();
+}
+
+TYPED_TEST(NaviStopStreamRequestsTest, Run_HmiInterfaceAvailable_SentRequest) {
+ EXPECT_CALL(TestFixture::mock_hmi_interfaces_,
+ GetInterfaceState(kHmiInterface))
+ .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(TestFixture::mock_rpc_service_,
+ SendMessageToHMI(TestFixture::msg_));
+
+ TestFixture::command_->Run();
+}
+
+} // namespace navi_stop_stream_requests
+} // 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/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
new file mode 100644
index 0000000000..60a7b01612
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc
@@ -0,0 +1,163 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "utils/shared_ptr.h"
+#include "utils/lock.h"
+#include "utils/make_shared.h"
+#include "utils/data_accessor.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "hmi/on_driver_distraction_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace on_driver_distraction_notification {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::Eq;
+using ::utils::SharedPtr;
+
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::hmi::OnDriverDistractionNotification;
+using namespace am::commands;
+
+typedef ::utils::SharedPtr<OnDriverDistractionNotification> NotificationPtr;
+
+class HMIOnDriverDistractionNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ HMIOnDriverDistractionNotificationTest()
+ : app_set_lock_(std::make_shared<sync_primitives::Lock>()) {}
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_;
+ policy_test::MockPolicyHandlerInterface mock_policy_handler_interface_;
+};
+
+MATCHER_P2(CheckNotificationParams, function_id, state, "") {
+ bool is_function_id_matched =
+ function_id ==
+ static_cast<am::mobile_api::FunctionID::eType>(
+ (*arg)[am::strings::params][am::strings::function_id].asInt());
+ bool is_state_matched =
+ state ==
+ static_cast<hmi_apis::Common_DriverDistractionState::eType>(
+ (*arg)[am::strings::msg_params][am::mobile_notification::state]
+ .asInt());
+ return is_function_id_matched && is_state_matched;
+}
+
+ACTION_P(GetArg3, result) {
+ arg3 = *result;
+}
+
+TEST_F(HMIOnDriverDistractionNotificationTest, Run_PushMobileMessage_SUCCESS) {
+ const hmi_apis::Common_DriverDistractionState::eType state =
+ hmi_apis::Common_DriverDistractionState::DD_ON;
+ MessageSharedPtr commands_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*commands_msg)[am::strings::msg_params][am::hmi_notification::state] = state;
+
+ NotificationPtr command(
+ CreateCommand<OnDriverDistractionNotification>(commands_msg));
+
+ EXPECT_CALL(app_mngr_, set_driver_distraction_state(Eq(state)));
+
+ MockAppPtr mock_app = CreateMockApp();
+ am::ApplicationSet app_set;
+ app_set.insert(mock_app);
+
+ DataAccessor<am::ApplicationSet> accessor(app_set, app_set_lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+ policy::CheckPermissionResult result;
+ result.hmi_level_permitted = policy::kRpcDisallowed;
+ EXPECT_CALL(app_mngr_, GetPolicyHandler())
+ .WillOnce(ReturnRef(mock_policy_handler_interface_));
+ EXPECT_CALL(mock_policy_handler_interface_, CheckPermissions(_, _, _, _))
+ .WillOnce(GetArg3(&result));
+
+ EXPECT_CALL(*mock_app,
+ PushMobileMessage(CheckNotificationParams(
+ am::mobile_api::FunctionID::OnDriverDistractionID, state)));
+
+ command->Run();
+}
+
+TEST_F(HMIOnDriverDistractionNotificationTest,
+ Run_SendNotificationToMobile_SUCCESS) {
+ const hmi_apis::Common_DriverDistractionState::eType state =
+ hmi_apis::Common_DriverDistractionState::DD_ON;
+ MessageSharedPtr commands_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*commands_msg)[am::strings::msg_params][am::hmi_notification::state] = state;
+
+ NotificationPtr command(
+ CreateCommand<OnDriverDistractionNotification>(commands_msg));
+
+ EXPECT_CALL(app_mngr_, set_driver_distraction_state(Eq(state)));
+
+ MockAppPtr mock_app = CreateMockApp();
+ am::ApplicationSet app_set;
+ app_set.insert(mock_app);
+
+ DataAccessor<am::ApplicationSet> accessor(app_set, app_set_lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+
+ policy::CheckPermissionResult result;
+ result.hmi_level_permitted = policy::kRpcAllowed;
+ EXPECT_CALL(app_mngr_, GetPolicyHandler())
+ .WillOnce(ReturnRef(mock_policy_handler_interface_));
+ EXPECT_CALL(mock_policy_handler_interface_, CheckPermissions(_, _, _, _))
+ .WillOnce(GetArg3(&result));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ CheckNotificationParams(
+ am::mobile_api::FunctionID::OnDriverDistractionID, state),
+ Command::CommandSource::SOURCE_SDL));
+
+ command->Run();
+}
+
+} // on_driver_distraction_notification
+} // 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/on_system_time_ready_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_system_time_ready_notification_test.cc
new file mode 100644
index 0000000000..2d50ec2b72
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_system_time_ready_notification_test.cc
@@ -0,0 +1,80 @@
+/*
+ * 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 names of the copyright holders 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 "application_manager/commands/commands_test.h"
+#include "hmi/on_system_time_ready_notification.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/smart_object_keys.h"
+#include "interfaces/HMI_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace on_system_time_ready_notification {
+
+using sdl_rpc_plugin::commands::OnSystemTimeReadyNotification;
+using test::components::event_engine_test::MockEventDispatcher;
+using testing::ReturnRef;
+
+class OnSystemTimeReadyNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+ACTION_P(GetEventId, event_id) {
+ *event_id = arg0.id();
+}
+
+TEST_F(OnSystemTimeReadyNotificationTest, Run_SUCCESS) {
+ int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr msg = CreateMessage();
+ MockEventDispatcher mock_event_dispatcher;
+
+ auto command(CreateCommand<OnSystemTimeReadyNotification>(msg));
+
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_))
+ .WillOnce(GetEventId(&event_id));
+
+ command->Run();
+
+ EXPECT_EQ(hmi_apis::FunctionID::BasicCommunication_OnSystemTimeReady,
+ event_id);
+}
+
+} // namespace on_system_time_ready_notification
+} // 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
new file mode 100644
index 0000000000..bbd5920f9f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
@@ -0,0 +1,177 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "hmi/rc_get_capabilities_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace rc_get_capabilities_response {
+
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = am::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::RCGetCapabilitiesResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<RCGetCapabilitiesResponse> RCGetCapabilitiesResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class RCGetCapabilitiesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][strings::rc_capability] =
+ (capabilities_);
+
+ return command_msg;
+ }
+
+ SmartObject capabilities_;
+};
+
+TEST_F(RCGetCapabilitiesResponseTest, RUN_SUCCESSS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+
+ (*command_msg)[strings::msg_params][strings::system_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::rc_capability] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ smart_objects::SmartObject& remote_control_capability =
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::rc_capability];
+
+ remote_control_capability["climateControlCapabilities"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ remote_control_capability["climateControlCapabilities"][0] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& climate_control_capability =
+ remote_control_capability["climateControlCapabilities"][0];
+
+ climate_control_capability["moduleName"] = "Climate";
+ climate_control_capability["fanSpeedAvailable"] = true;
+ climate_control_capability["desiredTemperatureAvailable"] = true;
+ climate_control_capability["acEnableAvailable"] = true;
+ climate_control_capability["acMaxEnableAvailable"] = true;
+ climate_control_capability["circulateAirEnableAvailable"] = true;
+ climate_control_capability["autoModeEnableAvailable"] = true;
+ climate_control_capability["dualModeEnableAvailable"] = true;
+
+ climate_control_capability["defrostZoneAvailable"] = true;
+ climate_control_capability["defrostZone"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ climate_control_capability["defrostZone"][0] = "ALL";
+
+ climate_control_capability["ventilationModeAvailable"] = true;
+ climate_control_capability["ventilationMode"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ climate_control_capability["ventilationMode"][0] = "BOTH";
+
+ remote_control_capability["radioControlCapabilities"] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ remote_control_capability["radioControlCapabilities"][0] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& radio_control_capability =
+ remote_control_capability["radioControlCapabilities"][0];
+
+ radio_control_capability["moduleName"] = "Radio";
+ radio_control_capability["radioEnableAvailable"] = true;
+ radio_control_capability["radioBandAvailable"] = true;
+ radio_control_capability["radioFrequencyAvailable"] = true;
+ radio_control_capability["hdChannelAvailable"] = true;
+ radio_control_capability["rdsDataAvailable"] = true;
+ radio_control_capability["availableHDsAvailable"] = true;
+ radio_control_capability["stateAvailable"] = true;
+ radio_control_capability["signalStrengthAvailable"] = true;
+ radio_control_capability["signalChangeThresholdAvailable"] = true;
+
+ remote_control_capability[hmi_response::button_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ remote_control_capability[hmi_response::button_capabilities][0] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& button_capability =
+ remote_control_capability[hmi_response::button_capabilities][0];
+
+ button_capability[strings::button_name] = "OK";
+ button_capability["shortPressAvailable"] = true;
+ button_capability["longPressAvailable"] = true;
+ button_capability["upDownAvailable"] = true;
+
+ RCGetCapabilitiesResponsePtr command(
+ CreateCommand<RCGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject rc_capability_so =
+ (*command_msg)[strings::msg_params][strings::rc_capability];
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_rc_capability(rc_capability_so));
+ EXPECT_CALL(mock_hmi_capabilities_, set_rc_supported(true));
+
+ command->Run();
+}
+
+} // namespace rc_get_capabilities_response
+} // 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_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc
new file mode 100644
index 0000000000..41acf67116
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc
@@ -0,0 +1,168 @@
+/*
+ * 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 "hmi/rc_is_ready_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace rc_is_ready_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::RCIsReadyRequest;
+using am::event_engine::Event;
+
+typedef SharedPtr<RCIsReadyRequest> RCIsReadyRequestPtr;
+
+class RCIsReadyRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ RCIsReadyRequestTest() : command_(CreateCommand<RCIsReadyRequest>()) {}
+
+ void SetUpExpectations(bool is_rc_cooperating_available,
+ bool is_send_message_to_hmi,
+ bool is_message_contain_param,
+ am::HmiInterfaces::InterfaceState state) {
+ if (is_send_message_to_hmi) {
+ ExpectSendMessagesToHMI();
+ }
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_rc_cooperating(is_rc_cooperating_available));
+ if (!is_rc_cooperating_available) {
+ EXPECT_CALL(mock_hmi_capabilities_, set_rc_supported(false));
+ }
+
+ if (is_message_contain_param) {
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_RC, 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_RC))
+ .WillOnce(Return(state));
+ }
+
+ void ExpectSendMessagesToHMI() {
+ smart_objects::SmartObjectSPtr capabilities(
+ new smart_objects::SmartObject(smart_objects::SmartType_Map));
+ EXPECT_CALL(mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::RC_GetCapabilities, _))
+ .WillOnce(Return(capabilities));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(capabilities));
+ }
+
+ void PrepareEvent(bool is_message_contain_param,
+ Event& event,
+ bool is_rc_cooperating_available = false) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ if (is_message_contain_param) {
+ (*msg)[am::strings::msg_params][am::strings::available] =
+ is_rc_cooperating_available;
+ }
+ event.set_smart_object(*msg);
+ }
+
+ RCIsReadyRequestPtr command_;
+ am::MockHmiInterfaces mock_hmi_interfaces_;
+};
+
+TEST_F(RCIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
+ const bool is_rc_cooperating_available = false;
+ 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);
+ SetUpExpectations(is_rc_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_RESPONSE);
+ command_->on_event(event);
+}
+
+TEST_F(RCIsReadyRequestTest, Run_KeyAvailableEqualToFalse_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);
+ PrepareEvent(is_message_contain_param, event);
+ 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_KeyAvailableEqualToTrue_StateAvailable) {
+ const bool is_rc_cooperating_available = true;
+ const bool is_send_message_to_hmi = true;
+ const bool is_message_contain_param = true;
+ Event event(hmi_apis::FunctionID::RC_IsReady);
+ PrepareEvent(is_message_contain_param, event, is_rc_cooperating_available);
+ SetUpExpectations(is_rc_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(RCIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
+ ExpectSendMessagesToHMI();
+ command_->onTimeOut();
+}
+
+} // namespace rc_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/rc_is_ready_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_response_test.cc
new file mode 100644
index 0000000000..e07a0c1538
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_response_test.cc
@@ -0,0 +1,79 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "hmi/rc_is_ready_response.h"
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace rc_is_ready_response {
+
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::RCIsReadyResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+
+typedef SharedPtr<RCIsReadyResponse> RCIsReadyResponsePtr;
+
+class RCIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+};
+
+TEST_F(RCIsReadyResponseTest, RUN_SUCCESS) {
+ RCIsReadyResponsePtr command(CreateCommand<RCIsReadyResponse>());
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace rc_is_ready_response
+} // 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/response_from_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/response_from_hmi_test.cc
new file mode 100644
index 0000000000..c5b0c2ba24
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/response_from_hmi_test.cc
@@ -0,0 +1,134 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/test/include/application_manager/commands/commands_test.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/test/include/application_manager/mock_event_dispatcher.h"
+#include "application_manager/commands/response_from_hmi.h"
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace response_from_hmi {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::SaveArg;
+using ::testing::DoAll;
+
+using ::utils::SharedPtr;
+using ::test::components::event_engine_test::MockEventDispatcher;
+
+namespace am = ::application_manager;
+using application_manager::commands::ResponseFromHMI;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+
+class ResponseFromHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(ResponseFromHMITest, BasicMethodsOverloads_SUCCESS) {
+ ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
+
+ // Current implementation always return `true`
+ EXPECT_TRUE(command->Init());
+ EXPECT_NO_THROW(command->Run());
+ EXPECT_TRUE(command->CleanUp());
+}
+
+TEST_F(ResponseFromHMITest, SendResponseToMobile_SUCCESS) {
+ ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
+
+ MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(msg, _));
+
+ command->SendResponseToMobile(msg, app_mngr_);
+
+ const application_manager::MessageType received_message_tipe =
+ static_cast<application_manager::MessageType>(
+ (*msg)[am::strings::params][am::strings::message_type].asInt());
+
+ EXPECT_EQ(application_manager::MessageType::kResponse, received_message_tipe);
+}
+
+TEST_F(ResponseFromHMITest, CreateHMIRequest_SUCCESS) {
+ ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
+
+ MessageSharedPtr result_msg;
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&result_msg), Return(true)));
+
+ const hmi_apis::FunctionID::eType posted_function_id =
+ hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr dummy_msg_params = CreateMessage();
+ command->CreateHMIRequest(posted_function_id, *dummy_msg_params);
+
+ ASSERT_TRUE(result_msg);
+
+ const application_manager::MessageType received_message_tipe =
+ static_cast<application_manager::MessageType>(
+ (*result_msg)[am::strings::params][am::strings::message_type]
+ .asInt());
+
+ EXPECT_EQ(am::MessageType::kRequest, received_message_tipe);
+
+ const hmi_apis::FunctionID::eType received_function_id =
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*result_msg)[am::strings::params][am::strings::function_id].asInt());
+
+ EXPECT_EQ(posted_function_id, received_function_id);
+}
+
+TEST_F(ResponseFromHMITest, CreateHMIRequest_CantManageCommand_Covering) {
+ ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
+
+ MessageSharedPtr result_msg;
+ ON_CALL(app_mngr_, GetNextHMICorrelationID()).WillByDefault(Return(1u));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&result_msg), Return(false)));
+
+ const hmi_apis::FunctionID::eType posted_function_id =
+ hmi_apis::FunctionID::INVALID_ENUM;
+ MessageSharedPtr dummy_msg_params = CreateMessage();
+ command->CreateHMIRequest(posted_function_id, *dummy_msg_params);
+}
+
+} // namespace response_from_hmi
+} // 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/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
new file mode 100644
index 0000000000..c21791e913
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc
@@ -0,0 +1,500 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/lock.h"
+#include "utils/helpers.h"
+#include "hmi/sdl_activate_app_request.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_state_controller.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace sdl_activate_app_request {
+
+namespace am = ::application_manager;
+namespace strings = am::strings;
+namespace hmi_response = am::hmi_response;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::SDLActivateAppRequest;
+using am::ApplicationSet;
+using testing::Mock;
+using testing::Return;
+using testing::ReturnRef;
+using testing::Mock;
+using ::testing::NiceMock;
+using policy_test::MockPolicyHandlerInterface;
+using am::event_engine::Event;
+
+namespace {
+const uint32_t kCorrelationID = 1u;
+const uint32_t kAppID = 2u;
+const uint32_t kAppIDFirst = 1u;
+const connection_handler::DeviceHandle kHandle = 2u;
+} // namespace
+
+MATCHER_P2(CheckMsgParams, result, corr_id, "") {
+ const bool is_func_id_valid =
+ hmi_apis::FunctionID::SDL_ActivateApp ==
+ static_cast<int32_t>(
+ (*arg)[strings::params][strings::function_id].asInt());
+
+ const bool is_result_code_valid =
+ hmi_apis::Common_Result::APPLICATION_NOT_REGISTERED ==
+ static_cast<int32_t>(
+ (*arg)[strings::msg_params][strings::result_code].asInt());
+
+ const bool is_result_valid =
+ result == (*arg)[strings::msg_params][strings::success].asBool();
+
+ const bool is_corr_id_valid =
+ corr_id == ((*arg)[strings::params][strings::correlation_id].asUInt());
+
+ using namespace helpers;
+ return Compare<bool, EQ, ALL>(true,
+ is_func_id_valid,
+ is_result_code_valid,
+ is_result_valid,
+ is_corr_id_valid);
+}
+
+class SDLActivateAppRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SDLActivateAppRequestTest()
+ : lock_(std::make_shared<sync_primitives::Lock>()) {}
+
+ protected:
+ ~SDLActivateAppRequestTest() {
+ // Fix DataAccessor release and WinQt crash
+ Mock::VerifyAndClearExpectations(&app_mngr_);
+ }
+
+ void InitCommand(const uint32_t& timeout) OVERRIDE {
+ MockAppPtr mock_app = CreateMockApp();
+ CommandRequestTest<CommandsTestMocks::kIsNice>::InitCommand(timeout);
+ ON_CALL((*mock_app), app_id()).WillByDefault(Return(kAppID));
+ ON_CALL(app_mngr_, application_by_hmi_app(kAppID))
+ .WillByDefault(Return(mock_app));
+ }
+ void SetCorrelationAndAppID(MessageSharedPtr msg) {
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+ (*msg)[strings::msg_params][strings::app_id] = kAppID;
+ }
+
+ ApplicationSet app_list_;
+ std::shared_ptr<sync_primitives::Lock> lock_;
+ policy_test::MockPolicyHandlerInterface policy_handler_;
+ application_manager_test::MockStateController mock_state_controller_;
+ NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
+};
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+
+TEST_F(SDLActivateAppRequestTest, Run_ActivateApp_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_policy_handler_, OnActivateApp(kAppID, kCorrelationID));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, DISABLED_Run_DactivateApp_REJECTED) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+ (*msg)[strings::msg_params][strings::function_id] =
+ hmi_apis::FunctionID::SDL_ActivateApp;
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::SDL_ActivateApp)))
+ .WillOnce(Return(true));
+
+ command->Run();
+}
+#else
+
+TEST_F(SDLActivateAppRequestTest, FindAppToRegister_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kAppID)).WillOnce(Return(mock_app));
+
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(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(false));
+ ON_CALL(*mock_app, device()).WillByDefault(Return(kHandle));
+
+ MockAppPtr mock_app_first(CreateMockApp());
+ ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
+ ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
+
+ app_list_.insert(mock_app_first);
+ DataAccessor<ApplicationSet> accessor(app_list_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+
+ ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
+ EXPECT_CALL(*mock_app_first, is_foreground()).WillOnce(Return(false));
+ ON_CALL(*mock_app_first, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ ON_CALL(*mock_app, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+
+ const std::string url = "url";
+ ON_CALL(*mock_app_first, SchemaUrl()).WillByDefault(Return(url));
+ const std::string package = "package";
+ ON_CALL(*mock_app_first, PackageName()).WillByDefault(Return(package));
+
+ EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, AppIdNotFound_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kAppID))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ EXPECT_CALL(app_mngr_, WaitingApplicationByID(kAppID))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, DevicesAppsEmpty_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ 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_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(false));
+ ON_CALL(*mock_app, device()).WillByDefault(Return(kHandle));
+
+ DataAccessor<ApplicationSet> accessor(app_list_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+ app_list_ = accessor.GetData();
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, FirstAppActive_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ 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_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+
+ DataAccessor<ApplicationSet> accessor(app_list_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+
+ app_list_ = accessor.GetData();
+
+ MockAppPtr mock_app_first(CreateMockApp());
+ ON_CALL(app_mngr_, application(kAppIDFirst))
+ .WillByDefault(Return(mock_app_first));
+
+ app_list_.insert(mock_app_first);
+ ON_CALL(*mock_app_first, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+
+ ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
+ EXPECT_CALL(*mock_app_first, is_foreground()).WillRepeatedly(Return(true));
+
+ EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, FirstAppNotActive_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ 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_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+ EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_policy_handler_, OnActivateApp(kAppID, kCorrelationID));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, FirstAppIsForeground_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+
+ const std::string schema("schema");
+ mock_app->SetShemaUrl(schema);
+ const std::string package_name("package_name");
+ mock_app->SetPackageName(package_name);
+
+ ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(false));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+ MockAppPtr mock_app_first(CreateMockApp());
+ ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
+
+ app_list_.insert(mock_app_first);
+ DataAccessor<ApplicationSet> accessor(app_list_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+ ON_CALL(*mock_app_first, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
+ EXPECT_CALL(*mock_app_first, is_foreground()).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, schema, package_name, _));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, FirstAppNotRegisteredAndEmpty_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+
+ MockAppPtr mock_app_first(CreateMockApp());
+ ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
+ ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
+
+ app_list_.insert(mock_app_first);
+ DataAccessor<ApplicationSet> accessor(app_list_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+ ON_CALL(*mock_app_first, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ EXPECT_CALL(*mock_app_first, is_foreground()).WillOnce(Return(false));
+
+ EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
+
+ command->Run();
+}
+
+TEST_F(SDLActivateAppRequestTest, FirstAppNotRegistered_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, state_controller())
+ .WillOnce(ReturnRef(mock_state_controller_));
+ EXPECT_CALL(mock_state_controller_,
+ IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
+ .WillOnce(Return(false));
+ DataAccessor<ApplicationSet> accessor(app_list_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+
+ app_list_ = accessor.GetData();
+
+ MockAppPtr mock_app_first(CreateMockApp());
+ ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
+ ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
+
+ app_list_.insert(mock_app_first);
+ ON_CALL(*mock_app_first, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ EXPECT_CALL(*mock_app_first, is_foreground()).WillRepeatedly(Return(true));
+
+ EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
+
+ command->Run();
+}
+#endif
+
+TEST_F(SDLActivateAppRequestTest, OnTimeout_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ SetCorrelationAndAppID(msg);
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+ ON_CALL(mock_event_dispatcher_, remove_observer(_, _));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ command->onTimeOut();
+}
+
+TEST_F(SDLActivateAppRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[strings::params][strings::correlation_id] = kCorrelationID;
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>());
+
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ event.set_smart_object(*event_msg);
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(_)).Times(0);
+
+ command->on_event(event);
+}
+
+TEST_F(SDLActivateAppRequestTest, OnEvent_InvalidAppId_UNSUCCESS) {
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[strings::msg_params][strings::application][strings::app_id] =
+ kAppID;
+
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>());
+
+ Event event(hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
+ event.set_smart_object(*event_msg);
+
+ MockAppPtr invalid_mock_app;
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(_))
+ .WillOnce(Return(invalid_mock_app));
+
+ command->on_event(event);
+}
+
+TEST_F(SDLActivateAppRequestTest, OnEvent_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+ SharedPtr<SDLActivateAppRequest> command(
+ CreateCommand<SDLActivateAppRequest>(msg));
+
+ MessageSharedPtr event_msg = CreateMessage();
+ (*event_msg)[strings::msg_params][strings::application][strings::app_id] =
+ kAppID;
+
+ Event event(hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
+ event.set_smart_object(*event_msg);
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(_)).WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppID));
+
+ EXPECT_CALL(mock_policy_handler_, OnActivateApp(kAppID, kCorrelationID));
+
+ command->on_event(event);
+}
+
+} // namespace sdl_activate_app_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/sdl_activate_app_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_response_test.cc
new file mode 100644
index 0000000000..716c818269
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_response_test.cc
@@ -0,0 +1,87 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "hmi/sdl_activate_app_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace sdl_activate_app_response {
+
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using sdl_rpc_plugin::commands::SDLActivateAppResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<SDLActivateAppResponse> SDLActivateAppResponsePtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber = "123";
+} // namespace
+
+class SDLActivateAppResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(SDLActivateAppResponseTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+
+ SDLActivateAppResponsePtr command(
+ CreateCommand<SDLActivateAppResponse>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+} // namespace sdl_activate_app_response
+} // 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/sdl_get_list_of_permisssions_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc
new file mode 100644
index 0000000000..e5f9845b74
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc
@@ -0,0 +1,111 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "hmi/sdl_get_list_of_permissions_request.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/commands/command_request_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace sdl_get_list_of_permissions_request {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::SDLGetListOfPermissionsRequest;
+using test::components::policy_test::MockPolicyHandlerInterface;
+using smart_objects::SmartObject;
+using testing::Return;
+using testing::ReturnRef;
+
+namespace {
+const uint32_t kCorrelationID = 1u;
+const uint32_t kAppID = 2u;
+const uint32_t kConnectionKey = 0u;
+} // namespace
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+class SDLGetListOfPermissionsRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ protected:
+ void SetUp() OVERRIDE {
+ mock_app_ = CreateMockApp();
+ }
+
+ void InitCommand(const uint32_t& timeout) OVERRIDE {
+ CommandRequestTest<CommandsTestMocks::kIsNice>::InitCommand(timeout);
+ ON_CALL((*mock_app_), app_id()).WillByDefault(Return(kAppID));
+ }
+ MockAppPtr mock_app_;
+};
+
+TEST_F(SDLGetListOfPermissionsRequestTest, Run_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+ (*msg)[strings::msg_params][strings::app_id] = kAppID;
+
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(kAppID))
+ .WillOnce(Return(mock_app_));
+
+ SharedPtr<SDLGetListOfPermissionsRequest> command(
+ CreateCommand<SDLGetListOfPermissionsRequest>(msg));
+
+ EXPECT_CALL(mock_policy_handler_,
+ OnGetListOfPermissions(kAppID, kCorrelationID));
+
+ command->Run();
+}
+
+TEST_F(SDLGetListOfPermissionsRequestTest, Run_KeyDoesntExist_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Binary);
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+
+ SharedPtr<SDLGetListOfPermissionsRequest> command(
+ CreateCommand<SDLGetListOfPermissionsRequest>(msg));
+
+ EXPECT_CALL(mock_policy_handler_,
+ OnGetListOfPermissions(kConnectionKey, kCorrelationID));
+
+ command->Run();
+}
+
+} // namespace sdl_get_list_of_permissions_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/sdl_get_status_update_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_status_update_request_test.cc
new file mode 100644
index 0000000000..7cfd7e49e2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_status_update_request_test.cc
@@ -0,0 +1,79 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "hmi/sdl_get_status_update_request.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/commands/command_request_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace sdl_get_status_update_request {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::SDLGetStatusUpdateRequest;
+using test::components::policy_test::MockPolicyHandlerInterface;
+using testing::Return;
+using testing::ReturnRef;
+
+namespace {
+const uint32_t kCorrelationID = 1u;
+} // namespace
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+class SDLGetStatusUpdateRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(SDLGetStatusUpdateRequestTest, Run_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+
+ SharedPtr<SDLGetStatusUpdateRequest> command(
+ CreateCommand<SDLGetStatusUpdateRequest>(msg));
+
+ EXPECT_CALL(mock_policy_handler_, OnGetStatusUpdate(kCorrelationID));
+
+ command->Run();
+}
+
+} // namespace sdl_get_status_update_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/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
new file mode 100644
index 0000000000..0ec40f896a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc
@@ -0,0 +1,160 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "hmi/sdl_get_user_friendly_message_request.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_state_controller.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/command_request_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace sdl_get_user_friendly_message_request {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::SDLGetUserFriendlyMessageRequest;
+using application_manager::MockMessageHelper;
+using test::components::policy_test::MockPolicyHandlerInterface;
+using test::components::application_manager_test::MockHMICapabilities;
+using testing::_;
+using testing::Return;
+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 kMessageCodes = "messageCodes";
+const hmi_apis::Common_Language::eType kLanguage =
+ hmi_apis::Common_Language::EN_GB;
+} // namespace
+
+namespace strings = ::application_manager::strings;
+
+class SDLGetUserFriendlyMessageRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ protected:
+ void SetUp() OVERRIDE {
+ mock_app_ = CreateMockApp();
+ }
+
+ void InitCommand(const uint32_t& timeout) OVERRIDE {
+ CommandRequestTest<CommandsTestMocks::kIsNice>::InitCommand(timeout);
+ ON_CALL((*mock_app_), app_id()).WillByDefault(Return(kAppID));
+ EXPECT_CALL(app_mngr_, application_by_hmi_app(kAppID))
+ .WillOnce(Return(mock_app_));
+ }
+ MockAppPtr mock_app_;
+};
+
+TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_LanguageSet_SUCCESS) {
+ 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(kLanguageDe);
+ (*msg)[strings::msg_params][kMessageCodes][1] = SmartObject(kLanguageEn);
+
+ (*msg)[strings::msg_params][strings::language] = kLanguage;
+
+ SharedPtr<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->Run();
+}
+
+TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_LanguageNotSet_SUCCESS) {
+ 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(kLanguageDe);
+ (*msg)[strings::msg_params][kMessageCodes][1] = SmartObject(kLanguageEn);
+
+ SharedPtr<SDLGetUserFriendlyMessageRequest> command(
+ CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
+
+ 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->Run();
+}
+
+TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_NoMsgCodes_Canceled) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+ (*msg)[strings::msg_params][strings::app_id] = kAppID;
+
+ SharedPtr<SDLGetUserFriendlyMessageRequest> command(
+ CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
+
+ EXPECT_CALL(mock_message_helper_, CommonLanguageToString(_)).Times(0);
+ EXPECT_CALL(mock_policy_handler_, OnGetUserFriendlyMessage(_, _, _)).Times(0);
+
+ command->Run();
+}
+
+} // namespace sdl_get_user_friendly_message_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/simple_notifications_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_notifications_test.cc
new file mode 100644
index 0000000000..d25c9b41e8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_notifications_test.cc
@@ -0,0 +1,77 @@
+/*
+ * 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 "gtest/gtest.h"
+
+#include "application_manager/commands/commands_test.h"
+
+#include "application_manager/commands/notification_to_hmi.h"
+#include "application_manager/commands/command_notification_impl.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace simple_notifications_test {
+
+using namespace application_manager;
+
+using ::testing::Types;
+using commands::NotificationToHMI;
+template <typename Command>
+class SimpleNotificationsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+typedef Types<commands::CommandNotificationImpl, NotificationToHMI>
+ CommandsList;
+
+TYPED_TEST_CASE(SimpleNotificationsTest, CommandsList);
+
+TYPED_TEST(SimpleNotificationsTest, Run_SendMessageToHMI_SUCCESS) {
+ typedef typename TestFixture::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+
+ // Current implementation always return `true`
+ EXPECT_TRUE(command->Init());
+ EXPECT_NO_THROW(command->Run());
+ EXPECT_TRUE(command->CleanUp());
+}
+
+} // namespace simple_notifications_test
+} // 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/simple_request_from_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_request_from_hmi_test.cc
new file mode 100644
index 0000000000..e47009583f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_request_from_hmi_test.cc
@@ -0,0 +1,99 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/commands/request_from_hmi.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace simple_requests_from_hmi_test {
+
+using ::testing::_;
+using ::testing::Types;
+using ::testing::NotNull;
+using ::testing::NiceMock;
+
+using ::utils::SharedPtr;
+namespace commands = ::application_manager::commands;
+using commands::MessageSharedPtr;
+using ::application_manager::event_engine::EventObserver;
+using ::test::components::event_engine_test::MockEventDispatcher;
+
+class RequestFromHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {
+ protected:
+ void SetUp() OVERRIDE {
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher_));
+ }
+ NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
+};
+
+TEST_F(RequestFromHMITest, BasicMethodsOverloads_SUCCESS) {
+ SharedPtr<commands::RequestFromHMI> command(
+ CreateCommand<commands::RequestFromHMI>());
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_ActivateApp);
+ // Current implementation always return `true`
+ EXPECT_TRUE(command->Init());
+ EXPECT_TRUE(command->CleanUp());
+ EXPECT_NO_THROW(command->Run());
+ EXPECT_NO_THROW(command->on_event(event));
+}
+
+TEST_F(RequestFromHMITest, SendResponse_SUCCESS) {
+ SharedPtr<commands::RequestFromHMI> command(
+ CreateCommand<commands::RequestFromHMI>());
+
+ const bool success = false;
+ const uint32_t correlation_id = 1u;
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(NotNull()));
+
+ command->SendResponse(success,
+ correlation_id,
+ hmi_apis::FunctionID::BasicCommunication_ActivateApp,
+ hmi_apis::Common_Result::SUCCESS);
+}
+
+} // namespace simple_requests_to_hmi_test
+} // 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/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
new file mode 100644
index 0000000000..c24cfc48db
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc
@@ -0,0 +1,267 @@
+/*
+ * 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 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 "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/command.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_app_request.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h"
+#include "sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_alert_maneuver_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_audio_stop_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_get_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_send_location_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_scrollable_message_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_app_icon_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "sdl_rpc_plugin/commands/hmi/dial_number_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_speak_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_stop_speaking_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_change_registration_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/tts_get_language_request.h"
+#include "sdl_rpc_plugin/commands/hmi/close_popup_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_add_command_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_alert_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_change_registration_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_delete_command_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_delete_submenu_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_end_audio_pass_thru_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_language_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_perform_audio_pass_thru_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_perform_interaction_request.h"
+#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/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"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_get_language_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h"
+#include "sdl_rpc_plugin/commands/hmi/vr_perform_interaction_request.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_all_apps_request.h"
+#include "sdl_rpc_plugin/commands/hmi/basic_communication_system_request.h"
+#include "sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h"
+#include "sdl_rpc_plugin/commands/hmi/allow_app_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_send_location_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_unsubscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_update_turn_list_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_stop_stream_request.h"
+#include "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_policy_update.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_set_icon_request.h"
+#include "sdl_rpc_plugin/commands/hmi/dial_number_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_request.h"
+
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace simple_requests_to_hmi_test {
+
+using ::testing::_;
+using ::testing::Types;
+using ::testing::NotNull;
+
+using ::utils::SharedPtr;
+
+namespace am_commands = application_manager::commands;
+using am_commands::MessageSharedPtr;
+using event_engine_test::MockEventDispatcher;
+
+class RequestToHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(RequestToHMITest, BasicMethodsOverloads_SUCCESS) {
+ SharedPtr<am_commands::RequestToHMI> command(
+ CreateCommand<am_commands::RequestToHMI>());
+
+ // Current implementation always return `true`
+ EXPECT_TRUE(command->Init());
+ EXPECT_NO_THROW(command->Run());
+ EXPECT_TRUE(command->CleanUp());
+}
+
+TEST_F(RequestToHMITest, SendRequest_SUCCESS) {
+ SharedPtr<am_commands::RequestToHMI> command(
+ CreateCommand<am_commands::RequestToHMI>());
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(NotNull()));
+
+ command->SendRequest();
+}
+
+template <typename Command>
+class RequestToHMICommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+template <typename Command>
+class RequestToHMICommandsTest2 : public RequestToHMICommandsTest<Command> {};
+
+template <typename Command>
+class RequestToHMICommandsTest3
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+typedef Types<sdl_rpc_plugin::commands::hmi::DialNumberRequest,
+ sdl_rpc_plugin::commands::ClosePopupRequest,
+ sdl_rpc_plugin::commands::TTSSetGlobalPropertiesRequest,
+ sdl_rpc_plugin::commands::TTSSpeakRequest,
+ sdl_rpc_plugin::commands::TTSStopSpeakingRequest,
+ sdl_rpc_plugin::commands::TTSGetSupportedLanguagesRequest,
+ sdl_rpc_plugin::commands::UIAddCommandRequest,
+ sdl_rpc_plugin::commands::UIAddSubmenuRequest,
+ sdl_rpc_plugin::commands::UIAlertRequest,
+ sdl_rpc_plugin::commands::UIChangeRegistrationRequest,
+ sdl_rpc_plugin::commands::UIDeleteCommandRequest,
+ sdl_rpc_plugin::commands::UIDeleteSubmenuRequest,
+ sdl_rpc_plugin::commands::UIEndAudioPassThruRequest,
+ sdl_rpc_plugin::commands::UIGetCapabilitiesRequest,
+ sdl_rpc_plugin::commands::UIGetLanguageRequest,
+ sdl_rpc_plugin::commands::UIGetSupportedLanguagesRequest,
+ sdl_rpc_plugin::commands::UIPerformAudioPassThruRequest,
+ sdl_rpc_plugin::commands::UIPerformInteractionRequest,
+ sdl_rpc_plugin::commands::UISetMediaClockTimerRequest,
+ sdl_rpc_plugin::commands::UIShowRequest,
+ sdl_rpc_plugin::commands::VRAddCommandRequest,
+ sdl_rpc_plugin::commands::VRChangeRegistrationRequest,
+ sdl_rpc_plugin::commands::VRDeleteCommandRequest,
+ sdl_rpc_plugin::commands::UISliderRequest,
+ sdl_rpc_plugin::commands::TTSChangeRegistrationRequest,
+ sdl_rpc_plugin::commands::TTSGetCapabilitiesRequest,
+ sdl_rpc_plugin::commands::TTSGetLanguageRequest,
+ sdl_rpc_plugin::commands::AllowAllAppsRequest,
+ sdl_rpc_plugin::commands::BasicCommunicationSystemRequest,
+ sdl_rpc_plugin::commands::ButtonGetCapabilitiesRequest,
+ sdl_rpc_plugin::commands::NaviSendLocationRequest,
+ sdl_rpc_plugin::commands::NaviUnSubscribeWayPointsRequest,
+ sdl_rpc_plugin::commands::NaviUpdateTurnListRequest,
+ sdl_rpc_plugin::commands::NaviShowConstantTBTRequest,
+ sdl_rpc_plugin::commands::NaviStopStreamRequest,
+ sdl_rpc_plugin::commands::NaviSubscribeWayPointsRequest,
+ sdl_rpc_plugin::commands::NaviAlertManeuverRequest,
+ sdl_rpc_plugin::commands::AudioStopStreamRequest,
+ sdl_rpc_plugin::commands::NaviGetWayPointsRequest,
+ sdl_rpc_plugin::commands::UISetGlobalPropertiesRequest,
+ sdl_rpc_plugin::commands::UISendHapticDataRequest>
+ RequestCommandsList;
+
+typedef Types<sdl_rpc_plugin::commands::UIScrollableMessageRequest,
+ sdl_rpc_plugin::commands::VRGetCapabilitiesRequest,
+ sdl_rpc_plugin::commands::UISetAppIconRequest,
+ sdl_rpc_plugin::commands::UiSetDisplayLayoutRequest,
+ sdl_rpc_plugin::commands::VRGetSupportedLanguagesRequest,
+ sdl_rpc_plugin::commands::VRGetLanguageRequest,
+ sdl_rpc_plugin::commands::VRPerformInteractionRequest,
+ sdl_rpc_plugin::commands::AllowAppRequest,
+// TODO (OKozlov). Need to clarify why UT fails
+// for UISetIconRequest
+// am_commands::UISetIconRequest,
+#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
+ sdl_rpc_plugin::commands::SDLPolicyUpdate,
+#endif
+ sdl_rpc_plugin::commands::hmi::DialNumberRequest>
+ RequestCommandsList2;
+
+typedef Types<sdl_rpc_plugin::commands::TTSIsReadyRequest,
+ sdl_rpc_plugin::commands::UIIsReadyRequest,
+ sdl_rpc_plugin::commands::NaviIsReadyRequest,
+ sdl_rpc_plugin::commands::VRIsReadyRequest> RequestCommandsList3;
+
+TYPED_TEST_CASE(RequestToHMICommandsTest, RequestCommandsList);
+TYPED_TEST_CASE(RequestToHMICommandsTest2, RequestCommandsList2);
+TYPED_TEST_CASE(RequestToHMICommandsTest3, RequestCommandsList3);
+
+TYPED_TEST(RequestToHMICommandsTest, Run_SendMessageToHMI_SUCCESS) {
+ typedef typename TestFixture::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+
+ EXPECT_CALL(this->mock_rpc_service_, SendMessageToHMI(NotNull()));
+
+ command->Run();
+}
+
+TYPED_TEST(RequestToHMICommandsTest2, Run_SendMessageToHMI_SUCCESS) {
+ typedef typename TestFixture::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+ EXPECT_CALL(this->mock_rpc_service_, SendMessageToHMI(NotNull()));
+
+ command->Run();
+}
+
+TYPED_TEST(RequestToHMICommandsTest3, Run_SendMessageToHMI_SUCCESS) {
+ typedef typename TestFixture::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+ EXPECT_CALL(this->mock_rpc_service_, SendMessageToHMI(NotNull()));
+
+ command->Run();
+}
+
+} // namespace simple_requests_to_hmi_test
+} // 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/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
new file mode 100644
index 0000000000..229f48b5e1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc
@@ -0,0 +1,325 @@
+/*
+ * 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 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command.h"
+#include "hmi/activate_app_response.h"
+#include "hmi/basic_communication_system_response.h"
+#include "hmi/navi_alert_maneuver_response.h"
+#include "hmi/navi_audio_start_stream_response.h"
+#include "hmi/navi_audio_stop_stream_response.h"
+#include "hmi/navi_get_way_points_response.h"
+#include "hmi/navi_send_location_response.h"
+#include "hmi/navi_show_constant_tbt_response.h"
+#include "hmi/navi_start_stream_response.h"
+#include "hmi/navi_stop_stream_response.h"
+#include "hmi/navi_subscribe_way_points_response.h"
+#include "hmi/navi_unsubscribe_way_points_response.h"
+#include "hmi/navi_update_turn_list_response.h"
+#include "hmi/tts_change_registration_response.h"
+#include "hmi/ui_set_app_icon_response.h"
+#include "hmi/ui_set_display_layout_response.h"
+#include "hmi/ui_set_global_properties_response.h"
+#include "hmi/ui_scrollable_message_response.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "hmi/dial_number_response.h"
+#include "hmi/close_popup_response.h"
+#include "hmi/tts_set_global_properties_response.h"
+#include "hmi/tts_speak_response.h"
+#include "hmi/tts_stop_speaking_response.h"
+#include "hmi/tts_change_registration_response.h"
+#include "hmi/ui_add_command_response.h"
+#include "hmi/ui_add_submenu_response.h"
+#include "hmi/ui_alert_response.h"
+#include "hmi/ui_change_registration_response.h"
+#include "hmi/ui_delete_command_response.h"
+#include "hmi/ui_delete_submenu_response.h"
+#include "hmi/ui_end_audio_pass_thru_response.h"
+#include "hmi/ui_perform_audio_pass_thru_response.h"
+#include "hmi/ui_perform_interaction_response.h"
+#include "hmi/ui_set_media_clock_timer_response.h"
+#include "hmi/ui_show_response.h"
+#include "hmi/ui_slider_response.h"
+#include "hmi/vr_add_command_response.h"
+#include "hmi/vr_change_registration_response.h"
+#include "hmi/vr_delete_command_response.h"
+#include "hmi/vr_perform_interaction_response.h"
+#include "hmi/activate_app_response.h"
+#include "hmi/basic_communication_system_response.h"
+#include "hmi/navi_unsubscribe_way_points_response.h"
+#include "hmi/navi_update_turn_list_response.h"
+#include "hmi/navi_send_location_response.h"
+#include "hmi/navi_show_constant_tbt_response.h"
+#include "hmi/navi_start_stream_response.h"
+#include "hmi/navi_subscribe_way_points_response.h"
+#include "hmi/on_find_applications.h"
+#include "hmi/on_update_device_list.h"
+#include "hmi/sdl_policy_update_response.h"
+#include "hmi/update_app_list_response.h"
+#include "hmi/update_device_list_response.h"
+#include "application_manager/commands/notification_from_hmi.h"
+#include "hmi/ui_send_haptic_data_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace simple_response_from_hmi_test {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::Types;
+using ::testing::Eq;
+
+using ::utils::SharedPtr;
+using ::test::components::event_engine_test::MockEventDispatcher;
+
+namespace am = ::application_manager;
+namespace commands = sdl_rpc_plugin::commands;
+using am::commands::MessageSharedPtr;
+template <class CommandD>
+class ResponseFromHMICommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef CommandD CommandData;
+ MockEventDispatcher event_dispatcher_;
+
+ ResponseFromHMICommandsTest() {
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_));
+ }
+};
+
+template <class Command>
+class EmptyResponseFromHMICommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+template <class Command, hmi_apis::FunctionID::eType kExpectedEventId>
+struct CommandData {
+ typedef Command CommandType;
+ enum { kEventId = kExpectedEventId };
+};
+
+typedef Types<
+ CommandData<sdl_rpc_plugin::commands::TTSSpeakResponse,
+ hmi_apis::FunctionID::TTS_Speak>,
+ CommandData<sdl_rpc_plugin::commands::hmi::DialNumberResponse,
+ hmi_apis::FunctionID::BasicCommunication_DialNumber>,
+ CommandData<sdl_rpc_plugin::commands::UIDeleteSubmenuResponse,
+ hmi_apis::FunctionID::UI_DeleteSubMenu>,
+ CommandData<sdl_rpc_plugin::commands::UIEndAudioPassThruResponse,
+ hmi_apis::FunctionID::UI_EndAudioPassThru>,
+ CommandData<sdl_rpc_plugin::commands::TTSSetGlobalPropertiesResponse,
+ hmi_apis::FunctionID::TTS_SetGlobalProperties>,
+ CommandData<sdl_rpc_plugin::commands::TTSStopSpeakingResponse,
+ hmi_apis::FunctionID::TTS_StopSpeaking>,
+ CommandData<sdl_rpc_plugin::commands::UIAddCommandResponse,
+ hmi_apis::FunctionID::UI_AddCommand>,
+ CommandData<sdl_rpc_plugin::commands::UIAddSubmenuResponse,
+ hmi_apis::FunctionID::UI_AddSubMenu>,
+ CommandData<sdl_rpc_plugin::commands::UIAlertResponse,
+ hmi_apis::FunctionID::UI_Alert>,
+ CommandData<sdl_rpc_plugin::commands::UIChangeRegistratioResponse,
+ hmi_apis::FunctionID::UI_ChangeRegistration>,
+ CommandData<sdl_rpc_plugin::commands::UIDeleteCommandResponse,
+ hmi_apis::FunctionID::UI_DeleteCommand>,
+ CommandData<sdl_rpc_plugin::commands::UIPerformAudioPassThruResponse,
+ hmi_apis::FunctionID::UI_PerformAudioPassThru>,
+ CommandData<sdl_rpc_plugin::commands::UIPerformInteractionResponse,
+ hmi_apis::FunctionID::UI_PerformInteraction>,
+ CommandData<sdl_rpc_plugin::commands::UIDeleteSubmenuResponse,
+ hmi_apis::FunctionID::UI_DeleteSubMenu>,
+ CommandData<sdl_rpc_plugin::commands::UIEndAudioPassThruResponse,
+ hmi_apis::FunctionID::UI_EndAudioPassThru>,
+ CommandData<sdl_rpc_plugin::commands::UISetMediaClockTimerResponse,
+ hmi_apis::FunctionID::UI_SetMediaClockTimer>,
+ CommandData<sdl_rpc_plugin::commands::UIShowResponse,
+ hmi_apis::FunctionID::UI_Show>,
+ CommandData<sdl_rpc_plugin::commands::VRAddCommandResponse,
+ hmi_apis::FunctionID::VR_AddCommand>,
+ CommandData<sdl_rpc_plugin::commands::VRChangeRegistrationResponse,
+ hmi_apis::FunctionID::VR_ChangeRegistration>,
+ CommandData<sdl_rpc_plugin::commands::VRDeleteCommandResponse,
+ hmi_apis::FunctionID::VR_DeleteCommand>,
+ CommandData<sdl_rpc_plugin::commands::UISliderResponse,
+ hmi_apis::FunctionID::UI_Slider>,
+ CommandData<sdl_rpc_plugin::commands::TTSChangeRegistratioResponse,
+ hmi_apis::FunctionID::TTS_ChangeRegistration>,
+ CommandData<sdl_rpc_plugin::commands::ActivateAppResponse,
+ hmi_apis::FunctionID::BasicCommunication_ActivateApp>,
+ CommandData<sdl_rpc_plugin::commands::BasicCommunicationSystemResponse,
+ hmi_apis::FunctionID::BasicCommunication_SystemRequest>,
+ CommandData<sdl_rpc_plugin::commands::NaviAlertManeuverResponse,
+ hmi_apis::FunctionID::Navigation_AlertManeuver>,
+ CommandData<sdl_rpc_plugin::commands::AudioStartStreamResponse,
+ hmi_apis::FunctionID::Navigation_StartAudioStream>,
+ CommandData<sdl_rpc_plugin::commands::NaviGetWayPointsResponse,
+ hmi_apis::FunctionID::Navigation_GetWayPoints>,
+ CommandData<sdl_rpc_plugin::commands::NaviSendLocationResponse,
+ hmi_apis::FunctionID::Navigation_SendLocation>,
+ CommandData<sdl_rpc_plugin::commands::NaviShowConstantTBTResponse,
+ hmi_apis::FunctionID::Navigation_ShowConstantTBT>,
+ CommandData<sdl_rpc_plugin::commands::NaviStartStreamResponse,
+ hmi_apis::FunctionID::Navigation_StartStream>,
+ CommandData<sdl_rpc_plugin::commands::NaviSubscribeWayPointsResponse,
+ hmi_apis::FunctionID::Navigation_SubscribeWayPoints>,
+ CommandData<sdl_rpc_plugin::commands::NaviUnsubscribeWayPointsResponse,
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints>,
+ CommandData<sdl_rpc_plugin::commands::NaviUpdateTurnListResponse,
+ hmi_apis::FunctionID::Navigation_UpdateTurnList>,
+ CommandData<sdl_rpc_plugin::commands::UISetAppIconResponse,
+ hmi_apis::FunctionID::UI_SetAppIcon>,
+ CommandData<sdl_rpc_plugin::commands::UiSetDisplayLayoutResponse,
+ hmi_apis::FunctionID::UI_SetDisplayLayout>,
+ CommandData<sdl_rpc_plugin::commands::UISetGlobalPropertiesResponse,
+ hmi_apis::FunctionID::UI_SetGlobalProperties>,
+ CommandData<sdl_rpc_plugin::commands::UISetGlobalPropertiesResponse,
+ hmi_apis::FunctionID::UI_SetGlobalProperties>,
+ CommandData<sdl_rpc_plugin::commands::VRPerformInteractionResponse,
+ hmi_apis::FunctionID::VR_PerformInteraction>,
+ CommandData<sdl_rpc_plugin::commands::UIScrollableMessageResponse,
+ hmi_apis::FunctionID::UI_ScrollableMessage>,
+ CommandData<sdl_rpc_plugin::commands::UISendHapticDataResponse,
+ hmi_apis::FunctionID::UI_SendHapticData> > ResponseCommandsList;
+
+typedef Types<sdl_rpc_plugin::commands::AudioStopStreamResponse,
+ sdl_rpc_plugin::commands::NaviStopStreamResponse,
+ sdl_rpc_plugin::commands::OnFindApplications,
+ sdl_rpc_plugin::commands::OnUpdateDeviceList,
+ sdl_rpc_plugin::commands::SDLPolicyUpdateResponse,
+ sdl_rpc_plugin::commands::UpdateAppListResponse,
+ sdl_rpc_plugin::commands::UpdateDeviceListResponse>
+ EmptyResponseCommandsList;
+
+TYPED_TEST_CASE(ResponseFromHMICommandsTest, ResponseCommandsList);
+
+TYPED_TEST_CASE(EmptyResponseFromHMICommandsTest, EmptyResponseCommandsList);
+
+MATCHER_P(EventIdIsEqualTo, function_id, "") {
+ return static_cast<hmi_apis::FunctionID::eType>(function_id) == arg.id();
+}
+
+TYPED_TEST(ResponseFromHMICommandsTest, Run_SendMessageToHMI_SUCCESS) {
+ typedef typename TestFixture::CommandData CommandData;
+ typedef typename CommandData::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+
+ EXPECT_CALL(this->event_dispatcher_,
+ raise_event(EventIdIsEqualTo(CommandData::kEventId)));
+
+ command->Run();
+}
+
+TYPED_TEST(EmptyResponseFromHMICommandsTest, Run_SUCCESS) {
+ typedef typename TestFixture::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+
+ command->Run();
+}
+
+class OtherResponseFromHMICommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+MATCHER_P(VehicleTypeIsEqualTo, vehicle_type, "") {
+ return (*vehicle_type) == arg.asString();
+}
+
+MATCHER_P(CheckMsgType, msg_type, "") {
+ return msg_type ==
+ static_cast<int32_t>(
+ (*arg)[am::strings::params][am::strings::message_type].asInt());
+}
+
+class NotificationFromHMITest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(NotificationFromHMITest, BasicMethodsOverloads_SUCCESS) {
+ SharedPtr<application_manager::commands::NotificationFromHMI> command(
+ CreateCommand<application_manager::commands::NotificationFromHMI>());
+ // Current implementation always return `true`
+ EXPECT_TRUE(command->Init());
+ EXPECT_TRUE(command->CleanUp());
+ EXPECT_NO_THROW(command->Run());
+}
+
+TEST_F(NotificationFromHMITest, SendNotificationToMobile_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::message_type] =
+ static_cast<int32_t>(am::MessageType::kNotification);
+
+ SharedPtr<application_manager::commands::NotificationFromHMI> command(
+ CreateCommand<application_manager::commands::NotificationFromHMI>());
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(CheckMsgType(am::MessageType::kNotification),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+
+ command->SendNotificationToMobile(command_msg);
+}
+
+TEST_F(NotificationFromHMITest, CreateHMIRequest_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params] = 0;
+ SharedPtr<application_manager::commands::NotificationFromHMI> command(
+ CreateCommand<application_manager::commands::NotificationFromHMI>(
+ command_msg));
+
+ const uint32_t correlation_id = 1u;
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(correlation_id));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(CheckMsgType(am::MessageType::kRequest)))
+ .WillOnce(Return(false));
+
+ command->CreateHMIRequest(hmi_apis::FunctionID::INVALID_ENUM,
+ (*command_msg)[am::strings::msg_params]);
+}
+
+} // namespace simple_response_from_hmi_test
+} // 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/simple_response_to_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_to_hmi_test.cc
new file mode 100644
index 0000000000..ef8978c34c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_to_hmi_test.cc
@@ -0,0 +1,105 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command.h"
+#include "application_manager/commands/commands_test.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_activate_app_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_list_of_permissions_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_status_update_response.h"
+#include "sdl_rpc_plugin/commands/hmi/sdl_get_user_friendly_message_response.h"
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace simple_response_to_hmi_test {
+
+using ::testing::_;
+using ::testing::Types;
+using ::testing::NotNull;
+using ::utils::SharedPtr;
+
+namespace commands = sdl_rpc_plugin::commands;
+using application_manager::commands::MessageSharedPtr;
+
+template <class Command>
+class ResponseToHMICommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+typedef Types<commands::SDLActivateAppResponse,
+ commands::SDLGetListOfPermissionsResponse,
+ commands::SDLGetStatusUpdateResponse,
+ commands::SDLGetUserFriendlyMessageResponse> ResponseCommandsList;
+
+TYPED_TEST_CASE(ResponseToHMICommandsTest, ResponseCommandsList);
+
+TYPED_TEST(ResponseToHMICommandsTest, Run_SendMessageToHMI_SUCCESS) {
+ typedef typename TestFixture::CommandType CommandType;
+
+ SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
+ EXPECT_CALL(this->mock_rpc_service_, SendMessageToHMI(NotNull()));
+
+ command->Run();
+}
+
+class ResponseToHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(ResponseToHMITest, BasicMethodsOverloads_SUCCESS) {
+ SharedPtr<application_manager::commands::ResponseToHMI> command(
+ CreateCommand<application_manager::commands::ResponseToHMI>());
+
+ // Current implementation always return `true`
+ EXPECT_TRUE(command->Init());
+ EXPECT_TRUE(command->CleanUp());
+}
+
+TEST_F(ResponseToHMITest, Run_SUCCESS) {
+ SharedPtr<application_manager::commands::ResponseToHMI> command(
+ CreateCommand<application_manager::commands::ResponseToHMI>());
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(NotNull()));
+
+ command->Run();
+}
+
+} // namespace simple_response_to_hmi_test
+} // 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
new file mode 100644
index 0000000000..afc18114de
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc
@@ -0,0 +1,125 @@
+/*
+ * 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 <string>
+
+#include "gtest/gtest.h"
+#include "hmi/tts_get_capabilities_response.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_get_capabilities_response {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::TTSGetCapabilitiesResponse;
+using test::components::application_manager_test::MockHMICapabilities;
+using utils::SharedPtr;
+using testing::_;
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+namespace {
+const std::string kText = "TEXT";
+}
+
+class TTSGetCapabilitiesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(TTSGetCapabilitiesResponseTest, Run_BothExist_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::msg_params][hmi_response::speech_capabilities] = kText;
+ (*msg)[strings::msg_params][hmi_response::prerecorded_speech_capabilities] =
+ kText;
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_speech_capabilities(SmartObject(kText)));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_prerecorded_speech(SmartObject(kText)));
+
+ SharedPtr<TTSGetCapabilitiesResponse> command(
+ CreateCommand<TTSGetCapabilitiesResponse>(msg));
+
+ command->Run();
+}
+
+TEST_F(TTSGetCapabilitiesResponseTest, Run_OnlySpeech_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*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);
+
+ SharedPtr<TTSGetCapabilitiesResponse> command(
+ CreateCommand<TTSGetCapabilitiesResponse>(msg));
+
+ command->Run();
+}
+
+TEST_F(TTSGetCapabilitiesResponseTest, Run_OnlyPrerecorded_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*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)));
+
+ SharedPtr<TTSGetCapabilitiesResponse> command(
+ CreateCommand<TTSGetCapabilitiesResponse>(msg));
+
+ command->Run();
+}
+
+TEST_F(TTSGetCapabilitiesResponseTest, Run_Nothing_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_speech_capabilities(_)).Times(0);
+ EXPECT_CALL(mock_hmi_capabilities_, set_prerecorded_speech(_)).Times(0);
+
+ SharedPtr<TTSGetCapabilitiesResponse> command(
+ CreateCommand<TTSGetCapabilitiesResponse>(msg));
+
+ command->Run();
+}
+
+} // namespace tts_get_capabilities_response
+} // 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
new file mode 100644
index 0000000000..5f2fe1beda
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc
@@ -0,0 +1,103 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/tts_get_language_response.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/commands/commands_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_get_language_response {
+
+using utils::SharedPtr;
+using sdl_rpc_plugin::commands::TTSGetLanguageResponse;
+using test::components::application_manager_test::MockHMICapabilities;
+using test::components::event_engine_test::MockEventDispatcher;
+using testing::_;
+using testing::ReturnRef;
+
+namespace strings = application_manager::strings;
+namespace hmi_response = application_manager::hmi_response;
+using namespace hmi_apis;
+
+namespace {
+const Common_Language::eType kLanguage = Common_Language::EN_GB;
+} // namespace
+
+class TTSGetLanguageResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(TTSGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::msg_params][hmi_response::language] = kLanguage;
+
+ SharedPtr<TTSGetLanguageResponse> command(
+ CreateCommand<TTSGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(kLanguage));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+TEST_F(TTSGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<TTSGetLanguageResponse> command(
+ CreateCommand<TTSGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_active_tts_language(Common_Language::INVALID_ENUM));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace tts_get_language_response
+} // 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
new file mode 100644
index 0000000000..2672062aab
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc
@@ -0,0 +1,130 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "hmi/tts_get_supported_languages_response.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_get_supported_languages_response {
+
+using ::testing::_;
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using application_manager::commands::ResponseFromHMI;
+using sdl_rpc_plugin::commands::TTSGetSupportedLanguagesResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class TTSGetSupportedLanguageResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ SmartObject capabilities_;
+};
+
+TEST_F(TTSGetSupportedLanguageResponseTest, RUN_SUCCESS) {
+ smart_objects::SmartObject supported_languages("EN_US");
+
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+ (*command_msg)[strings::msg_params][hmi_response::languages] =
+ supported_languages;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<TTSGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_tts_supported_languages((
+ *command_msg)[strings::msg_params][hmi_response::languages]));
+
+ command->Run();
+}
+TEST_F(TTSGetSupportedLanguageResponseTest, RUN_UNSUCCESS) {
+ smart_objects::SmartObject supported_languages("EN_US");
+
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::WRONG_LANGUAGE;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ ResponseFromHMIPtr command(
+ CreateCommand<TTSGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_tts_supported_languages(supported_languages)).Times(0);
+
+ command->Run();
+
+ EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
+ am::hmi_response::languages));
+}
+
+} // namespace tts_get_supported_languages_response
+} // 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_is_ready_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_response_test.cc
new file mode 100644
index 0000000000..d6d74d18bd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_response_test.cc
@@ -0,0 +1,99 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "hmi/tts_is_ready_response.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_is_ready_response {
+
+using ::testing::_;
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using application_manager::commands::ResponseFromHMI;
+using sdl_rpc_plugin::commands::TTSIsReadyResponse;
+using am::commands::CommandImpl;
+using test::components::event_engine_test::MockEventDispatcher;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const bool kIsAvailable = true;
+const bool kIsNotAvailable = false;
+} // namespace
+
+class TTSIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MockHMICapabilities mock_hmi_capabilities_;
+ SmartObject capabilities_;
+};
+
+TEST_F(TTSIsReadyResponseTest, RUN_SUCCESS) {
+ ResponseFromHMIPtr command(CreateCommand<TTSIsReadyResponse>());
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace tts_is_ready_response
+} // 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
new file mode 100644
index 0000000000..8dbc09fc4f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
@@ -0,0 +1,314 @@
+/*
+ * 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 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+#include "smart_objects/smart_object.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "hmi/ui_get_capabilities_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_get_capabilities_response {
+
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = am::strings;
+namespace hmi_response = am::hmi_response;
+using application_manager::commands::ResponseFromHMI;
+using sdl_rpc_plugin::commands::UIGetCapabilitiesResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class UIGetCapabilitiesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ return command_msg;
+ }
+
+ SmartObject capabilities_;
+};
+
+TEST_F(UIGetCapabilitiesResponseTest, RUN_SetDisplay_SUCCESSS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][hmi_response::display_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ (*command_msg)[strings::msg_params][hmi_response::display_capabilities]
+ [hmi_response::display_type] = "GEN2_8_DMA";
+ (*command_msg)[strings::msg_params][hmi_response::display_capabilities]
+ [hmi_response::display_name] = "GENERIC_DISPLAY";
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject display_capabilities_so =
+ (*command_msg)[strings::msg_params][hmi_response::display_capabilities];
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_display_capabilities(display_capabilities_so));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetSoftButton_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][hmi_response::soft_button_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*command_msg)[strings::msg_params][hmi_response::soft_button_capabilities]
+ [hmi_response::image_supported] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject soft_button_capabilities_so = (*command_msg)
+ [strings::msg_params][hmi_response::soft_button_capabilities];
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_soft_button_capabilities(soft_button_capabilities_so));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetHmiZone_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][hmi_response::hmi_zone_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*command_msg)[strings::msg_params][hmi_response::hmi_zone_capabilities][0] =
+ "FRONT";
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject hmi_zone_capabilities_so =
+ (*command_msg)[strings::msg_params][hmi_response::hmi_zone_capabilities];
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_hmi_zone_capabilities(hmi_zone_capabilities_so));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetAudioPassThru_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::audio_pass_thru_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject audio_pass_thru_capabilities_so = (*command_msg)
+ [strings::msg_params][strings::audio_pass_thru_capabilities];
+ EXPECT_CALL(
+ mock_hmi_capabilities_,
+ set_audio_pass_thru_capabilities(audio_pass_thru_capabilities_so));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetNavigation_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities]
+ [strings::navigation] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject hmi_capabilities_so =
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities];
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_navigation_supported(
+ hmi_capabilities_so[strings::navigation].asBool()));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetPhoneCall_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities]
+ [strings::phone_call] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject hmi_capabilities_so =
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities];
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_phone_call_supported(
+ hmi_capabilities_so[strings::phone_call].asBool()));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreaming_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities]
+ [strings::video_streaming] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject hmi_capabilities_so =
+ (*command_msg)[strings::msg_params][strings::hmi_capabilities];
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_video_streaming_supported(
+ hmi_capabilities_so[strings::video_streaming].asBool()));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetNavigationCapability_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::system_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::navigation_capability]["sendLocationEnabled"] = true;
+
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::navigation_capability]["getWayPointsEnabled"] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject navigation_capability_so =
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::navigation_capability];
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_navigation_capability(navigation_capability_so));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetPhonenCapability_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::system_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::phone_capability]["dialNumberEnabled"] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject phone_capability_so =
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::phone_capability];
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_phone_capability(phone_capability_so));
+
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::system_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::video_streaming_capability] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ smart_objects::SmartObject& video_streaming_capability =
+ (*command_msg)[strings::msg_params][strings::system_capabilities]
+ [strings::video_streaming_capability];
+
+ video_streaming_capability[strings::preferred_resolution] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ video_streaming_capability[strings::preferred_resolution]
+ [strings::resolution_width] = 800;
+ video_streaming_capability[strings::preferred_resolution]
+ [strings::resolution_height] = 350;
+
+ video_streaming_capability[strings::max_bitrate] = 10000;
+
+ video_streaming_capability[strings::supported_formats] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ video_streaming_capability[strings::supported_formats][0] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ video_streaming_capability[strings::supported_formats][0][strings::protocol] =
+ hmi_apis::Common_VideoStreamingProtocol::RAW;
+
+ video_streaming_capability[strings::supported_formats][0][strings::codec] =
+ hmi_apis::Common_VideoStreamingCodec::H264;
+
+ video_streaming_capability[strings::haptic_spatial_data_supported] = true;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_video_streaming_capability(video_streaming_capability));
+
+ command->Run();
+}
+
+} // namespace ui_get_capabilities_response
+} // 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
new file mode 100644
index 0000000000..285024ed40
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc
@@ -0,0 +1,107 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/ui_get_language_response.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_application_manager.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_get_language_response {
+
+using utils::SharedPtr;
+using sdl_rpc_plugin::commands::UIGetLanguageResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+using testing::_;
+using testing::ReturnRef;
+using ::testing::NiceMock;
+
+namespace strings = application_manager::strings;
+namespace hmi_response = application_manager::hmi_response;
+using namespace hmi_apis;
+
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const hmi_apis::Common_Language::eType kLanguage = Common_Language::EN_GB;
+} // namespace
+
+class UIGetLanguageResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(UIGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::msg_params][hmi_response::language] = kLanguage;
+
+ SharedPtr<UIGetLanguageResponse> command(
+ CreateCommand<UIGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(kLanguage));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+TEST_F(UIGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<UIGetLanguageResponse> command(
+ CreateCommand<UIGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_active_ui_language(Common_Language::INVALID_ENUM));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace ui_get_language_response
+} // 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
new file mode 100644
index 0000000000..021ef4fdb6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc
@@ -0,0 +1,124 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/application.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_application_manager.h"
+#include "hmi/ui_get_supported_languages_response.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_get_supported_languages_response {
+
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::UIGetSupportedLanguagesResponse;
+
+typedef SharedPtr<UIGetSupportedLanguagesResponse>
+ UIGetSupportedLanguagesResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStringNum = "123";
+const std::string kLanguage = "EN_US";
+const smart_objects::SmartObject supported_languages(kLanguage);
+} // namespace
+
+class UIGetSupportedLanguagesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ SmartObject capabilities_;
+};
+
+TEST_F(UIGetSupportedLanguagesResponseTest, RUN_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStringNum;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+ (*command_msg)[strings::msg_params][hmi_response::languages] =
+ supported_languages;
+
+ UIGetSupportedLanguagesResponsePtr command(
+ CreateCommand<UIGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_ui_supported_languages((supported_languages)));
+
+ command->Run();
+}
+TEST_F(UIGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStringNum;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::WRONG_LANGUAGE;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ UIGetSupportedLanguagesResponsePtr command(
+ CreateCommand<UIGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_ui_supported_languages(supported_languages)).Times(0);
+
+ command->Run();
+
+ EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
+ am::hmi_response::languages));
+}
+
+} // namespace ui_get_supported_languages_response
+} // 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_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc
new file mode 100644
index 0000000000..b8fc839f12
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc
@@ -0,0 +1,199 @@
+/*
+ * 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 "hmi/ui_is_ready_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_is_ready_request {
+
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::UIIsReadyRequest;
+using am::event_engine::Event;
+
+typedef SharedPtr<UIIsReadyRequest> UIIsReadyRequestPtr;
+
+class UIIsReadyRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ UIIsReadyRequestTest() : command_(CreateCommand<UIIsReadyRequest>()) {}
+
+ void SetUpExpectations(bool is_ui_cooperating_available,
+ bool is_send_message_to_hmi,
+ bool is_message_contain_param,
+ am::HmiInterfaces::InterfaceState state) {
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_ui_cooperating(is_ui_cooperating_available));
+
+ if (is_message_contain_param) {
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI, 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_UI))
+ .WillOnce(Return(state));
+
+ if (is_send_message_to_hmi) {
+ ExpectSendMessagesToHMI();
+ }
+ }
+
+ void ExpectSendMessagesToHMI() {
+ smart_objects::SmartObjectSPtr get_language(CreateMessage());
+ (*get_language)[am::strings::params][am::strings::message_type] =
+ static_cast<int>(am::MessageType::kRequest);
+ (*get_language)[am::strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ EXPECT_CALL(mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetLanguage, _))
+ .WillOnce(Return(get_language));
+
+ smart_objects::SmartObjectSPtr get_all_language(CreateMessage());
+ (*get_all_language)[am::strings::params][am::strings::message_type] =
+ static_cast<int>(am::MessageType::kRequest);
+ (*get_all_language)[am::strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetSupportedLanguages, _))
+ .WillOnce(Return(get_all_language));
+
+ smart_objects::SmartObjectSPtr get_capabilities(CreateMessage());
+ (*get_capabilities)[am::strings::params][am::strings::message_type] =
+ static_cast<int>(am::MessageType::kRequest);
+ (*get_capabilities)[am::strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ EXPECT_CALL(mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetCapabilities, _))
+ .WillOnce(Return(get_capabilities));
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_handle_response_for(*get_language));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(get_language));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(get_all_language));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(get_capabilities));
+ }
+
+ void PrepareEvent(bool is_message_contain_param,
+ Event& event,
+ bool is_ui_cooperating_available = false) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ if (is_message_contain_param) {
+ (*msg)[am::strings::msg_params][am::strings::available] =
+ is_ui_cooperating_available;
+ }
+ event.set_smart_object(*msg);
+ }
+
+ UIIsReadyRequestPtr command_;
+ policy_test::MockPolicyHandlerInterface mock_policy_handler_interface_;
+};
+
+TEST_F(UIIsReadyRequestTest,
+ OnEvent_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
+ 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);
+ SetUpExpectations(is_ui_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_RESPONSE);
+
+ command_->on_event(event);
+}
+
+TEST_F(UIIsReadyRequestTest,
+ OnEvent_KeyAvailableEqualToFalse_StateNotAvailable) {
+ const bool is_ui_cooperating_available = false;
+ const bool is_send_message_to_hmi = false;
+ const bool is_message_contain_param = true;
+ Event event(hmi_apis::FunctionID::UI_IsReady);
+ PrepareEvent(is_message_contain_param, event);
+ SetUpExpectations(is_ui_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(UIIsReadyRequestTest, OnEvent_KeyAvailableEqualToTrue_StateAvailable) {
+ 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);
+ SetUpExpectations(is_ui_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(UIIsReadyRequestTest, OnTimeout_SUCCESS) {
+ ExpectSendMessagesToHMI();
+ command_->onTimeOut();
+}
+
+} // namespace ui_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_is_ready_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_response_test.cc
new file mode 100644
index 0000000000..6817c5ef0e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_response_test.cc
@@ -0,0 +1,92 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "hmi/ui_is_ready_response.h"
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_is_ready_response {
+
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::UIIsReadyResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+
+typedef SharedPtr<UIIsReadyResponse> UIIsReadyResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStringNum = "123";
+const bool kIsAvailable = true;
+const bool kIsNotAvailable = false;
+} // namespace
+
+class UIIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MockHMICapabilities mock_hmi_capabilities_;
+ SmartObject capabilities_;
+};
+
+TEST_F(UIIsReadyResponseTest, RUN_SUCCESS) {
+ UIIsReadyResponsePtr command(CreateCommand<UIIsReadyResponse>());
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace ui_is_ready_response
+} // 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/update_device_list_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_device_list_request_test.cc
new file mode 100644
index 0000000000..2ce7d9e8f0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_device_list_request_test.cc
@@ -0,0 +1,173 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/request_controller_settings.h"
+#include "application_manager/mock_application_manager_settings.h"
+#include "hmi/update_device_list_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace update_device_list_request {
+
+using ::utils::SharedPtr;
+using testing::_;
+using testing::ReturnRef;
+using testing::Return;
+using test::components::event_engine_test::MockEventDispatcher;
+using ::test::components::application_manager_test::
+ MockApplicationManagerSettings;
+namespace am = ::application_manager;
+namespace strings = am::strings;
+namespace hmi_response = am::hmi_response;
+using am::event_engine::Event;
+using sdl_rpc_plugin::commands::UpdateDeviceListRequest;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<UpdateDeviceListRequest> UpdateDeviceListRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class UpdateDeviceListRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ return command_msg;
+ }
+
+ MockApplicationManagerSettings settings_;
+ MockEventDispatcher mock_event_dispatcher_;
+};
+
+TEST_F(UpdateDeviceListRequestTest, RUN_LaunchHMIReturnsFalse) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher_));
+ EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
+
+ UpdateDeviceListRequestPtr command(
+ CreateCommand<UpdateDeviceListRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, get_settings()).WillOnce(ReturnRef(settings_));
+
+ EXPECT_CALL(settings_, launch_hmi()).WillOnce(Return(false));
+
+ EXPECT_CALL(app_mngr_, IsHMICooperating()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+TEST_F(UpdateDeviceListRequestTest, RUN_HMICooperatingReturnsTrue_SUCCESSS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher_));
+ EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
+
+ UpdateDeviceListRequestPtr command(
+ CreateCommand<UpdateDeviceListRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, get_settings()).WillOnce(ReturnRef(settings_));
+
+ EXPECT_CALL(settings_, launch_hmi()).WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_, IsHMICooperating()).WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+TEST_F(UpdateDeviceListRequestTest, OnEvent_WrongEventId_UNSUCCESS) {
+ Event event(Event::EventID::INVALID_ENUM);
+
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher_));
+ EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
+
+ UpdateDeviceListRequestPtr command(CreateCommand<UpdateDeviceListRequest>());
+
+ command->on_event(event);
+}
+
+TEST_F(UpdateDeviceListRequestTest, OnEvent_SUCCESS) {
+ Event event(Event::EventID::BasicCommunication_OnReady);
+
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher_));
+ EXPECT_CALL(mock_event_dispatcher_, remove_observer(_, _));
+ EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
+
+ UpdateDeviceListRequestPtr command(CreateCommand<UpdateDeviceListRequest>());
+
+ command->on_event(event);
+}
+
+} // namespace update_device_list_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/update_sdl_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc
new file mode 100644
index 0000000000..2b079a21e0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc
@@ -0,0 +1,88 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "hmi/update_sdl_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace update_sdl_request {
+
+using ::utils::SharedPtr;
+using ::testing::ReturnRef;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using sdl_rpc_plugin::commands::UpdateSDLRequest;
+
+typedef SharedPtr<UpdateSDLRequest> UpdateSDLRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 1u;
+const std::string kStrNumber = "123";
+} // namespace
+
+class UpdateSDLRequestTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(UpdateSDLRequestTest, RUN_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][strings::correlation_id] = kCorrelationId;
+
+ UpdateSDLRequestPtr command(CreateCommand<UpdateSDLRequest>(command_msg));
+
+ EXPECT_CALL(mock_policy_handler_, PTExchangeAtUserRequest(kCorrelationId));
+
+ command->Run();
+
+ EXPECT_EQ(kCorrelationId,
+ (*command_msg)[strings::params][strings::correlation_id].asUInt());
+}
+
+} // namespace update_sdl_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/update_sdl_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc
new file mode 100644
index 0000000000..0035637605
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc
@@ -0,0 +1,86 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "hmi/update_sdl_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace update_sdl_response {
+
+using ::utils::SharedPtr;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using sdl_rpc_plugin::commands::UpdateSDLResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<UpdateSDLResponse> UpdateSDLResponsePtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber = "123";
+} // namespace
+
+class UpdateSDLResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+};
+
+TEST_F(UpdateSDLResponseTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+
+ UpdateSDLResponsePtr command(CreateCommand<UpdateSDLResponse>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+
+ command->Run();
+
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
+ CommandImpl::hmi_protocol_type_);
+ EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
+ CommandImpl::protocol_version_);
+}
+
+} // namespace update_sdl_response
+} // 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
new file mode 100644
index 0000000000..0163fdd1d1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc
@@ -0,0 +1,108 @@
+/*
+ * 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 <stdint.h>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "hmi/vr_get_capabilities_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_get_capabilities_response {
+
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = am::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::VRGetCapabilitiesResponse;
+using am::commands::CommandImpl;
+
+typedef SharedPtr<VRGetCapabilitiesResponse> VRGetCapabilitiesResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class VRGetCapabilitiesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = "123";
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ return command_msg;
+ }
+
+ SmartObject capabilities_;
+};
+
+TEST_F(VRGetCapabilitiesResponseTest, RUN_SUCCESSS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::vr_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ (*command_msg)[strings::msg_params][strings::vr_capabilities][0] =
+ "vrCapabilities";
+
+ VRGetCapabilitiesResponsePtr command(
+ CreateCommand<VRGetCapabilitiesResponse>(command_msg));
+
+ smart_objects::SmartObject vr_capabilities_so =
+ (*command_msg)[strings::msg_params][strings::vr_capabilities];
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_vr_capabilities(vr_capabilities_so));
+
+ command->Run();
+}
+
+} // namespace vr_get_capabilities_response
+} // 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
new file mode 100644
index 0000000000..845324925f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc
@@ -0,0 +1,107 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "hmi/vr_get_language_response.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_application_manager.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_get_language_response {
+
+using utils::SharedPtr;
+using sdl_rpc_plugin::commands::VRGetLanguageResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+using testing::_;
+using testing::ReturnRef;
+using ::testing::NiceMock;
+
+namespace strings = application_manager::strings;
+namespace hmi_response = application_manager::hmi_response;
+using namespace hmi_apis;
+
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const hmi_apis::Common_Language::eType kLanguage = Common_Language::EN_GB;
+} // namespace
+
+class VRGetLanguageResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(VRGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::msg_params][hmi_response::language] = kLanguage;
+
+ SharedPtr<VRGetLanguageResponse> command(
+ CreateCommand<VRGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(kLanguage));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+TEST_F(VRGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<VRGetLanguageResponse> command(
+ CreateCommand<VRGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_active_vr_language(Common_Language::INVALID_ENUM));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace vr_get_language_response
+} // 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
new file mode 100644
index 0000000000..0ac0d8e118
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc
@@ -0,0 +1,124 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/application.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_application_manager.h"
+#include "hmi/vr_get_supported_languages_response.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_get_supported_languages_response {
+
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::VRGetSupportedLanguagesResponse;
+
+typedef SharedPtr<VRGetSupportedLanguagesResponse>
+ VRGetSupportedLanguagesResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStringNum = "123";
+const std::string kLanguage = "EN_US";
+const smart_objects::SmartObject supported_languages(kLanguage);
+} // namespace
+
+class VRGetSupportedLanguagesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ SmartObject capabilities_;
+};
+
+TEST_F(VRGetSupportedLanguagesResponseTest, RUN_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStringNum;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+ (*command_msg)[strings::msg_params][hmi_response::languages] =
+ supported_languages;
+
+ VRGetSupportedLanguagesResponsePtr command(
+ CreateCommand<VRGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_vr_supported_languages((supported_languages)));
+
+ command->Run();
+}
+TEST_F(VRGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStringNum;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::WRONG_LANGUAGE;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ VRGetSupportedLanguagesResponsePtr command(
+ CreateCommand<VRGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_vr_supported_languages(supported_languages)).Times(0);
+
+ command->Run();
+
+ EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
+ am::hmi_response::languages));
+}
+
+} // namespace vr_get_supported_languages_response
+} // 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_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc
new file mode 100644
index 0000000000..1ec0adb5e0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc
@@ -0,0 +1,182 @@
+/*
+ * 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 "hmi/vr_is_ready_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_is_ready_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::VRIsReadyRequest;
+using am::event_engine::Event;
+
+typedef SharedPtr<VRIsReadyRequest> VRIsReadyRequestPtr;
+
+class VRIsReadyRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ VRIsReadyRequestTest() : command_(CreateCommand<VRIsReadyRequest>()) {}
+
+ void SetUpExpectations(bool is_vr_cooperating_available,
+ 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);
+ }
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_vr_cooperating(is_vr_cooperating_available));
+
+ if (is_message_contain_param) {
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR, 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_VR))
+ .WillOnce(Return(state));
+ }
+
+ void ExpectSendMessagesToHMI(bool is_send_message_by_timeout) {
+ smart_objects::SmartObjectSPtr language(
+ new smart_objects::SmartObject(smart_objects::SmartType_Map));
+ EXPECT_CALL(mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::VR_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(
+ new smart_objects::SmartObject(smart_objects::SmartType_Map));
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetSupportedLanguages, _))
+ .WillOnce(Return(support_language));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(support_language));
+
+ smart_objects::SmartObjectSPtr capabilities(
+ new smart_objects::SmartObject(smart_objects::SmartType_Map));
+ EXPECT_CALL(mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetCapabilities, _))
+ .WillOnce(Return(capabilities));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(capabilities));
+ }
+
+ void PrepareEvent(bool is_message_contain_param,
+ Event& event,
+ bool is_vr_cooperating_available = false) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ if (is_message_contain_param) {
+ (*msg)[am::strings::msg_params][am::strings::available] =
+ is_vr_cooperating_available;
+ }
+ event.set_smart_object(*msg);
+ }
+
+ VRIsReadyRequestPtr command_;
+};
+
+TEST_F(VRIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
+ 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);
+ SetUpExpectations(is_vr_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_RESPONSE);
+ command_->on_event(event);
+}
+
+TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
+ const bool is_vr_cooperating_available = false;
+ const bool is_send_message_to_hmi = false;
+ const bool is_message_contain_param = true;
+ Event event(hmi_apis::FunctionID::VR_IsReady);
+ PrepareEvent(is_message_contain_param, event);
+ SetUpExpectations(is_vr_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
+ 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);
+ SetUpExpectations(is_vr_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(VRIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
+ const bool is_send_message_by_timeout = true;
+ ExpectSendMessagesToHMI(is_send_message_by_timeout);
+ command_->onTimeOut();
+}
+
+} // namespace vr_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/vr_is_ready_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_response_test.cc
new file mode 100644
index 0000000000..452679e189
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_response_test.cc
@@ -0,0 +1,79 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "hmi/vr_is_ready_response.h"
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_is_ready_response {
+
+using ::testing::Return;
+using ::utils::SharedPtr;
+using ::testing::NiceMock;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using sdl_rpc_plugin::commands::VRIsReadyResponse;
+using test::components::event_engine_test::MockEventDispatcher;
+
+typedef SharedPtr<VRIsReadyResponse> VRIsReadyResponsePtr;
+
+class VRIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+};
+
+TEST_F(VRIsReadyResponseTest, RUN_SUCCESS) {
+ VRIsReadyResponsePtr command(CreateCommand<VRIsReadyResponse>());
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace vr_is_ready_response
+} // 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/mobile/add_command_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
new file mode 100644
index 0000000000..0067be3f1b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
@@ -0,0 +1,1112 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/add_command_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/helpers.h"
+#include "utils/make_shared.h"
+#include "smart_objects/smart_object.h"
+#include "utils/custom_string.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace add_command_request {
+
+namespace am = application_manager;
+using am::commands::CommandImpl;
+using am::ApplicationManager;
+using am::commands::MessageSharedPtr;
+using am::ApplicationSharedPtr;
+using ::testing::_;
+using ::utils::SharedPtr;
+using ::testing::Return;
+using ::testing::InSequence;
+using sdl_rpc_plugin::commands::AddCommandRequest;
+using NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr;
+using ::test::components::application_manager_test::MockApplication;
+using am::event_engine::EventObserver;
+using namespace smart_objects;
+
+namespace custom_str = utils::custom_string;
+namespace strings = ::application_manager::strings;
+namespace mobile_result = mobile_apis::Result;
+namespace hmi_response = ::application_manager::hmi_response;
+namespace hmi_request = ::application_manager::hmi_request;
+using namespace strings;
+
+namespace {
+const hmi_apis::FunctionID::eType kInvalidFunctionId =
+ hmi_apis::FunctionID::INVALID_ENUM;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const std::string kMenuName = "LG";
+const uint32_t kFirstParentId = 10u;
+const uint32_t kSecondParentId = 1u;
+const std::string kErroredVRCommand = "l\namer";
+const std::string kFirstVrCommand = "lamer";
+const std::string kSecondVrCommand = "hacker";
+const uint32_t kFirstCommandId = 10u;
+const uint32_t kSecondCommandId = 11u;
+const int32_t kType = 34;
+const int32_t kGrammarId = 12;
+const int32_t kPosition = 10;
+} // namespace
+
+class AddCommandRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ AddCommandRequestTest()
+ : msg_(CreateMessage())
+ , default_app_name_("test_default_app_name_")
+ , lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , mock_app_(CreateMockApp()) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+ InitGetters();
+ InitBasicMessage();
+ }
+
+ protected:
+ void InitBasicMessage() {
+ (*msg_)[params][connection_key] = kConnectionKey;
+ (*msg_)[msg_params][app_id] = kAppId;
+ (*msg_)[msg_params][app_name] = default_app_name_;
+ }
+
+ void InitGetters() {
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
+ ON_CALL(*mock_app_, FindCommand(kCmdId))
+ .WillByDefault(Return(so_ptr_.get()));
+ }
+
+ void CreateBasicParamsUIRequest() {
+ SmartObject menu_params = SmartObject(SmartType_Map);
+ menu_params[position] = kPosition;
+ menu_params[menu_name] = kMenuName;
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[cmd_id] = kCmdId;
+ msg_params[strings::menu_params] = menu_params;
+ msg_params[cmd_icon] = 1;
+ msg_params[cmd_icon][value] = "10";
+ msg_params[info] = "UI info";
+ }
+
+ void CreateBasicParamsVRRequest() {
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[cmd_id] = kCmdId;
+ msg_params[vr_commands] = SmartObject(SmartType_Array);
+ msg_params[vr_commands][0] = kFirstVrCommand;
+ msg_params[type] = kPosition;
+ msg_params[grammar_id] = kGrammarId;
+ msg_params[info] = "VR info";
+ }
+
+ const am::CommandsMap CreateCommandsMap(SmartObject& first_command,
+ SmartObject& second_command) {
+ second_command[menu_params] = SmartObject(SmartType_Map);
+ second_command[menu_params][hmi_request::parent_id] = kFirstParentId;
+ second_command[menu_params][menu_name] = kMenuName;
+ second_command[vr_commands] = SmartObject(SmartType_Array);
+ second_command[vr_commands][0] = kSecondVrCommand;
+ am::CommandsMap commands_map;
+ commands_map.insert(std::make_pair(kFirstCommandId, &first_command));
+ commands_map.insert(std::make_pair(kSecondCommandId, &second_command));
+ return commands_map;
+ }
+
+ void CheckOnTimeOutCommandDeletion(
+ const hmi_apis::FunctionID::eType incoming_cmd,
+ const hmi_apis::FunctionID::eType cmd_to_delete) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
+ 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()));
+ SmartObject first_command = SmartObject(SmartType_Map);
+ SmartObject second_command = SmartObject(SmartType_Map);
+ const am::CommandsMap commands_map =
+ CreateCommandsMap(first_command, second_command);
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
+ EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
+ .WillOnce(Return(so_ptr_.get()));
+ {
+ InSequence dummy;
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ Event event(incoming_cmd);
+ event.set_smart_object(*msg_);
+ request_ptr->on_event(event);
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(cmd_to_delete)))
+
+ .WillOnce(Return(true));
+ SmartObjectSPtr response = utils::MakeShared<SmartObject>(SmartType_Map);
+ (*response)[strings::msg_params][strings::info] = "info";
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
+ .WillOnce(Return(response));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(response,
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ utils::SharedPtr<CommandRequestImpl> base_class_request =
+ static_cast<utils::SharedPtr<CommandRequestImpl> >(request_ptr);
+ base_class_request->onTimeOut();
+ }
+
+ MessageSharedPtr msg_;
+ SmartObjectSPtr so_ptr_;
+ const utils::custom_string::CustomString default_app_name_;
+ std::shared_ptr<sync_primitives::Lock> lock_ptr_;
+ MockAppPtr mock_app_;
+};
+
+TEST_F(AddCommandRequestTest, Run_AppNotExisted_EXPECT_AppNotRegistered) {
+ CreateBasicParamsUIRequest();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, Run_ImageVerificationFailed_EXPECT_INVALID_DATA) {
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ SmartObject& image = msg_params[cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::INVALID_DATA));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, Run_MenuNameHasSyntaxError_EXPECT_INVALID_DATA) {
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[menu_params][hmi_request::parent_id] = kFirstParentId;
+ const std::string errored_menu_name = "L\nG";
+ msg_params[menu_params][menu_name] = errored_menu_name;
+ 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()));
+ 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_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest,
+ Run_VRCommandsHaveSyntaxError_EXPECT_INVALID_DATA) {
+ 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()));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, Run_CMDIconHasError_EXPECT_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMessage();
+ SmartObject& msg_params = (*msg)[strings::msg_params];
+ (*msg)[params][connection_key] = kConnectionKey;
+ msg_params[cmd_id] = kCmdId;
+ msg_params[cmd_icon] = 1;
+ const std::string errored_cmd_icon_value = "1\n0";
+ msg_params[cmd_icon][value] = errored_cmd_icon_value;
+ msg_params[vr_commands][0] = kFirstVrCommand;
+ 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()));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, Run_CommandIDAlreadyExists_EXPECT_INVALID_ID) {
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ SmartObject& image = msg_params[cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_ID), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest,
+ Run_CommandNameAlreadyExists_EXPECT_DUPLICATE_NAME) {
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[menu_params][hmi_request::parent_id] = kFirstParentId;
+ 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()));
+ SmartObject first_command = SmartObject(SmartType_Map);
+ SmartObject second_command = SmartObject(SmartType_Map);
+ const am::CommandsMap commands_map =
+ CreateCommandsMap(first_command, second_command);
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::DUPLICATE_NAME), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest,
+ Run_CmdAndMsgParentIDsAreDifferentSubmenuNotExisted_EXPECT_INVALID_ID) {
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
+ 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()));
+ SmartObject first_command = SmartObject(SmartType_Map);
+ SmartObject second_command = SmartObject(SmartType_Map);
+ const am::CommandsMap commands_map =
+ CreateCommandsMap(first_command, second_command);
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
+ .WillOnce(Return(so_ptr_.get()));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_ID), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest,
+ Run_CmdAndMsgVrSynonymsAreTheSame_EXPECT_DUPLICATE_NAME) {
+ CreateBasicParamsVRRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
+ msg_params[vr_commands][0] = kSecondVrCommand;
+ 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()));
+
+ SmartObject first_command = SmartObject(SmartType_Map);
+ SmartObject second_command = SmartObject(SmartType_Map);
+ const am::CommandsMap commands_map =
+ CreateCommandsMap(first_command, second_command);
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
+ EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
+ .WillOnce(Return(so_ptr_.get()));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::DUPLICATE_NAME), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, Run_MsgDataEmpty_EXPECT_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[params][connection_key] = kConnectionKey;
+ 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_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest,
+ Run_CmdAndMsg_UI_and_Vr_AreCorrect_EXPECT_VR_AND_UI_SENT) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
+ 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()));
+ SmartObject first_command = SmartObject(SmartType_Map);
+ SmartObject second_command = SmartObject(SmartType_Map);
+ const am::CommandsMap commands_map =
+ CreateCommandsMap(first_command, second_command);
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
+ EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
+ .WillOnce(Return(so_ptr_.get()));
+ {
+ InSequence dummy;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, GetRunMethods_SUCCESS) {
+ CreateBasicParamsUIRequest();
+ 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_, AddCommand(kCmdId, (*msg_)[msg_params]));
+
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+}
+
+TEST_F(AddCommandRequestTest, OnEvent_UI_SUCCESS) {
+ CreateBasicParamsUIRequest();
+ (*msg_)[params][hmi_response::code] = hmi_apis::Common_Result::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_, AddCommand(kCmdId, (*msg_)[msg_params]));
+
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(
+ Return(DataAccessor<am::CommandsMap>(commands_map, lock_ptr_)));
+
+ Event event(hmi_apis::FunctionID::UI_AddCommand);
+ event.set_smart_object(*msg_);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ request_ptr->on_event(event);
+}
+
+TEST_F(AddCommandRequestTest, OnEvent_VR_SUCCESS) {
+ CreateBasicParamsVRRequest();
+ MessageSharedPtr msg = CreateMessage(SmartType_Map);
+ (*msg)[params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+ (*msg)[msg_params][cmd_id] = kCmdId;
+
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*msg);
+ EXPECT_CALL(*mock_app_, AddCommand(kCmdId, (*msg_)[msg_params]));
+
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(
+ Return(DataAccessor<am::CommandsMap>(commands_map, lock_ptr_)));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ request_ptr->on_event(event);
+}
+
+TEST_F(AddCommandRequestTest, OnTimeOut_EXPECT_VR_DeleteCommand) {
+ CheckOnTimeOutCommandDeletion(hmi_apis::FunctionID::VR_AddCommand,
+ hmi_apis::FunctionID::VR_DeleteCommand);
+}
+
+TEST_F(AddCommandRequestTest, OnTimeOut_EXPECT_UI_DeleteCommand) {
+ CheckOnTimeOutCommandDeletion(hmi_apis::FunctionID::UI_AddCommand,
+ hmi_apis::FunctionID::UI_DeleteCommand);
+}
+
+TEST_F(AddCommandRequestTest, OnEvent_BothSend_SUCCESS) {
+ MessageSharedPtr command_msg = CreateMessage(SmartType_Map);
+ (*command_msg)[params][connection_key] = kConnectionKey;
+ MessageSharedPtr event_msg = CreateMessage(SmartType_Map);
+ (*event_msg)[params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+ (*event_msg)[msg_params][cmd_id] = kCmdId;
+
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*event_msg);
+
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ event_vr.set_smart_object(*event_msg);
+
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(0);
+
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(command_msg);
+ request_ptr->Run();
+ request_ptr->on_event(event_ui);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(AddCommandRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ request_ptr->on_event(event);
+}
+
+TEST_F(AddCommandRequestTest, OnEvent_AppNotExisted_UNSUCCESS) {
+ CreateBasicParamsUIRequest();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ Event event(hmi_apis::FunctionID::UI_AddCommand);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->on_event(event);
+}
+
+TEST_F(AddCommandRequestTest,
+ OnEvent_HmiResponseCodeIsRejected_ExpectUICommandRemoved) {
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::REJECTED;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::REJECTED), _));
+ Event event(hmi_apis::FunctionID::UI_AddCommand);
+ event.set_smart_object(*msg_);
+ request_ptr->on_event(event);
+}
+
+TEST_F(AddCommandRequestTest,
+ OnEvent_HmiResponseCodeIsWarnings_ExpectCommandUpdated) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::WARNINGS;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::WARNINGS), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*msg_);
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ event_vr.set_smart_object(*msg_);
+ request_ptr->on_event(event_ui);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(
+ AddCommandRequestTest,
+ OnEvent_UI_HmiResponseCodeIsGenericError_VR_HmiResponseCodeIsUnsupportedResourse_ExpectCommandRemoved) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::GENERIC_ERROR;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*msg_);
+ request_ptr->on_event(event_ui);
+
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ MessageSharedPtr msg_vr = CreateMessage(SmartType_Map);
+ (*msg_vr)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_vr)[msg_params][cmd_id] = kCmdId;
+ event_vr.set_smart_object(*msg_vr);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(
+ AddCommandRequestTest,
+ OnEvent_VR_HmiResponseCodeIsGenericError_UI_HmiResponseCodeIsUnsupportedResourse_ExpectCommandRemoved) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::GENERIC_ERROR;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ event_vr.set_smart_object(*msg_);
+ request_ptr->on_event(event_vr);
+
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ MessageSharedPtr msg_ui = CreateMessage(SmartType_Map);
+ (*msg_ui)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_ui)[msg_params][cmd_id] = kCmdId;
+ event_ui.set_smart_object(*msg_ui);
+ request_ptr->on_event(event_ui);
+}
+
+TEST_F(
+ AddCommandRequestTest,
+ OnEvent_UI_VR_HmiResponseCodeIsUnsupportedResourse_UI_NotAvailableInterfaceState_ExpectCommandRemoved) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*msg_);
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ event_vr.set_smart_object(*msg_);
+ request_ptr->on_event(event_ui);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(
+ AddCommandRequestTest,
+ OnEvent_UI_VR_HmiResponseCodeIsUnsupportedResourse_VR_NotAvailableInterfaceState_ExpectCommandRemoved) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*msg_);
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ event_vr.set_smart_object(*msg_);
+ request_ptr->on_event(event_ui);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(
+ AddCommandRequestTest,
+ OnEvent_UI_HmiResponseCodeIsUnsupportedResource_NotAvailableInterfaceState_ExpectCommandRemoved) {
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
+ Event event(hmi_apis::FunctionID::UI_AddCommand);
+ event.set_smart_object(*msg_);
+ request_ptr->on_event(event);
+}
+
+TEST_F(
+ AddCommandRequestTest,
+ OnEvent_VR_HmiResponseCodeIsUnsupportedResource_NotAvailableInterfaceState_ExpectCommandRemoved) {
+ CreateBasicParamsVRRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*msg_);
+ request_ptr->on_event(event);
+}
+
+TEST_F(AddCommandRequestTest,
+ OnEvent_UI_EventWithNotSuccesResponseCode_ExpectVRCommandDelete) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+
+ MessageSharedPtr msg_ui = CreateMessage(SmartType_Map);
+ (*msg_ui)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+ (*msg_ui)[msg_params][cmd_id] = kCmdId;
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*msg_ui);
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ event_vr.set_smart_object(*msg_);
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_DeleteCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(2);
+ request_ptr->on_event(event_ui);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(AddCommandRequestTest,
+ OnEvent_UI_VR_Events_VRErrorPresent_ExpectRemoveCommand) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& params = (*msg_)[strings::params];
+ params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ am::CommandsMap commands_map;
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ {
+ InSequence dummy;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR), _));
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+
+ Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
+ event_ui.set_smart_object(*msg_);
+ request_ptr->on_event(event_ui);
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_DeleteCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(2);
+ Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
+ MessageSharedPtr msg_vr = CreateMessage(SmartType_Map);
+ (*msg_vr)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+ (*msg_vr)[msg_params][cmd_id] = kCmdId;
+ event_vr.set_smart_object(*msg_vr);
+ request_ptr->on_event(event_vr);
+}
+
+TEST_F(AddCommandRequestTest,
+ OnTimeOut_AppNotExisted_NoAppRemoveCommandCalled) {
+ CreateBasicParamsUIRequest();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(0);
+ SmartObjectSPtr response = utils::MakeShared<SmartObject>(SmartType_Map);
+ (*response)[strings::msg_params][strings::info] = "info";
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
+ .WillOnce(Return(response));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ response, am::commands::Command::CommandSource::SOURCE_SDL));
+ utils::SharedPtr<CommandRequestImpl> base_class_request =
+ static_cast<utils::SharedPtr<CommandRequestImpl> >(
+ CreateCommand<AddCommandRequest>(msg_));
+ base_class_request->onTimeOut();
+}
+
+TEST_F(AddCommandRequestTest, OnTimeOut_AppRemoveCommandCalled) {
+ CreateBasicParamsVRRequest();
+ CreateBasicParamsUIRequest();
+ SmartObject& msg_params = (*msg_)[strings::msg_params];
+ SmartObject& image = msg_params[cmd_icon];
+ 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()));
+ SmartObject first_command = SmartObject(SmartType_Map);
+ SmartObject second_command = SmartObject(SmartType_Map);
+ const am::CommandsMap commands_map =
+ CreateCommandsMap(first_command, second_command);
+ EXPECT_CALL(*mock_app_, commands_map())
+ .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
+ commands_map, lock_ptr_)));
+ so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
+ EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
+ .WillOnce(Return(so_ptr_.get()));
+ {
+ InSequence dummy;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
+ .WillOnce(Return(true));
+ }
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ utils::SharedPtr<AddCommandRequest> request_ptr =
+ CreateCommand<AddCommandRequest>(msg_);
+ request_ptr->Run();
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
+ SmartObjectSPtr response = utils::MakeShared<SmartObject>(SmartType_Map);
+ (*response)[strings::msg_params][strings::info] = "info";
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
+ .WillOnce(Return(response));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ response, am::commands::Command::CommandSource::SOURCE_SDL));
+ utils::SharedPtr<CommandRequestImpl> base_class_request =
+ static_cast<utils::SharedPtr<CommandRequestImpl> >(request_ptr);
+ base_class_request->onTimeOut();
+}
+
+} // namespace add_command_request
+} // 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/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
new file mode 100644
index 0000000000..9fad021c3e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc
@@ -0,0 +1,158 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "mobile/add_sub_menu_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace add_sub_menu_request {
+
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::AddSubMenuRequest;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using ::testing::_;
+using ::testing::Return;
+
+typedef SharedPtr<AddSubMenuRequest> AddSubMenuPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kAppId = 1u;
+} // namespace
+
+class AddSubMenuRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ AddSubMenuRequestTest() : mock_app(CreateMockApp()) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app));
+ }
+
+ MockAppPtr mock_app;
+
+ MessageSharedPtr CreateMsgParams() {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ return msg;
+ }
+};
+
+TEST_F(AddSubMenuRequestTest, Run_ImageVerificationFailed_EXPECT_INVALID_DATA) {
+ const uint32_t menu_id = 10u;
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject& msg_params = (*msg)[am::strings::msg_params];
+
+ msg_params[am::strings::menu_icon] = 1;
+ msg_params[am::strings::menu_icon][am::strings::value] = "10";
+ msg_params[am::strings::menu_id] = menu_id;
+ msg_params[am::strings::menu_name] = "test";
+ SmartObject& image = msg_params[am::strings::menu_icon];
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
+ .WillOnce(Return(mobile_apis::Result::INVALID_DATA));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ utils::SharedPtr<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);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::menu_id] = menu_id;
+
+ utils::SharedPtr<AddSubMenuRequest> command =
+ CreateCommand<AddSubMenuRequest>(msg);
+
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+ EXPECT_CALL(*mock_app, AddSubMenu(menu_id, _));
+ EXPECT_CALL(*mock_app, UpdateHash());
+
+ MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*ev_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*ev_msg)[am::strings::msg_params][am::strings::info] = "info";
+
+ Event event(hmi_apis::FunctionID::UI_AddSubMenu);
+ event.set_smart_object(*ev_msg);
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+ command->Init();
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*ui_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*ui_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+} // namespace add_sub_menu_request
+} // 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/alert_maneuver_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_maneuver_request_test.cc
new file mode 100644
index 0000000000..ac870e7001
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_maneuver_request_test.cc
@@ -0,0 +1,256 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "mobile/alert_maneuver_request.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace alert_maneuver_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::AlertManeuverRequest;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+
+typedef SharedPtr<AlertManeuverRequest> CommandPtr;
+
+class AlertManeuverRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ void CheckExpectations(const hmi_apis::Common_Result::eType hmi_response,
+ const mobile_apis::Result::eType mobile_response,
+ const am::HmiInterfaces::InterfaceState state,
+ const bool success) {
+ MessageSharedPtr response = CreateMessage(smart_objects::SmartType_Map);
+ (*response)[am::strings::params][am::hmi_response::code] = hmi_response;
+ (*response)[am::strings::msg_params][am::strings::info] = "test";
+
+ am::event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*response);
+
+ utils::SharedPtr<AlertManeuverRequest> command =
+ CreateCommand<AlertManeuverRequest>(response);
+
+ MockAppPtr mock_app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(state));
+
+ MessageSharedPtr response_to_mobile;
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ _, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+ command->on_event(event);
+
+ EXPECT_EQ(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ success);
+ EXPECT_EQ(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(mobile_response));
+ }
+};
+
+TEST_F(AlertManeuverRequestTest, Run_RequiredFieldsDoesNotExist_UNSUCCESS) {
+ CommandPtr command(CreateCommand<AlertManeuverRequest>());
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::INVALID_DATA,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertManeuverRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::strings::soft_buttons] = 0;
+ (*msg)[am::strings::msg_params][am::strings::tts_chunks] = 0;
+
+ CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
+
+ ON_CALL(app_mngr_, application(_))
+ .WillByDefault(Return(ApplicationSharedPtr()));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertManeuverRequestTest, Run_ProcessingResult_UNSUCCESS) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::strings::soft_buttons][0]
+ [am::strings::text] = "text";
+
+ CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ const mobile_apis::Result::eType kProcessingResult =
+ mobile_apis::Result::ABORTED;
+
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _))
+ .WillOnce(Return(kProcessingResult));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(kProcessingResult,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertManeuverRequestTest, Run_IsWhiteSpaceExist_UNSUCCESS) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::strings::soft_buttons] = 0;
+ (*msg)[am::strings::msg_params][am::strings::tts_chunks] =
+ SmartObject(smart_objects::SmartType_Array);
+
+ SmartObject tts_chunk(smart_objects::SmartType_Map);
+ tts_chunk[am::strings::text] = "wrong chunk syntax\t\n";
+
+ (*msg)[am::strings::msg_params][am::strings::tts_chunks].asArray()->push_back(
+ tts_chunk);
+
+ CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::INVALID_DATA,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertManeuverRequestTest, Run_ProcessingResult_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::strings::soft_buttons][0]
+ [am::strings::text] = "text";
+
+ CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceFromFunction(_))
+ .WillRepeatedly(
+ Return(am::HmiInterfaces::InterfaceID::HMI_INTERFACE_TTS));
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_message_helper_, SubscribeApplicationToSoftButton(_, _, _));
+
+ MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command)));
+ EXPECT_EQ(hmi_apis::FunctionID::Navigation_AlertManeuver,
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*result_msg)[am::strings::params][am::strings::function_id]
+ .asInt()));
+}
+
+TEST_F(AlertManeuverRequestTest, OnEvent_ReceivedUnknownEvent_UNSUCCESS) {
+ CommandPtr command(CreateCommand<AlertManeuverRequest>());
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ MessageSharedPtr result_msg(
+ CatchMobileCommandResult(CallOnEvent(*command, event)));
+ EXPECT_EQ(mobile_apis::Result::INVALID_ENUM,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertManeuverRequestTest, OnEvent_SUCCESS) {
+ CheckExpectations(hmi_apis::Common_Result::SUCCESS,
+ mobile_apis::Result::SUCCESS,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ true);
+}
+
+TEST_F(AlertManeuverRequestTest, OnEvent_UNSUPPORTED_RESOURCE) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ false);
+}
+
+TEST_F(AlertManeuverRequestTest, OnEvent_WARNINGS) {
+ CheckExpectations(hmi_apis::Common_Result::WARNINGS,
+ mobile_apis::Result::WARNINGS,
+ am::HmiInterfaces::STATE_NOT_RESPONSE,
+ true);
+}
+
+TEST_F(AlertManeuverRequestTest, OnEvent_GENERIC_ERROR) {
+ CheckExpectations(hmi_apis::Common_Result::GENERIC_ERROR,
+ mobile_apis::Result::GENERIC_ERROR,
+ am::HmiInterfaces::STATE_NOT_RESPONSE,
+ false);
+}
+
+} // namespace alert_maneuver_request
+} // 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/alert_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_request_test.cc
new file mode 100644
index 0000000000..5835cbff81
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_request_test.cc
@@ -0,0 +1,810 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/alert_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace alert_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::AlertRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using ::utils::SharedPtr;
+using am::event_engine::Event;
+using policy_test::MockPolicyHandlerInterface;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+typedef SharedPtr<AlertRequest> CommandPtr;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kDefaultTimeout = 1000u;
+const uint32_t kCorrelationId = 2u;
+const mobile_apis::FunctionID::eType kFunctionId =
+ mobile_apis::FunctionID::AlertID;
+} // namespace
+
+class AlertRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ AlertRequestTest() : mock_app_(CreateMockApp()), msg_(CreateMessage()) {}
+
+ protected:
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ void PreConditions() {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(
+ Return(am::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(
+ Return(am::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
+ }
+
+ void Expectations() {
+ (*msg_)[am::strings::params][am::strings::function_id] = kFunctionId;
+ (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg_)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
+
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(
+ *mock_app_,
+ AreCommandLimitsExceeded(kFunctionId, am::TLimitSource::POLICY_TABLE))
+ .WillByDefault(Return(false));
+ ON_CALL(*mock_app_, hmi_level())
+ .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
+ ON_CALL(*mock_app_, hmi_level())
+ .WillByDefault(Return(mobile_apis::HMILevel::HMI_BACKGROUND));
+ }
+
+ void AddAlertTextsToMsg() {
+ (*msg_)[am::strings::msg_params][am::strings::alert_text1] = "alert_text1";
+ (*msg_)[am::strings::msg_params][am::strings::alert_text2] = "alert_text2";
+ (*msg_)[am::strings::msg_params][am::strings::alert_text3] = "alert_text3";
+ }
+ void AddTTSChunkToMsg() {
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "tts_chunk_text";
+ }
+
+ void ExpectCallHmiLevel(const mobile_apis::HMILevel::eType level) {
+ EXPECT_CALL(*mock_app_, hmi_level()).WillRepeatedly(Return(level));
+ }
+
+ void ExpectManageMobileCommandWithResultCode(
+ const mobile_apis::Result::eType code) {
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(code),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ }
+
+ void ExpectManageHmiCommandTTSAndUI() {
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_Alert)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
+ .WillOnce(Return(true));
+ }
+ sync_primitives::Lock lock_;
+
+ MockAppPtr mock_app_;
+ MessageSharedPtr msg_;
+};
+
+TEST_F(AlertRequestTest, OnTimeout_GENERIC_ERROR) {
+ PreConditions();
+ MessageSharedPtr command_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*command_msg)[am::strings::msg_params][am::strings::result_code] =
+ am::mobile_api::Result::GENERIC_ERROR;
+ (*command_msg)[am::strings::msg_params][am::strings::success] = false;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ utils::SharedPtr<AlertRequest> command = CreateCommand<AlertRequest>();
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
+ .WillOnce(Return(command_msg));
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->onTimeOut();
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ false);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
+}
+
+TEST_F(AlertRequestTest, OnEvent_UI_HmiSendSuccess_UNSUPPORTED_RESOURCE) {
+ PreConditions();
+ MessageSharedPtr command_msg = CreateFullParamsUISO();
+ (*command_msg)[am::strings::msg_params][am::strings::menu_params]
+ [am::hmi_request::parent_id] = 10u;
+ (*command_msg)[am::strings::msg_params][am::strings::menu_params]
+ [am::strings::menu_name] = "menu_name";
+
+ utils::SharedPtr<AlertRequest> command =
+ CreateCommand<AlertRequest>(command_msg);
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+ (*msg)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+
+ MessageSharedPtr msg_tts = CreateMessage();
+ (*msg_tts)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ Event event_vr(hmi_apis::FunctionID::TTS_Speak);
+ event_vr.set_smart_object(*msg_tts);
+
+ command->on_event(event_vr);
+
+ Event event(hmi_apis::FunctionID::UI_Alert);
+ event.set_smart_object(*msg);
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ ResultCommandExpectations(ui_command_result, "UI is not supported by system");
+}
+
+class CallOnTimeOut {
+ public:
+ CallOnTimeOut(CommandRequestImpl& command) : command_(command) {}
+
+ void operator()() {
+ command_.onTimeOut();
+ }
+
+ CommandRequestImpl& command_;
+};
+
+TEST_F(AlertRequestTest, Init_DurationExists_SUCCESS) {
+ Expectations();
+ (*msg_)[am::strings::msg_params][am::strings::duration] = kDefaultTimeout;
+ (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ EXPECT_TRUE(command->Init());
+}
+
+TEST_F(AlertRequestTest, Init_DurationNotExists_SUCCESS) {
+ Expectations();
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ EXPECT_TRUE(command->Init());
+}
+
+TEST_F(AlertRequestTest, OnTimeOut_SUCCESS) {
+ Expectations();
+ MessageSharedPtr result_msg(CreateMessage(smart_objects::SmartType_Null));
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
+ .WillOnce(Return(result_msg));
+
+ CommandPtr command(CreateCommand<AlertRequest>());
+ MessageSharedPtr received_result_msg(
+ CatchMobileCommandResult(CallOnTimeOut(*command)));
+ EXPECT_EQ(result_msg, received_result_msg);
+}
+
+TEST_F(AlertRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ Expectations();
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(invalid_app));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ ExpectManageMobileCommandWithResultCode(
+ mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ command->Run();
+}
+
+TEST_F(AlertRequestTest, Run_AlertFrequencyIsTooHigh_UNSUCCESS) {
+ Expectations();
+ EXPECT_CALL(
+ *mock_app_,
+ AreCommandLimitsExceeded(kFunctionId, am::TLimitSource::POLICY_TABLE))
+ .WillOnce(Return(true));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::REJECTED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertRequestTest, Run_FailToProcessSoftButtons_UNSUCCESS) {
+ Expectations();
+ const mobile_apis::Result::eType result_code =
+ mobile_apis::Result::INVALID_ENUM;
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(result_code));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(result_code,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(AlertRequestTest, Run_MandatoryParametersAreMissed_UNSUCCESS) {
+ Expectations();
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(AlertRequestTest, Run_MandatoryParametersAreInvalid_UNSUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ (*msg_)[am::strings::msg_params][am::strings::alert_text2] =
+ "invalid\t\nParam";
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(AlertRequestTest, Run_SUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ AddTTSChunkToMsg();
+
+ (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
+ (*msg_)[am::strings::msg_params][am::strings::progress_indicator] =
+ "progress_indicator";
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ EXPECT_CALL(mock_message_helper_,
+ SubscribeApplicationToSoftButton(
+ (*msg_)[am::strings::msg_params], _, kFunctionId));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ ExpectManageHmiCommandTTSAndUI();
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(AlertRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
+ Expectations();
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ event.set_smart_object(*msg_);
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, DISABLED_OnEvent_UI_OnResetTimeout_SUCCESS) {
+ PreConditions();
+ Expectations();
+ AddAlertTextsToMsg();
+
+ (*msg_)[am::strings::msg_params][am::strings::duration] = kDefaultTimeout;
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ EXPECT_TRUE(command->Init());
+
+ EXPECT_CALL(
+ app_mngr_,
+ updateRequestTimeout(kConnectionKey, kCorrelationId, kDefaultTimeout));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_ENUM);
+
+ Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, OnEvent_UIAlertHasHmiResponsesToWait_UNSUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ AddTTSChunkToMsg();
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::WARNINGS;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ ExpectManageHmiCommandTTSAndUI();
+
+ command->Run();
+
+ Event event(hmi_apis::FunctionID::UI_Alert);
+ event.set_smart_object(*msg_);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)));
+
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSWarnings_SUCCESS) {
+ PreConditions();
+ Expectations();
+ AddTTSChunkToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::WARNINGS;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
+ .WillOnce(Return(true));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSUnsupportedResource_SUCCESS) {
+ Expectations();
+ AddTTSChunkToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
+ .WillOnce(Return(true));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ PreConditions();
+
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest,
+ DISABLED_OnEvent_TTSUnsupportedResourceUiAlertSent_SUCCESS) {
+ PreConditions();
+
+ Expectations();
+ AddAlertTextsToMsg();
+ AddTTSChunkToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+ (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(mock_message_helper_,
+ SubscribeApplicationToSoftButton(
+ (*msg_)[am::strings::msg_params], _, kFunctionId));
+
+ ExpectManageHmiCommandTTSAndUI();
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
+ .WillOnce(Return(true));
+
+ Event ui_event(hmi_apis::FunctionID::UI_Alert);
+ ui_event.set_smart_object(*msg_);
+ command->on_event(ui_event);
+
+ Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ tts_stop_event.set_smart_object(*msg_);
+ command->on_event(tts_stop_event);
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, OnEvent_TTSUnsupportedResourceUiAlertSuccess_SUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ AddTTSChunkToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+ (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(mock_message_helper_,
+ SubscribeApplicationToSoftButton(
+ (*msg_)[am::strings::msg_params], _, kFunctionId));
+ ExpectManageHmiCommandTTSAndUI();
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
+ .WillOnce(Return(true));
+
+ Event ui_event(hmi_apis::FunctionID::UI_Alert);
+ ui_event.set_smart_object(*msg_);
+ command->on_event(ui_event);
+
+ Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ tts_stop_event.set_smart_object(*msg_);
+ command->on_event(tts_stop_event);
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, OnEvent_TTSSuccesUiAlertInvalidEnum_SUCCESS) {
+ Expectations();
+ AddTTSChunkToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
+ .WillOnce(Return(true));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::INVALID_ENUM;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
+ .WillOnce(Return(true));
+
+ Event ui_event(hmi_apis::FunctionID::UI_Alert);
+ ui_event.set_smart_object(*msg_);
+ command->on_event(ui_event);
+
+ Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ tts_stop_event.set_smart_object(*msg_);
+ command->on_event(tts_stop_event);
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSAbortedUiAlertNotSent_SUCCESS) {
+ Expectations();
+ AddTTSChunkToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
+ .WillOnce(Return(true));
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::INVALID_ENUM;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
+ .WillOnce(Return(true));
+
+ Event ui_event(hmi_apis::FunctionID::UI_Alert);
+ ui_event.set_smart_object(*msg_);
+ command->on_event(ui_event);
+
+ Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ tts_stop_event.set_smart_object(*msg_);
+ command->on_event(tts_stop_event);
+
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::ABORTED);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSWarningUiAlertWarning_SUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::WARNINGS;
+ (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
+
+ ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ ExpectManageHmiCommandTTSAndUI();
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
+ .WillOnce(Return(true));
+
+ Event ui_event(hmi_apis::FunctionID::UI_Alert);
+ ui_event.set_smart_object(*msg_);
+ command->on_event(ui_event);
+
+ Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ tts_stop_event.set_smart_object(*msg_);
+ command->on_event(tts_stop_event);
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
+
+ Event event(hmi_apis::FunctionID::TTS_Speak);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(AlertRequestTest, Run_InvalidAlert2_UNSUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ (*msg_)[am::strings::msg_params][am::strings::alert_text2] =
+ "invalid_text_with_empty_str\\n";
+
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(AlertRequestTest, Run_InvalidAlert3_UNSUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ (*msg_)[am::strings::msg_params][am::strings::alert_text3] =
+ "invalid_text_with_empty_str\\n";
+
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(AlertRequestTest, Run_InvalidTTSChunk_UNSUCCESS) {
+ Expectations();
+ AddAlertTextsToMsg();
+ (*msg_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "invalid_text_with_empty_str\\n";
+
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ CommandPtr command(CreateCommand<AlertRequest>(msg_));
+ command->Run();
+}
+
+} // namespace alert_request
+} // 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/change_registration_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc
new file mode 100644
index 0000000000..3d6a345ced
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc
@@ -0,0 +1,562 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/change_registration_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/helpers.h"
+#include "utils/make_shared.h"
+#include "utils/custom_string.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/smart_object_keys.h"
+#include "policy/policy_regular/policy/usage_statistics/mock_statistics_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace change_registration_request {
+
+namespace am = application_manager;
+using am::commands::CommandImpl;
+using am::ApplicationManager;
+using am::commands::MessageSharedPtr;
+using am::ApplicationSharedPtr;
+using am::MockMessageHelper;
+using ::testing::_;
+using ::utils::SharedPtr;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SetArgPointee;
+using sdl_rpc_plugin::commands::ChangeRegistrationRequest;
+using policy_test::MockPolicyHandlerInterface;
+using ::test::components::application_manager_test::MockApplication;
+
+namespace custom_str = utils::custom_string;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class ChangeRegistrationRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ ChangeRegistrationRequestTest()
+ : app_set_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , mock_app_(CreateMockApp())
+ , supported_languages_(CreateMessage(smart_objects::SmartType_Array)) {}
+
+ MessageSharedPtr CreateMsgFromMobile() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::hmi_display_language] = mobile_apis::Language::EN_US;
+ msg_params[strings::language] = mobile_apis::Language::EN_US;
+ (*msg)[strings::msg_params] = msg_params;
+ return msg;
+ }
+ void PrepareExpectationBeforeRun() {
+ (*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()));
+ EXPECT_CALL(mock_hmi_capabilities_, vr_supported_languages())
+ .WillOnce(Return(supported_languages_.get()));
+ EXPECT_CALL(mock_hmi_capabilities_, tts_supported_languages())
+ .WillOnce(Return(supported_languages_.get()));
+
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
+ .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
+ .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
+ .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ }
+
+ void CheckExpectations(const hmi_apis::Common_Result::eType hmi_response,
+ const mobile_apis::Result::eType mobile_response,
+ const am::HmiInterfaces::InterfaceState state,
+ const bool success,
+ const hmi_apis::Common_Result::eType ui_hmi_response =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ const hmi_apis::Common_Result::eType vr_hmi_response =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
+
+ utils::SharedPtr<ChangeRegistrationRequest> command =
+ CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(1));
+ am::ApplicationSet application_set;
+ const utils::custom_string::CustomString name("name");
+ MockAppPtr app = CreateMockApp();
+ app->set_name(name);
+
+ DataAccessor<am::ApplicationSet> accessor(application_set,
+ app_set_lock_ptr_);
+
+ application_set.insert(app);
+
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+ EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
+ PrepareExpectationBeforeRun();
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(state));
+ command->Run();
+
+ MessageSharedPtr ui_response = CreateMessage(smart_objects::SmartType_Map);
+ MessageSharedPtr vr_response = CreateMessage(smart_objects::SmartType_Map);
+ MessageSharedPtr tts_response = CreateMessage(smart_objects::SmartType_Map);
+ CreateResponseFromHMI(ui_response, ui_hmi_response, "ui_info");
+ CreateResponseFromHMI(vr_response, vr_hmi_response, "unsupported_resource");
+
+ (*tts_response)[strings::params][hmi_response::code] = hmi_response;
+ (*tts_response)[strings::msg_params] = 0;
+
+ am::event_engine::Event event_ui(
+ hmi_apis::FunctionID::UI_ChangeRegistration);
+ event_ui.set_smart_object(*ui_response);
+ am::event_engine::Event event_vr(
+ hmi_apis::FunctionID::VR_ChangeRegistration);
+ event_vr.set_smart_object(*vr_response);
+ am::event_engine::Event event_tts(
+ hmi_apis::FunctionID::TTS_ChangeRegistration);
+ event_tts.set_smart_object(*tts_response);
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ _, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_ui);
+ command->on_event(event_vr);
+ command->on_event(event_tts);
+
+ EXPECT_EQ(
+ (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
+ success);
+ EXPECT_EQ((*response_to_mobile)[strings::msg_params][strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(mobile_response));
+ }
+
+ void CreateResponseFromHMI(MessageSharedPtr msg,
+ hmi_apis::Common_Result::eType result,
+ const std::string& info) {
+ (*msg)[strings::params][hmi_response::code] = static_cast<int32_t>(result);
+ (*msg)[strings::msg_params][strings::info] = info;
+ }
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ }
+
+ void ExpectationsHmiCapabilities(
+ smart_objects::SmartObjectSPtr supported_languages) {
+ EXPECT_CALL(mock_hmi_capabilities_, ui_supported_languages())
+ .WillOnce(Return(supported_languages.get()));
+ EXPECT_CALL(mock_hmi_capabilities_, vr_supported_languages())
+ .WillOnce(Return(supported_languages.get()));
+ EXPECT_CALL(mock_hmi_capabilities_, tts_supported_languages())
+ .WillOnce(Return(supported_languages.get()));
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ typedef TypeIf<kMocksAreNice,
+ NiceMock<application_manager_test::MockHMICapabilities>,
+ application_manager_test::MockHMICapabilities>::Result
+ MockHMICapabilities;
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_ptr_;
+ MockHMICapabilities hmi_capabilities_;
+ MockAppPtr mock_app_;
+ MessageSharedPtr supported_languages_;
+ MockPolicyHandlerInterface mock_policy_handler_;
+};
+
+typedef ChangeRegistrationRequestTest::MockHMICapabilities MockHMICapabilities;
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_VRHmiSendSuccess_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
+ utils::SharedPtr<ChangeRegistrationRequest> command =
+ CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
+
+ am::ApplicationSet application_set;
+ const utils::custom_string::CustomString name("name");
+ MockAppPtr app = CreateMockApp();
+ app->set_name(name);
+
+ DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_ptr_);
+
+ application_set.insert(app);
+
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+ EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
+
+ smart_objects::SmartObjectSPtr supported_languages(
+ CreateMessage(smart_objects::SmartType_Array));
+ (*supported_languages)[0] =
+ static_cast<int32_t>(mobile_apis::Language::EN_US);
+
+ ExpectationsHmiCapabilities(supported_languages);
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_RESPONSE));
+
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ command->Run();
+
+ MessageSharedPtr ui_response = CreateMessage(smart_objects::SmartType_Map);
+ MessageSharedPtr vr_response = CreateMessage(smart_objects::SmartType_Map);
+ MessageSharedPtr tts_response = CreateMessage(smart_objects::SmartType_Map);
+ CreateResponseFromHMI(
+ ui_response, hmi_apis::Common_Result::WARNINGS, "ui_info");
+ CreateResponseFromHMI(vr_response,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ "VR is not supported by system");
+ CreateResponseFromHMI(
+ tts_response, hmi_apis::Common_Result::SUCCESS, "tts_info");
+ (*ui_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*vr_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*tts_response)[am::strings::msg_params][am::strings::app_id] =
+ kConnectionKey;
+ am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_ChangeRegistration);
+ event_ui.set_smart_object(*ui_response);
+ am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_ChangeRegistration);
+ event_vr.set_smart_object(*vr_response);
+ am::event_engine::Event event_tts(
+ hmi_apis::FunctionID::TTS_ChangeRegistration);
+ event_tts.set_smart_object(*tts_response);
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_ui);
+ command->on_event(event_tts);
+ command->on_event(event_vr);
+
+ ResultCommandExpectations(response_to_mobile,
+ "ui_info, VR is not supported by system, tts_info");
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_UNSUPPORTED_RESOURCE_STATE_NOT_AVAILABLE_Expect_false) {
+ MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
+ utils::SharedPtr<ChangeRegistrationRequest> command =
+ CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(1));
+ am::ApplicationSet application_set;
+ const utils::custom_string::CustomString name("name");
+ MockAppPtr app = CreateMockApp();
+ app->set_name(name);
+ DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_ptr_);
+ application_set.insert(app);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+ EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
+
+ (*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()));
+ EXPECT_CALL(mock_hmi_capabilities_, vr_supported_languages())
+ .WillOnce(Return(supported_languages_.get()));
+ EXPECT_CALL(mock_hmi_capabilities_, tts_supported_languages())
+ .WillOnce(Return(supported_languages_.get()));
+
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+ command->Run();
+
+ EXPECT_EQ(
+ (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
+ false);
+ EXPECT_EQ(
+ (*response_to_mobile)[strings::msg_params][strings::result_code].asInt(),
+ static_cast<int32_t>(mobile_apis::Result::UNSUPPORTED_RESOURCE));
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_UNSUPPORTED_RESOURCE_STATE_NOT_RESPONSE_Expect_false) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_NOT_RESPONSE,
+ false);
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_UNSUPPORTED_RESOURCE_STATE_AVAILABLE_Expect_false) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ false);
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_UNSUPPORTED_RESOURCE_SUCCESS_STATE_AVAILABLE_Expect_true) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ true,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::SUCCESS);
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_SUCCESS_STATE_AVAILABLE_Expect_true) {
+ CheckExpectations(hmi_apis::Common_Result::SUCCESS,
+ mobile_apis::Result::SUCCESS,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ true,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::SUCCESS);
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_WRONG_LANGUAGE_STATE_AVAILABLE_Expect_true) {
+ CheckExpectations(hmi_apis::Common_Result::WRONG_LANGUAGE,
+ mobile_apis::Result::WRONG_LANGUAGE,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ true,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::SUCCESS);
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_TTS_INVALID_DATA_STATE_AVAILABLE_Expect_false) {
+ CheckExpectations(hmi_apis::Common_Result::INVALID_DATA,
+ mobile_apis::Result::INVALID_DATA,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ false,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::SUCCESS);
+}
+
+TEST_F(ChangeRegistrationRequestTest,
+ OnEvent_UIHmiSendSuccess_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
+
+ utils::SharedPtr<ChangeRegistrationRequest> command =
+ CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
+
+ am::ApplicationSet application_set;
+ const utils::custom_string::CustomString name("name");
+ MockAppPtr app = CreateMockApp();
+ app->set_name(name);
+
+ DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_ptr_);
+
+ application_set.insert(app);
+
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+ EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
+
+ smart_objects::SmartObjectSPtr supported_languages(
+ CreateMessage(smart_objects::SmartType_Array));
+ (*supported_languages)[0] =
+ static_cast<int32_t>(mobile_apis::Language::EN_US);
+
+ ExpectationsHmiCapabilities(supported_languages);
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ command->Run();
+
+ MessageSharedPtr ui_response = CreateMessage(smart_objects::SmartType_Map);
+ MessageSharedPtr vr_response = CreateMessage(smart_objects::SmartType_Map);
+ MessageSharedPtr tts_response = CreateMessage(smart_objects::SmartType_Map);
+ CreateResponseFromHMI(ui_response,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ "unsupported_resource");
+ CreateResponseFromHMI(
+ vr_response, hmi_apis::Common_Result::WARNINGS, "vr_info");
+ CreateResponseFromHMI(
+ tts_response, hmi_apis::Common_Result::SUCCESS, "tts_info");
+ (*ui_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*vr_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*tts_response)[am::strings::msg_params][am::strings::app_id] =
+ kConnectionKey;
+ am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_ChangeRegistration);
+ event_ui.set_smart_object(*ui_response);
+ am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_ChangeRegistration);
+ event_vr.set_smart_object(*vr_response);
+ am::event_engine::Event event_tts(
+ hmi_apis::FunctionID::TTS_ChangeRegistration);
+ event_tts.set_smart_object(*tts_response);
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_vr);
+ command->on_event(event_tts);
+ command->on_event(event_ui);
+
+ ResultCommandExpectations(response_to_mobile,
+ "unsupported_resource, vr_info, tts_info");
+}
+
+} // namespace change_registration_request
+} // 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/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
new file mode 100644
index 0000000000..10ffbded09
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc
@@ -0,0 +1,826 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/create_interaction_choice_set_request.h"
+#include "mobile/create_interaction_choice_set_response.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/helpers.h"
+#include "utils/make_shared.h"
+#include "smart_objects/smart_object.h"
+#include "utils/custom_string.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace create_interaction_choice_set_request {
+
+namespace am = application_manager;
+using am::commands::CommandImpl;
+using am::ApplicationManager;
+using am::commands::MessageSharedPtr;
+using am::ApplicationSharedPtr;
+using am::MockMessageHelper;
+using ::testing::_;
+using ::utils::SharedPtr;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::AtLeast;
+using sdl_rpc_plugin::commands::CreateInteractionChoiceSetRequest;
+using sdl_rpc_plugin::commands::CreateInteractionChoiceSetResponse;
+using ::test::components::application_manager_test::MockApplication;
+
+namespace custom_str = utils::custom_string;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+typedef SharedPtr<CreateInteractionChoiceSetRequest>
+ CreateInteractionChoiceSetRequestPtr;
+typedef SharedPtr<CreateInteractionChoiceSetResponse>
+ CreateInteractionChoiceSetResponsePtr;
+
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const hmi_apis::FunctionID::eType kInvalidFunctionId =
+ hmi_apis::FunctionID::INVALID_ENUM;
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 10u;
+const uint32_t kGrammarId = 10u;
+const int32_t kMenuId = 5;
+const uint32_t kChoiceSetId = 1u;
+const uint32_t kChoiceId1 = 2u;
+const uint32_t kChoiceId2 = 3u;
+const std::string kImage = "image";
+const std::string kSecondImage = "second_image";
+const std::string kVrCommands1 = "vr_commands_1";
+const std::string kVrCommands2 = "vr_commands_2";
+const std::string kMenuName = "menu_name";
+
+} // namespace
+
+class CreateInteractionChoiceSetRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ CreateInteractionChoiceSetRequestTest()
+ : message_(CreateMessage())
+ , command_(CreateCommand<CreateInteractionChoiceSetRequest>(message_))
+ , mock_app_(CreateMockApp())
+ , lock_(std::make_shared<sync_primitives::Lock>()) {}
+
+ MessageSharedPtr CreateFullParamsVRSO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::cmd_id] = kCmdId;
+ msg_params[strings::vr_commands] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ msg_params[strings::vr_commands][0] = "lamer";
+ msg_params[strings::type] = 34;
+ msg_params[strings::grammar_id] = 12;
+ msg_params[strings::app_id] = kAppId;
+ (*msg)[strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void FillMessageFieldsItem1(MessageSharedPtr message) {
+ (*message)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::menu_name] = kMenuName;
+ (*message)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image][am::strings::value] = kImage;
+ (*message)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::choice_id] = kChoiceId1;
+ (*message)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::vr_commands][0] = kVrCommands1;
+ (*message)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_image][am::strings::value] = kSecondImage;
+ }
+ void FillMessageFieldsItem2(MessageSharedPtr message) {
+ (*message)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::choice_id] = kChoiceId2;
+ (*message)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::menu_name] = kMenuName;
+ (*message)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::vr_commands][0] = kVrCommands2;
+ (*message)[am::strings::msg_params]
+ [am::strings::interaction_choice_set_id] = kChoiceSetId;
+ }
+
+ MessageSharedPtr message_;
+ CreateInteractionChoiceSetRequestPtr command_;
+ MockAppPtr mock_app_;
+ std::shared_ptr<sync_primitives::Lock> lock_;
+};
+
+class CreateInteractionChoiceSetResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeout_GENERIC_ERROR) {
+ MessageSharedPtr msg_vr = CreateMessage(smart_objects::SmartType_Map);
+ (*msg_vr)[strings::msg_params][strings::result_code] =
+ am::mobile_api::Result::GENERIC_ERROR;
+ (*msg_vr)[strings::msg_params][strings::success] = false;
+
+ utils::SharedPtr<CreateInteractionChoiceSetRequest> req_vr =
+ CreateCommand<CreateInteractionChoiceSetRequest>();
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(*mock_app, get_grammar_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(*mock_app, RemoveCommand(_)).WillByDefault(Return());
+
+ MessageSharedPtr vr_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+
+ req_vr->onTimeOut();
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::success].asBool(),
+ false);
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::result_code].asInt(),
+ static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_VR_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_vr = CreateFullParamsVRSO();
+ (*msg_vr)[strings::msg_params][strings::choice_set][0][strings::choice_id] =
+ 10;
+ (*msg_vr)[strings::msg_params][strings::choice_set][0][strings::menu_name] =
+ "menu_name";
+ (*msg_vr)[strings::msg_params][strings::interaction_choice_set_id] = 11;
+ utils::SharedPtr<CreateInteractionChoiceSetRequest> req_vr =
+ CreateCommand<CreateInteractionChoiceSetRequest>(msg_vr);
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+
+ smart_objects::SmartObject* null_obj = NULL;
+ ON_CALL(*mock_app_, FindChoiceSet(_)).WillByDefault(Return(null_obj));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[strings::msg_params][strings::info] = "VR is not supported by system";
+ (*msg)[strings::msg_params][strings::cmd_id] = kCommandId;
+
+ 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);
+
+ am::CommandsMap commands_map;
+ ON_CALL(*mock_app_, commands_map())
+ .WillByDefault(
+ Return(DataAccessor<am::CommandsMap>(commands_map, lock_)));
+
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceFromFunction(_))
+ .WillByDefault(
+ Return(am::HmiInterfaces::HMI_INTERFACE_BasicCommunication));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ req_vr->Run();
+
+ MessageSharedPtr vr_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+
+ req_vr->on_event(event);
+
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::success].asBool(),
+ false);
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*vr_command_result)[strings::msg_params].keyExists(strings::info)) {
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::info].asString(),
+ (*msg)[strings::msg_params][strings::info].asString());
+ }
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, Run_InvalidApp_UNSUCCESS) {
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, Run_VerifyImageFail_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image] = kImage;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_image] = kSecondImage;
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::INVALID_DATA));
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, Run_FindChoiceSetFail_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image] = kImage;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_image] = kSecondImage;
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+ 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]);
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(invalid_choice_set_id));
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ Run_CheckChoiceSet_InvalidChoiceId_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::menu_name] = kMenuName;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image][am::strings::value] = kImage;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::choice_id] = kChoiceId1;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_image][am::strings::value] = kSecondImage;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::vr_commands][0] = kVrCommands1;
+
+ FillMessageFieldsItem2(message_);
+ (*message_)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::vr_commands][0] = kVrCommands1;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::vr_commands][1] = " kVrCommands2\t";
+ (*message_)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::vr_commands][0] = kVrCommands1;
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command_->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ Run_IsWhiteSpaceVRCommandsExist_InvalidMenuName_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::menu_name] = "menu_name\t";
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_text] = "secondary_text\t";
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::tertiary_text] = "tertiary_text\t";
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image][am::strings::value] = "image\t";
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::choice_id] = kChoiceId1;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_image][am::strings::value] =
+ "second_image\t";
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::vr_commands][0] = "vr_commands_1\t";
+
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillRepeatedly(Return(choice_set_id));
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ .keyExists(am::strings::menu_name)) {
+ CreateInteractionChoiceSetRequestPtr command(
+ CreateCommand<CreateInteractionChoiceSetRequest>(message_));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command->Run();
+ }
+ if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ .keyExists(am::strings::secondary_text)) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::menu_name] = kMenuName;
+ CreateInteractionChoiceSetRequestPtr command(
+ CreateCommand<CreateInteractionChoiceSetRequest>(message_));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command->Run();
+ }
+ if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ .keyExists(am::strings::tertiary_text)) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_text] = "secondary_text";
+ CreateInteractionChoiceSetRequestPtr command(
+ CreateCommand<CreateInteractionChoiceSetRequest>(message_));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command->Run();
+ }
+ if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ .keyExists(am::strings::vr_commands)) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::tertiary_text] = "tertiary_text";
+ CreateInteractionChoiceSetRequestPtr command(
+ CreateCommand<CreateInteractionChoiceSetRequest>(message_));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command->Run();
+ }
+ if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ .keyExists(am::strings::image)) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::vr_commands][0] = "vr_commands";
+ CreateInteractionChoiceSetRequestPtr command(
+ CreateCommand<CreateInteractionChoiceSetRequest>(message_));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command->Run();
+ }
+ if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ .keyExists(am::strings::secondary_image)) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image][am::strings::value] = kImage;
+ CreateInteractionChoiceSetRequestPtr command(
+ CreateCommand<CreateInteractionChoiceSetRequest>(message_));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
+ command->Run();
+ }
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ Run_ValidAmountVrCommands_SUCCESS) {
+ FillMessageFieldsItem1(message_);
+ FillMessageFieldsItem2(message_);
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .Times(AtLeast(2))
+ .WillOnce(Return(kConnectionKey))
+ .WillOnce(Return(kConnectionKey));
+
+ command_->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ Run_EmptyAmountVrCommands_SUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::menu_name] = kMenuName;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::image][am::strings::value] = kImage;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::choice_id] = kChoiceId1;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::secondary_image][am::strings::value] = kSecondImage;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][0]
+ [am::strings::vr_commands][0] = kVrCommands1;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::choice_id] = kChoiceId2;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::menu_name] = kMenuName;
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+ (*message_)[am::strings::msg_params][am::strings::choice_set][1]
+ [am::strings::vr_commands][0] = kVrCommands2;
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+
+ command_->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnEvent_InvalidEventId_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
+ command_->on_event(event);
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnEvent_InvalidVrCommand_UNSUCCESS) {
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::WARNINGS;
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*message_);
+
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
+ command_->on_event(event);
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_ValidVrNoError_SUCCESS) {
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::WARNINGS;
+
+ FillMessageFieldsItem1(message_);
+ FillMessageFieldsItem2(message_);
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ command_->Run();
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
+ event.set_smart_object(*message_);
+
+ command_->on_event(event);
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnEvent_InValidVrNoError_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::INVALID_DATA;
+
+ FillMessageFieldsItem1(message_);
+ FillMessageFieldsItem2(message_);
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ command_->Run();
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
+ event.set_smart_object(*message_);
+
+ command_->on_event(event);
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnEvent_ValidVrNoErrorAndExpectedChoiceLessThanReceiveChoice_SUCCESS) {
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::WARNINGS;
+
+ FillMessageFieldsItem1(message_);
+
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ command_->Run();
+
+ FillMessageFieldsItem2(message_);
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+ event.set_smart_object(*message_);
+ command_->on_event(event);
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnTimeOut_InvalidErrorFromHMI_UNSUCCESS) {
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR),
+ am::commands::Command::SOURCE_SDL));
+
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+ command_->onTimeOut();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnTimeOut_ValidErrorFromHMI_SUCCESS) {
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::INVALID_ENUM;
+
+ FillMessageFieldsItem1(message_);
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ command_->Run();
+
+ FillMessageFieldsItem2(message_);
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*message_);
+ command_->on_event(event);
+
+ EXPECT_CALL(*mock_app_, RemoveChoiceSet(kChoiceSetId));
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+ command_->onTimeOut();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeOut_InvalidApp_UNSUCCESS) {
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::INVALID_ENUM;
+
+ FillMessageFieldsItem1(message_);
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ command_->Run();
+
+ FillMessageFieldsItem2(message_);
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(2);
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*message_);
+ command_->on_event(event);
+
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(invalid_app));
+ EXPECT_CALL(*mock_app_, RemoveChoiceSet(_)).Times(0);
+ command_->onTimeOut();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest,
+ OnTimeOut_SuccessfulResponseReceived_UNSUCCESS) {
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+
+ FillMessageFieldsItem1(message_);
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
+
+ command_->Run();
+
+ FillMessageFieldsItem2(message_);
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+ event.set_smart_object(*message_);
+
+ command_->on_event(event);
+
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, RemoveChoiceSet(_));
+
+ command_->onTimeOut();
+}
+
+TEST_F(CreateInteractionChoiceSetResponseTest, Run_SuccessFalse_UNSUCCESS) {
+ MessageSharedPtr message(CreateMessage());
+ (*message)[am::strings::msg_params][am::strings::success] = false;
+ (*message)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::INVALID_ENUM;
+ CreateInteractionChoiceSetResponsePtr command(
+ CreateCommand<CreateInteractionChoiceSetResponse>(message));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(message, false));
+ command->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetResponseTest, Run_SuccessTrue_SUCCESS) {
+ MessageSharedPtr message(CreateMessage());
+ (*message)[am::strings::msg_params][am::strings::success] = true;
+ (*message)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::SUCCESS;
+ CreateInteractionChoiceSetResponsePtr command(
+ CreateCommand<CreateInteractionChoiceSetResponse>(message));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(message, false));
+ command->Run();
+}
+
+TEST_F(CreateInteractionChoiceSetRequestTest, Run_ErrorFromHmiFalse_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::VR_AddCommand);
+
+ (*message_)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::GENERIC_ERROR;
+
+ FillMessageFieldsItem1(message_);
+
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillRepeatedly(Return(mobile_apis::Result::GENERIC_ERROR));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
+ .WillRepeatedly(Return(choice_set_id));
+
+ EXPECT_CALL(app_mngr_, GenerateGrammarID())
+ .WillRepeatedly(Return(kGrammarId));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _)).Times(2);
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+
+ command_->Run();
+
+ FillMessageFieldsItem2(message_);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR),
+ am::commands::Command::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+ event.set_smart_object(*message_);
+ command_->on_event(event);
+ command_->Run();
+}
+
+} // namespace create_interaction_choice_set_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
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
new file mode 100644
index 0000000000..ac8803c2ca
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc
@@ -0,0 +1,256 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "mobile/delete_command_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace delete_command_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::DeleteCommandRequest;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using am::MockMessageHelper;
+using am::MockHmiInterfaces;
+
+typedef SharedPtr<DeleteCommandRequest> DeleteCommandPtr;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class DeleteCommandRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ DeleteCommandRequestTest() : mock_app_(CreateMockApp()) {}
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ MessageSharedPtr CreateFullParamsVRSO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::vr_commands] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ msg_params[am::strings::vr_commands][0] = "lamer";
+ msg_params[am::strings::type] = 34;
+ msg_params[am::strings::grammar_id] = 12;
+ msg_params[am::strings::app_id] = kAppId;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(hmi_interfaces_));
+ }
+
+ NiceMock<MockHmiInterfaces> hmi_interfaces_;
+ MockAppPtr mock_app_;
+};
+
+TEST_F(DeleteCommandRequestTest,
+ OnEvent_VrHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr command_msg = CreateFullParamsVRSO();
+ (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DeleteCommandPtr command(CreateCommand<DeleteCommandRequest>(command_msg));
+
+ 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;
+
+ ON_CALL(hmi_interfaces_, GetInterfaceFromFunction(_))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
+ ON_CALL(hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ 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_, get_grammar_id()).WillByDefault(Return(kConnectionKey));
+ MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ Event event_ui(hmi_apis::FunctionID::UI_DeleteCommand);
+ event_ui.set_smart_object(*msg);
+ command->Init();
+ command->Run();
+ command->on_event(event_ui);
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*event_msg)[am::strings::msg_params][am::strings::info] =
+ "VR is not supported by system";
+ Event event_vr(hmi_apis::FunctionID::VR_DeleteCommand);
+ event_vr.set_smart_object(*event_msg);
+
+ EXPECT_CALL(*mock_app_, RemoveCommand(kCommandId));
+
+ EXPECT_CALL(*mock_app_, UpdateHash());
+
+ MessageSharedPtr vr_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+
+ command->on_event(event_vr);
+
+ ResultCommandExpectations(vr_command_result, "VR is not supported by system");
+}
+
+TEST_F(DeleteCommandRequestTest,
+ OnEvent_UIHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr command_msg = CreateFullParamsUISO();
+ (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DeleteCommandPtr command(CreateCommand<DeleteCommandRequest>(command_msg));
+
+ 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;
+
+ ON_CALL(hmi_interfaces_, GetInterfaceFromFunction(_))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ 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, get_grammar_id()).WillByDefault(Return(kConnectionKey));
+ MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ Event event_vr(hmi_apis::FunctionID::VR_DeleteCommand);
+ event_vr.set_smart_object(*msg);
+
+ command->Init();
+ command->Run();
+ command->on_event(event_vr);
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*event_msg)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+ Event event_ui(hmi_apis::FunctionID::UI_DeleteCommand);
+ event_ui.set_smart_object(*event_msg);
+
+ EXPECT_CALL(*app, RemoveCommand(kCommandId));
+
+ EXPECT_CALL(*app, UpdateHash());
+
+ MessageSharedPtr result_msg(
+ CatchMobileCommandResult(CallOnEvent(*command, event_ui)));
+
+ ASSERT_TRUE(result_msg);
+
+ ResultCommandExpectations(result_msg, "UI is not supported by system");
+}
+
+} // namespace delete_command_request
+} // 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/delete_file_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_file_test.cc
new file mode 100644
index 0000000000..5cc9dcf543
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_file_test.cc
@@ -0,0 +1,250 @@
+/*
+ * 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 <stdint.h>
+#include <vector>
+#include <string>
+#include <map>
+
+#include "mobile/delete_file_request.h"
+#include "mobile/delete_file_response.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/file_system.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_application_manager_settings.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "application_manager/policies/policy_handler.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace delete_file {
+
+using ::testing::_;
+using ::testing::Test;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SetArgReferee;
+using ::testing::AtLeast;
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::DeleteFileRequest;
+using sdl_rpc_plugin::commands::DeleteFileResponse;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using am::MockMessageHelper;
+
+typedef SharedPtr<DeleteFileRequest> DeleteFileRequestPtr;
+typedef SharedPtr<DeleteFileResponse> DeleteFileResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+ACTION_TEMPLATE(SetArgPointer,
+ HAS_1_TEMPLATE_PARAMS(int, k),
+ AND_1_VALUE_PARAMS(vec)) {
+ *std::tr1::get<k>(args) = *vec;
+}
+
+MATCHER_P(CheckMessageResultCode, result_code, "") {
+ return (*arg)[am::strings::msg_params][am::strings::result_code].asInt() ==
+ result_code;
+}
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const uint32_t kCorrelationId = 10u;
+const int32_t kMenuId = 5;
+} // namespace
+
+class DeleteFileRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ protected:
+ void SetUp() OVERRIDE {
+ message_ = CreateMessage();
+ command_ = CreateCommand<DeleteFileRequest>(message_);
+ mock_app_ = CreateMockApp();
+ }
+ DeleteFileRequestPtr command_;
+ MessageSharedPtr message_;
+ MockAppPtr mock_app_;
+};
+
+class DeleteFileResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+};
+
+TEST_F(DeleteFileRequestTest, Run_InvalidApp_UNSUCCESS) {
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_, get_settings()).Times(0);
+
+ command_->Run();
+}
+
+TEST_F(DeleteFileRequestTest, Run_HMILevelNone_UNSUCCESS) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_NONE));
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ const uint32_t num = 0;
+ EXPECT_CALL(app_mngr_settings_, delete_file_in_none())
+ .WillOnce(ReturnRef(num));
+ EXPECT_CALL(*mock_app_, delete_file_in_none_count()).WillOnce(Return(1));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(CheckMessageResultCode(mobile_apis::Result::REJECTED),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+
+ command_->Run();
+}
+
+TEST_F(DeleteFileRequestTest, Run_ValidFileName_SUCCESS) {
+ const std::string file_name = "test_file.txt";
+ EXPECT_TRUE(file_system::CreateFile(file_name));
+ (*message_)[am::strings::msg_params][am::strings::sync_file_name] = file_name;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ const std::string kFullFilePath = file_system::CurrentWorkingDirectory();
+ EXPECT_CALL(app_mngr_settings_, app_storage_folder())
+ .WillOnce(ReturnRef(kFullFilePath));
+
+ am::AppFile file;
+ file.file_name = file_name;
+ file.file_type = mobile_apis::FileType::BINARY;
+
+ EXPECT_CALL(*mock_app_, GetFile(_)).WillOnce(Return(&file));
+ EXPECT_CALL(*mock_app_, DeleteFile(_));
+ EXPECT_CALL(*mock_app_, increment_delete_file_in_none_count());
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(CheckMessageResultCode(mobile_apis::Result::SUCCESS),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+
+ command_->Run();
+}
+
+TEST_F(DeleteFileRequestTest, Run_InvalidFile_UNSUCCESS) {
+ const std::string file_name = "test_file.txt";
+ (*message_)[am::strings::msg_params][am::strings::sync_file_name] = file_name;
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ const std::string kFullFilePath = file_system::CurrentWorkingDirectory();
+ EXPECT_CALL(app_mngr_settings_, app_storage_folder())
+ .WillOnce(ReturnRef(kFullFilePath));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::REJECTED),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ command_->Run();
+}
+
+TEST_F(DeleteFileResponseTest, Run_InvalidApp_UNSUCCESS) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ DeleteFileResponsePtr command = CreateCommand<DeleteFileResponse>(message);
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(invalid_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(CheckMessageResultCode(
+ mobile_apis::Result::APPLICATION_NOT_REGISTERED),
+ false));
+
+ command->Run();
+}
+
+TEST_F(DeleteFileResponseTest, Run_ValidApp_SUCCESS) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*message)[am::strings::msg_params][am::strings::success] = true;
+
+ DeleteFileResponsePtr command = CreateCommand<DeleteFileResponse>(message);
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+ const uint32_t kAvailableDiskSpace = 10u;
+ EXPECT_CALL(*app, GetAvailableDiskSpace())
+ .WillOnce(Return(kAvailableDiskSpace));
+
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(
+ CheckMessageResultCode(mobile_apis::Result::SUCCESS), _));
+
+ command->Run();
+}
+
+} // namespace delete_file
+} // 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/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
new file mode 100644
index 0000000000..b2daef9cd2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc
@@ -0,0 +1,296 @@
+/*
+ * 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 <stdint.h>
+#include <map>
+
+#include "mobile/delete_interaction_choice_set_request.h"
+#include "mobile/delete_interaction_choice_set_response.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace delete_interaction_choice_set {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::InSequence;
+
+namespace am = ::application_manager;
+
+using sdl_rpc_plugin::commands::DeleteInteractionChoiceSetRequest;
+using sdl_rpc_plugin::commands::DeleteInteractionChoiceSetResponse;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+
+typedef SharedPtr<DeleteInteractionChoiceSetRequest>
+ DeleteInteractionChoiceSetRequestPtr;
+typedef SharedPtr<DeleteInteractionChoiceSetResponse>
+ DeleteInteractionChoiceSetResponsePtr;
+
+MATCHER_P(CheckMessageSuccess, success, "") {
+ return success ==
+ (*arg)[am::strings::msg_params][am::strings::success].asBool();
+}
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kChoiceSetId = 11u;
+const uint32_t kChoiceId = 110u;
+const uint32_t kGrammarId = 101u;
+} // namespace
+
+class DeleteInteractionChoiceSetRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ DeleteInteractionChoiceSetRequestTest()
+ : performinteraction_choice_set_lock_(
+ std::make_shared<sync_primitives::Lock>())
+ , accessor_(choice_set_map_, performinteraction_choice_set_lock_) {}
+
+ ~DeleteInteractionChoiceSetRequestTest() {
+ // Fix DataAccessor release and WinQt crash
+ Mock::VerifyAndClearExpectations(&app_mngr_);
+ }
+
+ am::PerformChoiceSetMap choice_set_map_;
+ mutable std::shared_ptr<sync_primitives::Lock>
+ performinteraction_choice_set_lock_;
+ DataAccessor<am::PerformChoiceSetMap> accessor_;
+
+ protected:
+ void SetUp() OVERRIDE {
+ message_ = CreateMessage();
+ command_ = CreateCommand<DeleteInteractionChoiceSetRequest>(message_);
+ app_ = CreateMockApp();
+ }
+
+ DeleteInteractionChoiceSetRequestPtr command_;
+ MessageSharedPtr message_;
+ MockAppPtr app_;
+};
+
+class DeleteInteractionChoiceSetResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ protected:
+ void SetUp() OVERRIDE {
+ message_ = CreateMessage();
+ command_ = CreateCommand<DeleteInteractionChoiceSetResponse>(message_);
+ app_ = CreateMockApp();
+ }
+ DeleteInteractionChoiceSetResponsePtr command_;
+ MessageSharedPtr message_;
+ MockAppPtr app_;
+};
+
+TEST_F(DeleteInteractionChoiceSetRequestTest, Run_InvalidApp_UNSUCCESS) {
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_, FindChoiceSet(_)).Times(0);
+ command_->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetRequestTest, Run_FindChoiceSetFail_UNSUCCESS) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
+
+ smart_objects::SmartObject* choice_set_id = NULL;
+ EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL));
+
+ command_->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetRequestTest, Run_ChoiceSetInUse_SUCCESS) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+
+ 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]);
+
+ choice_set_map_[0].insert(
+ std::make_pair(kChoiceSetId,
+ &((*message_)[am::strings::msg_params]
+ [am::strings::interaction_choice_set_id])));
+
+ EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+ EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(true));
+ EXPECT_CALL(*app_, performinteraction_choice_set_map())
+ .WillOnce(Return(accessor_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL));
+
+ command_->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetRequestTest,
+ Run_SendVrDeleteCommand_PerformInteractionFalse_UNSUCCESS) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ 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;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(app_));
+
+ {
+ InSequence seq;
+
+ EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+ EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false));
+ EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0);
+
+ EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(invalid_choice_set_id));
+
+ EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId));
+ EXPECT_CALL(*app_, UpdateHash());
+ }
+
+ DeleteInteractionChoiceSetRequestPtr command =
+ CreateCommand<DeleteInteractionChoiceSetRequest>(message_);
+
+ command->Init();
+ command->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetRequestTest, Run_SendVrDeleteCommand_SUCCESS) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
+ kChoiceSetId;
+ (*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]);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(app_));
+
+ {
+ InSequence seq;
+
+ EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+ EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false));
+ EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0);
+
+ EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
+ .WillOnce(Return(choice_set_id));
+
+ EXPECT_CALL(*app_, app_id())
+ .WillOnce(Return(kConnectionKey))
+ .WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId));
+ EXPECT_CALL(*app_, UpdateHash());
+ }
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+
+ DeleteInteractionChoiceSetRequestPtr command =
+ CreateCommand<DeleteInteractionChoiceSetRequest>(message_);
+
+ command->Init();
+ command->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetResponseTest, Run_SuccessFalse_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::success] = false;
+
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageSuccess(false), false));
+ command_->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetResponseTest, Run_ValidResultCode_SUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::result_code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageSuccess(true), false));
+ command_->Run();
+}
+
+TEST_F(DeleteInteractionChoiceSetResponseTest,
+ Run_InvalidResultCode_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::result_code] =
+ hmi_apis::Common_Result::INVALID_ENUM;
+
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageSuccess(false), false));
+ command_->Run();
+}
+
+} // namespace delete_interaction_choice_set
+} // 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/delete_sub_menu_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc
new file mode 100644
index 0000000000..7a187c46d1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc
@@ -0,0 +1,366 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "mobile/delete_sub_menu_request.h"
+#include "mobile/delete_sub_menu_response.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace delete_sub_menu_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::InSequence;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using am::MockHmiInterfaces;
+using am::MockMessageHelper;
+
+using sdl_rpc_plugin::commands::DeleteSubMenuRequest;
+using sdl_rpc_plugin::commands::DeleteSubMenuResponse;
+
+typedef SharedPtr<DeleteSubMenuRequest> DeleteSubMenuRequestPtr;
+typedef SharedPtr<DeleteSubMenuResponse> DeleteSubMenuResponsePtr;
+
+MATCHER_P(CheckMessageResultCode, result_code, "") {
+ return (*arg)[am::strings::msg_params][am::strings::result_code].asInt() ==
+ result_code;
+}
+
+MATCHER_P(CheckMessageConnectionKey, connection_key, "") {
+ return (*arg)[am::strings::msg_params][am::strings::connection_key].asInt() ==
+ connection_key;
+}
+
+ACTION_P(DeleteCommand, commands_map) {
+ am::CommandsMap::iterator it = (*commands_map).begin();
+ if ((*commands_map).end() != it) {
+ (*commands_map).erase(it);
+ }
+}
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 10u;
+const uint32_t kMenuId = 100u;
+const uint32_t kGrammarId = 101u;
+const int32_t kCmdId = 102;
+} // namespace
+
+class DeleteSubMenuRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ DeleteSubMenuRequestTest()
+ : commands_lock_(std::make_shared<sync_primitives::Lock>())
+ , accessor_(commands_map_, commands_lock_)
+ , message_(CreateMessage())
+ , command_(CreateCommand<DeleteSubMenuRequest>(message_))
+ , app_(CreateMockApp()) {}
+
+ am::CommandsMap commands_map_;
+ mutable std::shared_ptr<sync_primitives::Lock> commands_lock_;
+ DataAccessor<am::CommandsMap> accessor_;
+
+ MessageSharedPtr message_;
+ DeleteSubMenuRequestPtr command_;
+ MockAppPtr app_;
+};
+
+class DeleteSubMenuResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(DeleteSubMenuRequestTest, DISABLED_OnEvent_UI_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::menu_id] = 10u;
+
+ utils::SharedPtr<DeleteSubMenuRequest> command =
+ CreateCommand<DeleteSubMenuRequest>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+ EXPECT_CALL(*mock_app, RemoveSubMenu(_));
+
+ MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*ev_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*ev_msg)[am::strings::msg_params][am::strings::info] = "info";
+
+ Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
+ event.set_smart_object(*ev_msg);
+
+ MockHmiInterfaces hmi_interfaces;
+ ON_CALL(app_mngr_, hmi_interfaces()).WillByDefault(ReturnRef(hmi_interfaces));
+ EXPECT_CALL(hmi_interfaces,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ am::CommandsMap commands_map;
+ smart_objects::SmartObject commands_msg(smart_objects::SmartType_Map);
+ commands_map.insert(std::pair<uint32_t, SmartObject*>(1u, &commands_msg));
+ DataAccessor<am::CommandsMap> accessor(
+ commands_map, std::make_shared<sync_primitives::Lock>());
+ EXPECT_CALL(*mock_app, commands_map())
+ .WillOnce(Return(accessor))
+ .WillOnce(Return(accessor));
+
+ MessageSharedPtr ui_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*ui_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*ui_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+TEST_F(DeleteSubMenuRequestTest, Run_InvalidApp_UNSUCCESS) {
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(CheckMessageResultCode(
+ mobile_apis::Result::APPLICATION_NOT_REGISTERED),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_, FindSubMenu(_)).Times(0);
+ command_->Run();
+}
+
+TEST_F(DeleteSubMenuRequestTest, Run_FindSubMenuFalse_UNSUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ smart_objects::SmartObject* invalid_sub_menu = NULL;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
+ EXPECT_CALL(*app_, FindSubMenu(kMenuId)).WillOnce(Return(invalid_sub_menu));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ CheckMessageResultCode(mobile_apis::Result::INVALID_ID),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ EXPECT_CALL(*app_, app_id()).Times(0);
+ command_->Run();
+}
+
+TEST_F(DeleteSubMenuRequestTest, Run_SendHMIRequest_SUCCESS) {
+ (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ 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));
+
+ EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(kCorrelationId));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_DeleteSubMenu)))
+ .WillOnce(Return(true));
+ command_->Run();
+}
+
+TEST_F(DeleteSubMenuRequestTest, OnEvent_UnknownEventId_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ EXPECT_CALL(app_mngr_, application(_)).Times(0);
+ command_->on_event(event);
+}
+
+TEST_F(DeleteSubMenuRequestTest, OnEvent_InvalidApp_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+ event.set_smart_object(*message_);
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+ EXPECT_CALL(*app_, RemoveSubMenu(_)).Times(0);
+ command_->on_event(event);
+}
+
+TEST_F(DeleteSubMenuRequestTest, OnEvent_DeleteSubmenu_SUCCESS) {
+ Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
+ (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::msg_params][am::strings::vr_commands] =
+ "vr_commands";
+ (*message_)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ (*message_)[am::strings::msg_params][am::strings::menu_params]
+ [am::hmi_request::parent_id] = kMenuId;
+ const hmi_apis::Common_Result::eType result_code =
+ hmi_apis::Common_Result::SUCCESS;
+ (*message_)[am::strings::params][am::hmi_response::code] = result_code;
+ event.set_smart_object(*message_);
+
+ commands_map_.insert(
+ std::make_pair(0, &((*message_)[am::strings::msg_params])));
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
+
+ InSequence seq;
+ EXPECT_CALL(*app_, commands_map()).WillOnce(Return(accessor_));
+ EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(*app_, get_grammar_id()).WillOnce(Return(kGrammarId));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_DeleteCommand)))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(*app_, commands_map()).WillOnce(Return(accessor_));
+ EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(*app_, RemoveCommand(_)).WillOnce(DeleteCommand(&commands_map_));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_DeleteCommand)))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(*app_, RemoveSubMenu(_));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS),
+ am::commands::Command::SOURCE_SDL));
+ EXPECT_CALL(*app_, UpdateHash());
+ DeleteSubMenuRequestPtr command =
+ CreateCommand<DeleteSubMenuRequest>(message_);
+
+ command->Init();
+ command->on_event(event);
+}
+
+TEST_F(DeleteSubMenuResponseTest, Run_SUCCESS) {
+ MessageSharedPtr message(CreateMessage());
+ (*message)[am::strings::msg_params][am::strings::connection_key] =
+ kConnectionKey;
+ DeleteSubMenuResponsePtr command(
+ CreateCommand<DeleteSubMenuResponse>(message));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(CheckMessageConnectionKey(kConnectionKey), _));
+ command->Run();
+}
+
+TEST_F(DeleteSubMenuRequestTest,
+ DeleteSubmenu_CommandhaventVrCommadsAndMenuParams_DontSendHMIRequest) {
+ Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
+ (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ am::mobile_api::Result::SUCCESS;
+ event.set_smart_object(*message_);
+
+ commands_map_.insert(
+ std::make_pair(0, &((*message_)[am::strings::msg_params])));
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*app_, commands_map()).Times(2).WillRepeatedly(Return(accessor_));
+ EXPECT_CALL(*app_, RemoveCommand(_)).Times(0);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS),
+ am::commands::Command::SOURCE_SDL));
+ command_->on_event(event);
+}
+
+TEST_F(DeleteSubMenuRequestTest,
+ DeleteSubmenu_NotAChildOfMenupartam_DontSendHMIRequest) {
+ Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
+ (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
+ (*message_)[am::strings::msg_params][am::strings::menu_params]
+ [am::hmi_request::parent_id] = kMenuId + 1;
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ am::mobile_api::Result::SUCCESS;
+ event.set_smart_object(*message_);
+
+ commands_map_.insert(
+ std::make_pair(0, &((*message_)[am::strings::msg_params])));
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*app_, commands_map()).Times(2).WillRepeatedly(Return(accessor_));
+ EXPECT_CALL(*app_, RemoveCommand(_)).Times(0);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS),
+ am::commands::Command::SOURCE_SDL));
+ command_->on_event(event);
+}
+
+} // namespace delete_sub_menu_request
+} // 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/dial_number_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc
new file mode 100644
index 0000000000..bf689629b4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc
@@ -0,0 +1,190 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/event_engine/event.h"
+#include "mobile/dial_number_request.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace dial_number_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::DialNumberRequest;
+using am::event_engine::Event;
+namespace mobile_result = mobile_apis::Result;
+
+typedef SharedPtr<DialNumberRequest> DialNumberRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class DialNumberRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(DialNumberRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ DialNumberRequestPtr command(CreateCommand<DialNumberRequest>());
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(DialNumberRequestTest, Run_InvalidNumber_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = "\t\n";
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(DialNumberRequestTest, Run_EmptyNumber_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = "NotANumber";
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(DialNumberRequestTest, Run_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = "123";
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::BasicCommunication_DialNumber)));
+
+ command->Run();
+}
+
+TEST_F(DialNumberRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
+ // MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ // (*command_msg)[am::strings::params][am::strings::connection_key] =
+ // kConnectionKey;
+
+ // DialNumberRequestPtr
+ // command(CreateCommand<DialNumberRequest>(command_msg));
+
+ // MockAppPtr app(CreateMockApp());
+ // EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ // Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ // EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ // command->on_event(event);
+}
+
+TEST_F(DialNumberRequestTest, OnEvent_SUCCESS) {
+ // MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ // (*event_msg)[am::strings::params][am::hmi_response::code] =
+ // mobile_apis::Result::SUCCESS;
+ // (*event_msg)[am::strings::params][am::strings::info] = "test_info";
+
+ // Event event(hmi_apis::FunctionID::BasicCommunication_DialNumber);
+ // event.set_smart_object(*event_msg);
+
+ // MockAppPtr app(CreateMockApp());
+ // EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ // .WillRepeatedly(Return(app));
+ // ON_CALL(app_mngr_,
+ // GetRPCService()).WillByDefault(ReturnRef(mock_rpc_service_));
+ // EXPECT_CALL(
+ // mock_rpc_service_,
+ // ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS),
+ // _));
+
+ // MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ // (*command_msg)[am::strings::params][am::strings::connection_key] =
+ // kConnectionKey;
+
+ // DialNumberRequestPtr
+ // command(CreateCommand<DialNumberRequest>(command_msg));
+ // command->on_event(event);
+}
+
+} // namespace dial_number_request
+} // 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/dummy_mobile_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc
new file mode 100644
index 0000000000..a8afe4007f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc
@@ -0,0 +1,315 @@
+/*
+ * 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 "application_manager/commands/command_request_test.h"
+
+#include <stdint.h>
+#include <string>
+#include <vector>
+#include "gtest/gtest.h"
+
+#include "mobile/add_command_request.h"
+#include "mobile/add_command_response.h"
+#include "mobile/add_sub_menu_request.h"
+#include "mobile/add_sub_menu_response.h"
+#include "mobile/alert_maneuver_request.h"
+#include "mobile/alert_maneuver_response.h"
+#include "mobile/alert_request.h"
+#include "mobile/alert_response.h"
+#include "mobile/change_registration_request.h"
+#include "mobile/change_registration_response.h"
+#include "mobile/create_interaction_choice_set_request.h"
+#include "mobile/create_interaction_choice_set_response.h"
+#include "mobile/delete_command_request.h"
+#include "mobile/delete_command_response.h"
+#include "mobile/delete_file_request.h"
+#include "mobile/delete_file_response.h"
+#include "mobile/delete_interaction_choice_set_request.h"
+#include "mobile/delete_interaction_choice_set_response.h"
+#include "mobile/delete_sub_menu_request.h"
+#include "mobile/delete_sub_menu_response.h"
+#include "mobile/dial_number_request.h"
+#include "mobile/dial_number_response.h"
+#include "mobile/end_audio_pass_thru_request.h"
+#include "mobile/end_audio_pass_thru_response.h"
+#include "mobile/generic_response.h"
+#include "mobile/get_way_points_request.h"
+#include "mobile/get_way_points_response.h"
+#include "mobile/list_files_request.h"
+#include "mobile/list_files_response.h"
+#include "mobile/on_app_interface_unregistered_notification.h"
+#include "mobile/on_audio_pass_thru_notification.h"
+#include "mobile/on_button_event_notification.h"
+#include "mobile/on_button_press_notification.h"
+#include "mobile/on_command_notification.h"
+#include "mobile/on_driver_distraction_notification.h"
+#include "mobile/on_hash_change_notification.h"
+#include "mobile/on_hmi_status_notification.h"
+#include "mobile/on_hmi_status_notification_from_mobile.h"
+#include "mobile/on_keyboard_input_notification.h"
+#include "mobile/on_language_change_notification.h"
+#include "mobile/on_permissions_change_notification.h"
+#include "mobile/on_system_request_notification.h"
+#include "mobile/on_tbt_client_state_notification.h"
+#include "mobile/on_touch_event_notification.h"
+#include "mobile/on_way_point_change_notification.h"
+#include "mobile/perform_audio_pass_thru_request.h"
+#include "mobile/perform_audio_pass_thru_response.h"
+#include "mobile/perform_interaction_request.h"
+#include "mobile/perform_interaction_response.h"
+#include "mobile/put_file_request.h"
+#include "mobile/put_file_response.h"
+#include "mobile/register_app_interface_request.h"
+#include "mobile/register_app_interface_response.h"
+#include "mobile/reset_global_properties_request.h"
+#include "mobile/reset_global_properties_response.h"
+#include "mobile/scrollable_message_request.h"
+#include "mobile/scrollable_message_response.h"
+#include "mobile/send_location_request.h"
+#include "mobile/send_location_response.h"
+#include "mobile/set_app_icon_request.h"
+#include "mobile/set_app_icon_response.h"
+#include "mobile/set_display_layout_request.h"
+#include "mobile/set_display_layout_response.h"
+#include "mobile/set_global_properties_request.h"
+#include "mobile/set_global_properties_response.h"
+#include "mobile/set_media_clock_timer_request.h"
+#include "mobile/set_media_clock_timer_response.h"
+#include "mobile/show_constant_tbt_request.h"
+#include "mobile/show_constant_tbt_response.h"
+#include "mobile/show_request.h"
+#include "mobile/show_response.h"
+#include "mobile/slider_request.h"
+#include "mobile/slider_response.h"
+#include "mobile/speak_request.h"
+#include "mobile/speak_response.h"
+#include "mobile/subscribe_button_request.h"
+#include "mobile/subscribe_button_response.h"
+#include "mobile/subscribe_way_points_request.h"
+#include "mobile/subscribe_way_points_response.h"
+#include "mobile/system_response.h"
+#include "mobile/unregister_app_interface_request.h"
+#include "mobile/unregister_app_interface_response.h"
+#include "mobile/unsubscribe_button_request.h"
+#include "mobile/unsubscribe_button_response.h"
+#include "mobile/unsubscribe_way_points_request.h"
+#include "mobile/unsubscribe_way_points_response.h"
+#include "mobile/update_turn_list_request.h"
+#include "mobile/update_turn_list_response.h"
+
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "test/application_manager/mock_application_manager_settings.h"
+#include "application_manager/mock_event_dispatcher.h"
+
+namespace am = application_manager;
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace dummy_mobile_commands_test {
+
+namespace commands = sdl_rpc_plugin::commands;
+using ::testing::_;
+using ::testing::NotNull;
+using ::testing::Types;
+using am::commands::MessageSharedPtr;
+using ::test::components::event_engine_test::MockEventDispatcher;
+using ::test::components::application_manager_test::MockApplicationManager;
+using ::test::components::application_manager_test::
+ MockApplicationManagerSettings;
+using ::application_manager::ApplicationSharedPtr;
+using ::test::components::application_manager_test::MockApplication;
+
+namespace {
+const std::string kEmptyString_ = "";
+} // namespace
+
+template <class Command>
+class MobileCommandsTest : public components::commands_test::CommandRequestTest<
+ CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+
+ void InitCommand(const uint32_t& timeout) OVERRIDE {
+ EXPECT_CALL(app_mngr_settings_, default_timeout())
+ .WillOnce(ReturnRef(timeout));
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_));
+ ON_CALL(app_mngr_, get_settings())
+ .WillByDefault(ReturnRef(app_mngr_settings_));
+ ON_CALL(app_mngr_settings_, app_icons_folder())
+ .WillByDefault(ReturnRef(kEmptyString_));
+ }
+};
+
+template <class Command>
+class MobileCommandsTestFirst : public MobileCommandsTest<Command> {
+ public:
+ using typename MobileCommandsTest<Command>::CommandType;
+};
+
+template <class Command>
+class MobileCommandsTestSecond : public MobileCommandsTest<Command> {
+ public:
+ using typename MobileCommandsTest<Command>::CommandType;
+};
+
+template <class Command>
+class MobileCommandsTestThird : public MobileCommandsTest<Command> {
+ public:
+ using typename MobileCommandsTest<Command>::CommandType;
+};
+
+/* macro TYPED_TEST_CASE takes max 50 args. That is why there are few
+ * TYPED_TEST_CASE for HMI and mobile commands
+ */
+
+typedef Types<commands::AddCommandRequest,
+ commands::AddCommandResponse,
+ commands::AddSubMenuRequest,
+ commands::AddSubMenuResponse,
+ commands::AlertManeuverRequest,
+ commands::AlertManeuverResponse,
+ commands::AlertRequest,
+ commands::AlertResponse,
+ commands::ChangeRegistrationRequest,
+ commands::ChangeRegistrationResponse,
+ commands::CreateInteractionChoiceSetRequest,
+ commands::CreateInteractionChoiceSetResponse,
+ commands::DeleteCommandRequest,
+ commands::DeleteCommandResponse,
+ commands::DeleteFileRequest,
+ commands::DeleteFileResponse,
+ commands::DeleteInteractionChoiceSetRequest,
+ commands::DeleteInteractionChoiceSetResponse,
+ commands::DeleteSubMenuRequest,
+ commands::DeleteSubMenuResponse,
+ commands::DialNumberRequest,
+ commands::DialNumberResponse,
+ commands::EndAudioPassThruRequest,
+ commands::EndAudioPassThruResponse,
+ commands::GenericResponse,
+ commands::GetWayPointsRequest,
+ commands::GetWayPointsResponse,
+ commands::ListFilesRequest,
+ commands::ListFilesResponse,
+ commands::OnAppInterfaceUnregisteredNotification,
+ commands::OnAudioPassThruNotification,
+ commands::mobile::OnButtonEventNotification,
+ commands::mobile::OnButtonPressNotification,
+ commands::OnCommandNotification,
+ commands::mobile::OnDriverDistractionNotification,
+ commands::mobile::OnHashChangeNotification,
+ commands::OnHMIStatusNotification,
+ commands::OnHMIStatusNotificationFromMobile,
+ commands::mobile::OnKeyBoardInputNotification,
+ commands::OnLanguageChangeNotification,
+ commands::OnPermissionsChangeNotification,
+ commands::mobile::OnSystemRequestNotification,
+ commands::OnTBTClientStateNotification,
+ commands::mobile::OnTouchEventNotification>
+ MobileCommandsListFirst;
+
+typedef Types<commands::OnWayPointChangeNotification,
+ commands::PerformAudioPassThruRequest,
+ commands::PerformAudioPassThruResponse,
+ commands::PerformInteractionRequest,
+ commands::PerformInteractionResponse,
+ commands::PutFileRequest,
+ commands::PutFileResponse,
+ commands::RegisterAppInterfaceRequest,
+ commands::RegisterAppInterfaceResponse,
+ commands::ResetGlobalPropertiesRequest,
+ commands::ResetGlobalPropertiesResponse,
+ commands::ScrollableMessageRequest,
+ commands::ScrollableMessageResponse,
+ commands::SendLocationRequest,
+ commands::SendLocationResponse,
+ commands::SetAppIconRequest,
+ commands::SetAppIconResponse,
+ commands::SetDisplayLayoutRequest,
+ commands::SetDisplayLayoutResponse,
+ commands::SetGlobalPropertiesRequest,
+ commands::SetGlobalPropertiesResponse,
+ commands::SetMediaClockRequest,
+ commands::SetMediaClockTimerResponse,
+ commands::ShowConstantTBTRequest,
+ commands::ShowConstantTBTResponse,
+ commands::ShowRequest,
+ commands::ShowResponse,
+ commands::SliderRequest,
+ commands::SliderResponse,
+ commands::SpeakRequest,
+ commands::SpeakResponse,
+ commands::SubscribeButtonRequest,
+ commands::SubscribeButtonResponse,
+ commands::SubscribeWayPointsRequest,
+ commands::SubscribeWayPointsResponse,
+ commands::SystemResponse,
+ commands::UnregisterAppInterfaceRequest,
+ commands::UnregisterAppInterfaceResponse,
+ commands::UnsubscribeButtonRequest,
+ commands::UnsubscribeButtonResponse> MobileCommandsListSecond;
+
+typedef Types<commands::UnSubscribeWayPointsRequest,
+ commands::UnsubscribeWayPointsResponse,
+ commands::UpdateTurnListRequest,
+ commands::UpdateTurnListResponse> MobileCommandsListThird;
+
+TYPED_TEST_CASE(MobileCommandsTestFirst, MobileCommandsListFirst);
+TYPED_TEST_CASE(MobileCommandsTestSecond, MobileCommandsListSecond);
+TYPED_TEST_CASE(MobileCommandsTestThird, MobileCommandsListThird);
+
+TYPED_TEST(MobileCommandsTestFirst, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+
+TYPED_TEST(MobileCommandsTestSecond, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+TYPED_TEST(MobileCommandsTestThird, CtorAndDtorCall) {
+ utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ UNUSED(command);
+}
+
+} // namespace dummy_mobile_commands_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/end_audio_pass_thru_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/end_audio_pass_thru_request_test.cc
new file mode 100644
index 0000000000..567f46e4ea
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/end_audio_pass_thru_request_test.cc
@@ -0,0 +1,120 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "mobile/end_audio_pass_thru_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace end_audio_pass_thru_request {
+
+namespace am = ::application_manager;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::EndAudioPassThruRequest;
+using am::event_engine::Event;
+using am::MockMessageHelper;
+
+typedef SharedPtr<EndAudioPassThruRequest> EndAudioPassThruRequestPtr;
+
+class EndAudioPassThruRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(EndAudioPassThruRequestTest, OnEvent_UI_UNSUPPORTED_RESOUCRE) {
+ const uint32_t kConnectionKey = 2u;
+ const uint32_t app_id = kConnectionKey;
+
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ EndAudioPassThruRequestPtr command(
+ CreateCommand<EndAudioPassThruRequest>(command_msg));
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::msg_params] = 0;
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ mobile_apis::Result::UNSUPPORTED_RESOURCE;
+
+ Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
+
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*ui_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*ui_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+} // namespace end_audio_pass_thru_request
+} // 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/get_way_points_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/get_way_points_request_test.cc
new file mode 100644
index 0000000000..0239f3c7d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/get_way_points_request_test.cc
@@ -0,0 +1,282 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "mobile/get_way_points_request.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_message_helper.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_message_helper.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace get_way_points_request {
+
+using namespace mobile_apis::Result;
+using ::testing::Return;
+using ::testing::_;
+using sdl_rpc_plugin::commands::GetWayPointsRequest;
+using application_manager::MockMessageHelper;
+using application_manager::MockHmiInterfaces;
+
+typedef SharedPtr<GetWayPointsRequest> CommandPtr;
+typedef mobile_apis::Result::eType MobileResult;
+typedef hmi_apis::Common_Result::eType HmiResult;
+
+namespace {
+const uint32_t kCorrelationId = 2u;
+const uint32_t kAppId = 3u;
+const uint32_t kConnectionKey = kAppId;
+const std::string kMethodName = "Navigation.GetWayPoints";
+}
+
+class GetWayPointsRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ GetWayPointsRequestTest() : mock_app_(CreateMockApp()) {}
+
+ void SetUp() OVERRIDE {
+ message_ = utils::MakeShared<SmartObject>(::smart_objects::SmartType_Map);
+ (*message_)[am::strings::msg_params] =
+ ::smart_objects::SmartObject(::smart_objects::SmartType_Map);
+
+ command_sptr_ = CreateCommand<GetWayPointsRequest>(message_);
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+ }
+
+ MockAppPtr mock_app_;
+ MessageSharedPtr message_;
+ utils::SharedPtr<GetWayPointsRequest> command_sptr_;
+};
+
+class GetWayPointsRequestOnEventTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ GetWayPointsRequestOnEventTest() : app_(CreateMockApp()) {}
+
+ void CheckOnEventResponse(const std::string& wayPointsParam,
+ const HmiResult ResultCode,
+ const bool success) {
+ Event event(Event::EventID::Navigation_GetWayPoints);
+ CommandPtr command(CreateCommand<GetWayPointsRequest>());
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::params][am::hmi_response::code] = ResultCode;
+ if ("0" == wayPointsParam) {
+ (*event_msg)[am::strings::msg_params] = 0;
+ } else {
+ (*event_msg)[am::strings::msg_params][am::strings::way_points][0]["123"] =
+ wayPointsParam;
+ }
+
+ event.set_smart_object(*event_msg);
+
+ const MobileResult mobile_result = static_cast<MobileResult>(ResultCode);
+
+ MessageSharedPtr result_msg(
+ CatchMobileCommandResult(CallOnEvent(*command, event)));
+ EXPECT_EQ(
+ mobile_result,
+ static_cast<MobileResult>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+ EXPECT_EQ(
+ success,
+ (*result_msg)[am::strings::msg_params][am::strings::success].asBool());
+ }
+
+ protected:
+ MockAppPtr app_;
+ MockHmiInterfaces hmi_interfaces_;
+};
+
+TEST_F(GetWayPointsRequestTest,
+ Run_InvalidApp_ApplicationNotRegisteredResponce) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ utils::SharedPtr<am::Application> null_application_sptr;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(null_application_sptr));
+
+ CallRun caller(*command_sptr_);
+
+ MessageSharedPtr result_message = CatchMobileCommandResult(caller);
+
+ const mobile_apis::Result::eType result =
+ static_cast<mobile_apis::Result::eType>(
+ (*result_message)[am::strings::msg_params][am::strings::result_code]
+ .asInt());
+
+ EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED, result);
+}
+
+TEST_F(GetWayPointsRequestTest, Run_ApplicationRegistered_Success) {
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ MockAppPtr application_sptr = CreateMockApp();
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(application_sptr));
+ EXPECT_CALL(*application_sptr, app_id()).WillOnce(Return(1));
+
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(kCorrelationId));
+
+ CallRun caller(*command_sptr_);
+
+ MessageSharedPtr result_message = CatchHMICommandResult(caller);
+
+ const hmi_apis::FunctionID::eType result_function_id =
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*result_message)[am::strings::params][am::strings::function_id]
+ .asInt());
+
+ EXPECT_EQ(hmi_apis::FunctionID::Navigation_GetWayPoints, result_function_id);
+ EXPECT_EQ(kCorrelationId,
+ (*result_message)[am::strings::params][am::strings::correlation_id]
+ .asUInt());
+}
+
+TEST_F(GetWayPointsRequestTest,
+ OnEvent_NavigationGetWayPointsEvent_SendResponse) {
+ am::event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints);
+
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ event.set_smart_object(*message_);
+
+ CallOnEvent caller(*command_sptr_, event);
+
+ MessageSharedPtr result_message = CatchMobileCommandResult(caller);
+
+ const mobile_apis::Result::eType result =
+ static_cast<mobile_apis::Result::eType>(
+ (*result_message)[am::strings::msg_params][am::strings::result_code]
+ .asInt());
+
+ EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
+}
+
+TEST_F(GetWayPointsRequestTest, OnEvent_DefaultCase) {
+ am::event_engine::Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ event.set_smart_object(*message_);
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+
+ CallOnEvent caller(*command_sptr_, event);
+ caller();
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_WrongEventId_UNSUCCESS) {
+ Event event(Event::EventID::INVALID_ENUM);
+ CommandPtr command(CreateCommand<GetWayPointsRequest>());
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->on_event(event);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_SUCCESS_Case1) {
+ CheckOnEventResponse("0", HmiResult::SUCCESS, true);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_SUCCESS_Case2) {
+ CheckOnEventResponse("", HmiResult::SUCCESS, true);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_SUCCESS_Case3) {
+ CheckOnEventResponse("test", HmiResult::SUCCESS, true);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case1) {
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ CheckOnEventResponse(" ", HmiResult::GENERIC_ERROR, false);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case2) {
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ CheckOnEventResponse("test\t", HmiResult::GENERIC_ERROR, false);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case3) {
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ CheckOnEventResponse("test\n", HmiResult::GENERIC_ERROR, false);
+}
+
+TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case4) {
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ CheckOnEventResponse("test\t\n", HmiResult::GENERIC_ERROR, false);
+}
+
+} // namespace get_way_points_request
+} // 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/list_files_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/list_files_request_test.cc
new file mode 100644
index 0000000000..f9fd31f99a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/list_files_request_test.cc
@@ -0,0 +1,145 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "mobile/list_files_request.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/smart_object_keys.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace list_files_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::DoAll;
+using ::testing::SaveArg;
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::ListFilesRequest;
+using am::commands::MessageSharedPtr;
+
+class ListFilesRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ ListFilesRequestTest() : kStoragePath_("storage"), kResponseSize_(1) {}
+ const std::string kStoragePath_;
+ const uint32_t kResponseSize_;
+};
+
+TEST_F(ListFilesRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>());
+
+ ON_CALL(app_mngr_, application(_))
+ .WillByDefault(Return(SharedPtr<am::Application>()));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(ListFilesRequestTest, Run_TooManyHmiNone_UNSUCCESS) {
+ MockAppPtr app(CreateMockApp());
+ SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>());
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+ ON_CALL(*app, hmi_level())
+ .WillByDefault(Return(mobile_apis::HMILevel::HMI_NONE));
+
+ const uint32_t kListFilesInNoneAllowed = 1u;
+ const uint32_t kListFilesInNoneCount = 2u;
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+ ON_CALL(app_mngr_settings_, list_files_in_none())
+ .WillByDefault(ReturnRef(kListFilesInNoneAllowed));
+ ON_CALL(*app, list_files_in_none_count())
+ .WillByDefault(Return(kListFilesInNoneCount));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::REJECTED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(ListFilesRequestTest, Run_SUCCESS) {
+ MockAppPtr app(CreateMockApp());
+ SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>());
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillRepeatedly(ReturnRef(app_mngr_settings_));
+
+ ON_CALL(app_mngr_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kStoragePath_));
+
+ ON_CALL(app_mngr_settings_, list_files_response_size())
+ .WillByDefault(ReturnRef(kResponseSize_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ ON_CALL(*app, hmi_level())
+ .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
+
+ ON_CALL(*app, increment_list_files_in_none_count()).WillByDefault(Return());
+
+ ON_CALL(*app, GetAvailableDiskSpace()).WillByDefault(Return(0));
+
+ am::AppFilesMap files_map;
+ ON_CALL(*app, getAppFiles()).WillByDefault(ReturnRef(files_map));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::SUCCESS,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+} // namespace list_files_request
+} // 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
new file mode 100644
index 0000000000..d2e86f0103
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc
@@ -0,0 +1,340 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "mobile/on_button_event_notification.h"
+#include "mobile/on_button_press_notification.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_button_notification {
+
+namespace am = ::application_manager;
+namespace commands = am::commands;
+using sdl_rpc_plugin::commands::mobile::OnButtonEventNotification;
+using sdl_rpc_plugin::commands::mobile::OnButtonPressNotification;
+using ::testing::_;
+using ::testing::Types;
+using ::testing::Return;
+
+using ::utils::SharedPtr;
+using am::commands::MessageSharedPtr;
+
+namespace {
+const uint32_t kAppId = 5u;
+const uint32_t kCustomButtonId = 3u;
+const mobile_apis::ButtonName::eType kButtonName = mobile_apis::ButtonName::OK;
+} // namespace
+
+template <class NotificationT,
+ mobile_apis::FunctionID::eType kExpectedFunctionId>
+struct NotificationData {
+ typedef NotificationT Notification;
+ enum { kFunctionId = kExpectedFunctionId };
+};
+
+template <class NotificationDataT>
+class OnButtonNotificationCommandsTest
+ : public CommandsTest<CommandsTestMocks::kNotNice>,
+ public NotificationDataT {};
+
+typedef Types<NotificationData<OnButtonEventNotification,
+ mobile_apis::FunctionID::OnButtonEventID>,
+ NotificationData<OnButtonPressNotification,
+ mobile_apis::FunctionID::OnButtonPressID> >
+ OnButtonNotificationCommandsList;
+
+MATCHER_P(CheckNotificationMessage, function_id, "") {
+ const bool kIsMobileProtocolTypeCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ commands::CommandImpl::mobile_protocol_type_;
+
+ const bool kIsProtocolVersionCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ commands::CommandImpl::protocol_version_;
+
+ const bool kIsNotificationCorrect =
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ am::MessageType::kNotification;
+
+ const bool kIsFunctionIdCorrect =
+ (*arg)[am::strings::params][am::strings::function_id].asInt() ==
+ function_id;
+
+ bool is_custom_button_id_correct = true;
+ if ((*arg)[am::strings::msg_params].keyExists(
+ am::hmi_response::custom_button_id)) {
+ is_custom_button_id_correct =
+ (*arg)[am::strings::msg_params][am::strings::custom_button_id] ==
+ kCustomButtonId;
+ }
+
+ return kIsMobileProtocolTypeCorrect && kIsProtocolVersionCorrect &&
+ kIsNotificationCorrect && kIsFunctionIdCorrect &&
+ is_custom_button_id_correct;
+}
+
+TYPED_TEST_CASE(OnButtonNotificationCommandsTest,
+ OnButtonNotificationCommandsList);
+
+TYPED_TEST(OnButtonNotificationCommandsTest,
+ Run_CustomButton_NoAppId_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ mobile_apis::ButtonName::CUSTOM_BUTTON;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest,
+ Run_CustomButton_NoCustomButtonId_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ mobile_apis::ButtonName::CUSTOM_BUTTON;
+ (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
+ EXPECT_CALL(this->app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest,
+ Run_CustomButton_AppNotRegistered_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ mobile_apis::ButtonName::CUSTOM_BUTTON;
+ (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*notification_msg)[am::strings::msg_params]
+ [am::hmi_response::custom_button_id] = kCustomButtonId;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ EXPECT_CALL(this->app_mngr_, application(kAppId))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest,
+ Run_CustomButton_AppNotSubscribedToCustomButtonId_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ mobile_apis::ButtonName::CUSTOM_BUTTON;
+ (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*notification_msg)[am::strings::msg_params]
+ [am::hmi_response::custom_button_id] = kCustomButtonId;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
+ EXPECT_CALL(this->app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, IsSubscribedToSoftButton(kCustomButtonId))
+ .WillOnce(Return(false));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest, Run_CustomButton_SUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ mobile_apis::ButtonName::CUSTOM_BUTTON;
+ (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*notification_msg)[am::strings::msg_params]
+ [am::hmi_response::custom_button_id] = kCustomButtonId;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
+ ON_CALL(*mock_app, hmi_level())
+ .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
+ EXPECT_CALL(this->app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, IsSubscribedToSoftButton(kCustomButtonId))
+ .WillOnce(Return(true));
+ EXPECT_CALL(this->mock_rpc_service_,
+ SendMessageToMobile(
+ CheckNotificationMessage(TestFixture::kFunctionId), _));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest, Run_NoSubscribedApps_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ kButtonName;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ const std::vector<ApplicationSharedPtr> empty_subscribed_apps_list;
+ EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
+ .WillOnce(Return(empty_subscribed_apps_list));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest, Run_InvalidHmiLevel_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ kButtonName;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
+ std::vector<ApplicationSharedPtr> subscribed_apps_list;
+ subscribed_apps_list.push_back(mock_app);
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_NONE));
+
+ EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
+ .WillOnce(Return(subscribed_apps_list));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest,
+ Run_ButtonOkOnlyForHmiLevelFull_UNSUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ kButtonName;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
+ std::vector<ApplicationSharedPtr> subscribed_apps_list;
+ subscribed_apps_list.push_back(mock_app);
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_LIMITED));
+
+ EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
+ .WillOnce(Return(subscribed_apps_list));
+
+ command->Run();
+}
+
+TYPED_TEST(OnButtonNotificationCommandsTest, Run_SUCCESS) {
+ typedef typename TestFixture::Notification Notification;
+
+ MessageSharedPtr notification_msg(
+ this->CreateMessage(smart_objects::SmartType_Map));
+
+ (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
+ kButtonName;
+
+ SharedPtr<Notification> command(
+ this->template CreateCommand<Notification>(notification_msg));
+
+ typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
+ std::vector<ApplicationSharedPtr> subscribed_apps_list;
+ subscribed_apps_list.push_back(mock_app);
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
+
+ ON_CALL(*mock_app, IsFullscreen()).WillByDefault(Return(true));
+
+ EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
+ .WillOnce(Return(subscribed_apps_list));
+ EXPECT_CALL(this->mock_rpc_service_,
+ SendMessageToMobile(
+ CheckNotificationMessage(TestFixture::kFunctionId), _));
+
+ command->Run();
+}
+
+} // namespace on_button_notification
+} // 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_command_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc
new file mode 100644
index 0000000000..9e12303f23
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc
@@ -0,0 +1,137 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "mobile/on_command_notification.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_command_notification {
+
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::Return;
+
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::OnCommandNotification;
+
+typedef ::utils::SharedPtr<OnCommandNotification> CommandPtr;
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kCommandId = 5u;
+} // namespace
+
+class OnCommandNotificationTest
+ : public CommandsTest<CommandsTestMocks::kNotNice> {};
+
+TEST_F(OnCommandNotificationTest, Run_AppNotRegistered_UNSUCCESS) {
+ CommandPtr command(CreateCommand<OnCommandNotification>());
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(OnCommandNotificationTest, Run_NoAppsForTheCommand_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+
+ CommandPtr command(CreateCommand<OnCommandNotification>(command_msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, FindCommand(kCommandId))
+ .WillOnce(Return(static_cast<SmartObject*>(NULL)));
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ command->Run();
+}
+
+MATCHER(CheckNotificationMessage, "") {
+ const bool kIsMobileProtocolTypeCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ am::commands::CommandImpl::mobile_protocol_type_;
+
+ const bool kIsProtocolVersionCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ am::commands::CommandImpl::protocol_version_;
+
+ const bool kIsNotificationCorrect =
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ am::MessageType::kNotification;
+
+ return kIsMobileProtocolTypeCorrect && kIsProtocolVersionCorrect &&
+ kIsNotificationCorrect;
+}
+
+TEST_F(OnCommandNotificationTest, Run_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+
+ CommandPtr command(CreateCommand<OnCommandNotification>(command_msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
+
+ MessageSharedPtr dummy_msg(CreateMessage());
+ EXPECT_CALL(*mock_app, FindCommand(kCommandId))
+ .WillOnce(Return(dummy_msg.get()));
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckNotificationMessage(), _));
+
+ command->Run();
+}
+
+} // namespace on_command_notification
+} // 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_hash_change_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hash_change_notification_test.cc
new file mode 100644
index 0000000000..86df3cdab6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hash_change_notification_test.cc
@@ -0,0 +1,119 @@
+/*
+ * 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 <string>
+
+#include "gtest/gtest.h"
+#include "mobile/on_hash_change_notification.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/test/include/application_manager/commands/commands_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_hash_change_notification {
+
+namespace strings = application_manager::strings;
+
+using sdl_rpc_plugin::commands::mobile::OnHashChangeNotification;
+using application_manager::MockMessageHelper;
+using application_manager::commands::CommandImpl;
+using testing::Mock;
+using testing::Return;
+using testing::ReturnRef;
+using testing::_;
+
+class OnHashChangeNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(OnHashChangeNotificationTest, Run_ValidApp_SUCCESS) {
+ const uint32_t kConnectionKey = 1u;
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+
+ SharedPtr<OnHashChangeNotification> command =
+ CreateCommand<OnHashChangeNotification>(msg);
+
+ std::string return_string = "1234";
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, curHash()).WillOnce(ReturnRef(return_string));
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _));
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+ ASSERT_EQ(CommandImpl::mobile_protocol_type_,
+ (*msg)[strings::params][strings::protocol_type].asInt());
+ ASSERT_EQ(CommandImpl::protocol_version_,
+ (*msg)[strings::params][strings::protocol_version].asInt());
+ ASSERT_EQ(return_string,
+ (*msg)[strings::msg_params][strings::hash_id].asString());
+}
+
+TEST_F(OnHashChangeNotificationTest, Run_InvalidApp_NoNotification) {
+ const uint32_t kConnectionKey = 1u;
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+
+ SharedPtr<OnHashChangeNotification> command =
+ CreateCommand<OnHashChangeNotification>(msg);
+
+ std::string return_string;
+ MockAppPtr mock_app = CreateMockApp();
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+ EXPECT_CALL(*mock_app, curHash()).Times(0);
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _)).Times(0);
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+} // namespace on_hash_change_notification
+} // 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_hmi_status_notification_from_mobile_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc
new file mode 100644
index 0000000000..43e01c5a3d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc
@@ -0,0 +1,284 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "mobile/on_hmi_status_notification_from_mobile.h"
+#include "application_manager/commands/commands_test.h"
+#include <application_manager/smart_object_keys.h>
+#include "application_manager/message.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/mock_message_helper.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_hmi_status_notification_from_mobile {
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const connection_handler::DeviceHandle kHandle = 2u;
+} // namespace
+
+namespace strings = application_manager::strings;
+
+using sdl_rpc_plugin::commands::OnHMIStatusNotificationFromMobile;
+using protocol_handler::MajorProtocolVersion;
+using application_manager::ApplicationSet;
+using testing::Mock;
+using testing::Return;
+using testing::_;
+
+class OnHMIStatusNotificationFromMobileTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnHMIStatusNotificationFromMobileTest()
+ : lock_(std::make_shared<sync_primitives::Lock>()) {}
+ MessageSharedPtr CreateMsgParams(
+ const mobile_apis::HMILevel::eType kHMIState) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][strings::hmi_level] = kHMIState;
+ return msg;
+ }
+ ApplicationSet app_set_;
+ std::shared_ptr<sync_primitives::Lock> lock_;
+};
+
+TEST_F(OnHMIStatusNotificationFromMobileTest,
+ Run_CurrentStateForeground_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_foreground(true));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
+
+ DataAccessor<ApplicationSet> accessor(app_set_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+
+ EXPECT_CALL(*mock_app, protocol_version())
+ .WillRepeatedly(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ EXPECT_CALL(*mock_app, is_foreground()).WillRepeatedly(Return(true));
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnHMIStatusNotificationFromMobileTest, Run_InvalidApp_NoNotification) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+ EXPECT_CALL(*mock_app, set_foreground(true)).Times(0);
+
+ EXPECT_CALL(*mock_app, device()).Times(0);
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).Times(0);
+
+ EXPECT_CALL(app_mngr_, applications()).Times(0);
+
+ EXPECT_CALL(*mock_app, protocol_version()).Times(0);
+ EXPECT_CALL(*mock_app, is_foreground()).Times(0);
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnHMIStatusNotificationFromMobileTest,
+ Run_CurrentStateNotForeground_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_foreground(false));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
+
+ DataAccessor<ApplicationSet> accessor(app_set_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+
+ EXPECT_CALL(*mock_app, protocol_version())
+ .WillRepeatedly(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ EXPECT_CALL(*mock_app, is_foreground()).WillRepeatedly(Return(true));
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnHMIStatusNotificationFromMobileTest,
+ Run_ProtocolVersionKV3_NoNotification) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_foreground(false));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
+
+ DataAccessor<ApplicationSet> accessor(app_set_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).Times(0);
+
+ EXPECT_CALL(*mock_app, protocol_version())
+ .WillOnce(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3));
+ EXPECT_CALL(*mock_app, is_foreground()).Times(0);
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnHMIStatusNotificationFromMobileTest,
+ Run_AppNotRequestedBeforeAndKV3_NoNotification) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_foreground(true));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(false));
+
+ EXPECT_CALL(app_mngr_, applications()).Times(0);
+
+ EXPECT_CALL(*mock_app, protocol_version())
+ .WillOnce(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3));
+ EXPECT_CALL(*mock_app, is_foreground()).Times(0);
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnHMIStatusNotificationFromMobileTest,
+ Run_AppNotRequestedBefore_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_foreground(true));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(false));
+
+ EXPECT_CALL(*mock_app, protocol_version())
+ .WillOnce(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+
+ EXPECT_CALL(app_mngr_, applications()).Times(0);
+
+ EXPECT_CALL(*mock_app, is_foreground()).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_message_helper_, SendQueryApps(kConnectionKey, _));
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnHMIStatusNotificationFromMobileTest,
+ Run_AnotherForegroundSDLApp_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotificationFromMobile> command =
+ CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, set_foreground(true));
+
+ EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
+ EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
+
+ DataAccessor<ApplicationSet> accessor(app_set_, lock_);
+ EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
+
+ EXPECT_CALL(*mock_app, protocol_version())
+ .WillRepeatedly(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+ EXPECT_CALL(*mock_app, is_foreground()).WillRepeatedly(Return(false));
+
+ EXPECT_CALL(app_mngr_, MarkAppsGreyOut(kHandle, false));
+ EXPECT_CALL(app_mngr_, SendUpdateAppList());
+
+ command->Run();
+
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+} // namespace on_hmi_status_notification_from_mobile
+} // 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_hmi_status_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_test.cc
new file mode 100644
index 0000000000..afb1574cbf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_test.cc
@@ -0,0 +1,166 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "mobile/on_hmi_status_notification.h"
+#include "application_manager/test/include/application_manager/commands/commands_test.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/commands/command_impl.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_hmi_status_notification {
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+} // namespace
+
+namespace strings = application_manager::strings;
+using sdl_rpc_plugin::commands::OnHMIStatusNotification;
+using protocol_handler::MajorProtocolVersion;
+using application_manager::MockMessageHelper;
+using application_manager::commands::CommandImpl;
+using testing::Mock;
+using testing::Return;
+using testing::_;
+
+class OnHMIStatusNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateMsgParams(
+ const mobile_apis::HMILevel::eType kHMIState) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][strings::hmi_level] = kHMIState;
+ return msg;
+ }
+
+ void SetSendNotificationExpectations(MessageSharedPtr& msg) {
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
+ .WillOnce(Return(false));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _));
+ }
+
+ void VerifySendNotificationData(MessageSharedPtr& msg) {
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+ ASSERT_EQ(CommandImpl::mobile_protocol_type_,
+ (*msg)[strings::params][strings::protocol_type].asInt());
+ ASSERT_EQ(CommandImpl::protocol_version_,
+ (*msg)[strings::params][strings::protocol_version].asInt());
+ }
+};
+
+TEST_F(OnHMIStatusNotificationTest, Run_InvalidApp_NoNotification) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotification> command =
+ CreateCommand<OnHMIStatusNotification>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+
+ EXPECT_CALL(*mock_app, tts_properties_in_full()).Times(0);
+ EXPECT_CALL(*mock_app, set_tts_properties_in_full(_)).Times(0);
+ EXPECT_CALL(*mock_app, app_id()).Times(0);
+ EXPECT_CALL(app_mngr_, AddAppToTTSGlobalPropertiesList(kConnectionKey))
+ .Times(0);
+
+ command->Run();
+}
+
+TEST_F(OnHMIStatusNotificationTest, Run_InvalidEnum_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::INVALID_ENUM);
+
+ SharedPtr<OnHMIStatusNotification> command =
+ CreateCommand<OnHMIStatusNotification>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ SetSendNotificationExpectations(msg);
+
+ command->Run();
+
+ VerifySendNotificationData(msg);
+}
+
+TEST_F(OnHMIStatusNotificationTest, Run_FullAndFalseProperties_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotification> command =
+ CreateCommand<OnHMIStatusNotification>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, tts_properties_in_full()).WillOnce(Return(false));
+ EXPECT_CALL(*mock_app, set_tts_properties_in_full(true));
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(app_mngr_, AddAppToTTSGlobalPropertiesList(kConnectionKey));
+
+ SetSendNotificationExpectations(msg);
+
+ command->Run();
+
+ VerifySendNotificationData(msg);
+}
+
+TEST_F(OnHMIStatusNotificationTest, Run_FullAndTrueProperties_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
+
+ SharedPtr<OnHMIStatusNotification> command =
+ CreateCommand<OnHMIStatusNotification>(msg);
+
+ MockAppPtr mock_app = CreateMockApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, tts_properties_in_full()).WillOnce(Return(true));
+
+ SetSendNotificationExpectations(msg);
+
+ command->Run();
+
+ VerifySendNotificationData(msg);
+}
+
+} // namespace on_hmi_status_notification
+} // 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_keyboard_input_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_keyboard_input_notification_test.cc
new file mode 100644
index 0000000000..ebfc2256ac
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_keyboard_input_notification_test.cc
@@ -0,0 +1,167 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "mobile/on_keyboard_input_notification.h"
+#include "application_manager/commands/commands_test.h"
+#include <application_manager/smart_object_keys.h>
+#include "application_manager/message.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/commands/command_impl.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_keyboard_input_notification {
+
+namespace strings = application_manager::strings;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+} // namespace
+
+using sdl_rpc_plugin::commands::mobile::OnKeyBoardInputNotification;
+using application_manager::MockMessageHelper;
+using application_manager::commands::CommandImpl;
+using application_manager::ApplicationSet;
+using testing::Mock;
+using testing::Return;
+using testing::_;
+
+class OnKeyBoardInputNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnKeyBoardInputNotificationTest()
+ : lock_(std::make_shared<sync_primitives::Lock>()) {}
+ void SetSendNotificationExpectations(MessageSharedPtr msg) {
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _));
+ }
+
+ void SetSendNotificationVariables(MessageSharedPtr msg) {
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+ ASSERT_EQ(CommandImpl::mobile_protocol_type_,
+ (*msg)[strings::params][strings::protocol_type].asInt());
+ ASSERT_EQ(CommandImpl::protocol_version_,
+ (*msg)[strings::params][strings::protocol_version].asInt());
+ }
+
+ MockAppPtr InitAppSetDataAccessor(SharedPtr<ApplicationSet>& app_set) {
+ app_set = (!app_set ? ::utils::MakeShared<ApplicationSet>() : app_set);
+ MockAppPtr app(CreateMockApp());
+ app_set->insert(app);
+ EXPECT_CALL(app_mngr_, applications())
+ .WillOnce(Return(DataAccessor<ApplicationSet>(*app_set, lock_)));
+ return app;
+ }
+
+ SharedPtr<ApplicationSet> app_set_;
+ std::shared_ptr<sync_primitives::Lock> lock_;
+};
+
+TEST_F(OnKeyBoardInputNotificationTest, Run_ActionActive_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<OnKeyBoardInputNotification> command =
+ CreateCommand<OnKeyBoardInputNotification>(msg);
+
+ MockAppPtr mock_app(InitAppSetDataAccessor(app_set_));
+ EXPECT_CALL(*mock_app, is_perform_interaction_active()).WillOnce(Return(1));
+ EXPECT_CALL(*mock_app, perform_interaction_layout())
+ .WillOnce(Return(mobile_apis::LayoutMode::KEYBOARD));
+ EXPECT_CALL(*mock_app, hmi_level()).Times(0);
+
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey));
+
+ SetSendNotificationExpectations(msg);
+
+ command->Run();
+
+ SetSendNotificationVariables(msg);
+
+ ASSERT_EQ(kConnectionKey,
+ (*msg)[strings::params][strings::connection_key].asInt());
+}
+
+TEST_F(OnKeyBoardInputNotificationTest, Run_ActionNotActive_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<OnKeyBoardInputNotification> command =
+ CreateCommand<OnKeyBoardInputNotification>(msg);
+
+ MockAppPtr mock_app(InitAppSetDataAccessor(app_set_));
+ EXPECT_CALL(*mock_app, is_perform_interaction_active())
+ .WillRepeatedly(Return(0));
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::eType::HMI_FULL));
+
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey));
+
+ SetSendNotificationExpectations(msg);
+
+ command->Run();
+
+ SetSendNotificationVariables(msg);
+
+ ASSERT_EQ(kConnectionKey,
+ (*msg)[strings::params][strings::connection_key].asInt());
+}
+
+TEST_F(OnKeyBoardInputNotificationTest, Run_InvalidApp_NoNotification) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<OnKeyBoardInputNotification> command =
+ CreateCommand<OnKeyBoardInputNotification>(msg);
+
+ MockAppPtr mock_app(InitAppSetDataAccessor(app_set_));
+ EXPECT_CALL(*mock_app, is_perform_interaction_active())
+ .WillRepeatedly(Return(0));
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::eType::HMI_BACKGROUND));
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _)).Times(0);
+
+ command->Run();
+}
+
+} // namespace on_keyboard_input_notification
+} // 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_system_request_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc
new file mode 100644
index 0000000000..d6e1b2fe52
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc
@@ -0,0 +1,273 @@
+/*
+ * 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 <string>
+
+#include "gtest/gtest.h"
+#include "mobile/on_system_request_notification.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_system_request_notification {
+
+namespace strings = application_manager::strings;
+
+using sdl_rpc_plugin::commands::mobile::OnSystemRequestNotification;
+using application_manager::commands::CommandImpl;
+using application_manager::MockMessageHelper;
+using test::components::policy_test::MockPolicyHandlerInterface;
+using namespace mobile_apis;
+using testing::SaveArg;
+using testing::Mock;
+using testing::Return;
+using testing::ReturnRef;
+using testing::_;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const std::string kPolicyAppId = "fake-app-id";
+} // namespace
+
+class OnSystemRequestNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnSystemRequestNotificationTest() : mock_app_(CreateMockApp()) {}
+
+ void PreConditions() {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ }
+
+ protected:
+ MockAppPtr mock_app_;
+};
+
+TEST_F(OnSystemRequestNotificationTest, Run_ProprietaryType_SUCCESS) {
+ const mobile_apis::RequestType::eType request_type =
+ mobile_apis::RequestType::PROPRIETARY;
+
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][strings::request_type] = request_type;
+
+ SharedPtr<OnSystemRequestNotification> command =
+ CreateCommand<OnSystemRequestNotification>(msg);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+
+ EXPECT_CALL(*mock_app_, policy_app_id()).WillOnce(Return(kPolicyAppId));
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestTypeAllowed(kPolicyAppId, request_type))
+ .WillRepeatedly(Return(true));
+
+#ifdef PROPRIETARY_MODE
+ EXPECT_CALL(mock_policy_handler_, TimeoutExchangeSec()).WillOnce(Return(5u));
+#endif // PROPRIETARY_MODE
+
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _));
+
+ command->Run();
+
+ ASSERT_EQ(FileType::JSON,
+ (*msg)[strings::msg_params][strings::file_type].asInt());
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+ ASSERT_EQ(CommandImpl::mobile_protocol_type_,
+ (*msg)[strings::params][strings::protocol_type].asInt());
+ ASSERT_EQ(CommandImpl::protocol_version_,
+ (*msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(OnSystemRequestNotificationTest, Run_HTTPType_SUCCESS) {
+ const mobile_apis::RequestType::eType request_type =
+ mobile_apis::RequestType::HTTP;
+
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][strings::request_type] = request_type;
+
+ SharedPtr<OnSystemRequestNotification> command =
+ CreateCommand<OnSystemRequestNotification>(msg);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, policy_app_id()).WillOnce(Return(kPolicyAppId));
+ EXPECT_CALL(mock_policy_handler_, IsRequestTypeAllowed(_, _))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _));
+
+ command->Run();
+
+ ASSERT_EQ(FileType::BINARY,
+ (*msg)[strings::msg_params][strings::file_type].asInt());
+ ASSERT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+ ASSERT_EQ(CommandImpl::mobile_protocol_type_,
+ (*msg)[strings::params][strings::protocol_type].asInt());
+ ASSERT_EQ(CommandImpl::protocol_version_,
+ (*msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(OnSystemRequestNotificationTest, Run_InvalidApp_NoNotification) {
+ const mobile_apis::RequestType::eType request_type =
+ mobile_apis::RequestType::HTTP;
+
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][strings::request_type] = request_type;
+
+ SharedPtr<OnSystemRequestNotification> command =
+ CreateCommand<OnSystemRequestNotification>(msg);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+ EXPECT_CALL(*mock_app_, policy_app_id()).Times(0);
+ EXPECT_CALL(mock_policy_handler_, IsRequestTypeAllowed(_, _)).Times(0);
+
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(OnSystemRequestNotificationTest, Run_RequestNotAllowed_NoNotification) {
+ const mobile_apis::RequestType::eType request_type =
+ mobile_apis::RequestType::HTTP;
+
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg)[strings::msg_params][strings::request_type] = request_type;
+
+ SharedPtr<OnSystemRequestNotification> command =
+ CreateCommand<OnSystemRequestNotification>(msg);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, policy_app_id()).WillOnce(Return(kPolicyAppId));
+ EXPECT_CALL(mock_policy_handler_, IsRequestTypeAllowed(_, _))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, _)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(
+ OnSystemRequestNotificationTest,
+ Run_RequestTypeAllowedAndRequestSubTypeDisallowed_MessageNotSentToMobile) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ const auto request_type = mobile_apis::RequestType::HTTP;
+ (*msg)[strings::msg_params][strings::request_type] = request_type;
+ const std::string request_subtype = "fakeSubType";
+ (*msg)[am::strings::msg_params][am::strings::request_subtype] =
+ request_subtype;
+
+ PreConditions();
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestTypeAllowed(kPolicyAppId, request_type))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestSubTypeAllowed(kPolicyAppId, request_subtype))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, _)).Times(0);
+
+ auto command = CreateCommand<OnSystemRequestNotification>(msg);
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(OnSystemRequestNotificationTest,
+ Run_RequestTypeAllowedAndRequestSubTypeAllowed_SendMessageToMobile) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::connection_key] = kConnectionKey;
+ const auto request_type = mobile_apis::RequestType::OEM_SPECIFIC;
+ (*msg)[strings::msg_params][strings::request_type] = request_type;
+ const std::string request_subtype = "fakeSubType";
+ (*msg)[am::strings::msg_params][am::strings::request_subtype] =
+ request_subtype;
+
+ PreConditions();
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestTypeAllowed(kPolicyAppId, request_type))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestSubTypeAllowed(kPolicyAppId, request_subtype))
+ .WillOnce(Return(true));
+
+ smart_objects::SmartObjectSPtr result;
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, _))
+ .WillOnce((SaveArg<0>(&result)));
+
+ auto command = CreateCommand<OnSystemRequestNotification>(msg);
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ EXPECT_EQ(application_manager::MessageType::kNotification,
+ (*result)[strings::params][strings::message_type].asInt());
+ EXPECT_EQ(request_type,
+ (*result)[strings::msg_params][strings::request_type].asInt());
+ EXPECT_EQ(
+ request_subtype,
+ (*result)[strings::msg_params][strings::request_subtype].asString());
+}
+
+} // namespace on_system_request_notification
+} // 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_tbt_client_state_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_tbt_client_state_notification_test.cc
new file mode 100644
index 0000000000..14939a433d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_tbt_client_state_notification_test.cc
@@ -0,0 +1,138 @@
+/*
+ * 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 <stdint.h>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "mobile/on_tbt_client_state_notification.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "utils/helpers.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_tbt_client_state_notification {
+
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::Return;
+
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::OnTBTClientStateNotification;
+
+typedef ::utils::SharedPtr<OnTBTClientStateNotification> NotificationPtr;
+
+namespace {
+const uint32_t kAppId = 1u;
+} // namespace
+
+class OnTBTClientStateNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnTBTClientStateNotificationTest()
+ : command_(CreateCommand<OnTBTClientStateNotification>()) {}
+
+ NotificationPtr command_;
+};
+
+TEST_F(OnTBTClientStateNotificationTest, Run_HmiLevelNone_UNSUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ std::vector<ApplicationSharedPtr> applications_with_navi;
+ applications_with_navi.push_back(mock_app);
+
+ EXPECT_CALL(app_mngr_, applications_with_navi())
+ .WillOnce(Return(applications_with_navi));
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
+
+ EXPECT_CALL(*mock_app, app_id()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, _)).Times(0);
+
+ command_->Run();
+}
+
+MATCHER(CheckMessageData, "") {
+ const bool kIsMobileProtocolTypeCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ am::commands::CommandImpl::mobile_protocol_type_;
+
+ const bool kIsProtocolVersionCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ am::commands::CommandImpl::protocol_version_;
+
+ const bool kIsNotificationCorrect =
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ am::MessageType::kNotification;
+
+ const bool kIsConnectionKeyCorrect =
+ (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
+ kAppId;
+
+ using namespace helpers;
+ return Compare<bool, EQ, ALL>(true,
+ kIsMobileProtocolTypeCorrect,
+ kIsProtocolVersionCorrect,
+ kIsNotificationCorrect,
+ kIsConnectionKeyCorrect);
+}
+
+TEST_F(OnTBTClientStateNotificationTest,
+ Run_NotEmptyListOfAppsWithNavi_SUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ std::vector<ApplicationSharedPtr> applications_with_navi;
+ applications_with_navi.push_back(mock_app);
+
+ EXPECT_CALL(app_mngr_, applications_with_navi())
+ .WillOnce(Return(applications_with_navi));
+
+ EXPECT_CALL(*mock_app, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
+
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(CheckMessageData(), _));
+
+ command_->Run();
+}
+
+} // namespace on_tbt_client_state_notification
+} // 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_touch_event_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_touch_event_notification_test.cc
new file mode 100644
index 0000000000..4576637d8d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_touch_event_notification_test.cc
@@ -0,0 +1,148 @@
+/*
+ * 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 <stdint.h>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "mobile/on_touch_event_notification.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "utils/helpers.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_touch_event_notification {
+
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::Return;
+
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::mobile::OnTouchEventNotification;
+
+typedef ::utils::SharedPtr<OnTouchEventNotification> NotificationPtr;
+
+namespace {
+const uint32_t kAppId = 1u;
+} // namespace
+
+class OnTouchEventNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnTouchEventNotificationTest()
+ : command_(CreateCommand<OnTouchEventNotification>()) {}
+
+ NotificationPtr command_;
+};
+
+TEST_F(OnTouchEventNotificationTest, Run_AppIsNotFullscreen_UNSUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ std::vector<ApplicationSharedPtr> applications_with_navi;
+ applications_with_navi.push_back(mock_app);
+
+ std::vector<ApplicationSharedPtr> applications_with_mobile_projection;
+ applications_with_mobile_projection.push_back(mock_app);
+
+ EXPECT_CALL(app_mngr_, applications_with_navi())
+ .WillOnce(Return(applications_with_navi));
+
+ EXPECT_CALL(app_mngr_, applications_with_mobile_projection())
+ .WillOnce(Return(applications_with_mobile_projection));
+
+ EXPECT_CALL(*mock_app, IsFullscreen()).WillRepeatedly(Return(false));
+
+ EXPECT_CALL(*mock_app, app_id()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, _)).Times(0);
+
+ command_->Run();
+}
+
+MATCHER(CheckMessageData, "") {
+ const bool kIsMobileProtocolTypeCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ am::commands::CommandImpl::mobile_protocol_type_;
+
+ const bool kIsProtocolVersionCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ am::commands::CommandImpl::protocol_version_;
+
+ const bool kIsNotificationCorrect =
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ am::MessageType::kNotification;
+
+ const bool kIsConnectionKeyCorrect =
+ (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
+ kAppId;
+
+ using namespace helpers;
+ return Compare<bool, EQ, ALL>(true,
+ kIsMobileProtocolTypeCorrect,
+ kIsProtocolVersionCorrect,
+ kIsNotificationCorrect,
+ kIsConnectionKeyCorrect);
+}
+
+TEST_F(OnTouchEventNotificationTest, Run_NotEmptyListOfAppsWithNavi_SUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ std::vector<ApplicationSharedPtr> applications_with_navi;
+ applications_with_navi.push_back(mock_app);
+
+ std::vector<ApplicationSharedPtr> applications_with_mobile_projection;
+ applications_with_mobile_projection.push_back(mock_app);
+
+ EXPECT_CALL(app_mngr_, applications_with_navi())
+ .WillOnce(Return(applications_with_navi));
+
+ EXPECT_CALL(app_mngr_, applications_with_mobile_projection())
+ .WillOnce(Return(applications_with_mobile_projection));
+
+ EXPECT_CALL(*mock_app, IsFullscreen()).WillRepeatedly(Return(true));
+
+ EXPECT_CALL(*mock_app, app_id()).WillRepeatedly(Return(kAppId));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(CheckMessageData(), _))
+ .Times(2);
+
+ command_->Run();
+}
+
+} // namespace on_touch_event_notification
+} // 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_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
new file mode 100644
index 0000000000..e0b7ab3b38
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc
@@ -0,0 +1,115 @@
+/*
+ * 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 <stdint.h>
+#include <set>
+
+#include "gtest/gtest.h"
+#include "mobile/on_way_point_change_notification.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "utils/helpers.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_way_point_change_notification {
+
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::Return;
+
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::OnWayPointChangeNotification;
+
+typedef ::utils::SharedPtr<OnWayPointChangeNotification> NotificationPtr;
+
+namespace {
+const uint32_t kAppId = 1u;
+} // namespace
+
+class OnWayPointChangeNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnWayPointChangeNotificationTest()
+ : command_(CreateCommand<OnWayPointChangeNotification>()) {}
+
+ NotificationPtr command_;
+};
+
+MATCHER(CheckMessageData, "") {
+ const bool kIsMobileProtocolTypeCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ am::commands::CommandImpl::mobile_protocol_type_;
+
+ const bool kIsProtocolVersionCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ am::commands::CommandImpl::protocol_version_;
+
+ const bool kIsNotificationCorrect =
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ am::MessageType::kNotification;
+
+ const bool kIsConnectionKeyCorrect =
+ (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
+ kAppId;
+
+ using namespace helpers;
+ return Compare<bool, EQ, ALL>(true,
+ kIsMobileProtocolTypeCorrect,
+ kIsProtocolVersionCorrect,
+ kIsNotificationCorrect,
+ kIsConnectionKeyCorrect);
+}
+
+TEST_F(OnWayPointChangeNotificationTest,
+ Run_NotEmptyListOfAppsSubscribedForWayPoints_SUCCESS) {
+ std::set<int32_t> apps_subscribed_for_way_points;
+ apps_subscribed_for_way_points.insert(kAppId);
+
+ EXPECT_CALL(app_mngr_, GetAppsSubscribedForWayPoints())
+ .WillOnce(Return(apps_subscribed_for_way_points));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(CheckMessageData(), _));
+
+ command_->Run();
+}
+
+} // namespace on_way_point_change_notification
+} // 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/perform_audio_pass_thru_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_audio_pass_thru_test.cc
new file mode 100644
index 0000000000..f06a642e3b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_audio_pass_thru_test.cc
@@ -0,0 +1,835 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/perform_audio_pass_thru_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace perform_audio_pass_thru_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::PerformAudioPassThruRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::InSequence;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 2u;
+const std::string kCorrectPrompt = "CorrectPrompt";
+const std::string kCorrectType = "CorrectType";
+const std::string kCorrectDisplayText1 = "CorrectDisplayText1";
+const std::string kCorrectDisplayText2 = "CorrectDisplayText2";
+const std::string kFunctionId = "FunctionId";
+const uint32_t kTimeoutForTTSSpeak = 1u;
+} // namespace
+
+class PerformAudioPassThruRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ PerformAudioPassThruRequestTest()
+ : mock_app_(CreateMockApp())
+ , message_(utils::MakeShared<SmartObject>(::smart_objects::SmartType_Map))
+ , msg_params_((*message_)[am::strings::msg_params]) {}
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void TestWrongSyntaxInField(const std::string& field) {
+ if (field == am::strings::initial_prompt) {
+ msg_params_[field][0][am::strings::text] = "prompt\\n";
+ } else {
+ msg_params_[field] = "prompt\\n";
+ }
+
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ CallRun caller(*command_sptr_);
+ MessageSharedPtr result_message = CatchMobileCommandResult(caller);
+
+ const am::mobile_api::Result::eType result =
+ static_cast<am::mobile_api::Result::eType>(
+ (*result_message)[am::strings::msg_params][am::strings::result_code]
+ .asInt());
+
+ EXPECT_EQ(am::mobile_api::Result::INVALID_DATA, result);
+ }
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ (*message_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ command_sptr_ = CreateCommand<PerformAudioPassThruRequest>(message_);
+
+ application_sptr_ = CreateMockApp();
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(application_sptr_));
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ sync_primitives::Lock lock_;
+ MockAppPtr mock_app_;
+ MessageSharedPtr message_;
+ ::smart_objects::SmartObject& msg_params_;
+ utils::SharedPtr<PerformAudioPassThruRequest> command_sptr_;
+ MockAppPtr application_sptr_;
+};
+
+TEST_F(PerformAudioPassThruRequestTest, OnTimeout_GENERIC_ERROR) {
+ MessageSharedPtr msg_ui = CreateMessage(smart_objects::SmartType_Map);
+ (*msg_ui)[am::strings::msg_params][am::strings::result_code] =
+ am::mobile_api::Result::GENERIC_ERROR;
+ (*msg_ui)[am::strings::msg_params][am::strings::success] = false;
+
+ MessageSharedPtr message =
+ utils::MakeShared<SmartObject>(::smart_objects::SmartType_Map);
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ utils::SharedPtr<PerformAudioPassThruRequest> command =
+ CreateCommand<PerformAudioPassThruRequest>(message);
+
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(true));
+ EXPECT_CALL(app_mngr_, StopAudioPassThru(_));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
+ .WillOnce(Return(msg_ui));
+
+ MessageSharedPtr vr_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+
+ command->onTimeOut();
+ EXPECT_EQ((*vr_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ false);
+ EXPECT_EQ(
+ (*vr_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ OnEvent_UIHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr mobile_request = CreateFullParamsUISO();
+ (*mobile_request)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ smart_objects::SmartObject initial_prompt =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ initial_prompt[0] = smart_objects::SmartObject(smart_objects::SmartType_Map);
+ initial_prompt[0][am::strings::text] = "tts chunk text";
+ initial_prompt[0][am::strings::type] = 0;
+ (*mobile_request)[am::strings::msg_params][am::strings::initial_prompt] =
+ initial_prompt;
+
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+ utils::SharedPtr<PerformAudioPassThruRequest> command =
+ CreateCommand<PerformAudioPassThruRequest>(mobile_request);
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ MessageSharedPtr response_msg_tts =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_msg_tts)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*response_msg_tts)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
+ am::event_engine::Event event_tts(hmi_apis::FunctionID::TTS_Speak);
+ event_tts.set_smart_object(*response_msg_tts);
+
+ MessageSharedPtr response_ui = CreateMessage(smart_objects::SmartType_Map);
+ (*response_ui)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*response_ui)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+ (*response_ui)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+ am::event_engine::Event event_ui(
+ hmi_apis::FunctionID::UI_PerformAudioPassThru);
+ event_ui.set_smart_object(*response_ui);
+
+ MessageSharedPtr response_to_mobile;
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ EXPECT_CALL(mock_message_helper_,
+ VerifyTtsFiles((*mobile_request)[am::strings::msg_params]
+ [am::strings::initial_prompt],
+ _,
+ _)).WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ command->Run();
+ command->on_event(event_tts);
+ command->on_event(event_ui);
+
+ EXPECT_EQ((*response_to_mobile)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ false);
+ EXPECT_EQ(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*response_to_mobile)[am::strings::msg_params][am::strings::info]
+ .asString(),
+ "UI is not supported by system");
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_InvalidApp_ApplicationNotRegisteredResponce) {
+ utils::SharedPtr<am::Application> null_application_sptr;
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(null_application_sptr));
+
+ CallRun caller(*command_sptr_);
+ MessageSharedPtr result_message = CatchMobileCommandResult(caller);
+
+ const am::mobile_api::Result::eType result =
+ static_cast<am::mobile_api::Result::eType>(
+ (*result_message)[am::strings::msg_params][am::strings::result_code]
+ .asInt());
+ EXPECT_EQ(am::mobile_api::Result::APPLICATION_NOT_REGISTERED, result);
+}
+
+TEST_F(PerformAudioPassThruRequestTest, Run_HmiLevelNone_Rejected) {
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_NONE));
+
+ CallRun caller(*command_sptr_);
+ MessageSharedPtr result_message = CatchMobileCommandResult(caller);
+
+ const am::mobile_api::Result::eType result =
+ static_cast<am::mobile_api::Result::eType>(
+ (*result_message)[am::strings::msg_params][am::strings::result_code]
+ .asInt());
+ EXPECT_EQ(am::mobile_api::Result::REJECTED, result);
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_WhitespaceInInitialPrompt_InvalidData) {
+ TestWrongSyntaxInField(am::strings::initial_prompt);
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_WhitespaceInAudioPassDisplayText1_InvalidData) {
+ TestWrongSyntaxInField(am::strings::audio_pass_display_text1);
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_WhitespaceInAudioPassDisplayText2_InvalidData) {
+ TestWrongSyntaxInField(am::strings::audio_pass_display_text2);
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_InitPromptCorrect_TTSSpeakIsAbsent) {
+ // First we need to call SendSpeakRequest()
+ // to enable the "is_active_tts_speak" key
+
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ msg_params_[am::strings::initial_prompt][0][am::strings::text] =
+ kCorrectPrompt;
+ msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
+
+ EXPECT_CALL(mock_message_helper_,
+ VerifyTtsFiles(msg_params_[am::strings::initial_prompt], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ MessageSharedPtr speak_reqeust_result_msg;
+ MessageSharedPtr perform_result_msg;
+ {
+ InSequence dummy;
+ // Send speak request sending
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
+
+ // Perform audio path thru request sending
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
+ }
+ CallRun run_caller(*command_sptr_);
+ run_caller();
+
+ const ::smart_objects::SmartObject& speak_msg_params =
+ (*speak_reqeust_result_msg)[am::strings::msg_params];
+
+ const std::string result_initial_prompt =
+ speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::text]
+ .asString();
+ const std::string result_prompt_type =
+ speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::type]
+ .asString();
+
+ EXPECT_EQ(kCorrectPrompt, result_initial_prompt);
+ EXPECT_EQ(kCorrectType, result_prompt_type);
+
+ // Now we recieve on_event()
+
+ am::event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::GENERIC_ERROR;
+ event.set_smart_object(*message_);
+
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
+
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_StopSpeaking))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ CallOnEvent on_event_caller(*command_sptr_, event);
+ MessageSharedPtr command_result = CatchHMICommandResult(on_event_caller);
+
+ const hmi_apis::FunctionID::eType result_function_id =
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*command_result)[am::strings::params][am::strings::function_id]
+ .asInt());
+
+ EXPECT_EQ(hmi_apis::FunctionID::TTS_StopSpeaking, result_function_id);
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_InitPromptCorrect_SpeakAndPerformAPTRequestsSendMuteTrue) {
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ msg_params_[am::strings::initial_prompt][0][am::strings::text] =
+ kCorrectPrompt;
+ msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
+ msg_params_[am::strings::audio_pass_display_text1] = kCorrectDisplayText1;
+ msg_params_[am::strings::audio_pass_display_text2] = kCorrectDisplayText2;
+
+ EXPECT_CALL(mock_message_helper_,
+ VerifyTtsFiles(msg_params_[am::strings::initial_prompt], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ MessageSharedPtr speak_reqeust_result_msg;
+ MessageSharedPtr perform_result_msg;
+ {
+ InSequence dummy;
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
+
+ // Perform audio path thru request sending
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
+ }
+ CallRun caller(*command_sptr_);
+ caller();
+
+ const ::smart_objects::SmartObject& speak_msg_params =
+ (*speak_reqeust_result_msg)[am::strings::msg_params];
+ const ::smart_objects::SmartObject& perform_msg_params =
+ (*perform_result_msg)[am::strings::msg_params];
+
+ const std::string result_initial_prompt =
+ speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::text]
+ .asString();
+ const std::string result_prompt_type =
+ speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::type]
+ .asString();
+ const std::string result_display_text_1 =
+ perform_msg_params[am::hmi_request::audio_pass_display_texts][0]
+ [am::hmi_request::field_text].asString();
+ const std::string result_display_text_2 =
+ perform_msg_params[am::hmi_request::audio_pass_display_texts][1]
+ [am::hmi_request::field_text].asString();
+
+ EXPECT_EQ(kCorrectPrompt, result_initial_prompt);
+ EXPECT_EQ(kCorrectType, result_prompt_type);
+ EXPECT_EQ(kCorrectDisplayText1, result_display_text_1);
+ EXPECT_EQ(kCorrectDisplayText2, result_display_text_2);
+
+ EXPECT_EQ(true, perform_msg_params[am::strings::mute_audio].asBool());
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ Run_InitPromptCorrect_SpeakAndPerformAPTRequestsSendMuteFalse) {
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ msg_params_[am::strings::initial_prompt][0][am::strings::text] =
+ kCorrectPrompt;
+ msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
+
+ EXPECT_CALL(mock_message_helper_,
+ VerifyTtsFiles(msg_params_[am::strings::initial_prompt], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ const bool muted = false;
+
+ msg_params_[am::strings::mute_audio] = muted;
+
+ MessageSharedPtr speak_reqeust_result_msg;
+ MessageSharedPtr perform_result_msg;
+ {
+ InSequence dummy;
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
+
+ // Perform audio path thru request sending
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
+ }
+ CallRun caller(*command_sptr_);
+ caller();
+
+ EXPECT_EQ(
+ muted,
+ (*perform_result_msg)[am::strings::msg_params][am::strings::mute_audio]
+ .asBool());
+}
+
+TEST_F(
+ PerformAudioPassThruRequestTest,
+ Run_InitPromptEmpty_PerformAndRecordStartNotificationsAndStartRecording) {
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ MessageSharedPtr start_record_result_msg;
+ MessageSharedPtr perform_result_msg;
+ {
+ InSequence dummy;
+
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ // Perform audio path thru request sending
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
+
+ // Perform audio path thru request sending
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_OnRecordStart))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ // Start recording notification sending
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&start_record_result_msg), Return(true)));
+ }
+
+ // Start microphone recording cals
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id));
+ EXPECT_CALL(app_mngr_, StartAudioPassThruThread(_, _, _, _, _, _));
+
+ CallRun caller(*command_sptr_);
+ caller();
+
+ const hmi_apis::FunctionID::eType start_record_result_function_id =
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*start_record_result_msg)[am::strings::params]
+ [am::strings::function_id].asInt());
+ EXPECT_EQ(hmi_apis::FunctionID::UI_OnRecordStart,
+ start_record_result_function_id);
+}
+
+TEST_F(PerformAudioPassThruRequestTest, OnEvent_UIPAPT_Rejected) {
+ am::event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
+
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::REJECTED;
+ event.set_smart_object(*message_);
+
+ CallOnEvent caller(*command_sptr_, event);
+
+ MessageSharedPtr result_message = CatchMobileCommandResult(caller);
+
+ const am::mobile_api::Result::eType result_code =
+ static_cast<am::mobile_api::Result::eType>(
+ (*result_message)[am::strings::msg_params][am::strings::result_code]
+ .asInt());
+
+ EXPECT_EQ(am::mobile_api::Result::REJECTED, result_code);
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ OnEvent_TTSSpeakSuccess_UpdateRequestTimeout) {
+ am::event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
+
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ event.set_smart_object(*message_);
+
+ // Start recording notification sending
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ // Start microphone recording cals
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id));
+ EXPECT_CALL(app_mngr_, StartAudioPassThruThread(_, _, _, _, _, _));
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
+
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ CallOnEvent caller(*command_sptr_, event);
+ caller();
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ DISABLED_OnEvent_PAPTunsupportedResource_CorrectInfo) {
+ const std::string return_info = "Unsupported phoneme type sent in a prompt";
+
+ am::event_engine::Event event_speak(hmi_apis::FunctionID::TTS_Speak);
+ am::event_engine::Event event_perform(
+ hmi_apis::FunctionID::UI_PerformAudioPassThru);
+
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ event_speak.set_smart_object(*message_);
+
+ (*message_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ event_perform.set_smart_object(*message_);
+
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ // First call on_event for setting result_tts_speak_ to UNSUPPORTED_RESOURCE
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
+ CallOnEvent caller_speak(*command_sptr_, event_speak);
+ caller_speak();
+
+ // Second call for test correct behavior of UI_PerformAudioPassThru event
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
+ EXPECT_CALL(app_mngr_, StopAudioPassThru(_)).Times(0);
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ CallOnEvent caller_perform(*command_sptr_, event_perform);
+
+ MessageSharedPtr perform_event_result =
+ CatchMobileCommandResult(caller_perform);
+
+ EXPECT_EQ(return_info,
+ (*perform_event_result)[am::strings::msg_params][am::strings::info]
+ .asString());
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ DISABLED_OnEvent_TTSSpeak_UpdateTimeout) {
+ am::event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
+
+ msg_params_[am::strings::connection_key] = kConnectionKey;
+ msg_params_[am::strings::function_id] = kFunctionId;
+ msg_params_[am::strings::correlation_id] = kCorrelationId;
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id)).WillOnce(Return(true));
+
+ EXPECT_CALL(
+ app_mngr_,
+ StartAudioPassThruThread(kConnectionKey, kCorrelationId, _, _, _, _));
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ CallOnEvent caller(*command_sptr_, event);
+ caller();
+
+ EXPECT_EQ(kConnectionKey, msg_params_[am::strings::connection_key].asUInt());
+ EXPECT_EQ(kFunctionId, msg_params_[am::strings::function_id].asString());
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ DISABLED_OnEvent_TTSOnResetTimeout_UpdateTimeout) {
+ am::event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+
+ msg_params_[am::strings::connection_key] = kConnectionKey;
+ msg_params_[am::strings::function_id] = kFunctionId;
+
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+ EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id)).WillOnce(Return(true));
+
+ EXPECT_CALL(
+ app_mngr_,
+ StartAudioPassThruThread(kConnectionKey, kCorrelationId, _, _, _, _));
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ CallOnEvent caller(*command_sptr_, event);
+ caller();
+
+ EXPECT_EQ(kConnectionKey, msg_params_[am::strings::connection_key].asUInt());
+ EXPECT_EQ(kFunctionId, msg_params_[am::strings::function_id].asString());
+}
+
+TEST_F(PerformAudioPassThruRequestTest, OnEvent_DefaultCase) {
+ am::event_engine::Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).Times(0);
+
+ CallOnEvent caller(*command_sptr_, event);
+ caller();
+}
+
+TEST_F(PerformAudioPassThruRequestTest, Init_CorrectTimeout) {
+ const uint32_t kDefaultTimeout = command_sptr_->default_timeout();
+ const uint32_t kMaxDuration = 10000u;
+
+ msg_params_[am::strings::max_duration] = kMaxDuration;
+
+ command_sptr_->Init();
+
+ EXPECT_EQ(kDefaultTimeout + kMaxDuration, command_sptr_->default_timeout());
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ onTimeOut_ttsSpeakNotActive_DontSendHMIReqeust) {
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(true));
+ EXPECT_CALL(app_mngr_, StopAudioPassThru(_));
+
+ // For setting current_state_ -> kCompleted
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ command_sptr_->SendResponse(true, am::mobile_api::Result::SUCCESS);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+
+ command_sptr_->onTimeOut();
+}
+
+TEST_F(PerformAudioPassThruRequestTest,
+ DISABLED_onTimeOut_ttsSpeakActive_SendHMIReqeust) {
+ uint32_t app_id = kConnectionKey;
+ EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(true));
+ EXPECT_CALL(app_mngr_, StopAudioPassThru(_));
+
+ EXPECT_CALL(*application_sptr_, hmi_level())
+ .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
+
+ msg_params_[am::strings::initial_prompt][0][am::strings::text] =
+ kCorrectPrompt;
+ msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
+
+ EXPECT_CALL(mock_message_helper_,
+ VerifyTtsFiles(msg_params_[am::strings::initial_prompt], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ MessageSharedPtr speak_reqeust_result_msg;
+ MessageSharedPtr perform_result_msg;
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
+
+ // Perform audio path thru request sending
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
+ .WillOnce(Return(msg));
+
+ // For setting is_active_tts_speak -> true
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .Times(2)
+ .WillRepeatedly(Return(false));
+ CallRun caller(*command_sptr_);
+ caller();
+
+ // For setting current_state_ -> kCompleted
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL));
+ command_sptr_->SendResponse(true, am::mobile_api::Result::SUCCESS);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
+ .WillOnce(Return(false));
+
+ command_sptr_->onTimeOut();
+}
+
+} // namespace perform_audio_pass_thru_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_interaction_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_interaction_test.cc
new file mode 100644
index 0000000000..2ffe9195b6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/perform_interaction_test.cc
@@ -0,0 +1,264 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/perform_interaction_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/helpers.h"
+#include "utils/make_shared.h"
+#include "smart_objects/smart_object.h"
+#include "utils/custom_string.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace perform_interaction_request {
+
+namespace am = application_manager;
+using am::commands::CommandImpl;
+using am::ApplicationManager;
+using am::commands::MessageSharedPtr;
+using am::ApplicationSharedPtr;
+using am::MockMessageHelper;
+using ::testing::_;
+using ::utils::SharedPtr;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using sdl_rpc_plugin::commands::PerformInteractionRequest;
+using ::test::components::application_manager_test::MockApplication;
+
+namespace strings = ::application_manager::strings;
+namespace hmi_response = ::application_manager::hmi_response;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class PerformInteractionRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ PerformInteractionRequestTest() : mock_app_(CreateMockApp()) {}
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ sync_primitives::Lock lock_;
+ MockAppPtr mock_app_;
+};
+
+TEST_F(PerformInteractionRequestTest, OnTimeout_VR_GENERIC_ERROR) {
+ MessageSharedPtr response_msg_vr =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_msg_vr)[strings::params][hmi_response::code] =
+ static_cast<uint64_t>(hmi_apis::Common_Result::SUCCESS);
+ (*response_msg_vr)[strings::msg_params][strings::info] = "info";
+ MessageSharedPtr request_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*request_msg)[strings::msg_params][strings::interaction_mode] =
+ mobile_apis::InteractionMode::BOTH;
+ utils::SharedPtr<PerformInteractionRequest> command =
+ CreateCommand<PerformInteractionRequest>(request_msg);
+ MockAppPtr mock_app;
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+
+ Event event(hmi_apis::FunctionID::VR_PerformInteraction);
+ event.set_smart_object(*response_msg_vr);
+
+ command->Init();
+ command->on_event(event);
+ MessageSharedPtr response_to_mobile =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_to_mobile)[strings::msg_params][strings::result_code] =
+ static_cast<uint64_t>(am::mobile_api::Result::GENERIC_ERROR);
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
+ .WillOnce(Return(response_to_mobile));
+
+ MessageSharedPtr vr_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+ command->onTimeOut();
+
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::success].asBool(),
+ false);
+ EXPECT_EQ(
+ (*vr_command_result)[strings::msg_params][strings::result_code].asInt(),
+ static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
+}
+
+TEST_F(PerformInteractionRequestTest,
+ OnEvent_VRHmiSendSuccess_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_from_mobile =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*msg_from_mobile)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg_from_mobile)[strings::msg_params][strings::interaction_mode] =
+ mobile_apis::InteractionMode::VR_ONLY;
+ utils::SharedPtr<PerformInteractionRequest> command =
+ CreateCommand<PerformInteractionRequest>(msg_from_mobile);
+ command->Init();
+
+ MockAppPtr mock_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app));
+
+ MessageSharedPtr response_msg_vr =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_msg_vr)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*response_msg_vr)[strings::msg_params][strings::cmd_id] = kCommandId;
+ (*response_msg_vr)[am::strings::msg_params][am::strings::info] =
+ "VR is not supported by system";
+
+ am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_PerformInteraction);
+ event_vr.set_smart_object(*response_msg_vr);
+
+ MessageSharedPtr response_msg_ui =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_msg_ui)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_PerformInteraction);
+ event_ui.set_smart_object(*response_msg_ui);
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_vr);
+ command->on_event(event_ui);
+
+ ResultCommandExpectations(response_to_mobile,
+ "VR is not supported by system");
+}
+
+TEST_F(PerformInteractionRequestTest,
+ OnEvent_UIHmiSendSuccess_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_from_mobile =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*msg_from_mobile)[strings::params][strings::connection_key] = kConnectionKey;
+ (*msg_from_mobile)[strings::msg_params][strings::interaction_mode] =
+ mobile_apis::InteractionMode::VR_ONLY;
+ utils::SharedPtr<PerformInteractionRequest> command =
+ CreateCommand<PerformInteractionRequest>(msg_from_mobile);
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ MessageSharedPtr response_msg_vr =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_msg_vr)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_PerformInteraction);
+ event_vr.set_smart_object(*response_msg_vr);
+
+ MessageSharedPtr response_msg_ui =
+ CreateMessage(smart_objects::SmartType_Map);
+ (*response_msg_ui)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*response_msg_ui)[strings::msg_params][strings::cmd_id] = kCommandId;
+ (*response_msg_ui)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+
+ am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_PerformInteraction);
+ event_ui.set_smart_object(*response_msg_ui);
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_vr);
+
+ EXPECT_CALL(*mock_app_, is_perform_interaction_active())
+ .WillOnce(Return(false));
+ EXPECT_CALL(*mock_app_, DeletePerformInteractionChoiceSet(_));
+
+ command->on_event(event_ui);
+
+ ResultCommandExpectations(response_to_mobile,
+ "UI is not supported by system");
+}
+
+} // namespace perform_interaction_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/put_file_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/put_file_test.cc
new file mode 100644
index 0000000000..c5feeeba25
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/put_file_test.cc
@@ -0,0 +1,407 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+
+#include "mobile/put_file_response.h"
+#include "mobile/put_file_request.h"
+
+#include "utils/make_shared.h"
+#include "utils/file_system.h"
+#include "smart_objects/smart_object.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace put_file {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::AtLeast;
+
+namespace am = ::application_manager;
+
+using sdl_rpc_plugin::commands::PutFileRequest;
+using sdl_rpc_plugin::commands::PutFileResponse;
+using am::commands::MessageSharedPtr;
+using policy_test::MockPolicyHandlerInterface;
+
+typedef SharedPtr<PutFileRequest> PutFileRequestPtr;
+typedef SharedPtr<PutFileResponse> PutFileResponsePtr;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const std::string kFileName = "sync_file_name.txt";
+const int64_t kOffset = 10u;
+const int64_t kZeroOffset = 0u;
+const std::string kStorageFolder = "./storage";
+const std::string kFolder = "folder";
+const std::string kAppFolder = "app_folder";
+}
+
+class PutFileRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ PutFileRequestTest()
+ : msg_(CreateMessage(::smart_objects::SmartType_Map))
+ , mock_app_(CreateMockApp()) {}
+
+ void SetUp() OVERRIDE {
+ binary_data_.push_back(1u);
+
+ (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg_)[am::strings::msg_params][am::strings::sync_file_name] = kFileName;
+ (*msg_)[am::strings::msg_params][am::strings::persistent_file] = true;
+ (*msg_)[am::strings::msg_params][am::strings::file_type] =
+ mobile_apis::FileType::JSON;
+ (*msg_)[am::strings::params][am::strings::binary_data] = binary_data_;
+
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, hmi_level())
+ .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
+ }
+
+ void ExpectReceiveMessageFromSDK() {
+ EXPECT_CALL(mock_policy_handler_,
+ ReceiveMessageFromSDK(kFileName, binary_data_))
+ .WillOnce(Return(false));
+ }
+ void ExpectManageMobileCommandWithResultCode(
+ const mobile_apis::Result::eType code) {
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(code),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ }
+
+ MessageSharedPtr msg_;
+ MockAppPtr mock_app_;
+ std::vector<uint8_t> binary_data_;
+};
+
+class PutFileResponceTest : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ PutFileResponceTest() : message_(CreateMessage()) {}
+
+ void SetUp() OVERRIDE {
+ command_sptr_ = CreateCommand<PutFileResponse>(message_);
+ }
+
+ MessageSharedPtr message_;
+ SharedPtr<PutFileResponse> command_sptr_;
+};
+
+TEST_F(PutFileResponceTest, Run_InvalidApp_ApplicationNotRegisteredResponce) {
+ ::smart_objects::SmartObject& message_ref = *message_;
+
+ message_ref[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ utils::SharedPtr<am::Application> null_application_sptr;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(null_application_sptr));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(
+ MobileResultCodeIs(mobile_apis::Result::APPLICATION_NOT_REGISTERED),
+ _));
+ command_sptr_->Run();
+}
+
+TEST_F(PutFileResponceTest, Run_ApplicationRegistered_Success) {
+ ::smart_objects::SmartObject& message_ref = *message_;
+
+ message_ref[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ message_ref[am::strings::msg_params][am::strings::success] = true;
+
+ utils::SharedPtr<am::Application> application_sptr =
+ utils::MakeShared<MockApplication>();
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(application_sptr));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
+ command_sptr_->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+ ExpectManageMobileCommandWithResultCode(
+ mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_HmiLevelNone_UNSUCCESS) {
+ EXPECT_CALL(*mock_app_, hmi_level())
+ .WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
+
+ const uint32_t settings_put_file_in_none = 1u;
+ const uint32_t app_put_file_in_none_count = 2u;
+ EXPECT_CALL(app_mngr_settings_, put_file_in_none())
+ .WillOnce(ReturnRef(settings_put_file_in_none));
+ EXPECT_CALL(*mock_app_, put_file_in_none_count())
+ .WillOnce(Return(app_put_file_in_none_count));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::REJECTED);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_BinaryDataDoesNotExists_UNSUCCESS) {
+ (*msg_)[am::strings::params].erase(am::strings::binary_data);
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_SyncFileNameDoesNotExists_UNSUCCESS) {
+ (*msg_)[am::strings::msg_params].erase(am::strings::sync_file_name);
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_FileTypeDoesNotExists_UNSUCCESS) {
+ (*msg_)[am::strings::msg_params].erase(am::strings::file_type);
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_BinaryDataGreaterThanAvaliableSpace_UNSUCCESS) {
+ (*msg_)[am::strings::msg_params][am::strings::offset] = kOffset;
+ (*msg_)[am::strings::msg_params][am::strings::system_file] = false;
+
+ ExpectReceiveMessageFromSDK();
+ EXPECT_CALL(app_mngr_settings_, app_storage_folder())
+ .WillOnce(ReturnRef(kStorageFolder));
+ EXPECT_CALL(*mock_app_, folder_name()).WillOnce(Return(kAppFolder));
+
+ const uint32_t avaliable_space = 0u;
+ EXPECT_CALL(*mock_app_, GetAvailableDiskSpace())
+ .WillOnce(Return(avaliable_space));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::OUT_OF_MEMORY);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_IvalidCreationDirectory_UNSUCCESS) {
+ (*msg_)[am::strings::msg_params][am::strings::offset] = kOffset;
+ (*msg_)[am::strings::msg_params][am::strings::system_file] = true;
+
+ ExpectReceiveMessageFromSDK();
+
+ const std::string storage_folder = "/storage";
+ EXPECT_CALL(app_mngr_settings_, system_files_path())
+ .WillOnce(ReturnRef(storage_folder));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::GENERIC_ERROR);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_IvalidUpdateFile_UNSUCCESS) {
+ (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
+ (*msg_)[am::strings::msg_params][am::strings::system_file] = false;
+
+ ExpectReceiveMessageFromSDK();
+ EXPECT_CALL(app_mngr_settings_, app_storage_folder())
+ .WillOnce(ReturnRef(kStorageFolder));
+ EXPECT_CALL(*mock_app_, folder_name()).WillOnce(Return(kAppFolder));
+
+ const uint32_t avaliable_space = 2u;
+ EXPECT_CALL(*mock_app_, GetAvailableDiskSpace())
+ .WillOnce(Return(avaliable_space))
+ .WillOnce(Return(avaliable_space));
+
+ const std::string file_path = kStorageFolder + "/" + kAppFolder;
+ EXPECT_CALL(app_mngr_,
+ SaveBinary(binary_data_, file_path, kFileName, kZeroOffset))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, AddFile(_)).WillOnce(Return(false));
+ EXPECT_CALL(*mock_app_, UpdateFile(_)).WillOnce(Return(false));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_AddFile_SUCCESS) {
+ (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
+ (*msg_)[am::strings::msg_params][am::strings::system_file] = false;
+
+ ExpectReceiveMessageFromSDK();
+ EXPECT_CALL(app_mngr_settings_, app_storage_folder())
+ .WillOnce(ReturnRef(kStorageFolder));
+ EXPECT_CALL(*mock_app_, folder_name()).WillOnce(Return(kAppFolder));
+
+ const uint32_t avaliable_space = 2u;
+ EXPECT_CALL(*mock_app_, GetAvailableDiskSpace())
+ .WillOnce(Return(avaliable_space))
+ .WillOnce(Return(avaliable_space));
+
+ const std::string file_path = kStorageFolder + "/" + kAppFolder;
+ EXPECT_CALL(app_mngr_,
+ SaveBinary(binary_data_, file_path, kFileName, kZeroOffset))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, AddFile(_)).WillOnce(Return(true));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_SendOnPutFileNotification_SUCCESS) {
+ (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
+ (*msg_)[am::strings::msg_params][am::strings::system_file] = true;
+
+ ExpectReceiveMessageFromSDK();
+ EXPECT_CALL(app_mngr_settings_, system_files_path())
+ .WillOnce(ReturnRef(kStorageFolder));
+ EXPECT_CALL(app_mngr_,
+ SaveBinary(binary_data_, kStorageFolder, kFileName, kZeroOffset))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::BasicCommunication_OnPutFile)))
+ .WillOnce(Return(true));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_InvalidPutFile_UNSUCCESS) {
+ (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
+ (*msg_)[am::strings::msg_params][am::strings::system_file] = true;
+
+ ExpectReceiveMessageFromSDK();
+ EXPECT_CALL(app_mngr_settings_, system_files_path())
+ .WillOnce(ReturnRef(kStorageFolder));
+ EXPECT_CALL(app_mngr_,
+ SaveBinary(binary_data_, kStorageFolder, kFileName, kZeroOffset))
+ .WillOnce(Return(mobile_apis::Result::INVALID_DATA));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(PutFileRequestTest, Run_CrcSumEqual_SendSuccessResponse) {
+ binary_data_ = {1u};
+ (*msg_)[am::strings::params][am::strings::binary_data] = binary_data_;
+ const uint32_t correct_crc_sum =
+ 2768625435u; // calculated using the GetCrc32CheckSum method
+ (*msg_)[am::strings::msg_params][am::strings::crc32_check_sum] =
+ correct_crc_sum;
+
+ ExpectReceiveMessageFromSDK();
+ ON_CALL(app_mngr_, get_settings())
+ .WillByDefault(ReturnRef(app_mngr_settings_));
+ ON_CALL(app_mngr_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kStorageFolder));
+ ON_CALL(*mock_app_, folder_name()).WillByDefault(Return(kFolder));
+ const size_t available_space = binary_data_.size() + 1;
+ ON_CALL(*mock_app_, GetAvailableDiskSpace())
+ .WillByDefault(Return(available_space));
+ ON_CALL(*mock_app_, AddFile(_)).WillByDefault(Return(true));
+
+ const std::string file_path = kStorageFolder + "/" + kFolder;
+ EXPECT_CALL(app_mngr_, SaveBinary(binary_data_, file_path, kFileName, 0u))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, increment_put_file_in_none_count());
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+ // The folder was created in the "Run" method
+ EXPECT_TRUE(file_system::RemoveDirectory(kStorageFolder, true));
+}
+
+TEST_F(PutFileRequestTest, Run_CrcSumUnequal_SendCorruptedDataResponse) {
+ binary_data_ = {1u};
+ (*msg_)[am::strings::params][am::strings::binary_data] = binary_data_;
+ const uint32_t incorrect_crc_sum = 0u;
+ (*msg_)[am::strings::msg_params][am::strings::crc32_check_sum] =
+ incorrect_crc_sum;
+
+ ExpectReceiveMessageFromSDK();
+ ON_CALL(app_mngr_, get_settings())
+ .WillByDefault(ReturnRef(app_mngr_settings_));
+ ON_CALL(app_mngr_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kStorageFolder));
+ ON_CALL(*mock_app_, folder_name()).WillByDefault(Return(kFolder));
+ const size_t available_space = binary_data_.size() + 1;
+ ON_CALL(*mock_app_, GetAvailableDiskSpace())
+ .WillByDefault(Return(available_space));
+ ON_CALL(*mock_app_, AddFile(_)).WillByDefault(Return(true));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::CORRUPTED_DATA);
+ EXPECT_CALL(app_mngr_, SaveBinary(_, _, _, _)).Times(0);
+ PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+ // The folder was created in the "Run" method
+ EXPECT_TRUE(file_system::RemoveDirectory(kStorageFolder, true));
+}
+
+} // namespace put_file
+} // 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/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
new file mode 100644
index 0000000000..8b21ceff17
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
@@ -0,0 +1,526 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "mobile/register_app_interface_request.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "protocol_handler/mock_session_observer.h"
+#include "connection_handler/mock_connection_handler.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "utils/data_accessor.h"
+#include "utils/custom_string.h"
+#include "utils/lock.h"
+#include "utils/macro.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace register_app_interface_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::DoAll;
+
+namespace am = ::application_manager;
+
+using ::utils::SharedPtr;
+using am::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::RegisterAppInterfaceRequest;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const hmi_apis::Common_Language::eType kHmiLanguage =
+ hmi_apis::Common_Language::EN_US;
+const mobile_apis::Language::eType kMobileLanguage =
+ mobile_apis::Language::EN_US;
+const std::string kMacAddress = "test_mac_address";
+const std::string kAppId = "test_app_id";
+const std::string kDummyString = "test_string";
+const std::vector<uint32_t> kDummyDiagModes;
+} // namespace
+
+class RegisterAppInterfaceRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ RegisterAppInterfaceRequestTest()
+ : msg_(CreateMessage())
+ , command_(CreateCommand<RegisterAppInterfaceRequest>(msg_))
+ , app_name_("test_app_name_")
+ , lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , mock_application_helper_(
+ application_manager_test::MockApplicationHelper::
+ application_helper_mock()) {
+ InitGetters();
+ InitLanguage();
+ }
+
+ void SetUp() OVERRIDE {
+ testing::Mock::VerifyAndClearExpectations(&mock_application_helper_);
+ }
+
+ void TearDown() OVERRIDE {
+ testing::Mock::VerifyAndClearExpectations(&mock_application_helper_);
+ }
+
+ void InitBasicMessage() {
+ (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg_)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ (*msg_)[am::strings::msg_params][am::strings::app_name] = app_name_;
+ (*msg_)[am::strings::msg_params][am::strings::language_desired] =
+ kHmiLanguage;
+ (*msg_)[am::strings::msg_params]
+ [am::strings::hmi_display_language_desired] = kHmiLanguage;
+ }
+
+ MockAppPtr CreateBasicMockedApp() {
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(*mock_app, name()).WillByDefault(ReturnRef(app_name_));
+ ON_CALL(*mock_app, mac_address()).WillByDefault(ReturnRef(kMacAddress));
+ ON_CALL(*mock_app, app_icon_path()).WillByDefault(ReturnRef(kDummyString));
+ ON_CALL(*mock_app, language()).WillByDefault(ReturnRef(kMobileLanguage));
+ ON_CALL(*mock_app, ui_language()).WillByDefault(ReturnRef(kMobileLanguage));
+ ON_CALL(*mock_app, policy_app_id()).WillByDefault(Return(kAppId));
+ return mock_app;
+ }
+
+ void InitLanguage(
+ hmi_apis::Common_Language::eType ui_language = kHmiLanguage,
+ hmi_apis::Common_Language::eType vr_language = kHmiLanguage,
+ hmi_apis::Common_Language::eType tts_language = kHmiLanguage) {
+ ON_CALL(mock_hmi_capabilities_, active_vr_language())
+ .WillByDefault(Return(vr_language));
+ ON_CALL(mock_hmi_capabilities_, active_ui_language())
+ .WillByDefault(Return(ui_language));
+ ON_CALL(mock_hmi_capabilities_, active_tts_language())
+ .WillByDefault(Return(tts_language));
+ }
+
+ void InitGetters() {
+ ON_CALL(app_mngr_, IsHMICooperating()).WillByDefault(Return(true));
+ ON_CALL(app_mngr_, resume_controller())
+ .WillByDefault(ReturnRef(mock_resume_crt_));
+ ON_CALL(app_mngr_, connection_handler())
+ .WillByDefault(ReturnRef(mock_connection_handler_));
+ ON_CALL(mock_connection_handler_, get_session_observer())
+ .WillByDefault(ReturnRef(mock_session_observer_));
+ ON_CALL(app_mngr_settings_, sdl_version())
+ .WillByDefault(ReturnRef(kDummyString));
+ ON_CALL(mock_hmi_capabilities_, ccpu_version())
+ .WillByDefault(ReturnRef(kDummyString));
+ ON_CALL(app_mngr_settings_, supported_diag_modes())
+ .WillByDefault(ReturnRef(kDummyDiagModes));
+ ON_CALL(mock_policy_handler_, GetAppRequestTypes(_))
+ .WillByDefault(Return(std::vector<std::string>()));
+ ON_CALL(mock_policy_handler_, GetAppRequestTypeState(_))
+ .WillByDefault(Return(policy::RequestType::State::EMPTY));
+ ON_CALL(mock_policy_handler_, GetAppRequestSubTypes(_))
+ .WillByDefault(Return(std::vector<std::string>()));
+ ON_CALL(mock_policy_handler_, GetAppRequestSubTypeState(_))
+ .WillByDefault(Return(policy::RequestSubType::State::EMPTY));
+ ON_CALL(mock_policy_handler_, GetUserConsentForDevice(_))
+ .WillByDefault(Return(policy::DeviceConsent::kDeviceAllowed));
+ ON_CALL(app_mngr_, GetDeviceTransportType(_))
+ .WillByDefault(Return(hmi_apis::Common_TransportType::WIFI));
+ ON_CALL(app_mngr_, IsAppInReconnectMode(_)).WillByDefault(Return(false));
+ ON_CALL(app_mngr_, application_by_policy_id(_))
+ .WillByDefault(Return(ApplicationSharedPtr()));
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ }
+
+ void SetCommonExpectionsOnSwitchedApplication(
+ MockAppPtr mock_app, mobile_apis::Result::eType response_result_code) {
+ EXPECT_CALL(mock_policy_handler_, AddApplication(_, _)).Times(0);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(response_result_code), _));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered)))
+ .Times(0);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Buttons_OnButtonSubscription)))
+ .Times(0);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_ChangeRegistration))).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_ChangeRegistration))).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::VR_ChangeRegistration))).Times(0);
+
+ EXPECT_CALL(
+ app_mngr_,
+ OnApplicationSwitched(
+ MockAppPtr::static_pointer_cast<application_manager::Application>(
+ mock_app)));
+ }
+
+ MessageSharedPtr msg_;
+ SharedPtr<RegisterAppInterfaceRequest> command_;
+
+ const utils::custom_string::CustomString app_name_;
+ std::shared_ptr<sync_primitives::Lock> lock_ptr_;
+ am::ApplicationSet app_set_;
+
+ typedef IsNiceMock<policy_test::MockPolicyHandlerInterface,
+ kMocksAreNice>::Result MockPolicyHandlerInterface;
+
+ typedef IsNiceMock<resumprion_test::MockResumeCtrl, kMocksAreNice>::Result
+ MockResumeCtrl;
+
+ typedef IsNiceMock<connection_handler_test::MockConnectionHandler,
+ kMocksAreNice>::Result MockConnectionHandler;
+
+ typedef IsNiceMock<protocol_handler_test::MockSessionObserver,
+ kMocksAreNice>::Result MockSessionObserver;
+
+ typedef IsNiceMock<application_manager_test::MockHMICapabilities,
+ kMocksAreNice>::Result MockHMICapabilities;
+
+ MockResumeCtrl mock_resume_crt_;
+ MockConnectionHandler mock_connection_handler_;
+ MockSessionObserver mock_session_observer_;
+ application_manager_test::MockApplicationHelper& mock_application_helper_;
+};
+
+TEST_F(RegisterAppInterfaceRequestTest, Init_SUCCESS) {
+ EXPECT_TRUE(command_->Init());
+}
+
+TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::hash_id] = kAppId;
+ EXPECT_CALL(app_mngr_, IsStopping())
+ .WillOnce(Return(false))
+ .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));
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()))
+ .WillRepeatedly(Return(mock_app));
+
+ ON_CALL(app_mngr_, applications())
+ .WillByDefault(
+ Return(DataAccessor<am::ApplicationSet>(app_set_, lock_ptr_)));
+ ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId, _, _))
+ .WillByDefault(Return(true));
+ policy::StatusNotifier notify_upd_manager =
+ utils::MakeShared<utils::CallNothing>();
+ ON_CALL(mock_policy_handler_, AddApplication(_, _))
+ .WillByDefault(Return(notify_upd_manager));
+
+ EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Buttons_OnButtonSubscription)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
+ .Times(2);
+ command_->Run();
+}
+
+MATCHER_P(CheckHMIInterfacesRealtedData, expected_data, "") {
+ const bool is_result_id_correct =
+ mobile_apis::Result::SUCCESS ==
+ static_cast<mobile_apis::Result::eType>(
+ (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
+
+ const bool are_ui_related_data_exist =
+ (*arg)[am::strings::msg_params].keyExists(
+ am::hmi_response::display_capabilities);
+
+ const bool are_vi_related_data_exist =
+ (*arg)[am::strings::msg_params][am::hmi_response::vehicle_type] ==
+ (*expected_data)[am::hmi_response::vehicle_type];
+
+ const bool are_vr_related_data_exist =
+ (*arg)[am::strings::msg_params][am::strings::vr_capabilities] ==
+ (*expected_data)[am::strings::vr_capabilities];
+
+ return is_result_id_correct && are_ui_related_data_exist &&
+ are_vi_related_data_exist && are_vr_related_data_exist;
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ Run_HmiInterfacesStateAvailable_SUCCESS) {
+ InitBasicMessage();
+
+ EXPECT_CALL(app_mngr_, IsStopping())
+ .WillOnce(Return(false))
+ .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));
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()))
+ .WillRepeatedly(Return(mock_app));
+
+ MessageSharedPtr expected_message =
+ CreateMessage(smart_objects::SmartType_Map);
+
+ (*expected_message)[am::hmi_response::vehicle_type] = "test_vehicle_type";
+ (*expected_message)[am::strings::vr_capabilities] = "test_vr_capabilities";
+ (*expected_message)[am::hmi_response::display_capabilities] = 0;
+ SmartObject& display_capabilities =
+ (*expected_message)[am::hmi_response::display_capabilities];
+ display_capabilities[am::hmi_response::display_type] = "test_display_type";
+ display_capabilities[am::hmi_response::display_name] = "GENERIC_DISPLAY";
+ display_capabilities[am::hmi_response::text_fields] = "test_text_fields";
+ display_capabilities[am::hmi_response::image_fields] = "test_image_fields";
+ display_capabilities[am::hmi_response::media_clock_formats] =
+ "test_media_clock_ptr_formats";
+ display_capabilities[am::hmi_response::num_custom_presets_available] =
+ "test_num_custom_presets_available";
+ display_capabilities[am::hmi_response::graphic_supported] =
+ "test_graphic_supported";
+ display_capabilities[am::hmi_response::templates_available] =
+ "test_templates_available";
+ display_capabilities[am::hmi_response::screen_params] = "test_screen_params";
+
+ ON_CALL(mock_hmi_capabilities_, vehicle_type())
+ .WillByDefault(
+ Return(&(*expected_message)[am::hmi_response::vehicle_type]));
+ ON_CALL(mock_hmi_capabilities_, vr_capabilities())
+ .WillByDefault(
+ Return(&(*expected_message)[am::strings::vr_capabilities]));
+ ON_CALL(mock_hmi_capabilities_, display_capabilities())
+ .WillByDefault(
+ Return(&(*expected_message)[am::hmi_response::display_capabilities]));
+
+ ON_CALL(app_mngr_, applications())
+ .WillByDefault(
+ Return(DataAccessor<am::ApplicationSet>(app_set_, lock_ptr_)));
+ ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId, _, _))
+ .WillByDefault(Return(true));
+ policy::StatusNotifier notify_upd_manager =
+ utils::MakeShared<utils::CallNothing>();
+ ON_CALL(mock_policy_handler_, AddApplication(_, _))
+ .WillByDefault(Return(notify_upd_manager));
+
+ EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app));
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Buttons_OnButtonSubscription)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::VR_ChangeRegistration)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_ChangeRegistration)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::UI_ChangeRegistration)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
+ .Times(2);
+
+ command_->Run();
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ SwitchApplication_CorrectHash_ExpectNoCleanupSuccess) {
+ InitBasicMessage();
+
+ const std::string request_hash_id = "abc123";
+ (*msg_)[am::strings::msg_params][am::strings::hash_id] = request_hash_id;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ EXPECT_CALL(app_mngr_, application_by_policy_id(kAppId))
+ .WillRepeatedly(Return(mock_app));
+
+ EXPECT_CALL(app_mngr_, IsAppInReconnectMode(kAppId)).WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_, ProcessReconnection(_, kConnectionKey));
+
+ EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
+
+ EXPECT_CALL(
+ mock_resume_crt_,
+ CheckApplicationHash(
+ MockAppPtr::static_pointer_cast<application_manager::Application>(
+ mock_app),
+ request_hash_id)).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_resume_crt_, RemoveApplicationFromSaved(_)).Times(0);
+
+ EXPECT_CALL(mock_application_helper_, RecallApplicationData(_, _)).Times(0);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app));
+
+ SetCommonExpectionsOnSwitchedApplication(mock_app,
+ mobile_apis::Result::SUCCESS);
+
+ command_->Run();
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ SwitchApplication_WrongHash_ExpectCleanupResumeFailed) {
+ InitBasicMessage();
+
+ const std::string request_hash_id = "abc123";
+ (*msg_)[am::strings::msg_params][am::strings::hash_id] = request_hash_id;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ EXPECT_CALL(app_mngr_, application_by_policy_id(kAppId))
+ .WillRepeatedly(Return(mock_app));
+
+ EXPECT_CALL(app_mngr_, IsAppInReconnectMode(kAppId)).WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_, ProcessReconnection(_, kConnectionKey));
+
+ EXPECT_CALL(
+ mock_resume_crt_,
+ CheckApplicationHash(
+ MockAppPtr::static_pointer_cast<application_manager::Application>(
+ mock_app),
+ request_hash_id)).WillOnce(Return(false));
+
+ EXPECT_CALL(
+ mock_application_helper_,
+ RecallApplicationData(
+ MockAppPtr::static_pointer_cast<application_manager::Application>(
+ mock_app),
+ _));
+
+ EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app));
+
+ SetCommonExpectionsOnSwitchedApplication(mock_app,
+ mobile_apis::Result::RESUME_FAILED);
+
+ command_->Run();
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ SwitchApplication_NoHash_ExpectCleanupResumeFailed) {
+ InitBasicMessage();
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ EXPECT_CALL(app_mngr_, application_by_policy_id(kAppId))
+ .WillRepeatedly(Return(mock_app));
+
+ EXPECT_CALL(app_mngr_, IsAppInReconnectMode(kAppId)).WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_, ProcessReconnection(_, kConnectionKey));
+
+ EXPECT_CALL(
+ mock_application_helper_,
+ RecallApplicationData(
+ MockAppPtr::static_pointer_cast<application_manager::Application>(
+ mock_app),
+ _));
+
+ EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app));
+
+ SetCommonExpectionsOnSwitchedApplication(mock_app,
+ mobile_apis::Result::RESUME_FAILED);
+
+ command_->Run();
+}
+
+} // namespace register_app_interface_request
+} // 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/reset_global_properties_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc
new file mode 100644
index 0000000000..4cdf4f8858
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc
@@ -0,0 +1,576 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "mobile/reset_global_properties_request.h"
+#include "mobile/reset_global_properties_response.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "utils/make_shared.h"
+#include "smart_objects/smart_object.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace reset_global_properties {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace am = ::application_manager;
+
+using sdl_rpc_plugin::commands::ResetGlobalPropertiesRequest;
+using sdl_rpc_plugin::commands::ResetGlobalPropertiesResponse;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using am::MockMessageHelper;
+
+typedef SharedPtr<ResetGlobalPropertiesRequest> ResetGlobalPropertiesRequestPtr;
+typedef SharedPtr<ResetGlobalPropertiesResponse>
+ ResetGlobalPropertiesResponsePtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 10u;
+} // namespace
+
+class ResetGlobalPropertiesRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ protected:
+ ResetGlobalPropertiesRequestTest()
+ : msg_(CreateMessage()), mock_app_(CreateMockApp()) {}
+
+ void SetUp() OVERRIDE {
+ (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg_)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
+
+ command_ = CreateCommand<ResetGlobalPropertiesRequest>(msg_);
+
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ }
+
+ MessageSharedPtr msg_;
+ MockAppPtr mock_app_;
+ ResetGlobalPropertiesRequestPtr command_;
+};
+
+class ResetGlobalPropertiesResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(ResetGlobalPropertiesRequestTest, Run_InvalidApp_UNSUCCESS) {
+ MockAppPtr invalid_app;
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
+
+ MessageSharedPtr command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
+
+ command_->Run();
+ EXPECT_EQ(
+ (*command_result)[am::strings::msg_params][am::strings::success].asBool(),
+ false);
+ EXPECT_EQ(
+ (*command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(mobile_apis::Result::APPLICATION_NOT_REGISTERED));
+}
+
+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));
+
+ 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);
+
+ 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());
+
+ 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);
+
+ 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);
+
+ 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());
+
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+
+ smart_objects::SmartObjectSPtr vr_help =
+ ::utils::MakeShared<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 =
+ ::utils::MakeShared<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_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties)))
+ .WillOnce(Return(true));
+
+ command_->Run();
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command_->on_event(event);
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest,
+ OnEvent_UI_SetGlobalProperties_SUCCESS) {
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ const hmi_apis::Common_Result::eType result_code =
+ 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;
+
+ 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 =
+ ::utils::MakeShared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
+ .WillOnce(Return(vr_help));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+
+ command_->Run();
+
+ event.set_smart_object(*msg_);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::eType::SUCCESS),
+ am::commands::Command::SOURCE_SDL));
+
+ command_->on_event(event);
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest,
+ OnEvent_TTS_SetGlobalProperties_SUCCESS) {
+ Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
+
+ (*msg_)[am::strings::msg_params][am::strings::properties][0] =
+ mobile_apis::GlobalProperty::TIMEOUTPROMPT;
+ (*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));
+
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+
+ smart_objects::SmartObjectSPtr prompt =
+ utils::MakeShared<smart_objects::SmartObject>();
+ *prompt = "prompt";
+
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+
+ MessageSharedPtr ui_msg = CreateMessage();
+ (*ui_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
+ (*ui_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ Event ui_event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ ui_event.set_smart_object(*ui_msg);
+
+ command_->Run();
+ command_->on_event(ui_event);
+ event.set_smart_object(*msg_);
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::WARNINGS),
+ am::commands::Command::SOURCE_SDL));
+
+ command_->on_event(event);
+}
+
+TEST_F(ResetGlobalPropertiesResponseTest, Run_Sendmsg_SUCCESS) {
+ MessageSharedPtr message(CreateMessage());
+ ResetGlobalPropertiesResponsePtr command(
+ CreateCommand<ResetGlobalPropertiesResponse>(message));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(message, _));
+ command->Run();
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidApp_NoHashUpdate) {
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+
+ (*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());
+
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ smart_objects::SmartObjectSPtr vr_help =
+ ::utils::MakeShared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
+ .WillOnce(Return(vr_help));
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+
+ ResetGlobalPropertiesRequestPtr command =
+ CreateCommand<ResetGlobalPropertiesRequest>(msg_);
+ command->Run();
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::eType::SUCCESS),
+ am::commands::Command::SOURCE_SDL));
+
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest,
+ Run_WaitTTS_Timeout_GENERIC_ERROR_TTSNotRespond) {
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
+
+ (*msg_)[am::strings::msg_params][am::strings::properties][0] =
+ mobile_apis::GlobalProperty::TIMEOUTPROMPT;
+ (*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));
+
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+
+ smart_objects::SmartObjectSPtr prompt =
+ utils::MakeShared<smart_objects::SmartObject>();
+ *prompt = "prompt";
+
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties)))
+ .WillOnce(Return(true));
+
+ ResetGlobalPropertiesRequestPtr command =
+ CreateCommand<ResetGlobalPropertiesRequest>(msg_);
+ command->Run();
+
+ // Received response only from UI
+ MessageSharedPtr ui_msg = CreateMessage();
+ (*ui_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
+ (*ui_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+ (*ui_msg)[am::strings::msg_params] =
+ SmartObject(smart_objects::SmartType_Map);
+ Event ui_event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ ui_event.set_smart_object(*ui_msg);
+ command->on_event(ui_event);
+
+ // TTS doesn't respond, so timeout should send generic error
+ smart_objects::SmartObjectSPtr response =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*response)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::GENERIC_ERROR;
+ EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
+ .WillOnce(Return(response));
+ const std::string info = "TTS component does not respond";
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResponseIs(mobile_apis::Result::GENERIC_ERROR, info, false),
+ am::commands::Command::SOURCE_SDL));
+ command->onTimeOut();
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest,
+ Run_WaitUI_Timeout_GENERIC_ERROR_UINotRespond) {
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
+
+ (*msg_)[am::strings::msg_params][am::strings::properties][0] =
+ mobile_apis::GlobalProperty::TIMEOUTPROMPT;
+ (*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));
+
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+
+ smart_objects::SmartObjectSPtr prompt =
+ utils::MakeShared<smart_objects::SmartObject>();
+ *prompt = "prompt";
+
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties)))
+ .WillOnce(Return(true));
+
+ command_->Run();
+
+ // Received response only from TTS
+ MessageSharedPtr tts_msg = CreateMessage();
+ (*tts_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
+ (*tts_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+
+ Event tts_event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ tts_event.set_smart_object(*tts_msg);
+ command_->on_event(tts_event);
+
+ // UI doesn't respond, so timeout should send generic error
+ smart_objects::SmartObjectSPtr response =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*response)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::GENERIC_ERROR;
+ EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
+ .WillOnce(Return(response));
+
+ const std::string info = "UI component does not respond";
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResponseIs(mobile_apis::Result::GENERIC_ERROR, info, false),
+ am::commands::Command::SOURCE_SDL));
+ command_->onTimeOut();
+}
+
+TEST_F(ResetGlobalPropertiesRequestTest,
+ Run_WaitUIAndTTS_Timeout_GENERIC_ERROR_TTSAndUINotRespond) {
+ Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
+
+ (*msg_)[am::strings::msg_params][am::strings::properties][0] =
+ mobile_apis::GlobalProperty::TIMEOUTPROMPT;
+ (*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));
+
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+
+ smart_objects::SmartObjectSPtr prompt =
+ utils::MakeShared<smart_objects::SmartObject>();
+ *prompt = "prompt";
+
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties)))
+ .WillOnce(Return(true));
+
+ command_->Run();
+ // TTS and UI don't respond, so timeout should send generic error
+ std::string info = "TTS, UI component does not respond";
+ smart_objects::SmartObjectSPtr response =
+ utils::MakeShared<smart_objects::SmartObject>();
+ (*response)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::GENERIC_ERROR;
+ EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
+ .WillOnce(Return(response));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResponseIs(mobile_apis::Result::GENERIC_ERROR, info, false),
+ am::commands::Command::SOURCE_SDL));
+ command_->onTimeOut();
+}
+
+} // namespace reset_global_properties
+} // 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/scrollable_message_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc
new file mode 100644
index 0000000000..f550043414
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc
@@ -0,0 +1,286 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/scrollable_message_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace scrollable_message_request {
+
+namespace am = application_manager;
+namespace hmi_response = am::hmi_response;
+namespace mobile_result = mobile_apis::Result;
+namespace am = ::application_manager;
+
+using sdl_rpc_plugin::commands::ScrollableMessageRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Eq;
+using ::testing::Ref;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+using namespace am::strings;
+using test::components::policy_test::MockPolicyHandlerInterface;
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kTimeOut = 30000u;
+const uint32_t kCorrelationId = 10u;
+const uint32_t kFunctionID = 3u;
+} // namespace
+
+class ScrollableMessageRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef TypeIf<kMocksAreNice,
+ NiceMock<application_manager_test::MockHMICapabilities>,
+ application_manager_test::MockHMICapabilities>::Result
+ MockHMICapabilities;
+ sync_primitives::Lock lock_;
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void SetUp() OVERRIDE {
+ mock_app_ = CreateMockApp();
+ command_ = CreateCommand<ScrollableMessageRequest>(msg_);
+ }
+
+ MockAppPtr mock_app_;
+ MessageSharedPtr msg_;
+ SharedPtr<ScrollableMessageRequest> command_;
+};
+
+typedef ScrollableMessageRequestTest::MockHMICapabilities MockHMICapabilities;
+
+TEST_F(ScrollableMessageRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_ui = CreateFullParamsUISO();
+ (*msg_ui)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ utils::SharedPtr<ScrollableMessageRequest> command =
+ CreateCommand<ScrollableMessageRequest>(msg_ui);
+
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+
+ ON_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillByDefault(Return(true));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::info] = "info1";
+
+ Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
+ event.set_smart_object(*msg);
+
+ MessageSharedPtr ui_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*ui_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*ui_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_SUCCESS) {
+ (*msg_)[msg_params][timeout] = kTimeOut;
+ (*msg_)[msg_params][interaction_mode] =
+ mobile_apis::InteractionMode::MANUAL_ONLY;
+ EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
+ command_->Init();
+ EXPECT_EQ(kTimeOut, command_->default_timeout());
+}
+
+TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_UNSUCCESS) {
+ (*msg_)[msg_params][interaction_mode] =
+ mobile_apis::InteractionMode::MANUAL_ONLY;
+ EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
+ command_->Init();
+ EXPECT_EQ(kTimeOut, command_->default_timeout());
+}
+
+TEST_F(ScrollableMessageRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+ command_->Run();
+}
+
+TEST_F(ScrollableMessageRequestTest,
+ Run_SoftButtonProcessingResultWrogParameters_UNSUCCESS) {
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+ const mobile_apis::Result::eType processing_result =
+ mobile_apis::Result::ABORTED;
+ smart_objects::SmartObject& msg_params = (*msg_)[am::strings::msg_params];
+ EXPECT_CALL(
+ mock_message_helper_,
+ ProcessSoftButtons(
+ msg_params, Eq(mock_app_), Ref(mock_policy_handler_), Ref(app_mngr_)))
+ .WillOnce(Return(processing_result));
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command_)));
+ EXPECT_EQ(processing_result,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][result_code].asInt()));
+}
+
+TEST_F(ScrollableMessageRequestTest, Run_SoftButtonProcessingResult_SUCCESS) {
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
+ smart_objects::SmartObject& msg_params = (*msg_)[am::strings::msg_params];
+ (*msg_)[am::strings::params][am::strings::function_id] = kFunctionID;
+ (*msg_)[am::strings::msg_params][am::strings::soft_buttons][0]
+ [am::strings::soft_button_id] = 0;
+ EXPECT_CALL(
+ mock_message_helper_,
+ ProcessSoftButtons(
+ msg_params, Eq(mock_app_), Ref(mock_policy_handler_), Ref(app_mngr_)))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+ EXPECT_CALL(mock_message_helper_, SubscribeApplicationToSoftButton(_, _, _));
+
+ MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command_)));
+ EXPECT_EQ(hmi_apis::FunctionID::UI_ScrollableMessage,
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*result_msg)[params][function_id].asInt()));
+}
+
+TEST_F(ScrollableMessageRequestTest, OnEvent_ReceivedUnknownEvent_UNSUCCESS) {
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ command_->on_event(event);
+}
+
+TEST_F(ScrollableMessageRequestTest,
+ OnEvent_ReceivedUIOnResetTimeoutEvent_SUCCESS) {
+ (*msg_)[params][connection_key] = kConnectionKey;
+ (*msg_)[params][correlation_id] = kCorrelationId;
+ EXPECT_CALL(
+ app_mngr_,
+ updateRequestTimeout(kConnectionKey, kCorrelationId, kDefaultTimeout_));
+ Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ event.set_smart_object(*msg_);
+ command_->on_event(event);
+}
+
+TEST_F(ScrollableMessageRequestTest,
+ DISABLED_OnEvent_ReceivedUIScrollableMessage_SUCCESS) {
+ (*msg_)[params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
+ Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
+ event.set_smart_object(*msg_);
+ command_->on_event(event);
+}
+
+TEST_F(ScrollableMessageRequestTest,
+ DISABLED_OnEvent_UnsupportedRCAndUICoop_SUCCESS) {
+ (*msg_)[params][hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
+ Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
+ event.set_smart_object(*msg_);
+ command_->on_event(event);
+}
+
+} // namespace scrollable_message_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_haptic_data_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_haptic_data_test.cc
new file mode 100644
index 0000000000..c0c44922e3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_haptic_data_test.cc
@@ -0,0 +1,164 @@
+/*
+ * 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 "gtest/gtest.h"
+
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+
+#include "mobile/send_haptic_data_request.h"
+#include "mobile/send_haptic_data_response.h"
+
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace send_haptic_data {
+
+using ::testing::_;
+using ::testing::Return;
+
+namespace am = ::application_manager;
+
+using sdl_rpc_plugin::commands::SendHapticDataRequest;
+using sdl_rpc_plugin::commands::SendHapticDataResponse;
+using am::commands::MessageSharedPtr;
+
+typedef SharedPtr<SendHapticDataRequest> SendHapticDataRequestPtr;
+typedef SharedPtr<SendHapticDataResponse> SendHapticDataResponsePtr;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+}
+
+class SendHapticDataRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SendHapticDataRequestTest()
+ : msg_(CreateMessage(::smart_objects::SmartType_Map))
+ , mock_app_(CreateMockApp()) {}
+
+ void SetUp() OVERRIDE {
+ (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ }
+
+ MessageSharedPtr msg_;
+ MockAppPtr mock_app_;
+};
+
+class SendHapticDataResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ SendHapticDataResponseTest() : message_(CreateMessage()) {}
+
+ void SetUp() OVERRIDE {
+ command_sptr_ = CreateCommand<SendHapticDataResponse>(message_);
+ }
+
+ MessageSharedPtr message_;
+ SharedPtr<SendHapticDataResponse> command_sptr_;
+};
+
+TEST_F(SendHapticDataRequestTest, Run_SUCCESS) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(*mock_app_, is_navi()).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::UI_SendHapticData)))
+ .WillOnce(Return(true));
+
+ SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
+
+ command->Init();
+ command->Run();
+}
+
+TEST_F(SendHapticDataRequestTest, Run_DISALLOWED) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(*mock_app_, is_navi()).WillOnce(Return(false));
+
+ EXPECT_CALL(*mock_app_, mobile_projection_enabled()).WillOnce(Return(false));
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
+ .WillOnce(Return(true));
+
+ SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
+
+ command->Init();
+ command->Run();
+}
+
+TEST_F(SendHapticDataRequestTest, OnEvent_SUCCESS) {
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS),
+ am::commands::Command::SOURCE_SDL));
+
+ (*msg_)[am::strings::msg_params] = 0;
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+ Event event(hmi_apis::FunctionID::UI_SendHapticData);
+ event.set_smart_object(*msg_);
+ SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
+
+ command->Init();
+ command->on_event(event);
+}
+
+TEST_F(SendHapticDataResponseTest, Run_Success) {
+ ::smart_objects::SmartObject& message_ref = *message_;
+ message_ref[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::SUCCESS;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
+ command_sptr_->Init();
+ command_sptr_->Run();
+}
+
+} // namespace send_haptic_data
+} // 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/send_location_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_location_request_test.cc
new file mode 100644
index 0000000000..d0072f6288
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/send_location_request_test.cc
@@ -0,0 +1,406 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "mobile/send_location_request.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/command_request_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace send_location_request {
+
+using application_manager::commands::MessageSharedPtr;
+using sdl_rpc_plugin::commands::SendLocationRequest;
+using application_manager::MockMessageHelper;
+using test::components::application_manager_test::MockHMICapabilities;
+using smart_objects::SmartObject;
+using utils::SharedPtr;
+using testing::_;
+using testing::Return;
+using testing::ReturnRef;
+
+namespace strings = application_manager::strings;
+namespace hmi_response = application_manager::hmi_response;
+namespace Common_TextFieldName = hmi_apis::Common_TextFieldName;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const uint32_t kFunctionID = 2u;
+const uint32_t kAppID = 3u;
+const double kLongitudeDegrees = 13.4;
+const std::string kLocationDescription = "Location_Description";
+const std::string kNewLine = "\\n";
+const std::string kAddressLine = "Address_Line";
+const std::string kPhoneNumber = "Phone_number";
+const std::string kCorrectAddress = "Correct address";
+const std::string kEmptyAddress = "";
+const std::string kAddressWithWrongSyntax = "Wrong Syntax\\n";
+} // namespace
+
+class SendLocationRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ class UnwrappedSendLocationRequest : public SendLocationRequest {
+ public:
+ UnwrappedSendLocationRequest(
+ const MessageSharedPtr& message,
+ application_manager::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : SendLocationRequest(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+ ::application_manager::CommandParametersPermissions&
+ get_parameters_permissions() {
+ return parameters_permissions_;
+ }
+ };
+
+ typedef SharedPtr<UnwrappedSendLocationRequest> CommandSPrt;
+
+ SendLocationRequestTest() {
+ mock_app_ = CreateMockApp();
+ disp_cap_ = utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
+ message_ = CreateMessage();
+ command_ = CreateCommand<UnwrappedSendLocationRequest>(message_);
+ }
+
+ void InitialSetup(MessageSharedPtr message_) {
+ (*message_)[strings::params][strings::connection_key] = kConnectionKey;
+ (*message_)[strings::params][strings::function_id] = kFunctionID;
+ (*message_)[strings::msg_params] =
+ SmartObject(smart_objects::SmartType_Map);
+ (*message_)[strings::msg_params][strings::address] = kCorrectAddress;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ AllowMandatoryFields();
+ }
+
+ void HMICapabilitiesSetupHelper() {
+ EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillOnce(Return(true));
+ }
+
+ void HMICapabilitiesSetupWithArguments(
+ Common_TextFieldName::eType field_name) {
+ HMICapabilitiesSetupHelper();
+ (*disp_cap_)[hmi_response::text_fields] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*disp_cap_)[hmi_response::text_fields][0] =
+ SmartObject(smart_objects::SmartType_Map);
+ (*disp_cap_)[hmi_response::text_fields][0][strings::name] = field_name;
+ EXPECT_CALL(mock_hmi_capabilities_, display_capabilities())
+ .Times(2)
+ .WillRepeatedly(Return(disp_cap_.get()));
+ }
+
+ void FinishSetup() {
+ EXPECT_CALL(*mock_app_, hmi_app_id()).WillOnce(Return(kAppID));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Navigation_SendLocation)));
+ }
+
+ void FinishSetupCancelled(mobile_apis::Result::eType result) {
+ EXPECT_CALL(*mock_app_, hmi_app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(result), _));
+ }
+
+ void AllowMandatoryFields() {
+ application_manager::CommandParametersPermissions& permissions =
+ command_->get_parameters_permissions();
+ permissions.allowed_params.insert(strings::longitude_degrees);
+ permissions.allowed_params.insert(strings::latitude_degrees);
+ }
+
+ MockAppPtr mock_app_;
+ SharedPtr<SmartObject> disp_cap_;
+ MessageSharedPtr message_;
+ CommandSPrt command_;
+};
+
+TEST_F(SendLocationRequestTest, Run_InvalidApp_Success) {
+ (*message_)[strings::params][strings::connection_key] = kConnectionKey;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+ FinishSetupCancelled(mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_DeliveryMode_Success) {
+ InitialSetup(message_);
+ SmartObject msg_params = (*message_)[strings::msg_params];
+ msg_params[strings::delivery_mode] = SmartObject();
+ (*message_)[strings::msg_params] = msg_params;
+ msg_params.erase(strings::delivery_mode);
+ FinishSetup();
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationNameIsAllowed_Success) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_name] = "Location_Name";
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationName);
+ FinishSetup();
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationNameIsNotAllowed_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_name] = "Location_Name";
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
+ FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationNameWrongSyntax_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_name] = "Location_Name\\n";
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationName);
+ FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationDescriptionIsAllowed_Success) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_description] =
+ kLocationDescription;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationDescription);
+ FinishSetup();
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationDescriptionIsNotAllowed_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_description] =
+ kLocationDescription;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
+ FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationDescriptionWrongSyntax_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_description] =
+ kLocationDescription + kNewLine;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationDescription);
+ FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_AddressLinesAreAllowed_Success) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::address_lines] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*message_)[strings::msg_params][strings::address_lines][0] = kAddressLine;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::addressLines);
+ FinishSetup();
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_AddressLinesAreNotAllowed_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::address_lines] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*message_)[strings::msg_params][strings::address_lines][0] = kAddressLine;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
+ FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_AddressLinesWrongSyntax_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::address_lines] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*message_)[strings::msg_params][strings::address_lines][0] =
+ kAddressLine + kNewLine;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::addressLines);
+ FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_PhoneNumberIsAllowed_Success) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::phone_number] = kPhoneNumber;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::phoneNumber);
+ FinishSetup();
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_PhoneNumberIsNotAllowed_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::phone_number] = kPhoneNumber;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
+ FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_PhoneNumberWrongSyntax_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::phone_number] =
+ kPhoneNumber + kNewLine;
+ HMICapabilitiesSetupWithArguments(Common_TextFieldName::phoneNumber);
+ FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_AddressesContainWrongSyntax_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::address] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*message_)[strings::msg_params][strings::address]["Address 1"] =
+ kCorrectAddress;
+ (*message_)[strings::msg_params][strings::address]["Address 2"] =
+ kAddressWithWrongSyntax;
+ FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationImageValid_Success) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_image] =
+ SmartObject(smart_objects::SmartType_Map);
+ (*message_)[strings::msg_params][strings::location_image][strings::value] =
+ "1";
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyImage(
+ (*message_)[strings::msg_params][strings::location_image], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ FinishSetup();
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_LocationImageInvalid_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::location_image] =
+ SmartObject(smart_objects::SmartType_Map);
+ (*message_)[strings::msg_params][strings::location_image][strings::value] =
+ "1";
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyImage(
+ (*message_)[strings::msg_params][strings::location_image], _, _))
+ .WillOnce(Return(mobile_apis::Result::ABORTED));
+ FinishSetupCancelled(mobile_apis::Result::ABORTED);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, Run_HMIUINotCoop_Cancelled) {
+ InitialSetup(message_);
+ (*message_)[strings::msg_params][strings::phone_number] = kPhoneNumber;
+ (*disp_cap_)[hmi_response::text_fields] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*disp_cap_)[hmi_response::text_fields][0] =
+ SmartObject(smart_objects::SmartType_Map);
+ (*disp_cap_)[hmi_response::text_fields][0][strings::name] =
+ Common_TextFieldName::phoneNumber;
+ EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillOnce(Return(false));
+ FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ command_->Run();
+}
+
+TEST_F(SendLocationRequestTest, OnEvent_Success) {
+ mobile_apis::Result::eType response_code = mobile_apis::Result::SUCCESS;
+ (*message_)[strings::params][hmi_response::code] = response_code;
+ (*message_)[strings::params][strings::connection_key] = kConnectionKey;
+
+ Event event(hmi_apis::FunctionID::Navigation_SendLocation);
+ event.set_smart_object(*message_);
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _))
+ .WillOnce(Return(false));
+ command_->on_event(event);
+}
+
+TEST_F(SendLocationRequestTest, OnEvent_Cancelled) {
+ (*message_)[strings::params][hmi_response::code] =
+ mobile_apis::Result::SUCCESS;
+ Event event(hmi_apis::FunctionID::Navigation_OnWayPointChange);
+ event.set_smart_object(*message_);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _))
+ .Times(0);
+ command_->on_event(event);
+}
+
+TEST_F(SendLocationRequestTest, Run_MandatoryParamsDisallowed_InvalidData) {
+ (*message_)[strings::params][strings::connection_key] = kConnectionKey;
+ (*message_)[strings::params][strings::function_id] = kFunctionID;
+ (*message_)[strings::msg_params] = SmartObject(smart_objects::SmartType_Map);
+ (*message_)[strings::msg_params][strings::address] = kCorrectAddress;
+ (*message_)[strings::msg_params][strings::longitude_degrees] =
+ kLongitudeDegrees;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ application_manager::CommandParametersPermissions& permissions =
+ command_->get_parameters_permissions();
+ // 1st one allowed
+ permissions.allowed_params.insert(strings::longitude_degrees);
+ // 2nd one disallowed
+ permissions.disallowed_params.insert(strings::latitude_degrees);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
+ command_->Run();
+}
+
+} // namespace send_location_request
+} // 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/set_app_icon_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_app_icon_test.cc
new file mode 100644
index 0000000000..e1612dbacb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_app_icon_test.cc
@@ -0,0 +1,174 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/set_app_icon_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "protocol_handler/mock_protocol_handler.h"
+#include "protocol_handler/mock_protocol_handler_settings.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace set_app_icon_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::SetAppIconRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using am::MockHmiInterfaces;
+using test::components::protocol_handler_test::MockProtocolHandler;
+using test::components::protocol_handler_test::MockProtocolHandlerSettings;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class SetAppIconRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+ NiceMock<MockHmiInterfaces> hmi_interfaces_;
+ protocol_handler_test::MockProtocolHandler mock_protocol_handler_;
+ protocol_handler_test::MockProtocolHandlerSettings
+ mock_protocol_handler_settings_;
+};
+
+TEST_F(SetAppIconRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
+ const std::string file_path = "file_path";
+ MessageSharedPtr msg_vr = CreateFullParamsUISO();
+ (*msg_vr)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg_vr)[am::strings::msg_params][am::strings::sync_file_name]
+ [am::strings::value] = file_path;
+
+ const std::string dir_path = "./";
+ ON_CALL(app_mngr_settings_, app_icons_folder())
+ .WillByDefault(ReturnRef(dir_path));
+
+ utils::SharedPtr<SetAppIconRequest> req_vr =
+ CreateCommand<SetAppIconRequest>(msg_vr);
+
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(hmi_interfaces_));
+ ON_CALL(hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ ON_CALL(app_mngr_, protocol_handler())
+ .WillByDefault(ReturnRef(mock_protocol_handler_));
+ ON_CALL(mock_protocol_handler_, get_settings())
+ .WillByDefault(ReturnRef(mock_protocol_handler_settings_));
+
+ ON_CALL(mock_protocol_handler_settings_, max_supported_protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4));
+
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(*mock_app, set_app_icon_path(_)).WillByDefault(Return(true));
+ ON_CALL(*mock_app, app_icon_path()).WillByDefault(ReturnRef(file_path));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::info] = "info1";
+
+ Event event(hmi_apis::FunctionID::UI_SetAppIcon);
+ event.set_smart_object(*msg);
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ req_vr->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*ui_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*ui_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+} // namespace set_app_icon_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_display_layout_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_display_layout_test.cc
new file mode 100644
index 0000000000..0758fb32f4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_display_layout_test.cc
@@ -0,0 +1,250 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/set_display_layout_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace set_display_layout_request {
+
+namespace am = application_manager;
+namespace mobile_result = mobile_apis::Result;
+using sdl_rpc_plugin::commands::SetDisplayLayoutRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+typedef ::utils::SharedPtr<SetDisplayLayoutRequest> CommandPtr;
+
+namespace {
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationKey = 2u;
+const std::string kLayout = "media";
+} // namespace
+
+MATCHER_P(CheckMshCorrId, corr_id, "") {
+ return (*arg)[am::strings::params][am::strings::correlation_id].asUInt() ==
+ corr_id;
+}
+
+class SetDisplayLayoutRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SetDisplayLayoutRequestTest() : mock_app_(CreateMockApp()) {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ }
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+ typedef TypeIf<kMocksAreNice,
+ NiceMock<application_manager_test::MockHMICapabilities>,
+ application_manager_test::MockHMICapabilities>::Result
+ MockHMICapabilities;
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ false);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ sync_primitives::Lock lock_;
+ MockAppPtr mock_app_;
+};
+
+typedef SetDisplayLayoutRequestTest::MockHMICapabilities MockHMICapabilities;
+
+TEST_F(SetDisplayLayoutRequestTest,
+ OnEvent_UIHmiUnsupportedResource_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_ui = CreateFullParamsUISO();
+ (*msg_ui)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ utils::SharedPtr<SetDisplayLayoutRequest> command =
+ CreateCommand<SetDisplayLayoutRequest>(msg_ui);
+
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+
+ Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
+ event.set_smart_object(*msg);
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ ResultCommandExpectations(ui_command_result, "UI is not supported by system");
+}
+
+TEST_F(SetDisplayLayoutRequestTest, Run_InvalidApp_UNSUCCESS) {
+ MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ CommandPtr command(CreateCommand<SetDisplayLayoutRequest>(msg));
+
+ MockAppPtr invalid_mock_app;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(invalid_mock_app));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+
+ command->Run();
+}
+
+TEST_F(SetDisplayLayoutRequestTest, Run_SUCCESS) {
+ MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ CommandPtr command(CreateCommand<SetDisplayLayoutRequest>(msg));
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, display_layout()).WillOnce(ReturnRef(kLayout));
+ EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
+
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(kCorrelationKey));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetDisplayLayout))
+ .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(CheckMshCorrId(kCorrelationKey)))
+ .WillOnce(Return(true));
+
+ command->Run();
+}
+
+TEST_F(SetDisplayLayoutRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
+ CommandPtr command(CreateCommand<SetDisplayLayoutRequest>());
+ am::event_engine::Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ SmartObject msg(smart_objects::SmartType_Map);
+
+ event.set_smart_object(msg);
+
+ command->on_event(event);
+}
+
+TEST_F(SetDisplayLayoutRequestTest, OnEvent_SUCCESS) {
+ am::event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
+ MessageSharedPtr msg = CreateMessage();
+
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*msg)[am::strings::msg_params][am::hmi_response::display_capabilities] = 0;
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ event.set_smart_object(*msg);
+
+ MessageSharedPtr dispaly_capabilities_msg = CreateMessage();
+ (*dispaly_capabilities_msg)[am::hmi_response::templates_available] =
+ "templates_available";
+
+ EXPECT_CALL(mock_hmi_capabilities_, display_capabilities())
+ .WillOnce(Return(dispaly_capabilities_msg.get()));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+
+ CommandPtr command(CreateCommand<SetDisplayLayoutRequest>(msg));
+ command->on_event(event);
+}
+
+} // namespace set_display_layout_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc
new file mode 100644
index 0000000000..4a590e0d91
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc
@@ -0,0 +1,1177 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/set_global_properties_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_help_prompt_manager.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace set_global_properties_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::SetGlobalPropertiesRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using am::CommandsMap;
+using utils::custom_string::CustomString;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 1u;
+const std::string kText = "one";
+const uint32_t kPosition = 1u;
+} // namespace
+
+class SetGlobalPropertiesRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SetGlobalPropertiesRequestTest()
+ : lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , mock_app_(CreateMockApp()) {
+ mock_help_prompt_manager_ =
+ std::shared_ptr<application_manager_test::MockHelpPromptManager>(
+ new application_manager_test::MockHelpPromptManager());
+ }
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ msg_params[am::strings::vr_help_title] = "vr_help_title";
+ msg_params[am::strings::vr_help][0][am::strings::text] = "vr_help";
+ msg_params[am::strings::vr_help][0][am::strings::position] = 1u;
+ msg_params[am::strings::help_prompt][0][am::strings::text] = "help_promt";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ MessageSharedPtr CreateMsgParams() {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ return msg;
+ }
+
+ void VRArraySetupHelper(MessageSharedPtr msg,
+ SmartObject& vr_help_title,
+ SmartObject& vr_help_array) {
+ (*msg)[am::strings::msg_params][am::strings::vr_help_title] = vr_help_title;
+ vr_help_array[0] = SmartObject(smart_objects::SmartType_Map);
+ vr_help_array[0][am::strings::text] = kText;
+ vr_help_array[0][am::strings::position] = kPosition;
+ (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ }
+
+ void OnEventUISetupHelper(MessageSharedPtr msg,
+ SharedPtr<SetGlobalPropertiesRequest> command) {
+ SmartObject vr_help_title("yes");
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ VRArraySetupHelper(msg, vr_help_title, vr_help_array);
+ EXPECT_CALL(mock_message_helper_,
+ VerifyImageVrHelpItems(vr_help_array, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(app_mngr_,
+ RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_vr_help_title(vr_help_title));
+ EXPECT_CALL(*mock_app_, set_vr_help(vr_help_array));
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ EXPECT_CALL(*mock_app_, vr_help()).WillOnce(Return(&vr_help_array));
+ EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_keyboard_props(_)).Times(0);
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ command->Run();
+ }
+
+ void OnEventTTSSetupHelper(MessageSharedPtr msg,
+ SharedPtr<SetGlobalPropertiesRequest> command) {
+ SmartObject help_prompt(smart_objects::SmartType_Array);
+ help_prompt[0][am::strings::text] = "Help_Prompt_One";
+ (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
+ SmartObject timeout_prompt(smart_objects::SmartType_Array);
+ timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One";
+ (*msg)[am::strings::msg_params][am::strings::timeout_prompt] =
+ timeout_prompt;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(mock_message_helper_, VerifyTtsFiles(help_prompt, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(mock_message_helper_, VerifyTtsFiles(timeout_prompt, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_,
+ RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_help_prompt(help_prompt));
+ EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(&help_prompt));
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(timeout_prompt));
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(&timeout_prompt));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ command->Run();
+ }
+
+ void EmptyExpectationsSetupHelper() {
+ EXPECT_CALL(*mock_app_, set_vr_help_title(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_vr_help(_)).Times(0);
+ EXPECT_CALL(*mock_app_, vr_help_title()).Times(0);
+ EXPECT_CALL(*mock_app_, vr_help()).Times(0);
+ EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_keyboard_props(_)).Times(0);
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+ }
+
+ void ExpectInvalidData() {
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_DATA),
+ am::commands::Command::SOURCE_SDL));
+ }
+
+ void ExpectVerifyImageVrHelpSuccess(SmartObject& smart_obj) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(smart_obj, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
+ }
+
+ void ExpectVerifyImageVrHelpUnsuccess() {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
+ }
+
+ void ExpectVerifyImageSuccess(SmartObject& smart_obj) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(smart_obj, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
+ }
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ void ExpectationsHmiInterface_Run() {
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ }
+ std::shared_ptr<sync_primitives::Lock> lock_ptr_;
+ MockAppPtr mock_app_;
+ std::shared_ptr<application_manager_test::MockHelpPromptManager>
+ mock_help_prompt_manager_;
+};
+
+TEST_F(SetGlobalPropertiesRequestTest,
+ OnEvent_UIHmiSendSuccess_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_vr = CreateFullParamsUISO();
+ (*msg_vr)[am::strings::msg_params][am::strings::vr_commands][0] =
+ "vr_command";
+
+ utils::SharedPtr<SetGlobalPropertiesRequest> command =
+ CreateCommand<SetGlobalPropertiesRequest>(msg_vr);
+
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ const smart_objects::SmartObject* vr_help_title =
+ &((*msg_vr)[am::strings::msg_params][am::strings::vr_help_title]);
+ const smart_objects::SmartObject* vr_help =
+ &((*msg_vr)[am::strings::msg_params][am::strings::vr_help]);
+ const smart_objects::SmartObject* vr_help_prompt =
+ &((*msg_vr)[am::strings::msg_params][am::strings::help_prompt]);
+ ON_CALL(*mock_app_, vr_help_title()).WillByDefault(Return(vr_help_title));
+ ON_CALL(*mock_app_, vr_help()).WillByDefault(Return(vr_help));
+ ON_CALL(*mock_app_, help_prompt()).WillByDefault(Return(vr_help_prompt));
+
+ ExpectationsHmiInterface_Run();
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+ (*msg)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ ON_CALL(mock_message_helper_,
+ VerifyImageVrHelpItems(
+ (*msg_vr)[am::strings::msg_params][am::strings::vr_help], _, _))
+ .WillByDefault(Return(mobile_apis::Result::SUCCESS));
+
+ ON_CALL(mock_message_helper_, VerifyImage(_, _, _))
+ .WillByDefault(Return(mobile_apis::Result::SUCCESS));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*msg_vr)[am::strings::msg_params][am::strings::help_prompt], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::UI_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties)))
+ .WillOnce(Return(true));
+ (*msg_vr)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ Event event_vr(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ event_vr.set_smart_object(*msg_vr);
+
+ command->Run();
+ command->on_event(event_vr);
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ ResultCommandExpectations(ui_command_result, "UI is not supported by system");
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, OnEvent_SUCCESS_Expect_MessageNotSend) {
+ MessageSharedPtr response = CreateMessage(smart_objects::SmartType_Map);
+ (*response)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*response)[am::strings::msg_params][am::strings::info] = "test";
+
+ am::event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ event.set_smart_object(*response);
+
+ utils::SharedPtr<SetGlobalPropertiesRequest> command =
+ CreateCommand<SetGlobalPropertiesRequest>(response);
+
+ MockAppPtr mock_app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .Times(0);
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest,
+ OnEvent_UNSUPPORTED_RESOURCE_Expect_false) {
+ MessageSharedPtr response = CreateMessage(smart_objects::SmartType_Map);
+ (*response)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*response)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*response)[am::strings::msg_params][am::strings::info] = "qwe";
+
+ am::event_engine::Event event_tts(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ event_tts.set_smart_object(*response);
+ am::event_engine::Event event_ui(
+ hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event_tts.set_smart_object(*response);
+ utils::SharedPtr<SetGlobalPropertiesRequest> command =
+ CreateCommand<SetGlobalPropertiesRequest>(response);
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ MessageSharedPtr response_to_mobile;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->Run();
+ command->on_event(event_ui);
+ command->on_event(event_tts);
+
+ EXPECT_EQ((*response_to_mobile)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ false);
+ EXPECT_EQ(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(mobile_apis::Result::INVALID_DATA));
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRNoMenuAndKeyboard_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ OnEventUISetupHelper(msg, command);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRWithMenuAndKeyboard_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help_title("yes");
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ VRArraySetupHelper(msg, vr_help_title, vr_help_array);
+ (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
+ SmartObject menu_title("Menu_Title");
+ (*msg)[am::strings::msg_params][am::hmi_request::menu_title] = menu_title;
+ SmartObject menu_icon(smart_objects::SmartType_Map);
+ menu_icon[am::strings::value] = "1";
+ (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
+ SmartObject keyboard_properties(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
+ keyboard_properties;
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_vr_help_title(vr_help_title));
+ EXPECT_CALL(*mock_app_, set_vr_help(vr_help_array));
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ EXPECT_CALL(*mock_app_, vr_help()).WillOnce(Return(&vr_help_array));
+ EXPECT_CALL(*mock_app_, set_menu_title(menu_title));
+ EXPECT_CALL(*mock_app_, set_menu_icon(menu_icon));
+ EXPECT_CALL(*mock_app_, set_keyboard_props(keyboard_properties));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRBrokenMenuIcon_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help_title("yes");
+ (*msg)[am::strings::msg_params][am::strings::vr_help_title] = vr_help_title;
+ SmartObject menu_icon(smart_objects::SmartType_Map);
+ menu_icon[am::strings::value] = "1";
+ (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
+ .WillOnce((Return(mobile_apis::Result::ABORTED)));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRBrokenVRHelp_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help_title("yes");
+ SmartObject menu_icon(smart_objects::SmartType_Map);
+ menu_icon[am::strings::value] = "1";
+ (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ VRArraySetupHelper(msg, vr_help_title, vr_help_array);
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
+ .WillOnce((Return(mobile_apis::Result::ABORTED)));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRIncorrectSyntax_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
+ SmartObject vr_help_title("wrong syntax string\\n");
+ SmartObject menu_icon(smart_objects::SmartType_Map);
+ menu_icon[am::strings::value] = "1";
+ (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ VRArraySetupHelper(msg, vr_help_title, vr_help_array);
+
+ EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRMissingTitle_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ vr_help_array[0] = SmartObject(smart_objects::SmartType_Map);
+ vr_help_array[0][am::strings::text] = kText;
+ vr_help_array[0][am::strings::position] = kPosition;
+ (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRMissingArray_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help_title("yes");
+ (*msg)[am::strings::msg_params][am::strings::vr_help_title] = vr_help_title;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_VRWrongOrder_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help_title("yes");
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ VRArraySetupHelper(msg, vr_help_title, vr_help_array);
+ vr_help_array[1] = SmartObject(smart_objects::SmartType_Map);
+ vr_help_array[1][am::strings::text] = "two";
+ vr_help_array[1][am::strings::position] = 3u;
+ (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
+
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
+ .WillOnce((Return(mobile_apis::Result::SUCCESS)));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_NoVR_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject keyboard_properties(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
+ keyboard_properties;
+ SmartObject menu_title("Menu_Title");
+ (*msg)[am::strings::msg_params][am::hmi_request::menu_title] = menu_title;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_menu_title(menu_title));
+ EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_keyboard_props(keyboard_properties));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_NoVRNoDataNoDefault_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject keyboard_properties(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
+ keyboard_properties;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey)); EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_keyboard_props(_));
+ EXPECT_CALL(*mock_app_, app_id());
+
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_NoVRNoDataDefaultCreated_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject keyboard_properties(smart_objects::SmartType_Map);
+ (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
+ keyboard_properties;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_keyboard_props(keyboard_properties));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_TTSHelpAndTimeout_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject help_prompt(smart_objects::SmartType_Array);
+ help_prompt[0][am::strings::text] = "Help_Prompt_One";
+ (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
+ SmartObject timeout_prompt(smart_objects::SmartType_Array);
+ timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One";
+ (*msg)[am::strings::msg_params][am::strings::timeout_prompt] = timeout_prompt;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(mock_message_helper_, VerifyTtsFiles(help_prompt, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(mock_message_helper_, VerifyTtsFiles(timeout_prompt, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_help_prompt(help_prompt));
+ EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(&help_prompt));
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(timeout_prompt));
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(&timeout_prompt));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_TTSOnlyHelp_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject help_prompt(smart_objects::SmartType_Array);
+ help_prompt[0][am::strings::text] = "Help_Prompt_One";
+ (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(mock_message_helper_, VerifyTtsFiles(help_prompt, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_help_prompt(help_prompt));
+ EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(&help_prompt));
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(_)).Times(0);
+ EXPECT_CALL(*mock_app_, timeout_prompt()).Times(0);
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_TTSOnlyTimeout_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject timeout_prompt(smart_objects::SmartType_Array);
+ timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One";
+ (*msg)[am::strings::msg_params][am::strings::timeout_prompt] = timeout_prompt;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EXPECT_CALL(mock_message_helper_, VerifyTtsFiles(timeout_prompt, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
+ EXPECT_CALL(*mock_app_, set_help_prompt(_)).Times(0);
+ EXPECT_CALL(*mock_app_, help_prompt()).Times(0);
+ EXPECT_CALL(*mock_app_, set_timeout_prompt(timeout_prompt));
+ EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(&timeout_prompt));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
+ .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_TTSIncorrectSyntax_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject timeout_prompt(smart_objects::SmartType_Array);
+ timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One\\n";
+ (*msg)[am::strings::msg_params][am::strings::timeout_prompt] = timeout_prompt;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidHelpPromptText_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject help_prompt(smart_objects::SmartType_Array);
+ help_prompt[0][am::strings::text] =
+ "invalid help prompt text with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
+
+ ExpectVerifyImageVrHelpUnsuccess();
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidVrHelpText_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help(smart_objects::SmartType_Array);
+ vr_help[0][am::strings::text] =
+ "invalid vr_help text with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help;
+
+ ExpectVerifyImageVrHelpSuccess(vr_help);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidImageValue_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject vr_help(smart_objects::SmartType_Array);
+ vr_help[0][am::strings::text] = "vr_help";
+ vr_help[0][am::strings::image][am::strings::value] =
+ "invalid value text with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help;
+
+ ExpectVerifyImageVrHelpSuccess(vr_help);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidMenuIcon_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject menu_icon(smart_objects::SmartType_Array);
+ menu_icon[am::strings::value] =
+ "invalid menu icon text with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::menu_icon] = menu_icon;
+
+ ExpectVerifyImageSuccess(menu_icon);
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidMenuTitle_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject menu_title(smart_objects::SmartType_Array);
+ menu_title = "invalid menu title text with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::menu_title] = menu_title;
+
+ ExpectVerifyImageVrHelpUnsuccess();
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest,
+ Run_InvalidLimitedCharacterList_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject limited_character_list(smart_objects::SmartType_Array);
+ limited_character_list[0] =
+ "invalid limited character list text with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::keyboard_properties]
+ [am::strings::limited_character_list] = limited_character_list;
+
+ ExpectVerifyImageVrHelpUnsuccess();
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest,
+ Run_InvalidAutoCompleteText_INVALID_DATA) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject auto_complete_text(smart_objects::SmartType_Array);
+ auto_complete_text =
+ "invalid auto completetext with empty line in the end\\n";
+ (*msg)[am::strings::msg_params][am::strings::keyboard_properties]
+ [am::strings::auto_complete_text] = auto_complete_text;
+
+ ExpectVerifyImageVrHelpUnsuccess();
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ ExpectInvalidData();
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_NoData_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ ExpectVerifyImageVrHelpUnsuccess();
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidApp_Canceled) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ ExpectVerifyImageVrHelpUnsuccess();
+
+ EmptyExpectationsSetupHelper();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ command->Run();
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, OnEvent_PendingRequest_UNSUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ (*msg)[am::strings::params][am::hmi_response::code] = response_code;
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, OnEvent_UIAndSuccessResultCode_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ (*msg)[am::strings::params][am::hmi_response::code] = response_code;
+
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+ OnEventUISetupHelper(msg, command);
+
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
+ .WillOnce(Return(true));
+
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, OnEvent_UIAndWarningResultCode_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::WARNINGS;
+ (*msg)[am::strings::params][am::hmi_response::code] = response_code;
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ OnEventUISetupHelper(msg, command);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
+ .WillOnce(Return(true));
+
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidApp_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::WARNINGS;
+ (*msg)[am::strings::params][am::hmi_response::code] = response_code;
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ OnEventUISetupHelper(msg, command);
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(MockAppPtr()));
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+
+ Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidEventID_Canceled) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+
+ Event event(hmi_apis::FunctionID::TTS_Stopped);
+ event.set_smart_object(*msg);
+
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest,
+ OnEvent_TTSAndSuccessResultCode_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ (*msg)[am::strings::params][am::hmi_response::code] = response_code;
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ OnEventTTSSetupHelper(msg, command);
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ command->on_event(event);
+}
+
+TEST_F(SetGlobalPropertiesRequestTest,
+ OnEvent_TTSAndWarningsResultCode_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ const hmi_apis::Common_Result::eType response_code =
+ hmi_apis::Common_Result::WARNINGS;
+ (*msg)[am::strings::params][am::hmi_response::code] = response_code;
+ ON_CALL(
+ mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+
+ OnEventTTSSetupHelper(msg, command);
+
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
+
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
+ .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ event.set_smart_object(*msg);
+
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::WARNINGS));
+}
+
+} // namespace set_global_properties_request
+} // 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/set_media_clock_timer_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_media_clock_timer_test.cc
new file mode 100644
index 0000000000..9d2dd996bc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_media_clock_timer_test.cc
@@ -0,0 +1,356 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "mobile/set_media_clock_timer_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace set_media_clock_timer_request {
+
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::SetMediaClockRequest;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using am::MockMessageHelper;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace UpdateMode = mobile_apis::UpdateMode;
+
+typedef SharedPtr<SetMediaClockRequest> SetMediaClockRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 2u;
+const uint32_t kAppID = 2u;
+const uint32_t kHours = 2u;
+const uint32_t kMinutes = 26u;
+const uint32_t kSeconds = 1u;
+} // namespace
+
+class SetMediaClockRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SetMediaClockRequestTest() : mock_app_(CreateMockApp()) {}
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ }
+
+ void ResultCommandExpectations(MessageSharedPtr msg,
+ const std::string& info) {
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
+ info);
+ }
+
+ MessageSharedPtr CreateMsgParams() {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ return msg;
+ }
+
+ void ExpectationsSetupHelper(bool is_media) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(is_media));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ }
+
+ MockAppPtr mock_app_;
+};
+
+TEST_F(SetMediaClockRequestTest,
+ OnEvent_UIHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ utils::SharedPtr<SetMediaClockRequest> command =
+ CreateCommand<SetMediaClockRequest>(msg);
+
+ MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*ev_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*ev_msg)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*ev_msg)[am::strings::msg_params][am::strings::info] =
+ "UI is not supported by system";
+
+ Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
+ event.set_smart_object(*ev_msg);
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_RESPONSE));
+
+ MessageSharedPtr ui_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ ResultCommandExpectations(ui_command_result, "UI is not supported by system");
+}
+
+TEST_F(SetMediaClockRequestTest, Run_UpdateCountUp_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[am::strings::msg_params][am::strings::update_mode] =
+ UpdateMode::COUNTUP;
+ (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::start_time]
+ [am::strings::minutes] = kMinutes;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
+ kMinutes;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::seconds] =
+ kSeconds;
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(true));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppID));
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetMediaClockTimer))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_UpdateCountDown_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[am::strings::msg_params][am::strings::update_mode] =
+ UpdateMode::COUNTDOWN;
+ (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::start_time]
+ [am::strings::minutes] = kMinutes;
+ (*msg)[am::strings::msg_params][am::strings::start_time]
+ [am::strings::seconds] = kSeconds;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
+ kMinutes;
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(true));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppID));
+ EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ .WillOnce(Return(kCorrelationId));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetMediaClockTimer))
+ .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
+ ON_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_UpdateCountUpWrongTime_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[am::strings::msg_params][am::strings::update_mode] =
+ UpdateMode::COUNTUP;
+ (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::start_time]
+ [am::strings::minutes] = kMinutes;
+ (*msg)[am::strings::msg_params][am::strings::start_time]
+ [am::strings::seconds] = kSeconds;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
+ kMinutes;
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ ExpectationsSetupHelper(true);
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_UpdateCountDownWrongTime_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[am::strings::msg_params][am::strings::update_mode] =
+ UpdateMode::COUNTDOWN;
+ (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::start_time]
+ [am::strings::minutes] = kMinutes;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
+ kHours;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
+ kMinutes;
+ (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::seconds] =
+ kSeconds;
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(true));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_NoStartTime_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[am::strings::msg_params][am::strings::update_mode] =
+ UpdateMode::COUNTDOWN;
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ ExpectationsSetupHelper(true);
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_NoUpdateMode_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ ExpectationsSetupHelper(true);
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_NotMediaApp_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ ExpectationsSetupHelper(false);
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, Run_InvalidApp_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+ EXPECT_CALL(*mock_app_, is_media_application()).Times(0);
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+
+ command->Run();
+}
+
+TEST_F(SetMediaClockRequestTest, OnEvent_Success) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*msg)[am::strings::msg_params] = SmartObject(smart_objects::SmartType_Null);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
+
+ Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
+ event.set_smart_object(*msg);
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+ command->on_event(event);
+}
+
+TEST_F(SetMediaClockRequestTest, OnEvent_Canceled) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<SetMediaClockRequest> command(
+ CreateCommand<SetMediaClockRequest>(msg));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ Event event(hmi_apis::FunctionID::UI_Slider);
+ event.set_smart_object(*msg);
+
+ command->on_event(event);
+}
+
+} // namespace set_media_clock_timer_request
+} // 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/show_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/show_test.cc
new file mode 100644
index 0000000000..9d5497d4a7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/show_test.cc
@@ -0,0 +1,921 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/show_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace show_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::ShowRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using test::components::policy_test::MockPolicyHandlerInterface;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kFunctionID = 3u;
+} // namespace
+
+class ShowRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ ShowRequestTest() {
+ mock_app_ = CreateMockApp();
+ }
+ sync_primitives::Lock lock_;
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ MessageSharedPtr CreateMsgParams() {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::params][am::strings::function_id] = kFunctionID;
+ return msg;
+ }
+
+ void TestSetupHelper(MessageSharedPtr msg,
+ hmi_apis::Common_TextFieldName::eType field_name,
+ const char* field) {
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::params][am::strings::function_id] = kFunctionID;
+ msg_params[field] = text_field_;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ msg_params.erase(field);
+ msg_params[am::hmi_request::show_strings][0][am::hmi_request::field_name] =
+ static_cast<int32_t>(field_name);
+ msg_params[am::hmi_request::show_strings][0][am::hmi_request::field_text] =
+ text_field_;
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+ }
+
+ void TestSetupHelperWrongSyntax(
+ MessageSharedPtr msg,
+ hmi_apis::Common_TextFieldName::eType field_name,
+ const char* field) {
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ msg_params[field] = text_field_;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
+ }
+
+ void TestSetupHelperWithMetadata(
+ MessageSharedPtr msg,
+ hmi_apis::Common_TextFieldName::eType field_name,
+ const char* field,
+ size_t num_tags,
+ int32_t* field_tags,
+ bool set_field_text = true) {
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::params][am::strings::function_id] = kFunctionID;
+ if (set_field_text) {
+ msg_params[field] = text_field_;
+ }
+ msg_params[am::strings::metadata_tags][field] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ for (size_t i = 0; i < num_tags; ++i) {
+ const int32_t current_tag = field_tags[i];
+ msg_params[am::strings::metadata_tags][field][i] = current_tag;
+ }
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ EXPECT_EQ((*msg)[am::strings::msg_params], msg_params);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params.erase(field);
+ msg_params.erase(am::strings::metadata_tags);
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ if (set_field_text) {
+ msg_params[am::hmi_request::show_strings][0]
+ [am::hmi_request::field_name] =
+ static_cast<int32_t>(field_name);
+ msg_params[am::hmi_request::show_strings][0]
+ [am::hmi_request::field_text] = text_field_;
+ msg_params[am::hmi_request::show_strings][0]
+ [am::hmi_request::field_types] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ for (size_t i = 0; i < num_tags; ++i) {
+ const int32_t current_tag = field_tags[i];
+ msg_params[am::hmi_request::show_strings][0]
+ [am::hmi_request::field_types][i] = current_tag;
+ }
+ }
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+ }
+
+ MockAppPtr mock_app_;
+ std::string text_field_;
+};
+
+TEST_F(ShowRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_vr = CreateFullParamsUISO();
+ (*msg_vr)[am::strings::msg_params][am::strings::menu_params]
+ [am::hmi_request::parent_id] = 10u;
+ (*msg_vr)[am::strings::msg_params][am::strings::menu_params]
+ [am::strings::menu_name] = "menu_name";
+
+ utils::SharedPtr<ShowRequest> command = CreateCommand<ShowRequest>(msg_vr);
+
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
+
+ Event event(hmi_apis::FunctionID::UI_Show);
+ event.set_smart_object(*msg);
+
+ MessageSharedPtr vr_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+
+ command->on_event(event);
+
+ EXPECT_EQ((*vr_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*vr_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*vr_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*vr_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+TEST_F(ShowRequestTest, Run_SoftButtonExists_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[am::strings::soft_buttons] = "Soft_Buttons";
+ (*msg)[am::strings::msg_params] = msg_params;
+ SmartObject creation_msg_params(msg_params);
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(msg_params, _, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ SubscribeApplicationToSoftButton(creation_msg_params, _, kFunctionID));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_SoftButtonNotExists_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[am::strings::soft_buttons] = "";
+ (*msg)[am::strings::msg_params] = msg_params;
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ EXPECT_CALL(*mock_app_, UnsubscribeFromSoftButtons(kFunctionID));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_SoftButtonExists_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[am::strings::soft_buttons] = "Soft_Buttons";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(msg_params, _, _, _))
+ .WillOnce(Return(mobile_apis::Result::ABORTED));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_message_helper_, SubscribeApplicationToSoftButton(_, _, _))
+ .Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_Graphic_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject graphic(smart_objects::SmartType_Map);
+ graphic[am::strings::value] = "1";
+ msg_params[am::strings::graphic] = graphic;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_Graphic_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject graphic(smart_objects::SmartType_Map);
+ graphic[am::strings::value] = "1";
+ msg_params[am::strings::graphic] = graphic;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
+ .WillOnce(Return(mobile_apis::Result::ABORTED));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_Graphic_WrongSyntax) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject graphic(smart_objects::SmartType_Map);
+ graphic[am::strings::value] = "\\n";
+ msg_params[am::strings::graphic] = graphic;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_SecondaryGraphic_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject graphic(smart_objects::SmartType_Map);
+ graphic[am::strings::value] = "1";
+ msg_params[am::strings::secondary_graphic] = graphic;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_SecondaryGraphic_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject graphic(smart_objects::SmartType_Map);
+ graphic[am::strings::value] = "1";
+ msg_params[am::strings::secondary_graphic] = graphic;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
+ .WillOnce(Return(mobile_apis::Result::ABORTED));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_SecondaryGraphic_WrongSyntax) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject graphic(smart_objects::SmartType_Map);
+ graphic[am::strings::value] = "";
+ msg_params[am::strings::secondary_graphic] = graphic;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField1_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_1";
+ TestSetupHelper(msg,
+ hmi_apis::Common_TextFieldName::mainField1,
+ am::strings::main_field_1);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField1_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_1\\n";
+ TestSetupHelperWrongSyntax(msg,
+ hmi_apis::Common_TextFieldName::mainField1,
+ am::strings::main_field_1);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField2_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_2";
+ TestSetupHelper(msg,
+ hmi_apis::Common_TextFieldName::mainField2,
+ am::strings::main_field_2);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField2_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_2\\n";
+ TestSetupHelperWrongSyntax(msg,
+ hmi_apis::Common_TextFieldName::mainField2,
+ am::strings::main_field_2);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField3_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_3";
+ TestSetupHelper(msg,
+ hmi_apis::Common_TextFieldName::mainField3,
+ am::strings::main_field_3);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField3_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_3\\n";
+ TestSetupHelperWrongSyntax(msg,
+ hmi_apis::Common_TextFieldName::mainField3,
+ am::strings::main_field_3);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField4_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_4";
+ TestSetupHelper(msg,
+ hmi_apis::Common_TextFieldName::mainField4,
+ am::strings::main_field_4);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField4_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_4\\n";
+ TestSetupHelperWrongSyntax(msg,
+ hmi_apis::Common_TextFieldName::mainField4,
+ am::strings::main_field_4);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField1_MetadataTag) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_1";
+ const size_t num_tags = 1;
+ int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
+ TestSetupHelperWithMetadata(msg,
+ hmi_apis::Common_TextFieldName::mainField1,
+ am::strings::main_field_1,
+ num_tags,
+ tags);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField1_MultipleMetadataTags) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_1";
+ const size_t num_tags = 5;
+ int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaTitle,
+ hmi_apis::Common_MetadataType::mediaArtist,
+ hmi_apis::Common_MetadataType::rating,
+ hmi_apis::Common_MetadataType::humidity,
+ hmi_apis::Common_MetadataType::currentTemperature};
+ TestSetupHelperWithMetadata(msg,
+ hmi_apis::Common_TextFieldName::mainField1,
+ am::strings::main_field_1,
+ num_tags,
+ tags);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField2_MetadataTag) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_2";
+ const size_t num_tags = 1;
+ int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
+ TestSetupHelperWithMetadata(msg,
+ hmi_apis::Common_TextFieldName::mainField2,
+ am::strings::main_field_2,
+ num_tags,
+ tags);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField3_MetadataTag) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_3";
+ const size_t num_tags = 1;
+ int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
+ TestSetupHelperWithMetadata(msg,
+ hmi_apis::Common_TextFieldName::mainField3,
+ am::strings::main_field_3,
+ num_tags,
+ tags);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField4_MetadataTag) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_4";
+ const size_t num_tags = 1;
+ int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
+ TestSetupHelperWithMetadata(msg,
+ hmi_apis::Common_TextFieldName::mainField4,
+ am::strings::main_field_4,
+ num_tags,
+ tags);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MainField1_MetadataTagWithNoFieldData) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Main_Field_1";
+ const size_t num_tags = 1;
+ int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
+ TestSetupHelperWithMetadata(msg,
+ hmi_apis::Common_TextFieldName::mainField1,
+ am::strings::main_field_1,
+ num_tags,
+ tags,
+ false);
+ command->Run();
+
+ MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*ev_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*ev_msg)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
+ (*ev_msg)[am::strings::msg_params][am::strings::info] = "";
+
+ Event event(hmi_apis::FunctionID::UI_Show);
+ event.set_smart_object(*ev_msg);
+
+ MessageSharedPtr ui_command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(mobile_apis::Result::WARNINGS));
+}
+
+TEST_F(ShowRequestTest, Run_MediaClock_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Media_Clock";
+ TestSetupHelper(msg,
+ hmi_apis::Common_TextFieldName::mediaClock,
+ am::strings::media_clock);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MediaClock_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Media_Clock\\n";
+ TestSetupHelperWrongSyntax(msg,
+ hmi_apis::Common_TextFieldName::mediaClock,
+ am::strings::media_clock);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MediaTrack_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Media_Track";
+ TestSetupHelper(msg,
+ hmi_apis::Common_TextFieldName::mediaTrack,
+ am::strings::media_track);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_MediaTrack_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Media_Track\\n";
+ TestSetupHelperWrongSyntax(msg,
+ hmi_apis::Common_TextFieldName::mediaTrack,
+ am::strings::media_track);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_StatusBar_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Status_Bar";
+ TestSetupHelper(
+ msg, hmi_apis::Common_TextFieldName::statusBar, am::strings::status_bar);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_StatusBar_WrongSyntax) {
+ MessageSharedPtr msg = CreateMessage();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ text_field_ = "Status_Bar\\n";
+ TestSetupHelperWrongSyntax(
+ msg, hmi_apis::Common_TextFieldName::statusBar, am::strings::status_bar);
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_Alignment_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[am::strings::alignment] = "Alignment";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_CustomPresets_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject custom_presets(smart_objects::SmartType_Array);
+ custom_presets[0] = "Custom_Presets";
+ msg_params[am::strings::custom_presets] = custom_presets;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
+
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_));
+ EXPECT_CALL(*mock_app_, set_show_command(msg_params));
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_CustomPresets_WrongSyntax) {
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject msg_params(smart_objects::SmartType_Map);
+ SmartObject custom_presets(smart_objects::SmartType_Array);
+ custom_presets[0] = "Custom_Presets\\t";
+ msg_params[am::strings::custom_presets] = custom_presets;
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_InvalidApp_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(MockAppPtr()));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, Run_EmptyParams_Canceled) {
+ MessageSharedPtr msg = CreateMsgParams();
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*mock_app_, app_id()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+ EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
+
+ command->Run();
+}
+
+TEST_F(ShowRequestTest, OnEvent_SuccessResultCode_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::eType::SUCCESS;
+ (*msg)[am::strings::msg_params] = SmartObject(smart_objects::SmartType_Map);
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::eType::SUCCESS), _));
+
+ Event event(hmi_apis::FunctionID::UI_Show);
+ event.set_smart_object(*msg);
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
+
+ command->on_event(event);
+}
+
+TEST_F(ShowRequestTest, OnEvent_WarningsResultCode_SUCCESS) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ mobile_apis::Result::WARNINGS;
+ (*msg)[am::strings::params][am::hmi_response::message] = "Response Info";
+ (*msg)[am::strings::msg_params] = SmartObject(smart_objects::SmartType_Map);
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+
+ Event event(hmi_apis::FunctionID::UI_Show);
+ event.set_smart_object(*msg);
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
+
+ command->on_event(event);
+}
+
+TEST_F(ShowRequestTest, OnEvent_WrongFunctionID_Canceled) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ mobile_apis::Result::SUCCESS;
+
+ SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ Event event(hmi_apis::FunctionID::UI_Alert);
+ event.set_smart_object(*msg);
+
+ command->on_event(event);
+}
+
+} // namespace show_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
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
new file mode 100644
index 0000000000..dcdda55b1c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc
@@ -0,0 +1,99 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/commands/commands_test.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"
+#include "mobile/on_permissions_change_notification.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace simple_notification_commands_test {
+
+namespace am = ::application_manager;
+namespace commands = sdl_rpc_plugin::commands;
+
+using ::testing::_;
+using ::testing::Types;
+using ::testing::Return;
+
+template <class Command>
+class MobileNotificationCommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+typedef Types<commands::OnAppInterfaceUnregisteredNotification,
+ commands::OnAudioPassThruNotification,
+ commands::OnLanguageChangeNotification,
+ commands::OnPermissionsChangeNotification,
+ commands::mobile::OnDriverDistractionNotification>
+ NotificationCommandsList;
+
+MATCHER(CheckNotificationMessage, "") {
+ return (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ am::commands::CommandImpl::mobile_protocol_type_ &&
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ am::commands::CommandImpl::protocol_version_ &&
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ application_manager::MessageType::kNotification;
+}
+
+TYPED_TEST_CASE(MobileNotificationCommandsTest, NotificationCommandsList);
+
+TYPED_TEST(MobileNotificationCommandsTest, Run_SendMessageToMobile_SUCCESS) {
+ ::utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ EXPECT_CALL(this->mock_rpc_service_,
+ SendMessageToMobile(CheckNotificationMessage(), _));
+ command->Run();
+}
+
+} // namespace simple_notification_commands_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/simple_response_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc
new file mode 100644
index 0000000000..cf1f7c6711
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc
@@ -0,0 +1,189 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/helpers.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "mobile/delete_command_response.h"
+#include "mobile/alert_maneuver_response.h"
+#include "mobile/alert_response.h"
+#include "mobile/list_files_response.h"
+#include "mobile/subscribe_button_response.h"
+#include "mobile/add_sub_menu_response.h"
+#include "mobile/dial_number_response.h"
+#include "mobile/end_audio_pass_thru_response.h"
+#include "mobile/unregister_app_interface_response.h"
+#include "mobile/unsubscribe_button_response.h"
+#include "mobile/unsubscribe_way_points_response.h"
+#include "mobile/update_turn_list_response.h"
+#include "mobile/slider_response.h"
+#include "mobile/speak_response.h"
+#include "mobile/subscribe_way_points_response.h"
+#include "mobile/system_response.h"
+#include "mobile/get_way_points_response.h"
+#include "mobile/perform_interaction_response.h"
+#include "mobile/perform_audio_pass_thru_response.h"
+#include "mobile/set_global_properties_response.h"
+#include "mobile/set_media_clock_timer_response.h"
+#include "mobile/show_constant_tbt_response.h"
+#include "mobile/show_response.h"
+#include "mobile/add_command_response.h"
+#include "mobile/send_location_response.h"
+#include "mobile/set_app_icon_response.h"
+#include "mobile/set_display_layout_response.h"
+#include "mobile/generic_response.h"
+#include "mobile/set_app_icon_response.h"
+#include "mobile/scrollable_message_response.h"
+#include "mobile/change_registration_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace simple_response_commands_test {
+
+namespace commands = sdl_rpc_plugin::commands;
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::NotNull;
+using ::testing::Types;
+
+using am::commands::MessageSharedPtr;
+
+template <class Command>
+class MobileResponseCommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef Command CommandType;
+};
+
+typedef Types<commands::ListFilesResponse,
+ commands::DeleteCommandResponse,
+ commands::AlertManeuverResponse,
+ commands::AlertResponse,
+ commands::SubscribeButtonResponse,
+ commands::AddSubMenuResponse,
+ commands::DialNumberResponse,
+ commands::EndAudioPassThruResponse,
+ commands::UnregisterAppInterfaceResponse,
+ commands::UnsubscribeWayPointsResponse,
+ commands::UpdateTurnListResponse,
+ commands::UnsubscribeButtonResponse,
+ commands::SliderResponse,
+ commands::SpeakResponse,
+ commands::SubscribeWayPointsResponse,
+ commands::SystemResponse,
+ commands::GetWayPointsResponse,
+ commands::PerformInteractionResponse,
+ commands::PerformAudioPassThruResponse,
+ commands::SetGlobalPropertiesResponse,
+ commands::SetMediaClockTimerResponse,
+ commands::ShowConstantTBTResponse,
+ commands::ShowResponse,
+ commands::SystemResponse,
+ commands::AddCommandResponse,
+ commands::SendLocationResponse,
+ commands::SetAppIconResponse,
+ commands::SetDisplayLayoutResponse,
+ commands::ChangeRegistrationResponse> ResponseCommandsList;
+
+TYPED_TEST_CASE(MobileResponseCommandsTest, ResponseCommandsList);
+
+TYPED_TEST(MobileResponseCommandsTest, Run_SendResponseToMobile_SUCCESS) {
+ ::utils::SharedPtr<typename TestFixture::CommandType> command =
+ this->template CreateCommand<typename TestFixture::CommandType>();
+ EXPECT_CALL(this->mock_rpc_service_, SendMessageToMobile(NotNull(), _));
+ command->Run();
+}
+
+class GenericResponseFromHMICommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+MATCHER_P2(CheckMessageParams, success, result, "") {
+ const bool is_msg_type_correct =
+ (am::MessageType::kResponse) ==
+ static_cast<int32_t>(
+ (*arg)[am::strings::params][am::strings::message_type].asInt());
+ const bool is_success_correct =
+ success == (*arg)[am::strings::msg_params][am::strings::success].asBool();
+ const bool is_result_code_correct =
+ result ==
+ static_cast<int32_t>(
+ (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
+
+ using namespace helpers;
+ return Compare<bool, EQ, ALL>(
+ true, is_msg_type_correct, is_success_correct, is_result_code_correct);
+}
+
+TEST_F(GenericResponseFromHMICommandsTest, Run_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+
+ SharedPtr<commands::GenericResponse> command(
+ CreateCommand<commands::GenericResponse>(command_msg));
+
+ EXPECT_CALL(
+ this->mock_rpc_service_,
+ SendMessageToMobile(
+ CheckMessageParams(false, mobile_apis::Result::INVALID_DATA), false));
+
+ command->Run();
+}
+
+class ScrollableMessageResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(ScrollableMessageResponseTest, Run_SUCCESS) {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::SUCCESS;
+
+ MockAppPtr app(CreateMockApp());
+
+ SharedPtr<commands::ScrollableMessageResponse> command(
+ CreateCommand<commands::ScrollableMessageResponse>(message));
+ EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app));
+ EXPECT_CALL(*app, UnsubscribeFromSoftButtons(_));
+ command->Run();
+}
+
+} // namespace simple_response_commands_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/slider_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/slider_test.cc
new file mode 100644
index 0000000000..a039581284
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/slider_test.cc
@@ -0,0 +1,342 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "mobile/slider_request.h"
+
+#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace slider_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::SliderRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockMessageHelper;
+using policy_test::MockPolicyHandlerInterface;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+typedef SharedPtr<SliderRequest> CommandPtr;
+
+namespace {
+const int32_t kCommandId = 1;
+const uint32_t kAppId = 1u;
+const uint32_t kCmdId = 1u;
+const uint32_t kConnectionKey = 2u;
+const uint32_t kDefaultTimeout = 1000u;
+const uint32_t kCorrelationId = 2u;
+const uint32_t kFunctionId = 3u;
+const uint32_t kNumTicks = 2u;
+const uint32_t kPositionGreaterTicks = 3u;
+const uint32_t kPositionLessTicks = 1u;
+} // namespace
+
+class SliderRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SliderRequestTest()
+ : mock_app_(CreateMockApp())
+ , msg_(CreateMessage(smart_objects::SmartType_Map)) {}
+
+ MessageSharedPtr CreateFullParamsUISO() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ smart_objects::SmartObject menu_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ menu_params[am::strings::position] = 10;
+ menu_params[am::strings::menu_name] = "LG";
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[am::strings::cmd_id] = kCmdId;
+ msg_params[am::strings::menu_params] = menu_params;
+ msg_params[am::strings::app_id] = kAppId;
+ msg_params[am::strings::cmd_icon] = 1;
+ msg_params[am::strings::cmd_icon][am::strings::value] = "10";
+ (*msg)[am::strings::msg_params] = msg_params;
+
+ return msg;
+ }
+
+ void PreConditions() {
+ (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg_)[am::strings::msg_params][am::strings::num_ticks] = kNumTicks;
+ (*msg_)[am::strings::msg_params][am::strings::position] =
+ kPositionLessTicks;
+ (*msg_)[am::strings::msg_params][am::strings::slider_footer][0] =
+ "slider_footer1";
+ (*msg_)[am::strings::msg_params][am::strings::slider_footer][1] =
+ "slider_footer2";
+ (*msg_)[am::strings::msg_params][am::strings::slider_header] =
+ "slider_header";
+
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ }
+
+ void ExpectManageMobileCommandWithResultCode(
+ const mobile_apis::Result::eType code) {
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(code),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ }
+
+ sync_primitives::Lock lock_;
+
+ MockAppPtr mock_app_;
+ MessageSharedPtr msg_;
+ MockPolicyHandlerInterface mock_policy_handler_;
+};
+
+TEST_F(SliderRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
+ MessageSharedPtr msg_ui = CreateFullParamsUISO();
+ (*msg_ui)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ utils::SharedPtr<SliderRequest> command =
+ CreateCommand<SliderRequest>(msg_ui);
+
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ (*msg)[am::strings::msg_params][am::strings::info] = "info";
+
+ Event event(hmi_apis::FunctionID::UI_Slider);
+ event.set_smart_object(*msg);
+
+ MessageSharedPtr ui_command_result;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
+
+ command->on_event(event);
+
+ EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
+ .asBool(),
+ true);
+ EXPECT_EQ(
+ (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
+ if ((*ui_command_result)[am::strings::msg_params].keyExists(
+ am::strings::info)) {
+ EXPECT_FALSE(
+ (*ui_command_result)[am::strings::msg_params][am::strings::info]
+ .asString()
+ .empty());
+ }
+}
+
+class CallOnTimeOut {
+ public:
+ CallOnTimeOut(CommandRequestImpl& command) : command_(command) {}
+
+ void operator()() {
+ command_.onTimeOut();
+ }
+
+ CommandRequestImpl& command_;
+};
+
+TEST_F(SliderRequestTest, Init_SUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ EXPECT_TRUE(command->Init());
+}
+
+TEST_F(SliderRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ PreConditions();
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(ApplicationSharedPtr()));
+ ExpectManageMobileCommandWithResultCode(
+ mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(SliderRequestTest, Run_PositionGreaterTicks_UNSUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::position] =
+ kPositionGreaterTicks;
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+ command->Run();
+}
+
+TEST_F(SliderRequestTest, Run_SliderFooterNotEqToNumticks_UNSUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::slider_footer][2] =
+ "slider_footer3";
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+ command->Run();
+}
+
+TEST_F(SliderRequestTest, Run_InvalidSliderHeader_UNSUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::slider_header] =
+ "invalid_test_with_empty_str\\n";
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(SliderRequestTest, Run_InvalidSliderFooter_UNSUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::slider_footer][0] =
+ "invalid_test_with_empty_str\\n";
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(SliderRequestTest, Run_SUCCESS) {
+ PreConditions();
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_Slider)));
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->Run();
+}
+
+TEST_F(SliderRequestTest, OnEvent_UI_OnResetTimeout_UNSUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
+ (*msg_)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ EXPECT_TRUE(command->Init());
+
+ EXPECT_CALL(app_mngr_,
+ updateRequestTimeout(kConnectionKey, kCorrelationId, _));
+
+ Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ event.set_smart_object(*msg_);
+ command->on_event(event);
+}
+
+TEST_F(SliderRequestTest, OnEvent_UI_UnknownEventId_UNSUCCESS) {
+ PreConditions();
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ event.set_smart_object(*msg_);
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->on_event(event);
+}
+
+TEST_F(SliderRequestTest, OnEvent_UISliderPositionExists_SUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::TIMED_OUT;
+ (*msg_)[am::strings::params][am::strings::data]
+ [am::strings::slider_position] = "position";
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::TIMED_OUT);
+
+ Event event(hmi_apis::FunctionID::UI_Slider);
+ event.set_smart_object(*msg_);
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->on_event(event);
+}
+
+TEST_F(SliderRequestTest, OnEvent_UISliderAborted_SUCCESS) {
+ PreConditions();
+ (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
+ (*msg_)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::ABORTED);
+
+ Event event(hmi_apis::FunctionID::UI_Slider);
+ event.set_smart_object(*msg_);
+
+ CommandPtr command(CreateCommand<SliderRequest>(msg_));
+ command->on_event(event);
+}
+
+} // namespace slider_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace tests
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/speak_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/speak_request_test.cc
new file mode 100644
index 0000000000..ab086de0e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/speak_request_test.cc
@@ -0,0 +1,407 @@
+/*
+
+ 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 <string>
+#include "gtest/gtest.h"
+#include "mobile/speak_request.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "interfaces/HMI_API.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/shared_ptr.h"
+#include "utils/helpers.h"
+#include "utils/make_shared.h"
+#include "smart_objects/smart_object.h"
+#include "utils/custom_string.h"
+#include "application_manager/application.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace speak_request {
+
+namespace am = application_manager;
+namespace mobile_result = mobile_apis::Result;
+namespace hmi_response = ::application_manager::hmi_response;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::ApplicationManager;
+using am::commands::MessageSharedPtr;
+using am::ApplicationSharedPtr;
+using am::MockMessageHelper;
+using ::testing::_;
+using ::utils::SharedPtr;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using sdl_rpc_plugin::commands::SpeakRequest;
+using ::test::components::application_manager_test::MockApplication;
+
+typedef SharedPtr<SpeakRequest> CommandPtr;
+
+namespace {
+const uint32_t kAppId = 10u;
+const uint32_t kConnectionKey = 5u;
+}
+
+class SpeakRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SpeakRequestTest()
+ : request_(CreateMessage(smart_objects::SmartType_Map))
+ , response_(CreateMessage(smart_objects::SmartType_Map))
+ , app_(CreateMockApp()) {}
+
+ void CheckExpectations(const hmi_apis::Common_Result::eType hmi_response,
+ const mobile_apis::Result::eType mobile_response,
+ const am::HmiInterfaces::InterfaceState state,
+ const bool success) {
+ utils::SharedPtr<SpeakRequest> command =
+ CreateCommand<SpeakRequest>(request_);
+
+ (*response_)[strings::params][hmi_response::code] = hmi_response;
+ (*response_)[strings::msg_params] = 0;
+
+ am::event_engine::Event event_tts(hmi_apis::FunctionID::TTS_Speak);
+ event_tts.set_smart_object(*response_);
+
+ MockAppPtr mock_app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+
+ MessageSharedPtr response_to_mobile;
+ EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
+ .WillRepeatedly(Return(state));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ _, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_tts);
+
+ EXPECT_EQ(
+ (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
+ success);
+ EXPECT_EQ((*response_to_mobile)[strings::msg_params][strings::result_code]
+ .asInt(),
+ static_cast<int32_t>(mobile_response));
+ }
+
+ MessageSharedPtr request_;
+ MessageSharedPtr response_;
+ MockAppPtr app_;
+};
+
+TEST_F(SpeakRequestTest, OnEvent_SUCCESS_Expect_true) {
+ utils::SharedPtr<SpeakRequest> command =
+ CreateCommand<SpeakRequest>(request_);
+
+ (*response_)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*response_)[strings::msg_params] = 0;
+
+ am::event_engine::Event event_tts(hmi_apis::FunctionID::TTS_Speak);
+ event_tts.set_smart_object(*response_);
+
+ MockAppPtr mock_app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
+
+ MessageSharedPtr response_to_mobile;
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ command->on_event(event_tts);
+
+ EXPECT_EQ(
+ (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
+ true);
+ EXPECT_EQ(
+ (*response_to_mobile)[strings::msg_params][strings::result_code].asInt(),
+ static_cast<int32_t>(mobile_apis::Result::SUCCESS));
+}
+
+TEST_F(SpeakRequestTest,
+ OnEvent_UNSUPPORTED_RESOURCE_STATE_AVAILABLE_Expect_true) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_AVAILABLE,
+ true);
+}
+
+TEST_F(SpeakRequestTest,
+ OnEvent_UNSUPPORTED_RESOURCE_STATE_NOT_AVAILABLE_Expect_false) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE,
+ false);
+}
+
+TEST_F(SpeakRequestTest,
+ OnEvent_UNSUPPORTED_RESOURCE_STATE_NOT_RESPONSE_Expect_true) {
+ CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ am::HmiInterfaces::STATE_NOT_RESPONSE,
+ true);
+}
+
+TEST_F(SpeakRequestTest, Run_ApplicationIsNotRegistered) {
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_))
+ .WillByDefault(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithWhiteSpace_InvalidData) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = " ";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar1_InvalidData) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "sd\\t";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar2_InvalidData) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "sd\\n";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar3_InvalidData) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "sd\tdf";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar4_InvalidData) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "sd\n rer";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithIncorrectCharInfirstPlace_InvalidData) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "\n";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgWithEmptyString_Success) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+ ON_CALL(*app_, app_id()).WillByDefault(Return(kAppId));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, Run_MsgCorrect_Success) {
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "asda";
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyTtsFiles(
+ (*request_)[am::strings::msg_params][am::strings::tts_chunks], _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+ ON_CALL(*app_, app_id()).WillByDefault(Return(kAppId));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)));
+
+ command->Run();
+}
+
+TEST_F(SpeakRequestTest, OnEvent_WrongEventId_UNSUCCESS) {
+ Event event(Event::EventID::INVALID_ENUM);
+ CommandPtr command(CreateCommand<SpeakRequest>());
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->on_event(event);
+}
+
+TEST_F(SpeakRequestTest, OnEvent_TTS_Speak_SUCCESS) {
+ Event event(Event::EventID::TTS_Speak);
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ hmi_apis::Common_Result::eType hmi_result = hmi_apis::Common_Result::SUCCESS;
+ (*event_msg)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "1234";
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_result;
+ (*event_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ event.set_smart_object(*event_msg);
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
+ command->on_event(event);
+}
+
+TEST_F(SpeakRequestTest, OnEvent_TTS_SpeakWithWarning_WarningWithSuccess) {
+ Event event(Event::EventID::TTS_Speak);
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ hmi_apis::Common_Result::eType hmi_result = hmi_apis::Common_Result::WARNINGS;
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_result;
+ (*event_msg)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "asda";
+ event.set_smart_object(*event_msg);
+ CommandPtr command(CreateCommand<SpeakRequest>());
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::WARNINGS), _));
+ command->on_event(event);
+}
+
+TEST_F(SpeakRequestTest, OnEvent_TTS_OnResetTimeout_UpdateTimeout) {
+ Event event(Event::EventID::TTS_OnResetTimeout);
+ (*request_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*request_)[am::strings::params][am::strings::correlation_id] = kAppId;
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ EXPECT_CALL(app_mngr_, updateRequestTimeout(kConnectionKey, kAppId, _));
+
+ command->on_event(event);
+}
+
+TEST_F(SpeakRequestTest, OnEvent_ApplicationIsNotRegistered_UNSUCCESS) {
+ const hmi_apis::Common_Result::eType hmi_result =
+ hmi_apis::Common_Result::SUCCESS;
+
+ Event event(Event::EventID::TTS_Speak);
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::msg_params][am::strings::tts_chunks][0]
+ [am::strings::text] = "text";
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_result;
+ (*event_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ event.set_smart_object(*event_msg);
+ CommandPtr command(CreateCommand<SpeakRequest>(request_));
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ command->on_event(event);
+}
+
+} // namespace speak_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace component
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_button_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_button_request_test.cc
new file mode 100644
index 0000000000..17c4db36bc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_button_request_test.cc
@@ -0,0 +1,202 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "mobile/subscribe_button_request.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/smart_object_keys.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace subscribe_button_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::DoAll;
+using ::testing::SaveArg;
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::SubscribeButtonRequest;
+using am::commands::MessageSharedPtr;
+
+typedef SharedPtr<SubscribeButtonRequest> CommandPtr;
+
+class SubscribeButtonRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef TypeIf<kMocksAreNice,
+ NiceMock<application_manager_test::MockHMICapabilities>,
+ application_manager_test::MockHMICapabilities>::Result
+ MockHMICapabilities;
+};
+
+typedef SubscribeButtonRequestTest::MockHMICapabilities MockHMICapabilities;
+
+TEST_F(SubscribeButtonRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ CommandPtr command(CreateCommand<SubscribeButtonRequest>());
+
+ ON_CALL(app_mngr_, application(_))
+ .WillByDefault(Return(SharedPtr<am::Application>()));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(SubscribeButtonRequestTest, Run_SubscriptionNotAllowed_UNSUCCESS) {
+ MessageSharedPtr msg(CreateMessage());
+ (*msg)[am::strings::msg_params][am::strings::button_name] =
+ mobile_apis::ButtonName::SEEKLEFT;
+ CommandPtr command(CreateCommand<SubscribeButtonRequest>(msg));
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+ ON_CALL(*app, is_media_application()).WillByDefault(Return(false));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::REJECTED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(SubscribeButtonRequestTest, Run_UiIsNotSupported_UNSUCCESS) {
+ CommandPtr command(CreateCommand<SubscribeButtonRequest>());
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ ON_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillByDefault(Return(false));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(SubscribeButtonRequestTest, Run_IsSubscribedToButton_UNSUCCESS) {
+ const mobile_apis::ButtonName::eType kButtonName =
+ mobile_apis::ButtonName::SEEKLEFT;
+
+ MessageSharedPtr msg(CreateMessage());
+ (*msg)[am::strings::msg_params][am::strings::button_name] = kButtonName;
+ CommandPtr command(CreateCommand<SubscribeButtonRequest>(msg));
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+ ON_CALL(*app, is_media_application()).WillByDefault(Return(true));
+
+ ON_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillByDefault(Return(true));
+
+ MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
+ (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonName;
+
+ ON_CALL(mock_hmi_capabilities_, button_capabilities())
+ .WillByDefault(Return(button_caps_ptr.get()));
+
+ ON_CALL(*app, IsSubscribedToButton(_)).WillByDefault(Return(true));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::IGNORED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(SubscribeButtonRequestTest, Run_SUCCESS) {
+ const mobile_apis::ButtonName::eType kButtonName =
+ mobile_apis::ButtonName::SEEKLEFT;
+
+ MessageSharedPtr msg(CreateMessage());
+ (*msg)[am::strings::msg_params][am::strings::button_name] = kButtonName;
+ CommandPtr command(CreateCommand<SubscribeButtonRequest>(msg));
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+ ON_CALL(*app, is_media_application()).WillByDefault(Return(true));
+
+ ON_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillByDefault(Return(true));
+
+ MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
+ (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonName;
+
+ ON_CALL(mock_hmi_capabilities_, button_capabilities())
+ .WillByDefault(Return(button_caps_ptr.get()));
+
+ ON_CALL(*app, IsSubscribedToButton(_)).WillByDefault(Return(false));
+
+ MessageSharedPtr hmi_result_msg;
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&hmi_result_msg), Return(true)));
+
+ MessageSharedPtr mobile_result_msg;
+ EXPECT_CALL(this->mock_rpc_service_, ManageMobileCommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&mobile_result_msg), Return(true)));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ EXPECT_EQ(hmi_apis::FunctionID::Buttons_OnButtonSubscription,
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*hmi_result_msg)[am::strings::params][am::strings::function_id]
+ .asInt()));
+
+ EXPECT_EQ(mobile_apis::Result::SUCCESS,
+ static_cast<mobile_apis::Result::eType>(
+ (*mobile_result_msg)[am::strings::msg_params]
+ [am::strings::result_code].asInt()));
+}
+
+} // namespace subscribe_button_request
+} // 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/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
new file mode 100644
index 0000000000..e944c3eb39
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc
@@ -0,0 +1,130 @@
+/*
+ * 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 "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "mobile/subscribe_way_points_request.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/smart_object_keys.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace subscribe_way_points_request {
+
+using ::testing::_;
+using ::testing::A;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::DoAll;
+using ::testing::SaveArg;
+using ::testing::InSequence;
+namespace am = ::application_manager;
+using sdl_rpc_plugin::commands::SubscribeWayPointsRequest;
+using am::commands::MessageSharedPtr;
+
+typedef SharedPtr<SubscribeWayPointsRequest> CommandPtr;
+
+class SubscribeWayPointsRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(SubscribeWayPointsRequestTest, Run_SUCCESS) {
+ CommandPtr command(CreateCommand<SubscribeWayPointsRequest>());
+ MockAppPtr app(CreateMockApp());
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+ ON_CALL(app_mngr_, IsAppSubscribedForWayPoints(A<am::ApplicationSharedPtr>()))
+ .WillByDefault(Return(false));
+ ON_CALL(app_mngr_, IsAnyAppSubscribedForWayPoints())
+ .WillByDefault(Return(true));
+
+ {
+ InSequence dummy;
+ EXPECT_CALL(app_mngr_,
+ SubscribeAppForWayPoints(A<am::ApplicationSharedPtr>()));
+ EXPECT_CALL(*app, UpdateHash());
+ }
+
+ command->Init();
+ MessageSharedPtr mobile_result_msg(
+ CatchMobileCommandResult(CallRun(*command)));
+
+ EXPECT_EQ(mobile_apis::Result::SUCCESS,
+ static_cast<mobile_apis::Result::eType>(
+ (*mobile_result_msg)[am::strings::msg_params]
+ [am::strings::result_code].asInt()));
+}
+
+TEST_F(SubscribeWayPointsRequestTest, OnEvent_SUCCESS) {
+ CommandPtr command(CreateCommand<SubscribeWayPointsRequest>());
+ MockAppPtr app(CreateMockApp());
+ Event event(hmi_apis::FunctionID::Navigation_SubscribeWayPoints);
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ const hmi_apis::Common_Result::eType result_code =
+ hmi_apis::Common_Result::SUCCESS;
+ (*event_msg)[am::strings::params][am::hmi_response::code] = result_code;
+ (*event_msg)[am::strings::msg_params] = 0;
+
+ event.set_smart_object(*event_msg);
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ {
+ InSequence dummy;
+ EXPECT_CALL(app_mngr_,
+ SubscribeAppForWayPoints(A<am::ApplicationSharedPtr>()));
+ EXPECT_CALL(mock_message_helper_, HMIToMobileResult(result_code))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _));
+ EXPECT_CALL(*app, UpdateHash());
+ }
+
+ command->Init();
+ command->on_event(event);
+}
+
+} // namespace subscribe_way_points_request
+} // 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/system_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/system_request_test.cc
new file mode 100644
index 0000000000..7214e0eea4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/system_request_test.cc
@@ -0,0 +1,236 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <set>
+
+#include "gtest/gtest.h"
+
+#include "mobile/system_request.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace system_request {
+
+namespace am = application_manager;
+using sdl_rpc_plugin::commands::SystemRequest;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::MockHmiInterfaces;
+using am::event_engine::Event;
+using am::MessageType;
+using policy_test::MockPolicyHandlerInterface;
+using ::utils::SharedPtr;
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SaveArg;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kAppPolicyId = "fake-app-id";
+const uint32_t kDefaultTimeout = 1000u;
+const std::string kAppFolderName = "fake-app-name";
+const std::string kAppStorageFolder = "fake-storage";
+const std::string kSystemFilesPath = "/fake/system/files";
+const std::string kFileName = "Filename";
+const uint32_t kHmiAppId = 3u;
+} // namespace
+
+class SystemRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SystemRequestTest() : mock_app_(CreateMockApp()) {}
+
+ protected:
+ MessageSharedPtr CreateIVSUMessage() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*msg)[am::strings::msg_params][am::strings::request_type] =
+ mobile_apis::RequestType::HTTP;
+ (*msg)[am::strings::msg_params][am::strings::file_name] = kFileName;
+ return msg;
+ }
+
+ void PreConditions() {
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kAppPolicyId));
+ ON_CALL(*mock_app_, folder_name()).WillByDefault(Return(kAppFolderName));
+ ON_CALL(*mock_app_, hmi_app_id()).WillByDefault(Return(kHmiAppId));
+
+ ON_CALL(app_mngr_settings_, system_files_path())
+ .WillByDefault(ReturnRef(kSystemFilesPath));
+ ON_CALL(app_mngr_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+
+ ON_CALL(mock_policy_handler_, IsRequestTypeAllowed(kAppPolicyId, _))
+ .WillByDefault(Return(true));
+ }
+
+ void ExpectManageMobileCommandWithResultCode(
+ const mobile_apis::Result::eType code) {
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(code),
+ am::commands::Command::CommandSource::SOURCE_SDL));
+ }
+
+ MockAppPtr mock_app_;
+};
+
+TEST_F(SystemRequestTest, Run_HTTP_FileName_no_binary_data_REJECTED) {
+ PreConditions();
+ MessageSharedPtr msg = CreateIVSUMessage();
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::REJECTED);
+
+ SharedPtr<SystemRequest> command(CreateCommand<SystemRequest>(msg));
+ command->Run();
+}
+
+TEST_F(SystemRequestTest,
+ Run_RequestTypeAllowedAndRequestSubTypeAllowed_SendHMIRequest) {
+ MessageSharedPtr msg = CreateIVSUMessage();
+
+ (*msg)[am::strings::msg_params][am::strings::request_type] =
+ mobile_apis::RequestType::OEM_SPECIFIC;
+
+ const std::string request_subtype = "fakeSubType";
+ (*msg)[am::strings::msg_params][am::strings::request_subtype] =
+ request_subtype;
+
+ const std::vector<uint8_t> binary_data = {1u, 2u};
+ (*msg)[am::strings::params][am::strings::binary_data] = binary_data;
+
+ PreConditions();
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestTypeAllowed(kAppPolicyId,
+ mobile_apis::RequestType::OEM_SPECIFIC))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestSubTypeAllowed(kAppPolicyId, request_subtype))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(app_mngr_,
+ SaveBinary(binary_data, kSystemFilesPath, kFileName, 0u))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ smart_objects::SmartObjectSPtr result;
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
+
+ SharedPtr<SystemRequest> command(CreateCommand<SystemRequest>(msg));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ EXPECT_EQ(MessageType::kRequest,
+ (*result)[am::strings::params][am::strings::message_type].asInt());
+ EXPECT_EQ(
+ mobile_apis::RequestType::OEM_SPECIFIC,
+ (*result)[am::strings::msg_params][am::strings::request_type].asInt());
+ EXPECT_EQ(
+ request_subtype,
+ (*msg)[am::strings::msg_params][am::strings::request_subtype].asString());
+}
+
+TEST_F(
+ SystemRequestTest,
+ Run_RequestTypeAllowedAndRequestSubTypeDisallowed_SendDisallowedResponse) {
+ MessageSharedPtr msg = CreateIVSUMessage();
+
+ (*msg)[am::strings::msg_params][am::strings::request_type] =
+ mobile_apis::RequestType::OEM_SPECIFIC;
+
+ const std::string request_subtype = "fakeSubType2";
+ (*msg)[am::strings::msg_params][am::strings::request_subtype] =
+ request_subtype;
+
+ PreConditions();
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestTypeAllowed(kAppPolicyId,
+ mobile_apis::RequestType::OEM_SPECIFIC))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestSubTypeAllowed(kAppPolicyId, request_subtype))
+ .WillOnce(Return(false));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::DISALLOWED);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+
+ SharedPtr<SystemRequest> command(CreateCommand<SystemRequest>(msg));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(SystemRequestTest, Run_RequestTypeDisallowed_SendDisallowedResponse) {
+ MessageSharedPtr msg = CreateIVSUMessage();
+
+ (*msg)[am::strings::msg_params][am::strings::request_type] =
+ mobile_apis::RequestType::OEM_SPECIFIC;
+
+ PreConditions();
+
+ EXPECT_CALL(mock_policy_handler_,
+ IsRequestTypeAllowed(kAppPolicyId,
+ mobile_apis::RequestType::OEM_SPECIFIC))
+ .WillOnce(Return(false));
+
+ ExpectManageMobileCommandWithResultCode(mobile_apis::Result::DISALLOWED);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).Times(0);
+
+ SharedPtr<SystemRequest> command(CreateCommand<SystemRequest>(msg));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+} // namespace system_request
+} // 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/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
new file mode 100644
index 0000000000..1c4df3a463
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc
@@ -0,0 +1,118 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.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/unregister_app_interface_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace unregister_app_interface_request {
+
+namespace am = ::application_manager;
+namespace mobile_result = mobile_apis::Result;
+
+using ::testing::_;
+
+using sdl_rpc_plugin::commands::UnregisterAppInterfaceRequest;
+using am::commands::MessageSharedPtr;
+
+typedef ::utils::SharedPtr<UnregisterAppInterfaceRequest> CommandPtr;
+
+class UnregisterAppInterfaceRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(UnregisterAppInterfaceRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ CommandPtr command(CreateCommand<UnregisterAppInterfaceRequest>());
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(UnregisterAppInterfaceRequestTest, Run_SUCCESS) {
+ const uint32_t kConnectionKey = 1u;
+
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ CommandPtr command(CreateCommand<UnregisterAppInterfaceRequest>(command_msg));
+
+ 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, _, _));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
+ }
+
+ command->Run();
+}
+
+} // namespace unregister_app_interface_request
+} // 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/unsubscribe_button_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_button_request_test.cc
new file mode 100644
index 0000000000..439e94b94f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_button_request_test.cc
@@ -0,0 +1,150 @@
+#include <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "mobile/unsubscribe_button_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace unsubscribe_button_request {
+
+namespace am = ::application_manager;
+namespace mobile_result = mobile_apis::Result;
+
+using ::testing::_;
+
+using sdl_rpc_plugin::commands::UnsubscribeButtonRequest;
+using am::commands::MessageSharedPtr;
+
+typedef ::utils::SharedPtr<UnsubscribeButtonRequest> CommandPtr;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const mobile_apis::ButtonName::eType kButtonId = mobile_apis::ButtonName::OK;
+} // namespace
+
+class UnsubscribeButtonRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef TypeIf<kMocksAreNice,
+ NiceMock<application_manager_test::MockHMICapabilities>,
+ application_manager_test::MockHMICapabilities>::Result
+ MockHMICapabilities;
+};
+
+TEST_F(UnsubscribeButtonRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ CommandPtr command(CreateCommand<UnsubscribeButtonRequest>());
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(UnsubscribeButtonRequestTest,
+ Run_UnsubscribeNotSubscribedButton_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] = kButtonId;
+
+ CommandPtr command(CreateCommand<UnsubscribeButtonRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillOnce(Return(true));
+
+ MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
+ (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonId;
+ EXPECT_CALL(mock_hmi_capabilities_, button_capabilities())
+ .WillOnce(Return(button_caps_ptr.get()));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(*mock_app, UnsubscribeFromButton(kButtonId))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
+
+ command->Run();
+}
+
+TEST_F(UnsubscribeButtonRequestTest,
+ Run_UnsubscribeNotAllowedByHmiCapabilities_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] = kButtonId;
+ CommandPtr command(CreateCommand<UnsubscribeButtonRequest>(command_msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillOnce(Return(true));
+
+ MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
+ EXPECT_CALL(mock_hmi_capabilities_, button_capabilities())
+ .WillOnce(Return(button_caps_ptr.get()));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::UNSUPPORTED_RESOURCE), _));
+
+ command->Run();
+}
+
+TEST_F(UnsubscribeButtonRequestTest, Run_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][am::strings::button_name] = kButtonId;
+
+ CommandPtr command(CreateCommand<UnsubscribeButtonRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
+ .WillOnce(Return(true));
+
+ MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
+ (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonId;
+ EXPECT_CALL(mock_hmi_capabilities_, button_capabilities())
+ .WillOnce(Return(button_caps_ptr.get()));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app));
+
+ EXPECT_CALL(*mock_app, UnsubscribeFromButton(kButtonId))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Buttons_OnButtonSubscription)));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
+
+ EXPECT_CALL(*mock_app, UpdateHash());
+ command->Init();
+ command->Run();
+}
+
+} // namespace unsubscribe_button_request
+} // 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/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
new file mode 100644
index 0000000000..a6e1eb0518
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc
@@ -0,0 +1,171 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "mobile/unsubscribe_way_points_request.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace unsubscribe_way_points_request {
+
+namespace am = ::application_manager;
+namespace mobile_result = mobile_apis::Result;
+
+using ::testing::_;
+using ::testing::Return;
+
+using sdl_rpc_plugin::commands::UnSubscribeWayPointsRequest;
+using am::commands::MessageSharedPtr;
+
+namespace {
+const uint32_t kConnectionKey = 3u;
+const uint32_t kAppId = 5u;
+} // namespace
+
+class UnSubscribeWayPointsRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ UnSubscribeWayPointsRequestTest()
+ : command_msg_(CreateMessage(smart_objects::SmartType_Map))
+ , command_(CreateCommand<UnSubscribeWayPointsRequest>(command_msg_)) {
+ (*command_msg_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ }
+
+ MessageSharedPtr command_msg_;
+ ::utils::SharedPtr<UnSubscribeWayPointsRequest> command_;
+};
+
+TEST_F(UnSubscribeWayPointsRequestTest,
+ Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command_->Run();
+}
+
+TEST_F(UnSubscribeWayPointsRequestTest,
+ Run_AppIsNotSubscribedForWayPoints_UNSUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(app_mngr_,
+ IsAppSubscribedForWayPoints(
+ ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
+
+ command_->Run();
+}
+
+TEST_F(UnSubscribeWayPointsRequestTest, Run_AppSubscribedForWayPoints_SUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(app_mngr_,
+ IsAppSubscribedForWayPoints(
+ ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints)));
+
+ command_->Run();
+}
+
+TEST_F(UnSubscribeWayPointsRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ command_->on_event(event);
+}
+
+TEST_F(UnSubscribeWayPointsRequestTest,
+ OnEvent_ReceivedNavigationUnSubscribeWayPointsEvent_SUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app));
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::msg_params] = 0;
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ mobile_result::SUCCESS;
+ Event event(hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(app_mngr_,
+ UnsubscribeAppFromWayPoints(
+ ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
+
+ command_->on_event(event);
+}
+
+} // namespace unsubscribe_way_points_request
+} // 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/update_turn_list_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/update_turn_list_request_test.cc
new file mode 100644
index 0000000000..d1f59bb3a4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/update_turn_list_request_test.cc
@@ -0,0 +1,292 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "mobile/update_turn_list_request.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace update_turn_list_request {
+
+namespace am = ::application_manager;
+namespace mobile_result = mobile_apis::Result;
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::Ref;
+using ::testing::Eq;
+
+using sdl_rpc_plugin::commands::UpdateTurnListRequest;
+using am::commands::MessageSharedPtr;
+using application_manager_test::MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 3u;
+const hmi_apis::FunctionID::eType kFunctionId =
+ hmi_apis::FunctionID::Buttons_OnButtonEvent;
+const uint32_t kAppId = 5u;
+} // namespace
+
+class UpdateTurnListRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ UpdateTurnListRequestTest()
+ : command_msg_(CreateMessage(smart_objects::SmartType_Map))
+ , command_(CreateCommand<UpdateTurnListRequest>(command_msg_)) {
+ (*command_msg_)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg_)[am::strings::params][am::strings::function_id] =
+ kFunctionId;
+ }
+
+ MessageSharedPtr command_msg_;
+ ::utils::SharedPtr<UpdateTurnListRequest> command_;
+};
+
+TEST_F(UpdateTurnListRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command_->Run();
+}
+
+TEST_F(UpdateTurnListRequestTest, Run_InvalidNavigationText_UNSUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::navigation_text] = "invalid_navigation_text\t\n";
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command_->Run();
+}
+
+TEST_F(UpdateTurnListRequestTest, Run_InvalidTurnIcon_UNSUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::navigation_text] = "valid_navigation_text";
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::turn_icon][am::strings::value] =
+ "invalid_turn_icon\t\n";
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command_->Run();
+}
+
+TEST_F(UpdateTurnListRequestTest,
+ Run_ProcessSoftButtonsNotSucceeded_UNSUCCESS) {
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::navigation_text] = "valid_navigation_text";
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::turn_icon][am::strings::value] =
+ "valid_turn_icon";
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ const mobile_result::eType kExpectedResult = mobile_result::INVALID_ENUM;
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*command_msg_)[am::strings::msg_params],
+ Eq(mock_app),
+ Ref(mock_policy_handler_),
+ Ref(app_mngr_)))
+ .WillOnce(Return(kExpectedResult));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(kExpectedResult), _));
+
+ command_->Run();
+}
+
+TEST_F(UpdateTurnListRequestTest, Run_NoTurnList_UNSUCCESS) {
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*command_msg_)[am::strings::msg_params],
+ Eq(mock_app),
+ Ref(mock_policy_handler_),
+ Ref(app_mngr_)))
+ .WillOnce(Return(mobile_result::SUCCESS));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command_->Run();
+}
+
+TEST_F(UpdateTurnListRequestTest, Run_ValidTurnList_SUCCESS) {
+ const std::string kNavigationText = "valid_navigation_text";
+
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::navigation_text] = kNavigationText;
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::turn_icon][am::strings::value] =
+ "valid_turn_icon";
+ (*command_msg_)[am::strings::msg_params][am::strings::soft_buttons] = 0;
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(mock_message_helper_,
+ ProcessSoftButtons((*command_msg_)[am::strings::msg_params],
+ Eq(mock_app),
+ Ref(mock_policy_handler_),
+ Ref(app_mngr_)))
+ .WillOnce(Return(mobile_result::SUCCESS));
+
+ EXPECT_CALL(
+ mock_message_helper_,
+ VerifyImage(
+ (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::strings::turn_icon],
+ Eq(mock_app),
+ Ref(app_mngr_))).WillOnce(Return(mobile_result::SUCCESS));
+
+ EXPECT_CALL(mock_message_helper_,
+ SubscribeApplicationToSoftButton(_, _, kFunctionId));
+
+ MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command_)));
+ ASSERT_TRUE(result_msg);
+ EXPECT_EQ(
+ hmi_apis::FunctionID::Navigation_UpdateTurnList,
+ (*result_msg)[am::strings::params][am::strings::function_id].asInt());
+
+ ASSERT_TRUE((*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
+ .keyExists(am::hmi_request::navi_text));
+
+ EXPECT_TRUE((*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::hmi_request::navi_text].keyExists(
+ am::hmi_request::field_name));
+ EXPECT_EQ(
+ hmi_apis::Common_TextFieldName::turnText,
+ (*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::hmi_request::navi_text][am::hmi_request::field_name]
+ .asInt());
+
+ EXPECT_TRUE((*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::hmi_request::navi_text].keyExists(
+ am::hmi_request::field_text));
+ EXPECT_EQ(
+ kNavigationText,
+ (*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
+ [am::hmi_request::navi_text][am::hmi_request::field_text]
+ .asString());
+}
+
+TEST_F(UpdateTurnListRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ command_->on_event(event);
+}
+
+TEST_F(UpdateTurnListRequestTest, OnEvent_UnsupportedResource_SUCCESS) {
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ const hmi_apis::Common_Result::eType hmi_response_code =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
+ const mobile_result::eType mobile_response_code =
+ mobile_result::UNSUPPORTED_RESOURCE;
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
+ (*event_msg)[am::strings::msg_params] = 0;
+
+ Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
+
+ command_->on_event(event);
+}
+
+TEST_F(UpdateTurnListRequestTest,
+ OnEvent_ReceivedNavigationUpdateTurnListEvent_SUCCESS) {
+ const hmi_apis::Common_Result::eType hmi_response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ const mobile_result::eType mobile_response_code = mobile_result::SUCCESS;
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
+ (*event_msg)[am::strings::msg_params] = 0;
+
+ Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
+
+ command_->on_event(event);
+}
+
+} // namespace update_turn_list_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/CMakeLists.txt b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/CMakeLists.txt
new file mode 100644
index 0000000000..0e556a6993
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/CMakeLists.txt
@@ -0,0 +1,72 @@
+# 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 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_directories(include)
+
+set (HMI_COMMANDS_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/commands/hmi
+)
+
+set (MOBILE_COMMANDS_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/commands/mobile
+)
+
+collect_sources(HMI_COMMANDS "${HMI_COMMANDS_SOURCE_DIR}")
+collect_sources(MOBILE_COMMANDS "${MOBILE_COMMANDS_SOURCE_DIR}")
+collect_sources(VEHICLE_INFO_PLUGIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src")
+
+set(LIBRARIES
+ HMI_API
+ MOBILE_API
+ ApplicationManager
+ v4_protocol_v1_2_no_extra
+ SmartObjects
+ Utils
+)
+
+if(ENABLE_LOG)
+ list(APPEND LIBRARIES log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
+endif()
+
+add_library("vehicle_info_plugin" SHARED ${MOBILE_COMMANDS} ${HMI_COMMANDS} ${VEHICLE_INFO_PLUGIN_SOURCES})
+target_link_libraries("vehicle_info_plugin" ${LIBRARIES})
+
+set(INSTALL_DESTINATION bin)
+
+install(TARGETS vehicle_info_plugin
+ DESTINATION ${INSTALL_DESTINATION}
+ 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/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/on_vi_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/on_vi_vehicle_data_notification.h
new file mode 100644
index 0000000000..1fb9c0a008
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/on_vi_vehicle_data_notification.h
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVIVehicleDataNotification command class
+ * Sent by HMI for the periodic and non periodic vehicle data
+ **/
+class OnVIVehicleDataNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnVIVehicleDataNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVIVehicleDataNotification(
+ 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 OnVIVehicleDataNotification class destructor
+ **/
+ virtual ~OnVIVehicleDataNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnVIVehicleDataNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_request.h
new file mode 100644
index 0000000000..0b0a9ef99e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIDiagnosticMessageRequest command class
+ **/
+class VIDiagnosticMessageRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIDiagnosticMessageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIDiagnosticMessageRequest(
+ 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 VIDiagnosticMessageRequest class destructor
+ **/
+ virtual ~VIDiagnosticMessageRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIDiagnosticMessageRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_response.h
new file mode 100644
index 0000000000..31fc73897e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_diagnostic_message_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIDiagnosticMessageResponse command class
+ **/
+class VIDiagnosticMessageResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIDiagnosticMessageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIDiagnosticMessageResponse(
+ 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 VIDiagnosticMessageResponse class destructor
+ **/
+ virtual ~VIDiagnosticMessageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIDiagnosticMessageResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_request.h
new file mode 100644
index 0000000000..67308a3898
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIGetDTCsRequest command class
+ **/
+class VIGetDTCsRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIGetDTCsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetDTCsRequest(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 VIGetDTCsRequest class destructor
+ **/
+ virtual ~VIGetDTCsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetDTCsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_response.h
new file mode 100644
index 0000000000..0ddf225c93
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_dtcs_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIGetDTCsResponse command class
+ **/
+class VIGetDTCsResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIGetDTCsResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetDTCsResponse(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 VIGetDTCsResponse class destructor
+ **/
+ virtual ~VIGetDTCsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetDTCsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_request.h
new file mode 100644
index 0000000000..1b4669cf24
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIGetVehicleDataRequest command class
+ **/
+class VIGetVehicleDataRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIGetVehicleDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetVehicleDataRequest(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 VIGetVehicleDataRequest class destructor
+ **/
+ virtual ~VIGetVehicleDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_response.h
new file mode 100644
index 0000000000..df5e630aea
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIGetVehicleDataResponse command class
+ **/
+class VIGetVehicleDataResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIGetVehicleDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetVehicleDataResponse(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 VIGetVehicleDataResponse class destructor
+ **/
+ virtual ~VIGetVehicleDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
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
new file mode 100644
index 0000000000..79a5270f8d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIGetVehicleTypeRequest command class
+ **/
+class VIGetVehicleTypeRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIGetVehicleTypeRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetVehicleTypeRequest(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 VIGetVehicleTypeRequest class destructor
+ **/
+ virtual ~VIGetVehicleTypeRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_response.h
new file mode 100644
index 0000000000..baa4a936ae
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIGetVehicleTypeResponse command class
+ **/
+class VIGetVehicleTypeResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIGetVehicleTypeResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIGetVehicleTypeResponse(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief VIGetVehicleTypeResponse class destructor
+ **/
+ virtual ~VIGetVehicleTypeResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
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
new file mode 100644
index 0000000000..3f12a30c8d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIIsReadyRequest command class
+ **/
+class VIIsReadyRequest : public app_mngr::commands::RequestToHMI,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief VIIsReadyRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIIsReadyRequest(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 VIIsReadyRequest class destructor
+ **/
+ virtual ~VIIsReadyRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief On event callback
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ /**
+ * @brief onTimeOut from requrst Controller
+ */
+ void onTimeOut() OVERRIDE;
+
+ /**
+ * @brief Send request to HMI for fetching of cappabilities
+ */
+ void SendMessageToHMI();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIIsReadyRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_response.h
new file mode 100644
index 0000000000..3531aa03c4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_response.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/application_manager.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIIsReadyResponse command class
+ **/
+class VIIsReadyResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIIsReadyResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIIsReadyResponse(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 VIIsReadyResponse class destructor
+ **/
+ virtual ~VIIsReadyResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIIsReadyResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_request.h
new file mode 100644
index 0000000000..2d10bbf11d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_request.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIReadDIDRequest command class
+ **/
+class VIReadDIDRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIReadDIDRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIReadDIDRequest(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 VIReadDIDRequest class destructor
+ **/
+ virtual ~VIReadDIDRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIReadDIDRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_response.h
new file mode 100644
index 0000000000..5ac655b499
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_read_did_response.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIReadDIDResponse command class
+ **/
+class VIReadDIDResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIReadDIDResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIReadDIDResponse(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 VIReadDIDResponse class destructor
+ **/
+ virtual ~VIReadDIDResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIReadDIDResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
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
new file mode 100644
index 0000000000..bd22a313e7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VISubscribeVehicleDataRequest command class
+ **/
+class VISubscribeVehicleDataRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VISubscribeVehicleDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VISubscribeVehicleDataRequest(
+ 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 VISubscribeVehicleDataRequest class destructor
+ **/
+ virtual ~VISubscribeVehicleDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_response.h
new file mode 100644
index 0000000000..1148a8b41a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VISubscribeVehicleDataResponse command class
+ **/
+class VISubscribeVehicleDataResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VISubscribeVehicleDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VISubscribeVehicleDataResponse(
+ 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 VISubscribeVehicleDataResponse class destructor
+ **/
+ virtual ~VISubscribeVehicleDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h
new file mode 100644
index 0000000000..3b39835fbf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIUnsubscribeVehicleDataRequest command class
+ **/
+class VIUnsubscribeVehicleDataRequest
+ : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief VIUnsubscribeVehicleDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIUnsubscribeVehicleDataRequest(
+ 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 VIUnsubscribeVehicleDataRequest class destructor
+ **/
+ virtual ~VIUnsubscribeVehicleDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h
new file mode 100644
index 0000000000..ada6896520
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief VIUnsubscribeVehicleDataResponse command class
+ **/
+class VIUnsubscribeVehicleDataResponse
+ : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief VIUnsubscribeVehicleDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ VIUnsubscribeVehicleDataResponse(
+ 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 VIUnsubscribeVehicleDataResponse class destructor
+ **/
+ virtual ~VIUnsubscribeVehicleDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h
new file mode 100644
index 0000000000..e2bc7c4dfd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h
@@ -0,0 +1,85 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DiagnosticMessageRequest command class
+ **/
+class DiagnosticMessageRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief DiagnosticMessageRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DiagnosticMessageRequest(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_handler);
+
+ /**
+ * @brief DiagnosticMessageRequest class destructor
+ **/
+ virtual ~DiagnosticMessageRequest();
+
+ /**
+ * @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);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DiagnosticMessageRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h
new file mode 100644
index 0000000000..d69a6a0155
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h
@@ -0,0 +1,79 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief DiagnosticMessageResponse command class
+ **/
+class DiagnosticMessageResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief DiagnosticMessageResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ DiagnosticMessageResponse(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_handler);
+
+ /**
+ * @brief DiagnosticMessageResponse class destructor
+ **/
+ virtual ~DiagnosticMessageResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DiagnosticMessageResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DIAGNOSTIC_MESSAGE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h
new file mode 100644
index 0000000000..01f007697d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h
@@ -0,0 +1,85 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_DTCS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_DTCS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief GetDTCsRequest command class
+ **/
+class GetDTCsRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief GetDTCsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetDTCsRequest(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_handler);
+
+ /**
+ * @brief GetDTCsRequest class destructor
+ **/
+ virtual ~GetDTCsRequest();
+
+ /**
+ * @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);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetDTCsRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_DTCS_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h
new file mode 100644
index 0000000000..87024b1860
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_DTCS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_DTCS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief GetDTCsResponse command class
+ **/
+class GetDTCsResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief GetDTCsResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetDTCsResponse(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_handler);
+
+ /**
+ * @brief GetDTCsResponse class destructor
+ **/
+ virtual ~GetDTCsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetDTCsResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_DTCS_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h
new file mode 100644
index 0000000000..17ae1ffd09
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h
@@ -0,0 +1,98 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+class SmartObject;
+
+namespace commands {
+
+/**
+ * @brief GetVehicleDataRequest command class
+ **/
+class GetVehicleDataRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief GetVehicleDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetVehicleDataRequest(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_handler);
+
+ /**
+ * @brief GetVehicleDataRequest class destructor
+ **/
+ virtual ~GetVehicleDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ protected:
+ virtual void on_event(const app_mngr::event_engine::Event& event);
+
+#ifdef HMI_DBUS_API
+ private:
+ void SendRequestsToHmi(const int32_t app_id);
+
+ struct HmiRequest {
+ hmi_apis::Common_Result::eType status;
+ bool complete;
+ smart_objects::SmartObject value;
+ const char* str;
+ hmi_apis::FunctionID::eType func_id;
+ };
+
+ typedef std::vector<HmiRequest> HmiRequests;
+ HmiRequests hmi_requests_;
+#endif // #ifdef HMI_DBUS_API
+
+ DISALLOW_COPY_AND_ASSIGN(GetVehicleDataRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h
new file mode 100644
index 0000000000..22ec1a5a78
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief GetVehicleDataResponse command class
+ **/
+class GetVehicleDataResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief GetVehicleDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ GetVehicleDataResponse(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_handler);
+
+ /**
+ * @brief GetVehicleDataResponse class destructor
+ **/
+ virtual ~GetVehicleDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GetVehicleDataResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_GET_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h
new file mode 100644
index 0000000000..57c30164e4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h
@@ -0,0 +1,88 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_VEHICLE_DATA_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_VEHICLE_DATA_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnVehicleDataNotification class is used to send notification
+ * to mobile device that some button was pressed on HMI.
+ **/
+class OnVehicleDataNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnVehicleDataNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnVehicleDataNotification(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_handler);
+
+ /**
+ * @brief OnVehicleDataNotification class destructor
+ **/
+ virtual ~OnVehicleDataNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ /*
+ * @brief Sends vehicle data notification to mobile device
+ *
+ * @param app Application to receive notification
+ */
+ void SendVehicleData(app_mngr::ApplicationConstSharedPtr app);
+
+ DISALLOW_COPY_AND_ASSIGN(OnVehicleDataNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h
new file mode 100644
index 0000000000..9a8fbbd62e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h
@@ -0,0 +1,85 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_READ_DID_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_READ_DID_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ReadDIDRequest command class
+ **/
+class ReadDIDRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ReadDIDRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ReadDIDRequest(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_handler);
+
+ /**
+ * @brief ReadDIDRequest class destructor
+ **/
+ virtual ~ReadDIDRequest();
+
+ /**
+ * @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);
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ReadDIDRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_READ_DID_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h
new file mode 100644
index 0000000000..2b7ab04768
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h
@@ -0,0 +1,78 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ReadDIDResponse command class
+ **/
+class ReadDIDResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief ReadDIDResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ReadDIDResponse(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_handler);
+
+ /**
+ * @brief ReadDIDResponse class destructor
+ **/
+ virtual ~ReadDIDResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ReadDIDResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h
new file mode 100644
index 0000000000..d324d5ca24
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h
@@ -0,0 +1,180 @@
+/*
+
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Copyright (c) 2018, Livio, Inc.
+ 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_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubscribeVehicleDataRequest command class
+ **/
+class SubscribeVehicleDataRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SubscribeVehicleDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SubscribeVehicleDataRequest(
+ 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_handler);
+
+ /**
+ * @brief SubscribeButtonCommandRequest class destructor
+ **/
+ ~SubscribeVehicleDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+#ifdef HMI_DBUS_API
+ private:
+ struct HmiRequest {
+ hmi_apis::Common_Result::eType status;
+ bool complete;
+ smart_objects::SmartObject value;
+ const char* str;
+ hmi_apis::FunctionID::eType func_id;
+ };
+
+ typedef std::vector<HmiRequest> HmiRequests;
+ HmiRequests hmi_requests_;
+#endif // #ifdef HMI_DBUS_API
+
+ private:
+ /**
+ * @brief Checks, if any app is subscribed for particular VI parameter
+ * @param param_id VI parameter id
+ * @return true, if there are registered apps subscribed for VI parameter,
+ * otherwise - false
+ */
+ bool IsSomeoneSubscribedFor(const uint32_t param_id) const;
+
+ /**
+ * @brief Adds VI parameters being subscribed by another or the same app to
+ * response with appropriate results
+ * @param msg_params 'message_params' response section reference
+ */
+ void AddAlreadySubscribedVI(smart_objects::SmartObject& msg_params) const;
+
+ /**
+ * @brief Removes subscription for VI parameters which subsription attempt
+ * returned an error
+ * @param app Pointer to application sent subscribe request
+ * @param msg_params 'message_parameters' response section reference
+ */
+ void UnsubscribeFailedSubscriptions(
+ app_mngr::ApplicationSharedPtr app,
+ const smart_objects::SmartObject& msg_params) const;
+
+ DEPRECATED void CheckVISubscribtions(
+ app_mngr::ApplicationSharedPtr app,
+ std::string& out_info,
+ mobile_apis::Result::eType& out_result_code,
+ smart_objects::SmartObject& out_response_params,
+ smart_objects::SmartObject& out_request_params,
+ bool& out_result);
+
+ /**
+ * @brief Checks if current application and other applications
+ * were subscribed to VI, prepare data that need to send to mobile app
+ * or HMI.
+ * @param app contains application
+ * @param out_info contains resulting info for sending to mobile app
+ * @param out_result_code contains result code for sending to mobile app
+ * @param out_response_params contains parameters that SDL sends to
+ * mobile application
+ * @param out_request_params contains parameters that SDL sends to
+ * HMI
+ * @param result contains result that SDL sends to mobile app.
+ */
+ void CheckVISubscriptions(app_mngr::ApplicationSharedPtr app,
+ std::string& out_info,
+ mobile_apis::Result::eType& out_result_code,
+ smart_objects::SmartObject& out_response_params,
+ smart_objects::SmartObject& out_request_params,
+ bool& out_result);
+
+ /**
+ * @brief VI parameters which had been already subscribed by another apps
+ * befor particular app subscribed for these parameters
+ */
+ VehicleInfoSubscriptions vi_already_subscribed_by_another_apps_;
+
+ /**
+ * @brief VI parameters which had been subscribed already by particular app
+ */
+ VehicleInfoSubscriptions vi_already_subscribed_by_this_app_;
+
+ /**
+ * @brief VI parameters which wait for subscribe after HMI respond
+ */
+ VehicleInfoSubscriptions vi_waiting_for_subscribe_;
+
+ DISALLOW_COPY_AND_ASSIGN(SubscribeVehicleDataRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h
new file mode 100644
index 0000000000..60670afee1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubscribeVehicleDataResponse command class
+ **/
+class SubscribeVehicleDataResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SubscribeVehicleDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SubscribeVehicleDataResponse(
+ 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_handler);
+
+ /**
+ * @brief UnsubscribeVehicleDataCommandRequest class destructor
+ **/
+ virtual ~SubscribeVehicleDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SubscribeVehicleDataResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h
new file mode 100644
index 0000000000..5730048b85
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h
@@ -0,0 +1,134 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application.h"
+#include "utils/macro.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnsubscribeVehicleDataRequest command class
+ **/
+class UnsubscribeVehicleDataRequest
+ : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief UnsubscribeVehicleDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UnsubscribeVehicleDataRequest(
+ 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_handler);
+
+ /**
+ * @brief UnsubscribeVehicleDataRequest class destructor
+ **/
+ ~UnsubscribeVehicleDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() FINAL;
+
+ /**
+ * @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) FINAL;
+
+ /**
+ * @brief Init sets hash update mode for request
+ */
+ bool Init() FINAL;
+
+#ifdef HMI_DBUS_API
+ private:
+ struct HmiRequest {
+ hmi_apis::Common_Result::eType status;
+ bool complete;
+ smart_objects::SmartObject value;
+ const char* str;
+ hmi_apis::FunctionID::eType func_id;
+ };
+
+ typedef std::vector<HmiRequest> HmiRequests;
+ HmiRequests hmi_requests_;
+#endif // #ifdef HMI_DBUS_API
+
+ private:
+ /**
+ * @brief Checks, if any app is subscribed for particular VI parameter
+ * @param param_id VI parameter id
+ * @return true, if there are registered apps subscribed for VI parameter,
+ * otherwise - false
+ */
+ bool IsSomeoneSubscribedFor(const uint32_t param_id) const;
+
+ /**
+ * @brief Adds VI parameters being unsubscribed by another or the same app to
+ * response with appropriate results
+ * @param msg_params 'message_params' response section reference
+ */
+ void AddAlreadyUnsubscribedVI(smart_objects::SmartObject& response) const;
+
+ /**
+ * @brief VI parameters which still being subscribed by another apps after
+ * particular app had been unsubscribed from these parameters
+ */
+ VehicleInfoSubscriptions vi_still_subscribed_by_another_apps_;
+
+ /**
+ * @brief VI parameters which had been unsubscribed already by particular app
+ */
+ VehicleInfoSubscriptions vi_already_unsubscribed_by_this_app_;
+
+ DISALLOW_COPY_AND_ASSIGN(UnsubscribeVehicleDataRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h
new file mode 100644
index 0000000000..397ae3cbce
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h
@@ -0,0 +1,80 @@
+/*
+
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnsubscribeVehicleDataResponse command class
+ **/
+class UnsubscribeVehicleDataResponse
+ : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief UnsubscribeVehicleDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UnsubscribeVehicleDataResponse(
+ 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_handler);
+
+ /**
+ * @brief UnsubscribeVehicleDataResponse class destructor
+ **/
+ virtual ~UnsubscribeVehicleDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnsubscribeVehicleDataResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
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
new file mode 100644
index 0000000000..f7e6ae7887
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
@@ -0,0 +1,135 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_APP_EXTENSION_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_APP_EXTENSION_H
+
+#include <application_manager/application_manager.h>
+
+#include <set>
+#include <string>
+
+namespace vehicle_info_plugin {
+class VehicleInfoPlugin;
+
+namespace app_mngr = application_manager;
+
+typedef mobile_apis::VehicleDataType::eType VehicleDataType;
+/**
+ * @brief Defines set of vehicle info types
+ */
+typedef std::set<mobile_apis::VehicleDataType::eType> VehicleInfoSubscriptions;
+
+class VehicleInfoAppExtension : public app_mngr::AppExtension {
+ public:
+ /**
+ * @brief VehicleInfoAppExtension constructor
+ * @param plugin vehicle info plugin
+ * @param app application that contains this plugin
+ */
+ VehicleInfoAppExtension(VehicleInfoPlugin& plugin,
+ app_mngr::Application& app);
+ virtual ~VehicleInfoAppExtension();
+
+ /**
+ * @brief subscribeToVehicleInfo add vehicle_data to list of subscriptions of
+ * application extension
+ * @param vehicle_data data to subscribe
+ * @return true in case if subscription is successful
+ */
+ bool subscribeToVehicleInfo(const VehicleDataType vehicle_data);
+
+ /**
+ * @brief unsubscribeFromVehicleInfo remove vehicle_data from list of
+ * subscriptions of application extension
+ * @param vehicle_data data to unsubscribe
+ * @return true in case if unsubscription is successful
+ */
+ bool unsubscribeFromVehicleInfo(const VehicleDataType vehicle_data);
+ /**
+ * @brief unsubscribeFromVehicleInfo unsubscribe from all vehicle info data
+ */
+ void unsubscribeFromVehicleInfo();
+
+ /**
+ * @brief isSubscribedToVehicleInfo checks if extension is subscribed to
+ * vehicle data
+ * @param vehicle_data_type data type to check subscription
+ * @return true if extension is subscribed this vehicle_data_type, otherwise
+ * return false
+ */
+ bool isSubscribedToVehicleInfo(const VehicleDataType vehicle_data_type) const;
+
+ /**
+ * @brief Subscriptions get list of subscriptions for application extension
+ * @return list of subscriptions for application extension
+ */
+ VehicleInfoSubscriptions Subscriptions();
+
+ /**
+ * @brief SaveResumptionData saves vehicle info data
+ * @param resumption_data plase to store resumption data
+ */
+ void SaveResumptionData(
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) OVERRIDE;
+
+ /**
+ * @brief ProcessResumption load resumtion data back to plugin during
+ * resumption
+ * @param resumption_data resumption data
+ */
+ void ProcessResumption(
+ const smart_objects::SmartObject& resumption_data) OVERRIDE;
+
+ /**
+ * @brief VehicleInfoAppExtensionUID unique identifier of VehicleInfo
+ * aplication extension
+ */
+ static unsigned VehicleInfoAppExtensionUID;
+
+ /**
+ * @brief ExtractVIExtension utility function to extract application extension
+ * from application
+ * @param app : applicaiton that contains vehicle info app_extension
+ * @return application extension extracted from application
+ */
+ static VehicleInfoAppExtension& ExtractVIExtension(
+ application_manager::Application& app);
+
+ private:
+ VehicleInfoSubscriptions subscribed_data_;
+ VehicleInfoPlugin& plugin_;
+ app_mngr::Application& app_;
+};
+}
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_APP_EXTENSION_H
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h
new file mode 100644
index 0000000000..e36611dfa6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h
@@ -0,0 +1,70 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_COMMAND_FACTORY_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_COMMAND_FACTORY_H
+
+#include "application_manager/application_manager.h"
+#include "vehicle_info_plugin/vehicle_info_hmi_command_factory.h"
+#include "vehicle_info_plugin/vehicle_info_mobile_command_factory.h"
+
+namespace vehicle_info_plugin {
+
+namespace app_mngr = application_manager;
+namespace commands = application_manager::commands;
+
+/**
+ * @brief The Vehicle Info command factory.
+ */
+class VehicleInfoCommandFactory : public app_mngr::CommandFactory {
+ public:
+ VehicleInfoCommandFactory(app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+ virtual ~VehicleInfoCommandFactory();
+
+ app_mngr::CommandSharedPtr CreateCommand(
+ const commands::MessageSharedPtr& message,
+ commands::Command::CommandSource source) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t function_id,
+ const commands::Command::CommandSource source) const OVERRIDE;
+
+ private:
+ std::unique_ptr<app_mngr::CommandFactory> hmi_command_factory_;
+ std::unique_ptr<app_mngr::CommandFactory> mob_command_factory_;
+};
+}
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_COMMAND_FACTORY_H
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_hmi_command_factory.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_hmi_command_factory.h
new file mode 100644
index 0000000000..412949eedb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_hmi_command_factory.h
@@ -0,0 +1,73 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_HMI_COMMAND_FACTORY_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_HMI_COMMAND_FACTORY_H
+
+#include "application_manager/application_manager.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+/**
+ * @brief The vehicle info hmi command factory.
+ */
+class VehicleInfoHmiCommandFactory : public app_mngr::CommandFactory {
+ public:
+ VehicleInfoHmiCommandFactory(
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ app_mngr::CommandSharedPtr CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t function_id,
+ const app_mngr::commands::Command::CommandSource source) const OVERRIDE;
+
+ private:
+ app_mngr::ApplicationManager& application_manager_;
+ app_mngr::rpc_service::RPCService& rpc_service_;
+ app_mngr::HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
+
+ app_mngr::CommandCreator& buildCommandCreator(
+ const int32_t function_id, const int32_t message_type) const;
+
+ DISALLOW_COPY_AND_ASSIGN(VehicleInfoHmiCommandFactory);
+};
+}
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_HMI_COMMAND_FACTORY_H
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h
new file mode 100644
index 0000000000..6cfc77a41c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h
@@ -0,0 +1,73 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_MOBILE_COMMAND_FACTORY_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_MOBILE_COMMAND_FACTORY_H
+
+#include "application_manager/application_manager.h"
+
+namespace vehicle_info_plugin {
+namespace app_mngr = application_manager;
+
+/**
+ * @brief The vehicle info mobile command factory.
+ */
+class VehicleInfoMobileCommandFactory : public app_mngr::CommandFactory {
+ public:
+ VehicleInfoMobileCommandFactory(
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ app_mngr::CommandSharedPtr CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t function_id,
+ const app_mngr::commands::Command::CommandSource source) const OVERRIDE;
+
+ private:
+ app_mngr::ApplicationManager& application_manager_;
+ app_mngr::rpc_service::RPCService& rpc_service_;
+ app_mngr::HMICapabilities& hmi_capabilities_;
+ policy::PolicyHandlerInterface& policy_handler_;
+
+ app_mngr::CommandCreator& buildCommandCreator(
+ const int32_t function_id, const int32_t message_type) const;
+
+ DISALLOW_COPY_AND_ASSIGN(VehicleInfoMobileCommandFactory);
+};
+}
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_MOBILE_COMMAND_FACTORY_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
new file mode 100644
index 0000000000..b15b7006e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h
@@ -0,0 +1,82 @@
+/*
+ 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.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PLUGIN_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PLUGIN_H
+
+#include "application_manager/command_factory.h"
+
+namespace vehicle_info_plugin {
+class VehicleInfoAppExtension;
+namespace app_mngr = application_manager;
+namespace plugins = application_manager::plugin_manager;
+
+class VehicleInfoPlugin : public plugins::RPCPlugin {
+ public:
+ VehicleInfoPlugin();
+
+ bool Init(app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) OVERRIDE;
+
+ bool IsAbleToProcess(
+ const int32_t function_id,
+ const app_mngr::commands::Command::CommandSource source) OVERRIDE;
+
+ std::string PluginName() OVERRIDE;
+ app_mngr::CommandFactory& GetCommandFactory() OVERRIDE;
+
+ void OnPolicyEvent(plugins::PolicyEvent event) OVERRIDE;
+ 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,
+ VehicleInfoAppExtension& ext);
+
+ private:
+ void DeleteSubscriptions(app_mngr::ApplicationSharedPtr app);
+
+ std::unique_ptr<app_mngr::CommandFactory> command_factory_;
+ app_mngr::ApplicationManager* application_manager_;
+};
+}
+
+extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+
+#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
new file mode 100644
index 0000000000..6125c4ee45
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
@@ -0,0 +1,75 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/on_vi_vehicle_data_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVIVehicleDataNotification::OnVIVehicleDataNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {}
+
+void OnVIVehicleDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
+ if (msg_params.keyExists(strings::odometer)) {
+ application_manager_.IviInfoUpdated(
+ mobile_apis::VehicleDataType::VEHICLEDATA_ODOMETER,
+ msg_params[strings::odometer].asInt());
+ }
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..8d3b9f13fb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_diagnostic_message_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {}
+
+void VIDiagnosticMessageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..e22ba7ddb2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
@@ -0,0 +1,66 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_diagnostic_message_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {}
+
+void VIDiagnosticMessageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..71ce6331ab
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_get_dtcs_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIGetDTCsRequest::VIGetDTCsRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIGetDTCsRequest::~VIGetDTCsRequest() {}
+
+void VIGetDTCsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9d39c60796
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
@@ -0,0 +1,65 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_get_dtcs_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIGetDTCsResponse::VIGetDTCsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIGetDTCsResponse::~VIGetDTCsResponse() {}
+
+void VIGetDTCsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9fc48c8820
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIGetVehicleDataRequest::VIGetVehicleDataRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {}
+
+void VIGetVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..73ba1a94fe
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
@@ -0,0 +1,89 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+VIGetVehicleDataResponse::VIGetVehicleDataResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {}
+
+void VIGetVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
+
+ if ((*message_)[strings::params][strings::message_type] ==
+ static_cast<int32_t>(hmi_apis::messageType::error_response)) {
+ smart_objects::SmartObject result(smart_objects::SmartType_Map);
+
+ if ((*message_)[strings::params].keyExists(strings::data)) {
+ result[strings::msg_params] = (*message_)[strings::params][strings::data];
+ result[strings::params][hmi_response::code] =
+ (*message_)[strings::params][hmi_response::code];
+ result[strings::params][strings::correlation_id] =
+ (*message_)[strings::params][strings::correlation_id];
+ result[strings::params][strings::error_msg] =
+ (*message_)[strings::params][strings::error_msg];
+ result[strings::params][strings::message_type] =
+ (*message_)[strings::params][strings::message_type];
+ result[strings::params][strings::protocol_type] =
+ (*message_)[strings::params][strings::protocol_type];
+ result[strings::params][strings::protocol_version] =
+ (*message_)[strings::params][strings::protocol_version];
+ }
+
+ event.set_smart_object(result);
+ } else {
+ event.set_smart_object(*message_);
+ policy_handler_.OnVehicleDataUpdated(*message_);
+ }
+
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..a1a221220a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {}
+
+void VIGetVehicleTypeRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9f14b4e7ea
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_response.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {}
+
+void VIGetVehicleTypeResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+
+ hmi_capabilities.set_vehicle_type(
+ (*message_)[strings::msg_params][hmi_response::vehicle_type]);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3401849861
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
@@ -0,0 +1,112 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_is_ready_request.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/message_helper.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIIsReadyRequest::VIIsReadyRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle)
+ , EventObserver(application_manager.event_dispatcher()) {}
+
+VIIsReadyRequest::~VIIsReadyRequest() {}
+
+void VIIsReadyRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(hmi_apis::FunctionID::VehicleInfo_IsReady,
+ correlation_id());
+ SendRequest();
+}
+
+void VIIsReadyRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::VehicleInfo_IsReady: {
+ LOG4CXX_DEBUG(logger_, "VehicleInfo_IsReady event");
+ unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_IsReady);
+ const bool is_available = app_mngr::commands::ChangeInterfaceState(
+ application_manager_,
+ message,
+ HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+
+ HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities.set_is_ivi_cooperating(is_available);
+ policy_handler_.OnVIIsReady();
+ if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
+ application_manager_, HmiInterfaces::HMI_INTERFACE_VehicleInfo)) {
+ LOG4CXX_INFO(
+ logger_,
+ "HmiInterfaces::HMI_INTERFACE_VehicleInfo isn't available");
+ return;
+ }
+ SendMessageToHMI();
+
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+void VIIsReadyRequest::onTimeOut() {
+ // Note(dtrunov): According to new requirment APPLINK-27956
+ SendMessageToHMI();
+}
+
+void VIIsReadyRequest::SendMessageToHMI() {
+ utils::SharedPtr<smart_objects::SmartObject> get_type(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
+ application_manager_));
+ rpc_service_.ManageHMICommand(get_type);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..35907e11d2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_is_ready_response.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIIsReadyResponse::VIIsReadyResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIIsReadyResponse::~VIIsReadyResponse() {}
+
+void VIIsReadyResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..b55c9e32a0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_read_did_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIReadDIDRequest::VIReadDIDRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIReadDIDRequest::~VIReadDIDRequest() {}
+
+void VIReadDIDRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9d56b2aa78
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
@@ -0,0 +1,64 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_read_did_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIReadDIDResponse::VIReadDIDResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIReadDIDResponse::~VIReadDIDResponse() {}
+
+void VIReadDIDResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_ReadDID);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..60e9dc88c3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {}
+
+void VISubscribeVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f004d6f3cd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {}
+
+void VISubscribeVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..9056538514
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {}
+
+void VIUnsubscribeVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..348bc1b269
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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 "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {}
+
+void VIUnsubscribeVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..4eba894025
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
@@ -0,0 +1,130 @@
+/*
+
+ 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 <algorithm>
+#include "vehicle_info_plugin/commands/mobile/diagnostic_message_request.h"
+
+#include "application_manager/application_impl.h"
+
+#include "interfaces/HMI_API.h"
+#include "application_manager/message_helper.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DiagnosticMessageRequest::DiagnosticMessageRequest(
+ 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) {}
+
+DiagnosticMessageRequest::~DiagnosticMessageRequest() {}
+
+void DiagnosticMessageRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const std::vector<uint32_t>& supported_diag_modes =
+ application_manager_.get_settings().supported_diag_modes();
+
+ smart_objects::SmartObject& msg_data =
+ (*message_)[strings::msg_params][strings::message_data];
+
+ const uint8_t mode_position = 0;
+ const uint32_t msg_diagnostic_mode = msg_data[mode_position].asUInt();
+ 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
+ << " is not supported.");
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
+ "Received diagnostic mode is not supported.");
+ return;
+ }
+
+ // Add app_id for HMI request
+ (*message_)[strings::msg_params][strings::app_id] = app->app_id();
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage,
+ &(*message_)[strings::msg_params],
+ true);
+}
+
+void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ std::string response_info;
+ GetInfo(message, response_info);
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..54d8382f5d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/diagnostic_message_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+DiagnosticMessageResponse::DiagnosticMessageResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+DiagnosticMessageResponse::~DiagnosticMessageResponse() {}
+
+void DiagnosticMessageResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..6c04e874e8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
@@ -0,0 +1,119 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/get_dtcs_request.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/message_helper.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetDTCsRequest::GetDTCsRequest(
+ 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) {}
+
+GetDTCsRequest::~GetDTCsRequest() {}
+
+void GetDTCsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(
+ (*message_)[strings::params][strings::connection_key].asUInt());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::ecu_name] =
+ (*message_)[strings::msg_params][strings::ecu_name];
+
+ if ((*message_)[strings::msg_params].keyExists(strings::dtc_mask)) {
+ msg_params[strings::dtc_mask] =
+ (*message_)[strings::msg_params][strings::dtc_mask];
+ }
+
+ msg_params[strings::app_id] = app->app_id();
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_GetDTCs, &msg_params, true);
+}
+
+void GetDTCsRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::VehicleInfo_GetDTCs: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ std::string response_info;
+ GetInfo(message, response_info);
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3686094b73
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/get_dtcs_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetDTCsResponse::GetDTCsResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+GetDTCsResponse::~GetDTCsResponse() {}
+
+void GetDTCsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..7c7a5e61f7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
@@ -0,0 +1,319 @@
+/*
+
+ 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 <string>
+#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+namespace str = strings;
+
+#ifdef HMI_DBUS_API
+GetVehicleDataRequest::GetVehicleDataRequest(
+ 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)
+ : CommandRequestImpl(message, application_manager) {}
+
+GetVehicleDataRequest::~GetVehicleDataRequest() {}
+
+void GetVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ int32_t app_id =
+ (*message_)[strings::params][strings::connection_key].asUInt();
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const VehicleData& vehicle_data = MessageHelper::vehicle_data();
+ VehicleData::const_iterator it = vehicle_data.begin();
+
+ for (; vehicle_data.end() != it; ++it) {
+ if (true == (*message_)[str::msg_params].keyExists(it->first) &&
+ true == (*message_)[str::msg_params][it->first].asBool()) {
+ SendRequestsToHmi(app->app_id());
+ return;
+ }
+ }
+
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+}
+
+namespace {
+struct Subrequest {
+ hmi_apis::FunctionID::eType func_id;
+ const char* str;
+};
+Subrequest subrequests[] = {
+ {hmi_apis::FunctionID::VehicleInfo_GetGpsData, str::gps},
+ {hmi_apis::FunctionID::VehicleInfo_GetSpeed, str::speed},
+ {hmi_apis::FunctionID::VehicleInfo_GetRpm, str::rpm},
+ {hmi_apis::FunctionID::VehicleInfo_GetFuelLevel, str::fuel_level},
+ {hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState,
+ str::fuel_level_state},
+ {hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption,
+ str::instant_fuel_consumption},
+ {hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature,
+ str::external_temp},
+ {hmi_apis::FunctionID::VehicleInfo_GetVin, str::vin},
+ {hmi_apis::FunctionID::VehicleInfo_GetPrndl, str::prndl},
+ {hmi_apis::FunctionID::VehicleInfo_GetTirePressure, str::tire_pressure},
+ {hmi_apis::FunctionID::VehicleInfo_GetOdometer, str::odometer},
+ {hmi_apis::FunctionID::VehicleInfo_GetBeltStatus, str::belt_status},
+ {hmi_apis::FunctionID::VehicleInfo_GetBodyInformation,
+ str::body_information},
+ {hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus, str::device_status},
+ {hmi_apis::FunctionID::VehicleInfo_GetDriverBraking, str::driver_braking},
+ {hmi_apis::FunctionID::VehicleInfo_GetWiperStatus, str::wiper_status},
+ {hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus,
+ str::head_lamp_status},
+ {hmi_apis::FunctionID::VehicleInfo_GetEngineTorque, str::engine_torque},
+ {hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition, str::acc_pedal_pos},
+ {hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle,
+ str::steering_wheel_angle},
+ {hmi_apis::FunctionID::VehicleInfo_GetECallInfo, str::e_call_info},
+ {hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus, str::airbag_status},
+ {hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent, str::emergency_event},
+ {hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus,
+ str::cluster_mode_status},
+ {hmi_apis::FunctionID::VehicleInfo_GetMyKey, str::my_key},
+};
+}
+
+void GetVehicleDataRequest::SendRequestsToHmi(const int32_t app_id) {
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = app_id;
+
+ for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
+ const Subrequest& sr = subrequests[i];
+ if (true == (*message_)[str::msg_params].keyExists(sr.str) &&
+ true == (*message_)[str::msg_params][sr.str].asBool()) {
+ HmiRequest hmi_request;
+ hmi_request.str = sr.str;
+ hmi_request.func_id = sr.func_id;
+ hmi_request.complete = false;
+ hmi_requests_.push_back(hmi_request);
+ }
+ }
+
+ LOG4CXX_INFO(logger_,
+ hmi_requests_.size() << " requests are going to be sent to HMI");
+
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ SendHMIRequest(it->func_id, &msg_params, true);
+ }
+}
+
+void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event " << event.id());
+
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ for (HmiRequests::iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ HmiRequest& hmi_request = *it;
+ if (hmi_request.func_id == event.id()) {
+ hmi_request.status = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
+ hmi_request.value = message[str::msg_params][hmi_request.str];
+ hmi_request.complete = true;
+ break;
+ }
+ }
+
+ bool all_complete = true;
+ bool any_arg_success = false;
+ mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ if (!it->complete) {
+ all_complete = false;
+ break;
+ }
+ if (hmi_apis::Common_Result::SUCCESS != it->status) {
+ if (mobile_api::Result::SUCCESS == status) {
+ status = static_cast<mobile_apis::Result::eType>(it->status);
+ } else if (status !=
+ static_cast<mobile_apis::Result::eType>(it->status)) {
+ status = mobile_api::Result::eType::GENERIC_ERROR;
+ }
+ LOG4CXX_TRACE(logger_,
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
+ } else {
+ any_arg_success = true;
+ }
+ }
+
+ if (all_complete) {
+ smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
+ if (any_arg_success) {
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ response_params[it->str] = it->value;
+ }
+ }
+ LOG4CXX_INFO(logger_, "All HMI requests are complete");
+ const char* info = NULL;
+ std::string error_message;
+ if (true == message[strings::params].keyExists(strings::error_msg)) {
+ error_message = message[strings::params][strings::error_msg].asString();
+ info = error_message.c_str();
+ }
+ SendResponse(any_arg_success, status, info, &response_params);
+ }
+}
+#else
+GetVehicleDataRequest::GetVehicleDataRequest(
+ 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) {}
+
+GetVehicleDataRequest::~GetVehicleDataRequest() {}
+
+void GetVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ int32_t app_id =
+ (*message_)[strings::params][strings::connection_key].asUInt();
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (app->AreCommandLimitsExceeded(
+ static_cast<mobile_apis::FunctionID::eType>(function_id()),
+ application_manager::TLimitSource::CONFIG_FILE)) {
+ LOG4CXX_ERROR(logger_, "GetVehicleData frequency is too high.");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+ const VehicleData& vehicle_data = MessageHelper::vehicle_data();
+ VehicleData::const_iterator it = vehicle_data.begin();
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = app->app_id();
+ const uint32_t min_length_msg_params = 1;
+ for (; vehicle_data.end() != it; ++it) {
+ if (true == (*message_)[str::msg_params].keyExists(it->first) &&
+ true == (*message_)[str::msg_params][it->first].asBool()) {
+ msg_params[it->first] = (*message_)[strings::msg_params][it->first];
+ }
+ }
+ if (msg_params.length() > min_length_msg_params) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleData, &msg_params, true);
+ return;
+ } else if (HasDisallowedParams()) {
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ } else {
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ }
+}
+
+void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObject message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ std::string response_info;
+ GetInfo(message, response_info);
+ result = result ||
+ ((hmi_apis::Common_Result::DATA_NOT_AVAILABLE == result_code) &&
+ (message[strings::msg_params].length() > 1));
+
+ if (true ==
+ message[strings::msg_params].keyExists(hmi_response::method)) {
+ message[strings::msg_params].erase(hmi_response::method);
+ }
+ if (true == message[strings::params].keyExists(strings::error_msg)) {
+ response_info = message[strings::params][strings::error_msg].asString();
+ }
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+#endif // #ifdef HMI_DBUS_API
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..3a7d663756
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
@@ -0,0 +1,65 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/HMI_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+GetVehicleDataResponse::GetVehicleDataResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+GetVehicleDataResponse::~GetVehicleDataResponse() {}
+
+void GetVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..f8553c84f8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
@@ -0,0 +1,136 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+#include "application_manager/helpers/application_helper.h"
+#include "utils/macro.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+OnVehicleDataNotification::OnVehicleDataNotification(
+ 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) {}
+
+OnVehicleDataNotification::~OnVehicleDataNotification() {}
+
+void OnVehicleDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::vector<ApplicationSharedPtr> appNotification;
+ std::vector<ApplicationSharedPtr>::iterator appNotification_it =
+ appNotification.begin();
+ std::vector<smart_objects::SmartObject> appSO;
+
+ const VehicleData& vehicle_data = MessageHelper::vehicle_data();
+ VehicleData::const_iterator it = vehicle_data.begin();
+
+ for (; vehicle_data.end() != it; ++it) {
+ if (true == (*message_)[strings::msg_params].keyExists(it->first)) {
+ LOG4CXX_ERROR(logger_, "vehicle_data nanme" << it->first);
+ auto vehicle_data_value =
+ (*message_)[strings::msg_params][it->first].asInt();
+
+ application_manager_.IviInfoUpdated(it->second, vehicle_data_value);
+
+ auto subscribed_to_ivi_predicate = [&it](const ApplicationSharedPtr app) {
+ DCHECK_OR_RETURN(app, false);
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ return ext.isSubscribedToVehicleInfo(it->second);
+ };
+
+ const std::vector<ApplicationSharedPtr>& applications =
+ application_manager::FindAllApps(application_manager_.applications(),
+ subscribed_to_ivi_predicate);
+
+ std::vector<ApplicationSharedPtr>::const_iterator app_it =
+ applications.begin();
+
+ for (; applications.end() != app_it; ++app_it) {
+ const ApplicationSharedPtr app = *app_it;
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ continue;
+ }
+
+ appNotification_it =
+ find(appNotification.begin(), appNotification.end(), app);
+ if (appNotification_it == appNotification.end()) {
+ appNotification.push_back(app);
+ smart_objects::SmartObject msg_param =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_param[it->first] = (*message_)[strings::msg_params][it->first];
+ appSO.push_back(msg_param);
+ } else {
+ size_t idx =
+ std::distance(appNotification.begin(), appNotification_it);
+ appSO[idx][it->first] = (*message_)[strings::msg_params][it->first];
+ }
+ }
+ }
+ }
+
+ LOG4CXX_DEBUG(
+ logger_,
+ "Number of Notifications to be send: " << appNotification.size());
+
+ for (size_t idx = 0; idx < appNotification.size(); idx++) {
+ LOG4CXX_INFO(logger_,
+ "Send OnVehicleData PRNDL notification to "
+ << appNotification[idx]->name().c_str()
+ << " application id " << appNotification[idx]->app_id());
+ (*message_)[strings::params][strings::connection_key] =
+ appNotification[idx]->app_id();
+ (*message_)[strings::msg_params] = appSO[idx];
+ SendNotification();
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..010cce4c63
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
@@ -0,0 +1,134 @@
+/*
+ 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 <string>
+#include "vehicle_info_plugin/commands/mobile/read_did_request.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/message_helper.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ReadDIDRequest::ReadDIDRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ReadDIDRequest::~ReadDIDRequest() {}
+
+void ReadDIDRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ uint32_t app_id =
+ (*message_)[strings::params][strings::connection_key].asUInt();
+
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+ LOG4CXX_INFO(
+ logger_,
+ "Correlation_id :"
+ << (*message_)[strings::params][strings::correlation_id].asUInt());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "An application is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (app->AreCommandLimitsExceeded(
+ static_cast<mobile_apis::FunctionID::eType>(function_id()),
+ application_manager::TLimitSource::CONFIG_FILE)) {
+ LOG4CXX_ERROR(logger_, "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");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::ecu_name] =
+ (*message_)[strings::msg_params][strings::ecu_name];
+ msg_params[strings::did_location] =
+ (*message_)[strings::msg_params][strings::did_location];
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_ReadDID, &msg_params, true);
+}
+
+void ReadDIDRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::VehicleInfo_ReadDID: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ std::string response_info;
+ GetInfo(message, response_info);
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..82d49574f0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
@@ -0,0 +1,64 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/read_did_response.h"
+#include "application_manager/rpc_service.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+ReadDIDResponse::ReadDIDResponse(
+ 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) {}
+
+ReadDIDResponse::~ReadDIDResponse() {}
+
+void ReadDIDResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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
new file mode 100644
index 0000000000..27716855a2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
@@ -0,0 +1,517 @@
+/*
+
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Copyright (c) 2018, Livio, Inc.
+ 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/commands/mobile/subscribe_vehicle_data_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "utils/helpers.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {}
+
+#ifdef HMI_DBUS_API
+namespace {
+struct Subrequest {
+ hmi_apis::FunctionID::eType func_id;
+ const char* str;
+};
+Subrequest subrequests[] = {
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeGps, strings::gps},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed, strings::speed},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeRpm, strings::rpm},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel, strings::fuel_level},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State,
+ strings::fuel_level_state},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption,
+ strings::instant_fuel_consumption},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature,
+ strings::external_temp},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeVin, strings::vin},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribePrndl, strings::prndl},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure,
+ strings::tire_pressure},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer, strings::odometer},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus,
+ strings::belt_status},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation,
+ strings::body_information},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus,
+ strings::device_status},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking,
+ strings::driver_braking},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus,
+ strings::wiper_status},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus,
+ strings::head_lamp_status},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque,
+ strings::engine_torque},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition,
+ strings::acc_pedal_pos},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle,
+ strings::steering_wheel_angle},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo,
+ strings::e_call_info},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus,
+ strings::airbag_status},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent,
+ strings::emergency_event},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus,
+ strings::cluster_mode_status},
+ {hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey, strings::my_key},
+};
+}
+#endif // #ifdef HMI_DBUS_API
+
+void SubscribeVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+ std::string info;
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ smart_objects::SmartObject response_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ bool result = false;
+ CheckVISubscriptions(
+ app, info, result_code, response_params, msg_params, result);
+
+ if (mobile_apis::Result::INVALID_ENUM != result_code) {
+ SendResponse(result,
+ result_code,
+ info.empty() ? NULL : info.c_str(),
+ response_params.empty() ? NULL : &response_params);
+ return;
+ }
+
+#ifdef HMI_DBUS_API
+ // Generate list of subrequests
+ for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
+ const Subrequest& sr = subrequests[i];
+ if (true == (*message_)[strings::msg_params].keyExists(sr.str) &&
+ true == (*message_)[strings::msg_params][sr.str].asBool()) {
+ HmiRequest hmi_request;
+ hmi_request.str = sr.str;
+ hmi_request.func_id = sr.func_id;
+ hmi_request.complete = false;
+ hmi_requests_.push_back(hmi_request);
+ }
+ }
+ LOG4CXX_DEBUG(
+ logger_, hmi_requests_.size() << " requests are going to be sent to HMI");
+
+ // Send subrequests
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it)
+ SendHMIRequest(it->func_id, &msg_params, true);
+#else
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
+ &msg_params,
+ true);
+#endif // #ifdef HMI_DBUS_API
+}
+
+void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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.");
+ return;
+ }
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer.");
+ return;
+ }
+
+#ifdef HMI_DBUS_API
+ for (HmiRequests::iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ HmiRequest& hmi_request = *it;
+ if (hmi_request.func_id == event.id()) {
+ hmi_request.status = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
+ hmi_request.value = message[strings::msg_params][hmi_request.str];
+ hmi_request.complete = true;
+ break;
+ }
+ }
+ bool all_complete = true;
+ bool any_arg_success = false;
+ mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ if (!it->complete) {
+ all_complete = false;
+ break;
+ }
+ if (hmi_apis::Common_Result::SUCCESS != it->status) {
+ if (mobile_api::Result::SUCCESS == status) {
+ status = static_cast<mobile_apis::Result::eType>(it->status);
+ } else if (status !=
+ static_cast<mobile_apis::Result::eType>(it->status)) {
+ status = mobile_api::Result::eType::GENERIC_ERROR;
+ }
+ LOG4CXX_TRACE(logger_,
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
+ } else {
+ any_arg_success = true;
+ }
+ }
+
+ if (all_complete) {
+ smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
+ if (any_arg_success) {
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ response_params[it->str] = it->value;
+ }
+ }
+ LOG4CXX_DEBUG(logger_, "All HMI requests are complete");
+ const bool result = any_arg_success;
+ SendResponse(any_arg_success, status, NULL, &response_params);
+ if (result) {
+ app->UpdateHash();
+ }
+ }
+#else
+
+ hmi_apis::Common_Result::eType hmi_result =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ hmi_result, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+
+ bool is_succeeded = result || !vi_already_subscribed_by_another_apps_.empty();
+
+ mobile_apis::Result::eType result_code =
+ MessageHelper::HMIToMobileResult(hmi_result);
+
+ if (is_succeeded) {
+ if (!vi_already_subscribed_by_this_app_.empty()) {
+ result_code = mobile_apis::Result::IGNORED;
+ response_info = "Already subscribed on some provided VehicleData.";
+ }
+
+ if (!vi_waiting_for_subscribe_.empty()) {
+ LOG4CXX_DEBUG(logger_, "Subscribing to all pending VehicleData");
+ VehicleInfoSubscriptions::const_iterator key =
+ vi_waiting_for_subscribe_.begin();
+ for (; key != vi_waiting_for_subscribe_.end(); ++key) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ ext.subscribeToVehicleInfo(*key);
+ }
+ }
+ }
+
+ UnsubscribeFailedSubscriptions(app, message[strings::msg_params]);
+
+ if (!vi_already_subscribed_by_another_apps_.empty() ||
+ !vi_already_subscribed_by_this_app_.empty()) {
+ AddAlreadySubscribedVI(
+ const_cast<smart_objects::SmartObject&>(message[strings::msg_params]));
+ }
+
+ SendResponse(is_succeeded,
+ result_code,
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+#endif // #ifdef HMI_DBUS_API
+}
+
+bool SubscribeVehicleDataRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
+ smart_objects::SmartObject& msg_params) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace mobile_apis;
+ auto vi_to_string =
+ [](const mobile_apis::VehicleDataType::eType vehicle_data) {
+ for (auto& vi_str_to_int_pair : MessageHelper::vehicle_data()) {
+ if (vehicle_data == vi_str_to_int_pair.second) {
+ return vi_str_to_int_pair.first;
+ }
+ }
+ return std::string();
+ };
+
+ VehicleInfoSubscriptions::const_iterator it_same_app =
+ vi_already_subscribed_by_this_app_.begin();
+ for (; vi_already_subscribed_by_this_app_.end() != it_same_app;
+ ++it_same_app) {
+ msg_params[vi_to_string(*it_same_app)][strings::result_code] =
+ VehicleDataResultCode::VDRC_DATA_ALREADY_SUBSCRIBED;
+ msg_params[vi_to_string(*it_same_app)][strings::data_type] = *it_same_app;
+ }
+
+ VehicleInfoSubscriptions::const_iterator it_another_app =
+ vi_already_subscribed_by_another_apps_.begin();
+ for (; vi_already_subscribed_by_another_apps_.end() != it_another_app;
+ ++it_another_app) {
+ msg_params[vi_to_string(*it_another_app)][strings::result_code] =
+ VehicleDataResultCode::VDRC_SUCCESS;
+ msg_params[vi_to_string(*it_another_app)][strings::data_type] =
+ *it_another_app;
+ }
+}
+
+void SubscribeVehicleDataRequest::UnsubscribeFailedSubscriptions(
+ ApplicationSharedPtr app,
+ const smart_objects::SmartObject& msg_params) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const VehicleData& vehicle_data = MessageHelper::vehicle_data();
+ VehicleData::const_iterator it = vehicle_data.begin();
+
+ for (; vehicle_data.end() != it; ++it) {
+ if (msg_params.keyExists(it->first)) {
+ if (msg_params[it->first][strings::result_code].asInt() !=
+ hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS) {
+ LOG4CXX_DEBUG(logger_,
+ "Subscription for VehicleDataType "
+ << it->first
+ << " is unsuccessfull. "
+ "Unsubscribing app with connection key "
+ << connection_key() << " from it.");
+ VehicleInfoAppExtension::ExtractVIExtension(*app)
+ .unsubscribeFromVehicleInfo(it->second);
+ }
+ }
+ }
+}
+
+struct SubscribedToIVIPredicate {
+ int32_t vehicle_info_;
+ SubscribedToIVIPredicate(int32_t vehicle_info)
+ : vehicle_info_(vehicle_info) {}
+ bool operator()(const ApplicationSharedPtr app) const {
+ DCHECK_OR_RETURN(app, false);
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ return ext.isSubscribedToVehicleInfo(
+ static_cast<mobile_apis::VehicleDataType::eType>(vehicle_info_));
+ }
+};
+
+bool SubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
+ const uint32_t param_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SubscribedToIVIPredicate finder(param_id);
+ DataAccessor<ApplicationSet> accessor = application_manager_.applications();
+ ApplicationSetConstIt it = std::find_if(
+ accessor.GetData().begin(), accessor.GetData().end(), finder);
+ return it != accessor.GetData().end();
+}
+
+void SubscribeVehicleDataRequest::CheckVISubscribtions(
+ ApplicationSharedPtr app,
+ std::string& out_info,
+ mobile_apis::Result::eType& out_result_code,
+ smart_objects::SmartObject& out_response_params,
+ smart_objects::SmartObject& out_request_params,
+ bool& out_result) {
+ CheckVISubscriptions(app,
+ out_info,
+ out_result_code,
+ out_response_params,
+ out_request_params,
+ out_result);
+}
+
+void SubscribeVehicleDataRequest::CheckVISubscriptions(
+ ApplicationSharedPtr app,
+ std::string& out_info,
+ mobile_apis::Result::eType& out_result_code,
+ smart_objects::SmartObject& out_response_params,
+ smart_objects::SmartObject& out_request_params,
+ bool& out_result) {
+ // counter for items to subscribe
+ VehicleInfoSubscriptions::size_type items_to_subscribe = 0;
+ // counter for subscribed items by application
+ uint32_t subscribed_items = 0;
+
+ const VehicleData& vehicle_data = MessageHelper::vehicle_data();
+ VehicleData::const_iterator it = vehicle_data.begin();
+
+ HmiInterfaces::InterfaceState interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+
+ const bool is_interface_not_available =
+ interface_state == HmiInterfaces::STATE_NOT_AVAILABLE;
+
+ for (; vehicle_data.end() != it; ++it) {
+ const std::string& key_name = it->first;
+ if ((*message_)[strings::msg_params].keyExists(key_name)) {
+ const bool is_key_enabled =
+ (*message_)[strings::msg_params][key_name].asBool();
+ if (is_key_enabled) {
+ ++items_to_subscribe;
+ }
+ if (!is_interface_not_available && is_key_enabled) {
+ mobile_apis::VehicleDataType::eType key_type = it->second;
+ const auto is_subscribed =
+ VehicleInfoAppExtension::ExtractVIExtension(*app)
+ .isSubscribedToVehicleInfo(key_type);
+ if (is_subscribed) {
+ LOG4CXX_DEBUG(logger_,
+ "App with connection key "
+ << connection_key()
+ << " is subscribed already for VehicleDataType: "
+ << key_type);
+ ++subscribed_items;
+ vi_already_subscribed_by_this_app_.insert(key_type);
+ out_response_params[key_name][strings::data_type] = key_type;
+ out_response_params[key_name][strings::result_code] =
+ mobile_apis::VehicleDataResultCode::VDRC_DATA_ALREADY_SUBSCRIBED;
+ continue;
+ }
+
+ if (IsSomeoneSubscribedFor(key_type)) {
+ LOG4CXX_DEBUG(logger_,
+ "There are apps subscribed already for "
+ "VehicleDataType: "
+ << key_type);
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+
+ if (!ext.subscribeToVehicleInfo(key_type)) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Unable to subscribe for VehicleDataType: " << key_type);
+ continue;
+ }
+ LOG4CXX_DEBUG(
+ logger_,
+ "App with connection key "
+ << connection_key()
+ << " have been subscribed for VehicleDataType: " << key_type);
+ ++subscribed_items;
+ vi_already_subscribed_by_another_apps_.insert(key_type);
+ out_response_params[key_name][strings::data_type] = key_type;
+ out_response_params[key_name][strings::result_code] =
+ mobile_apis::VehicleDataResultCode::VDRC_SUCCESS;
+ continue;
+ }
+
+ out_request_params[key_name] = is_key_enabled;
+
+ if (is_key_enabled) {
+ vi_waiting_for_subscribe_.insert(key_type);
+ LOG4CXX_DEBUG(
+ logger_,
+ "App with connection key "
+ << connection_key()
+ << " will be subscribed for VehicleDataType: " << key_type);
+ ++subscribed_items;
+ }
+ }
+ }
+ }
+
+ const bool is_everything_already_subscribed =
+ items_to_subscribe ==
+ vi_already_subscribed_by_another_apps_.size() +
+ vi_already_subscribed_by_this_app_.size();
+
+ if (0 == items_to_subscribe) {
+ if (HasDisallowedParams()) {
+ out_result_code = mobile_apis::Result::DISALLOWED;
+ } else {
+ out_result_code = mobile_apis::Result::INVALID_DATA;
+ out_info = "No data in the request";
+ }
+ out_result = false;
+ }
+
+ if (0 == subscribed_items && !is_interface_not_available) {
+ out_result_code = mobile_apis::Result::IGNORED;
+ out_info = "Already subscribed on provided VehicleData.";
+ out_result = false;
+ }
+
+ if (is_everything_already_subscribed) {
+ out_result_code = vi_already_subscribed_by_this_app_.size()
+ ? mobile_apis::Result::IGNORED
+ : mobile_apis::Result::SUCCESS;
+ if (!(vi_already_subscribed_by_this_app_.empty())) {
+ out_info = "Already subscribed on some provided VehicleData.";
+ }
+ out_result = true;
+ }
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..2bea839320
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
@@ -0,0 +1,63 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
+ 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) {}
+
+SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {}
+
+void SubscribeVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..de419894c5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
@@ -0,0 +1,424 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h"
+#include "application_manager/commands/command_impl.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/smart_object_keys.h"
+#include "utils/helpers.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {}
+
+#ifdef HMI_DBUS_API
+namespace {
+struct Subrequest {
+ hmi_apis::FunctionID::eType func_id;
+ const char* str;
+};
+Subrequest subrequests[] = {
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps, strings::gps},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed, strings::speed},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm, strings::rpm},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel,
+ strings::fuel_level},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State,
+ strings::fuel_level_state},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption,
+ strings::instant_fuel_consumption},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature,
+ strings::external_temp},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin, strings::vin},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl, strings::prndl},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure,
+ strings::tire_pressure},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer, strings::odometer},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus,
+ strings::belt_status},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation,
+ strings::body_information},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus,
+ strings::device_status},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking,
+ strings::driver_braking},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus,
+ strings::wiper_status},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus,
+ strings::head_lamp_status},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque,
+ strings::engine_torque},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition,
+ strings::acc_pedal_pos},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle,
+ strings::steering_wheel_angle},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo,
+ strings::e_call_info},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus,
+ strings::airbag_status},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent,
+ strings::emergency_event},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus,
+ strings::cluster_mode_status},
+ {hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey, strings::my_key},
+};
+}
+#endif // #ifdef HMI_DBUS_API
+
+void UnsubscribeVehicleDataRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ int32_t items_to_unsubscribe = 0;
+ int32_t unsubscribed_items = 0;
+
+ const VehicleData& vehicle_data = MessageHelper::vehicle_data();
+ VehicleData::const_iterator it = vehicle_data.begin();
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject response_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ for (; vehicle_data.end() != it; ++it) {
+ const std::string& key_name = it->first;
+ if ((*message_)[strings::msg_params].keyExists(key_name)) {
+ bool is_key_enabled = (*message_)[strings::msg_params][key_name].asBool();
+ if (is_key_enabled) {
+ ++items_to_unsubscribe;
+
+ mobile_apis::VehicleDataType::eType key_type = it->second;
+ const auto is_subscribed =
+ VehicleInfoAppExtension::ExtractVIExtension(*app)
+ .isSubscribedToVehicleInfo(key_type);
+ if (!is_subscribed) {
+ ++unsubscribed_items;
+ vi_already_unsubscribed_by_this_app_.insert(key_type);
+ response_params[key_name][strings::data_type] = key_type;
+ response_params[key_name][strings::result_code] =
+ mobile_apis::VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
+ continue;
+ }
+
+ if (!VehicleInfoAppExtension::ExtractVIExtension(*app)
+ .unsubscribeFromVehicleInfo(it->second)) {
+ LOG4CXX_ERROR(logger_,
+ "Unable to unsubscribe from "
+ "VehicleDataType: "
+ << key_type);
+ continue;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Unsubscribed app with connection key "
+ << connection_key()
+ << " from VehicleDataType: " << key_type);
+
+ ++unsubscribed_items;
+
+ if (IsSomeoneSubscribedFor(key_type)) {
+ LOG4CXX_DEBUG(logger_,
+ "There are another apps still subscribed for "
+ "VehicleDataType: "
+ << key_type);
+
+ vi_still_subscribed_by_another_apps_.insert(key_type);
+ response_params[key_name][strings::data_type] = key_type;
+ response_params[key_name][strings::result_code] =
+ mobile_apis::VehicleDataResultCode::VDRC_SUCCESS;
+ continue;
+ }
+
+ msg_params[key_name] = is_key_enabled;
+ }
+ }
+ }
+
+ bool is_everything_already_unsubscribed =
+ static_cast<uint32_t>(items_to_unsubscribe) ==
+ vi_still_subscribed_by_another_apps_.size() +
+ vi_already_unsubscribed_by_this_app_.size();
+
+ if (0 == items_to_unsubscribe) {
+ if (HasDisallowedParams()) {
+ SendResponse(false, mobile_apis::Result::DISALLOWED);
+ } else {
+ SendResponse(
+ false, mobile_apis::Result::INVALID_DATA, "No data in the request.");
+ }
+ return;
+ }
+
+ if (0 == unsubscribed_items) {
+ SendResponse(false,
+ mobile_apis::Result::IGNORED,
+ "Was not subscribed on any VehicleData.",
+ &response_params);
+ return;
+ }
+
+ if (is_everything_already_unsubscribed) {
+ if (!vi_already_unsubscribed_by_this_app_.empty()) {
+ SendResponse(false,
+ mobile_apis::Result::IGNORED,
+ "Some provided VehicleData was not subscribed.",
+ &response_params);
+ } else {
+ SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
+ }
+ return;
+ }
+
+#ifdef HMI_DBUS_API
+ // Generate list of subrequests
+ for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
+ const Subrequest& sr = subrequests[i];
+ if (true == (*message_)[strings::msg_params].keyExists(sr.str) &&
+ true == (*message_)[strings::msg_params][sr.str].asBool()) {
+ HmiRequest hmi_request;
+ hmi_request.str = sr.str;
+ hmi_request.func_id = sr.func_id;
+ hmi_request.complete = false;
+ hmi_requests_.push_back(hmi_request);
+ }
+ }
+ LOG4CXX_INFO(logger_,
+ hmi_requests_.size() << " requests are going to be sent to HMI");
+
+ // Send subrequests
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it)
+ SendHMIRequest(it->func_id, &msg_params, true);
+#else
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
+ &msg_params,
+ true);
+#endif // #ifdef HMI_DBUS_API
+}
+
+void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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.");
+ return;
+ }
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+
+ ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "NULL pointer.");
+ return;
+ }
+
+#ifdef HMI_DBUS_API
+ for (HmiRequests::iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ HmiRequest& hmi_request = *it;
+ if (hmi_request.func_id == event.id()) {
+ hmi_request.status = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
+ hmi_request.value = message[strings::msg_params][hmi_request.str];
+ hmi_request.complete = true;
+ break;
+ }
+ }
+ bool all_complete = true;
+ bool any_arg_success = false;
+ mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ if (!it->complete) {
+ all_complete = false;
+ break;
+ }
+ if (hmi_apis::Common_Result::SUCCESS != it->status) {
+ if (mobile_api::Result::SUCCESS == status) {
+ status = static_cast<mobile_apis::Result::eType>(it->status);
+ } else if (status !=
+ static_cast<mobile_apis::Result::eType>(it->status)) {
+ status = mobile_api::Result::eType::GENERIC_ERROR;
+ }
+ LOG4CXX_TRACE(logger_,
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
+ } else {
+ any_arg_success = true;
+ }
+ }
+ if (all_complete) {
+ smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
+ if (any_arg_success) {
+ for (HmiRequests::const_iterator it = hmi_requests_.begin();
+ it != hmi_requests_.end();
+ ++it) {
+ response_params[it->str] = it->value;
+ }
+ }
+
+ LOG4CXX_INFO(logger_, "All HMI requests are complete");
+ if (true == any_arg_success) {
+ SetAllowedToTerminate(false);
+ }
+ SendResponse(any_arg_success, status, NULL, &response_params);
+ if (true == any_arg_success) {
+ app->UpdateHash();
+ }
+ }
+#else
+ hmi_apis::Common_Result::eType hmi_result =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ hmi_result, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+
+ mobile_apis::Result::eType result_code =
+ MessageHelper::HMIToMobileResult(hmi_result);
+
+ if (result) {
+ if (vi_already_unsubscribed_by_this_app_.size()) {
+ result_code = mobile_apis::Result::IGNORED;
+ response_info = "Some provided VehicleData was not subscribed.";
+ }
+ }
+
+ if (!vi_still_subscribed_by_another_apps_.empty() ||
+ !vi_already_unsubscribed_by_this_app_.empty()) {
+ AddAlreadyUnsubscribedVI(
+ const_cast<smart_objects::SmartObject&>(message[strings::msg_params]));
+ }
+
+ if (result) {
+ SetAllowedToTerminate(false);
+ }
+ SendResponse(result,
+ result_code,
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
+ if (result) {
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
+ }
+#endif // #ifdef HMI_DBUS_API
+}
+
+bool UnsubscribeVehicleDataRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
+struct SubscribedToIVIPredicate {
+ int32_t vehicle_info_;
+ SubscribedToIVIPredicate(int32_t vehicle_info)
+ : vehicle_info_(vehicle_info) {}
+ bool operator()(const ApplicationSharedPtr app) const {
+ DCHECK_OR_RETURN(app, false);
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ return ext.isSubscribedToVehicleInfo(
+ static_cast<mobile_apis::VehicleDataType::eType>(vehicle_info_));
+ }
+};
+
+bool UnsubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
+ const uint32_t param_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SubscribedToIVIPredicate finder(param_id);
+ DataAccessor<ApplicationSet> accessor = application_manager_.applications();
+ ApplicationSetConstIt it = std::find_if(
+ accessor.GetData().begin(), accessor.GetData().end(), finder);
+ return it != accessor.GetData().end();
+}
+
+void UnsubscribeVehicleDataRequest::AddAlreadyUnsubscribedVI(
+ smart_objects::SmartObject& response) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace mobile_apis;
+ VehicleInfoSubscriptions::const_iterator it_same_app =
+ vi_already_unsubscribed_by_this_app_.begin();
+ for (; vi_already_unsubscribed_by_this_app_.end() != it_same_app;
+ ++it_same_app) {
+ response[*it_same_app][strings::result_code] =
+ VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
+ }
+
+ VehicleInfoSubscriptions::const_iterator it_another_app =
+ vi_still_subscribed_by_another_apps_.begin();
+ for (; vi_still_subscribed_by_another_apps_.end() != it_another_app;
+ ++it_another_app) {
+ response[*it_another_app][strings::result_code] =
+ VehicleDataResultCode::VDRC_SUCCESS;
+ }
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..5f79785784
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
@@ -0,0 +1,70 @@
+/*
+
+ 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 "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h"
+#include "smart_objects/smart_object.h"
+
+namespace vehicle_info_plugin {
+using namespace application_manager;
+namespace commands {
+
+UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
+ 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) {}
+
+UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {}
+
+void UnsubscribeVehicleDataResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // 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");
+ SendResponse(false);
+ return;
+ }
+ }
+ SendResponse(true);
+}
+
+} // namespace commands
+} // namespace application_manager
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
new file mode 100644
index 0000000000..ed4755a818
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.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 "vehicle_info_plugin/vehicle_info_app_extension.h"
+#include "vehicle_info_plugin/vehicle_info_plugin.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+
+namespace vehicle_info_plugin {
+
+unsigned VehicleInfoAppExtension::VehicleInfoAppExtensionUID = 146;
+
+VehicleInfoAppExtension::VehicleInfoAppExtension(
+ VehicleInfoPlugin& plugin, application_manager::Application& app)
+ : app_mngr::AppExtension(
+ VehicleInfoAppExtension::VehicleInfoAppExtensionUID)
+ , plugin_(plugin)
+ , app_(app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+VehicleInfoAppExtension::~VehicleInfoAppExtension() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+bool VehicleInfoAppExtension::subscribeToVehicleInfo(
+ const VehicleDataType vehicle_data) {
+ LOG4CXX_DEBUG(logger_, vehicle_data);
+ return subscribed_data_.insert(vehicle_data).second;
+}
+
+bool VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
+ const VehicleDataType vehicle_data) {
+ LOG4CXX_DEBUG(logger_, vehicle_data);
+ auto it = subscribed_data_.find(vehicle_data);
+ if (it != subscribed_data_.end()) {
+ subscribed_data_.erase(it);
+ return true;
+ }
+ return false;
+}
+
+void VehicleInfoAppExtension::unsubscribeFromVehicleInfo() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribed_data_.clear();
+}
+
+bool VehicleInfoAppExtension::isSubscribedToVehicleInfo(
+ const VehicleDataType vehicle_data) const {
+ LOG4CXX_DEBUG(logger_, vehicle_data);
+ return subscribed_data_.find(vehicle_data) != subscribed_data_.end();
+}
+
+VehicleInfoSubscriptions VehicleInfoAppExtension::Subscriptions() {
+ return subscribed_data_;
+}
+
+void VehicleInfoAppExtension::SaveResumptionData(
+ smart_objects::SmartObject& resumption_data) {
+ const char* application_vehicle_info = "vehicleInfo";
+ resumption_data[application_vehicle_info] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ int i = 0;
+ for (const auto& subscription : subscribed_data_) {
+ resumption_data[application_vehicle_info][i] = subscription;
+ }
+}
+
+void VehicleInfoAppExtension::ProcessResumption(
+ const smart_objects::SmartObject& resumption_data) {
+ const char* application_vehicle_info = "vehicleInfo";
+ if (resumption_data.keyExists(application_vehicle_info)) {
+ const smart_objects::SmartObject& subscriptions_ivi =
+ resumption_data[application_vehicle_info];
+ for (size_t i = 0; i < subscriptions_ivi.length(); ++i) {
+ mobile_apis::VehicleDataType::eType ivi =
+ static_cast<mobile_apis::VehicleDataType::eType>(
+ (resumption_data[i]).asInt());
+ subscribeToVehicleInfo(ivi);
+ }
+ plugin_.ProcessResumptionSubscription(app_, *this);
+ }
+}
+
+VehicleInfoAppExtension& VehicleInfoAppExtension::ExtractVIExtension(
+ application_manager::Application& app) {
+ auto ext_ptr =
+ app.QueryInterface(VehicleInfoAppExtension::VehicleInfoAppExtensionUID);
+ DCHECK(ext_ptr);
+ DCHECK(dynamic_cast<VehicleInfoAppExtension*>(ext_ptr.get()));
+ auto vi_app_extension =
+ application_manager::AppExtensionPtr::static_pointer_cast<
+ VehicleInfoAppExtension>(ext_ptr);
+ DCHECK(vi_app_extension);
+ return *vi_app_extension;
+}
+}
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
new file mode 100644
index 0000000000..32959174da
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
@@ -0,0 +1,70 @@
+/*
+ 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 "vehicle_info_plugin/vehicle_info_command_factory.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+
+namespace vehicle_info_plugin {
+
+VehicleInfoCommandFactory::VehicleInfoCommandFactory(
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : hmi_command_factory_(new VehicleInfoHmiCommandFactory(
+ application_manager, rpc_service, hmi_capabilities, policy_handler))
+ , mob_command_factory_(new VehicleInfoMobileCommandFactory(
+ application_manager, rpc_service, hmi_capabilities, policy_handler)) {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+VehicleInfoCommandFactory::~VehicleInfoCommandFactory() {}
+
+app_mngr::CommandSharedPtr VehicleInfoCommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ if (app_mngr::commands::Command::SOURCE_HMI == source) {
+ return hmi_command_factory_->CreateCommand(message, source);
+ } else {
+ return mob_command_factory_->CreateCommand(message, source);
+ }
+}
+
+bool VehicleInfoCommandFactory::IsAbleToProcess(
+ const int32_t function_id,
+ const commands::Command::CommandSource source) const {
+ return commands::Command::SOURCE_HMI == source
+ ? hmi_command_factory_->IsAbleToProcess(function_id, source)
+ : mob_command_factory_->IsAbleToProcess(function_id, source);
+}
+}
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
new file mode 100644
index 0000000000..3855d6733b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
@@ -0,0 +1,155 @@
+/*
+ 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 "vehicle_info_plugin/vehicle_info_hmi_command_factory.h"
+#include "application_manager/message.h"
+#include "interfaces/HMI_API.h"
+
+#include "vehicle_info_plugin/commands/hmi/on_vi_vehicle_data_notification.h"
+#include "vehicle_info_plugin/commands/hmi/vi_diagnostic_message_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_diagnostic_message_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_get_dtcs_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_get_dtcs_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_get_vehicle_data_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_is_ready_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_is_ready_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_read_did_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_read_did_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
+#include "vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h"
+#include "vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_response.h"
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+
+namespace vehicle_info_plugin {
+namespace strings = app_mngr::strings;
+
+VehicleInfoHmiCommandFactory::VehicleInfoHmiCommandFactory(
+ application_manager::ApplicationManager& application_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ UNUSED(source);
+
+ const hmi_apis::FunctionID::eType function_id =
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ const hmi_apis::messageType::eType message_type =
+ static_cast<hmi_apis::messageType::eType>(
+ (*message)[strings::params][strings::message_type].asInt());
+
+ auto message_type_str = "request";
+ if (hmi_apis::messageType::response == message_type) {
+ message_type_str = "response";
+ } else if (hmi_apis::messageType::error_response == message_type) {
+ message_type_str = "error response";
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "HMICommandFactory::CreateCommand function_id: "
+ << function_id << ", message type: " << message_type_str);
+
+ return buildCommandCreator(function_id, message_type).create(message);
+}
+
+bool VehicleInfoHmiCommandFactory::IsAbleToProcess(
+ const int32_t function_id,
+ const app_mngr::commands::Command::CommandSource source) const {
+ UNUSED(source);
+ return buildCommandCreator(function_id, hmi_apis::messageType::INVALID_ENUM)
+ .CanBeCreated();
+}
+
+app_mngr::CommandCreator& VehicleInfoHmiCommandFactory::buildCommandCreator(
+ const int32_t function_id, const int32_t message_type) const {
+ auto factory = app_mngr::CommandCreatorFactory(
+ application_manager_, rpc_service_, hmi_capabilities_, policy_handler_);
+
+ switch (function_id) {
+ case hmi_apis::FunctionID::VehicleInfo_GetVehicleType:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleTypeRequest>()
+ : factory.GetCreator<commands::VIGetVehicleTypeResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_IsReady:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIIsReadyRequest>()
+ : factory.GetCreator<commands::VIIsReadyResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VISubscribeVehicleDataRequest>()
+ : factory
+ .GetCreator<commands::VISubscribeVehicleDataResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData:
+ return hmi_apis::messageType::request == message_type
+ ? factory
+ .GetCreator<commands::VIUnsubscribeVehicleDataRequest>()
+ : factory.GetCreator<
+ commands::VIUnsubscribeVehicleDataResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_GetVehicleData:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetVehicleDataRequest>()
+ : factory.GetCreator<commands::VIGetVehicleDataResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_OnVehicleData:
+ return factory.GetCreator<commands::OnVIVehicleDataNotification>();
+ case hmi_apis::FunctionID::VehicleInfo_ReadDID:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIReadDIDRequest>()
+ : factory.GetCreator<commands::VIReadDIDResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_GetDTCs:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIGetDTCsRequest>()
+ : factory.GetCreator<commands::VIGetDTCsResponse>();
+ case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::VIDiagnosticMessageRequest>()
+ : factory.GetCreator<commands::VIDiagnosticMessageResponse>();
+ default:
+ LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id);
+ return factory.GetCreator<app_mngr::InvalidCommand>();
+ }
+}
+}
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
new file mode 100644
index 0000000000..caa832dde4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
@@ -0,0 +1,143 @@
+/*
+ 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 "vehicle_info_plugin/vehicle_info_mobile_command_factory.h"
+
+#include "application_manager/message.h"
+#include "interfaces/MOBILE_API.h"
+
+#include "vehicle_info_plugin/commands/mobile/diagnostic_message_request.h"
+#include "vehicle_info_plugin/commands/mobile/diagnostic_message_response.h"
+#include "vehicle_info_plugin/commands/mobile/get_dtcs_request.h"
+#include "vehicle_info_plugin/commands/mobile/get_dtcs_response.h"
+#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h"
+#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h"
+#include "vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h"
+#include "vehicle_info_plugin/commands/mobile/read_did_request.h"
+#include "vehicle_info_plugin/commands/mobile/read_did_response.h"
+#include "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h"
+#include "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h"
+#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")
+
+namespace vehicle_info_plugin {
+namespace strings = app_mngr::strings;
+
+VehicleInfoMobileCommandFactory::VehicleInfoMobileCommandFactory(
+ application_manager::ApplicationManager& application_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::commands::Command::CommandSource source) {
+ UNUSED(source);
+
+ const mobile_apis::FunctionID::eType function_id =
+ static_cast<mobile_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ const mobile_apis::messageType::eType message_type =
+ static_cast<mobile_apis::messageType::eType>(
+ (*message)[strings::params][strings::message_type].asInt());
+
+ auto message_type_str = "request";
+ if (mobile_apis::messageType::response == message_type) {
+ message_type_str = "response";
+ } else if (mobile_apis::messageType::notification == message_type) {
+ message_type_str = "notification";
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "HMICommandFactory::CreateCommand function_id: "
+ << function_id << ", message type: " << message_type_str);
+
+ return buildCommandCreator(function_id, message_type).create(message);
+}
+
+bool VehicleInfoMobileCommandFactory::IsAbleToProcess(
+ const int32_t function_id,
+ const app_mngr::commands::Command::CommandSource source) const {
+ UNUSED(source);
+ return buildCommandCreator(function_id,
+ mobile_apis::messageType::INVALID_ENUM)
+ .CanBeCreated();
+}
+
+app_mngr::CommandCreator& VehicleInfoMobileCommandFactory::buildCommandCreator(
+ const int32_t function_id, const int32_t message_type) const {
+ auto factory = app_mngr::CommandCreatorFactory(
+ application_manager_, rpc_service_, hmi_capabilities_, policy_handler_);
+
+ switch (function_id) {
+ case mobile_apis::FunctionID::GetVehicleDataID:
+ return mobile_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::GetVehicleDataRequest>()
+ : factory.GetCreator<commands::GetVehicleDataResponse>();
+ case mobile_apis::FunctionID::SubscribeVehicleDataID:
+ return mobile_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::SubscribeVehicleDataRequest>()
+ : factory.GetCreator<commands::SubscribeVehicleDataResponse>();
+ case mobile_apis::FunctionID::UnsubscribeVehicleDataID:
+ return mobile_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UnsubscribeVehicleDataRequest>()
+ : factory
+ .GetCreator<commands::UnsubscribeVehicleDataResponse>();
+ case mobile_apis::FunctionID::OnVehicleDataID:
+ return factory.GetCreator<commands::OnVehicleDataNotification>();
+ case mobile_apis::FunctionID::ReadDIDID:
+ return mobile_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ReadDIDRequest>()
+ : factory.GetCreator<commands::ReadDIDResponse>();
+ case mobile_apis::FunctionID::GetDTCsID:
+ return mobile_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::GetDTCsRequest>()
+ : factory.GetCreator<commands::GetDTCsResponse>();
+ case mobile_apis::FunctionID::DiagnosticMessageID:
+ return mobile_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::DiagnosticMessageRequest>()
+ : factory.GetCreator<commands::DiagnosticMessageResponse>();
+ default:
+ LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id);
+ return factory.GetCreator<app_mngr::InvalidCommand>();
+ }
+}
+}
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
new file mode 100644
index 0000000000..7b94d22312
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
@@ -0,0 +1,164 @@
+/*
+ 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 "vehicle_info_plugin/vehicle_info_plugin.h"
+#include "vehicle_info_plugin/vehicle_info_command_factory.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/message_helper.h"
+
+namespace vehicle_info_plugin {
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+
+namespace strings = application_manager::strings;
+
+VehicleInfoPlugin::VehicleInfoPlugin() : application_manager_(nullptr) {}
+
+bool VehicleInfoPlugin::Init(
+ application_manager::ApplicationManager& app_manager,
+ application_manager::rpc_service::RPCService& rpc_service,
+ application_manager::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler) {
+ application_manager_ = &app_manager;
+ command_factory_.reset(new vehicle_info_plugin::VehicleInfoCommandFactory(
+ app_manager, rpc_service, hmi_capabilities, policy_handler));
+ return true;
+}
+
+bool VehicleInfoPlugin::IsAbleToProcess(
+ const int32_t function_id, const commands::Command::CommandSource source) {
+ return command_factory_->IsAbleToProcess(function_id, source);
+}
+
+std::string VehicleInfoPlugin::PluginName() {
+ return "Vehicle Info Plugin";
+}
+
+app_mngr::CommandFactory& VehicleInfoPlugin::GetCommandFactory() {
+ return *command_factory_;
+}
+
+void VehicleInfoPlugin::OnPolicyEvent(plugins::PolicyEvent event) {}
+
+void VehicleInfoPlugin::OnApplicationEvent(
+ plugins::ApplicationEvent event,
+ app_mngr::ApplicationSharedPtr application) {
+ if (plugins::ApplicationEvent::kApplicationRegistered == event) {
+ application->AddExtension(new VehicleInfoAppExtension(*this, *application));
+ }
+}
+
+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();
+ for (auto& ivi_data : application_manager::MessageHelper::vehicle_data()) {
+ mobile_apis::VehicleDataType::eType type_id = ivi_data.second;
+ if (subscriptions.end() != subscriptions.find(type_id)) {
+ std::string key_name = ivi_data.first;
+ msg_params[key_name] = true;
+ }
+ }
+ smart_objects::SmartObjectSPtr request =
+ application_manager::MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
+ *application_manager_);
+ (*request)[strings::msg_params] = msg_params;
+ application_manager_->GetRPCService().ManageHMICommand(request);
+}
+
+application_manager::ApplicationSharedPtr FindAppSubscribedToIVI(
+ mobile_apis::VehicleDataType::eType ivi_data,
+ application_manager::ApplicationManager& app_mngr) {
+ auto applications = app_mngr.applications();
+
+ for (auto& app : applications.GetData()) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ if (ext.isSubscribedToVehicleInfo(ivi_data)) {
+ return app;
+ }
+ }
+ return application_manager::ApplicationSharedPtr();
+}
+
+smart_objects::SmartObjectSPtr GetUnsubscribeIVIRequest(
+ int32_t ivi_id, application_manager::ApplicationManager& app_mngr) {
+ using namespace smart_objects;
+
+ auto find_ivi_name = [ivi_id]() {
+ for (auto item : application_manager::MessageHelper::vehicle_data()) {
+ if (ivi_id == item.second) {
+ return item.first;
+ }
+ }
+ return std::string();
+ };
+ std::string key_name = find_ivi_name();
+ DCHECK_OR_RETURN(!key_name.empty(), smart_objects::SmartObjectSPtr());
+ auto msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[key_name] = true;
+
+ auto message = application_manager::MessageHelper::CreateMessageForHMI(
+ hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
+ DCHECK(message);
+
+ SmartObject& object = *message;
+ object[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData;
+
+ object[strings::msg_params] = msg_params;
+ return message;
+}
+
+void VehicleInfoPlugin::DeleteSubscriptions(
+ application_manager::ApplicationSharedPtr app) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ auto subscriptions = ext.Subscriptions();
+ for (auto& ivi : subscriptions) {
+ ext.unsubscribeFromVehicleInfo(ivi);
+ auto still_subscribed_app =
+ FindAppSubscribedToIVI(ivi, *application_manager_);
+ if (!still_subscribed_app) {
+ auto message = GetUnsubscribeIVIRequest(ivi, *application_manager_);
+ application_manager_->GetRPCService().ManageHMICommand(message);
+ }
+ }
+}
+}
+
+extern "C" application_manager::plugin_manager::RPCPlugin* Create() {
+ return new vehicle_info_plugin::VehicleInfoPlugin();
+}
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
new file mode 100644
index 0000000000..3ea4a50a8a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt
@@ -0,0 +1,64 @@
+# 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 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(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
+
+include_directories(
+ ${GMOCK_INCLUDE_DIRECTORY}
+ ${COMPONENTS_DIR}/application_manager/rpc_plugins/vehicle_info_plugin/include
+ ${COMPONENTS_DIR}/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/
+ ${COMPONENTS_DIR}/application_manager/test/include/
+)
+
+
+set(COMMANDS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/commands)
+
+file(GLOB SOURCES
+ ${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
+ ${COMPONENTS_DIR}/application_manager/test/mock_application_helper.cc
+ ${COMPONENTS_DIR}/application_manager/src/smart_object_keys.cc
+ ${COMMANDS_TEST_DIR}/hmi/*
+ ${COMMANDS_TEST_DIR}/mobile/*
+ ${COMPONENTS_DIR}/application_manager/src/message.cc
+ ${COMPONENTS_DIR}/application_manager/src/event_engine/*
+)
+
+set(LIBRARIES
+ gmock
+ Utils
+ SmartObjects
+ HMI_API
+ MOBILE_API
+ connectionHandler
+ vehicle_info_plugin
+ jsoncpp
+)
+
+create_cotired_test("vi_commands_test" "${SOURCES}" "${LIBRARIES}" )
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
new file mode 100644
index 0000000000..ddfc8e8a55
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc
@@ -0,0 +1,153 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/application.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "hmi/vi_get_vehicle_data_response.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vi_get_vehicle_data_response {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::VIGetVehicleDataResponse;
+using am::event_engine::Event;
+using test::components::event_engine_test::MockEventDispatcher;
+
+typedef SharedPtr<VIGetVehicleDataResponse> VIGetVehicleDataResponsePtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kCorrelationId = 1u;
+const std::string kStrNumber = "123";
+} // namespace
+
+class VIGetVehicleDataResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(VIGetVehicleDataResponseTest, RUN_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][strings::message_type] =
+ hmi_apis::messageType::response;
+
+ VIGetVehicleDataResponsePtr command(
+ CreateCommand<VIGetVehicleDataResponse>(command_msg));
+
+ am::event_engine::Event event(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
+ event.set_smart_object(*command_msg);
+
+ EXPECT_CALL(mock_policy_handler_, OnVehicleDataUpdated(*command_msg));
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+TEST_F(VIGetVehicleDataResponseTest, ErrorResponse_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ (*command_msg)[strings::params][strings::message_type] =
+ hmi_apis::messageType::error_response;
+ (*command_msg)[strings::params][strings::data][strings::slider_position] = 1;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::params][strings::correlation_id] = kCorrelationId;
+ (*command_msg)[am::strings::params][am::strings::error_msg] = "test_error";
+ (*command_msg)[am::strings::params][am::strings::protocol_type] =
+ am::commands::CommandImpl::hmi_protocol_type_;
+ (*command_msg)[strings::params][strings::protocol_version] =
+ am::commands::CommandImpl::protocol_version_;
+
+ smart_objects::SmartObject result(smart_objects::SmartType_Map);
+ result[strings::msg_params] = (*command_msg)[strings::params][strings::data];
+ result[strings::params][hmi_response::code] =
+ (*command_msg)[strings::params][hmi_response::code];
+ result[strings::params][strings::correlation_id] =
+ (*command_msg)[strings::params][strings::correlation_id];
+ result[strings::params][strings::error_msg] =
+ (*command_msg)[strings::params][strings::error_msg];
+ result[strings::params][strings::message_type] =
+ (*command_msg)[strings::params][strings::message_type];
+ result[strings::params][strings::protocol_type] =
+ (*command_msg)[strings::params][strings::protocol_type];
+ result[strings::params][strings::protocol_version] =
+ (*command_msg)[strings::params][strings::protocol_version];
+
+ VIGetVehicleDataResponsePtr command(
+ CreateCommand<VIGetVehicleDataResponse>(command_msg));
+
+ am::event_engine::Event event(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
+ event.set_smart_object(result);
+
+ MockEventDispatcher mock_event_dispatcher;
+ EXPECT_CALL(app_mngr_, event_dispatcher())
+ .WillOnce(ReturnRef(mock_event_dispatcher));
+ EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+
+ command->Run();
+}
+
+} // namespace vi_get_vehicle_data_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
new file mode 100644
index 0000000000..d0093f45cf
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc
@@ -0,0 +1,169 @@
+/*
+ * 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 "hmi/vi_is_ready_request.h"
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/event_engine/event.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vi_is_ready_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+using ::testing::Return;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::VIIsReadyRequest;
+using am::event_engine::Event;
+
+typedef SharedPtr<VIIsReadyRequest> VIIsReadyRequestPtr;
+
+class VIIsReadyRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ VIIsReadyRequestTest() : command_(CreateCommand<VIIsReadyRequest>()) {}
+
+ void SetUpExpectations(bool is_vi_cooperating_available,
+ bool is_send_message_to_hmi,
+ bool is_message_contain_param,
+ am::HmiInterfaces::InterfaceState state) {
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_ivi_cooperating(is_vi_cooperating_available));
+
+ if (is_message_contain_param) {
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ SetInterfaceState(
+ am::HmiInterfaces::HMI_INTERFACE_VehicleInfo, state));
+ } else {
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillOnce(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(mock_hmi_interfaces_, SetInterfaceState(_, _)).Times(0);
+ }
+ EXPECT_CALL(mock_policy_handler_, OnVIIsReady());
+
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VehicleInfo))
+ .WillOnce(Return(state));
+
+ if (is_send_message_to_hmi) {
+ ExpectSendMessagesToHMI();
+ }
+ }
+
+ void ExpectSendMessagesToHMI() {
+ smart_objects::SmartObjectSPtr ivi_type;
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::VehicleInfo_GetVehicleType, _))
+ .WillOnce(Return(ivi_type));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(ivi_type));
+ }
+
+ void PrepareEvent(bool is_message_contain_param,
+ Event& event,
+ bool is_vi_cooperating_available = false) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ if (is_message_contain_param) {
+ (*msg)[am::strings::msg_params][am::strings::available] =
+ is_vi_cooperating_available;
+ }
+ event.set_smart_object(*msg);
+ }
+
+ VIIsReadyRequestPtr command_;
+};
+
+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;
+ Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
+ PrepareEvent(is_message_contain_param, event);
+ SetUpExpectations(is_vi_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_RESPONSE);
+ 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;
+ Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
+ PrepareEvent(is_message_contain_param, event);
+ SetUpExpectations(is_vi_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE);
+ 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;
+ Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
+ PrepareEvent(is_message_contain_param, event, is_vi_cooperating_available);
+ SetUpExpectations(is_vi_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(VIIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
+ ExpectSendMessagesToHMI();
+ command_->onTimeOut();
+}
+
+} // namespace vi_is_ready_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/mobile/diagnostic_message_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/diagnostic_message_request_test.cc
new file mode 100644
index 0000000000..3f684cae3f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/diagnostic_message_request_test.cc
@@ -0,0 +1,185 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/mock_message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "vehicle_info_plugin/commands/mobile/diagnostic_message_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace diagnostic_message_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::DiagnosticMessageRequest;
+using am::event_engine::Event;
+namespace mobile_result = mobile_apis::Result;
+
+typedef SharedPtr<DiagnosticMessageRequest> DiagnosticMessageRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const uint32_t kDiagnosticMode = 5u;
+} // namespace
+
+class DiagnosticMessageRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(DiagnosticMessageRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DiagnosticMessageRequestPtr command(
+ CreateCommand<DiagnosticMessageRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(DiagnosticMessageRequestTest, Run_NotSupportedDiagnosticMode_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::message_data][0] =
+ kDiagnosticMode;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DiagnosticMessageRequestPtr command(
+ CreateCommand<DiagnosticMessageRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+
+ const std::vector<uint32_t> empty_supported_diag_modes;
+ EXPECT_CALL(app_mngr_settings_, supported_diag_modes())
+ .WillOnce(ReturnRef(empty_supported_diag_modes));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::REJECTED), _));
+
+ command->Run();
+}
+
+TEST_F(DiagnosticMessageRequestTest, Run_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::message_data][0] =
+ kDiagnosticMode;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ DiagnosticMessageRequestPtr command(
+ CreateCommand<DiagnosticMessageRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(app_mngr_, get_settings())
+ .WillOnce(ReturnRef(app_mngr_settings_));
+
+ std::vector<uint32_t> supported_diag_modes;
+ supported_diag_modes.push_back(kDiagnosticMode);
+
+ EXPECT_CALL(app_mngr_settings_, supported_diag_modes())
+ .WillOnce(ReturnRef(supported_diag_modes));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage)));
+
+ command->Run();
+}
+
+TEST_F(DiagnosticMessageRequestTest, OnEvent_UNSUCCESS) {
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ DiagnosticMessageRequestPtr command(
+ CreateCommand<DiagnosticMessageRequest>());
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ command->on_event(event);
+}
+
+TEST_F(DiagnosticMessageRequestTest, OnEvent_SUCCESS) {
+ Event event(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
+
+ MessageSharedPtr event_message(CreateMessage(smart_objects::SmartType_Map));
+ (*event_message)[am::strings::msg_params] = 0;
+ (*event_message)[am::strings::params][am::hmi_response::code] =
+ mobile_result::SUCCESS;
+ event.set_smart_object(*event_message);
+
+ DiagnosticMessageRequestPtr command(
+ CreateCommand<DiagnosticMessageRequest>());
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
+
+ command->on_event(event);
+}
+
+} // namespace diagnostic_message_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/get_dtcs_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_dtcs_request_test.cc
new file mode 100644
index 0000000000..9719d3ceed
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_dtcs_request_test.cc
@@ -0,0 +1,142 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/event_engine/event.h"
+#include "mobile/get_dtcs_request.h"
+#include "application_manager/mock_message_helper.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace get_dtcs_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::GetDTCsRequest;
+using am::event_engine::Event;
+using am::MockMessageHelper;
+using testing::Mock;
+namespace mobile_result = mobile_apis::Result;
+
+typedef SharedPtr<GetDTCsRequest> GetDTCsRequestPtr;
+
+class GetDTCsRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ GetDTCsRequestTest() : CommandRequestTest<CommandsTestMocks::kIsNice>() {}
+};
+
+TEST_F(GetDTCsRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>());
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(GetDTCsRequestTest, Run_SUCCESS) {
+ const uint32_t kConnectionKey = 2u;
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::dtc_mask] = 0;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::VehicleInfo_GetDTCs)));
+
+ command->Run();
+}
+
+TEST_F(GetDTCsRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
+ GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>());
+
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ command->on_event(event);
+}
+
+TEST_F(GetDTCsRequestTest, OnEvent_SUCCESS) {
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::msg_params] = 0;
+ (*event_msg)[am::strings::params][am::hmi_response::code] =
+ mobile_apis::Result::SUCCESS;
+
+ Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
+
+ GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>());
+ command->on_event(event);
+}
+
+} // namespace get_dtcs_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/get_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc
new file mode 100644
index 0000000000..d8e4c3d075
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc
@@ -0,0 +1,262 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "mobile/get_vehicle_data_request.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace get_vehicle_data_request {
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::GetVehicleDataRequest;
+using am::event_engine::Event;
+namespace mobile_result = mobile_apis::Result;
+
+typedef SharedPtr<GetVehicleDataRequest> GetVehicleDataRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class GetVehicleDataRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+class UnwrappedGetVehicleDataRequest : public GetVehicleDataRequest {
+ public:
+ UnwrappedGetVehicleDataRequest(const MessageSharedPtr& message,
+ am::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : GetVehicleDataRequest(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ policy::RPCParams& get_disallowed_params() {
+ return removed_parameters_permissions_.disallowed_params;
+ }
+
+ using GetVehicleDataRequest::on_event;
+};
+
+#ifdef HMI_DBUS_API
+// HMI_DBUS_API currently not supported
+#else
+
+TEST_F(GetVehicleDataRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
+ GetVehicleDataRequestPtr command(CreateCommand<GetVehicleDataRequest>());
+
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(GetVehicleDataRequestTest, Run_TooHighFrequency_UNSUCCESS) {
+ const mobile_apis::FunctionID::eType kFunctionId =
+ mobile_apis::FunctionID::GetVehicleDataID;
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::function_id] = kFunctionId;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ GetVehicleDataRequestPtr command(
+ CreateCommand<GetVehicleDataRequest>(command_msg));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(
+ *app,
+ AreCommandLimitsExceeded(kFunctionId, am::TLimitSource::CONFIG_FILE))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::REJECTED), _));
+
+ command->Run();
+}
+
+TEST_F(GetVehicleDataRequestTest, Run_EmptyMsgParams_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ GetVehicleDataRequestPtr command(
+ CreateCommand<GetVehicleDataRequest>(command_msg));
+
+ const am::VehicleData kEmptyVehicleData;
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(kEmptyVehicleData));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(GetVehicleDataRequestTest,
+ Run_EmptyMsgParamsAndHasDisallowedParams_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ SharedPtr<UnwrappedGetVehicleDataRequest> command(
+ CreateCommand<UnwrappedGetVehicleDataRequest>(command_msg));
+
+ const am::VehicleData kEmptyVehicleData;
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillRepeatedly(ReturnRef(kEmptyVehicleData));
+
+ policy::RPCParams& disallowed_params = command->get_disallowed_params();
+ disallowed_params.insert("test_param");
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::DISALLOWED), _));
+
+ command->Run();
+}
+
+TEST_F(GetVehicleDataRequestTest, Run_SUCCESS) {
+ const std::string kMsgParamKey("test_key");
+
+ 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] = true;
+
+ GetVehicleDataRequestPtr command(
+ CreateCommand<GetVehicleDataRequest>(command_msg));
+
+ am::VehicleData vehicle_data;
+ vehicle_data.insert(am::VehicleData::value_type(
+ kMsgParamKey, mobile_apis::VehicleDataType::VEHICLEDATA_SPEED));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(vehicle_data));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleData)));
+
+ command->Run();
+}
+
+TEST_F(GetVehicleDataRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ SharedPtr<UnwrappedGetVehicleDataRequest> command(
+ CreateCommand<UnwrappedGetVehicleDataRequest>(command_msg));
+
+ Event event(hmi_apis::FunctionID::INVALID_ENUM);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+
+ command->on_event(event);
+}
+
+TEST_F(GetVehicleDataRequestTest, OnEvent_DataNotAvailable_SUCCESS) {
+ const hmi_apis::Common_Result::eType hmi_response_code =
+ hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
+ const mobile_result::eType mobile_response_code =
+ mobile_result::DATA_NOT_AVAILABLE;
+
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ SharedPtr<UnwrappedGetVehicleDataRequest> command(
+ CreateCommand<UnwrappedGetVehicleDataRequest>(command_msg));
+
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
+ (*event_msg)[am::strings::params][am::strings::error_msg] = "test_error";
+ (*event_msg)[am::strings::msg_params][am::hmi_response::method] = 0;
+
+ Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
+
+ command->on_event(event);
+}
+
+#endif // HMI_DBUS_API
+
+} // namespace get_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/on_vehicle_data_notification_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/on_vehicle_data_notification_test.cc
new file mode 100644
index 0000000000..3cc5af575e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/on_vehicle_data_notification_test.cc
@@ -0,0 +1,114 @@
+/*
+ * 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 <stdint.h>
+#include <vector>
+#include <map>
+
+#include "gtest/gtest.h"
+#include "mobile/on_vehicle_data_notification.h"
+#include "utils/shared_ptr.h"
+#include "utils/custom_string.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/mock_message_helper.h"
+#include "utils/helpers.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_vehicle_data_notification {
+
+namespace am = ::application_manager;
+
+using ::testing::_;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::OnVehicleDataNotification;
+
+typedef ::utils::SharedPtr<OnVehicleDataNotification> NotificationPtr;
+
+namespace {
+const uint32_t kAppId = 1u;
+} // namespace
+
+class OnVehicleDataNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnVehicleDataNotificationTest()
+ : command_msg_(CreateMessage(smart_objects::SmartType_Map))
+ , command_(CreateCommand<OnVehicleDataNotification>(command_msg_)) {}
+
+ MessageSharedPtr command_msg_;
+ NotificationPtr command_;
+};
+
+MATCHER_P2(CheckMessageData, key, value, "") {
+ const bool kIsMobileProtocolTypeCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
+ am::commands::CommandImpl::mobile_protocol_type_;
+
+ const bool kIsProtocolVersionCorrect =
+ (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
+ am::commands::CommandImpl::protocol_version_;
+
+ const bool kIsNotificationCorrect =
+ (*arg)[am::strings::params][am::strings::message_type].asInt() ==
+ am::MessageType::kNotification;
+
+ const bool kIsConnectionKeyCorrect =
+ (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
+ kAppId;
+
+ const bool kAreMsgParamsCorrect =
+ (*arg)[am::strings::msg_params][key].asInt() == value;
+
+ using namespace helpers;
+ return Compare<bool, EQ, ALL>(true,
+ kIsMobileProtocolTypeCorrect,
+ kIsProtocolVersionCorrect,
+ kIsNotificationCorrect,
+ kIsConnectionKeyCorrect,
+ kAreMsgParamsCorrect);
+}
+
+} // namespace on_vehicle_data_notification
+} // 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/read_did_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc
new file mode 100644
index 0000000000..7cdeb2541c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc
@@ -0,0 +1,165 @@
+/*
+ * 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "smart_objects/smart_object.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "application_manager/smart_object_keys.h"
+#include "application_manager/event_engine/event.h"
+#include "vehicle_info_plugin/commands/mobile/read_did_request.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace read_did_request {
+
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::Return;
+using ::testing::SaveArg;
+namespace am = ::application_manager;
+using vehicle_info_plugin::commands::ReadDIDRequest;
+using am::commands::MessageSharedPtr;
+using am::event_engine::Event;
+using ::utils::SharedPtr;
+
+class ReadDIDRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(ReadDIDRequestTest, OnEvent_WrongEventId_UNSUCCESS) {
+ Event event(Event::EventID::INVALID_ENUM);
+ SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ command->on_event(event);
+}
+
+TEST_F(ReadDIDRequestTest, OnEvent_SUCCESS) {
+ Event event(Event::EventID::VehicleInfo_ReadDID);
+
+ SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
+
+ const hmi_apis::Common_Result::eType hmi_response_code =
+ hmi_apis::Common_Result::SUCCESS;
+ const mobile_apis::Result::eType mobile_response_code =
+ mobile_apis::Result::SUCCESS;
+ MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
+ (*event_msg)[am::strings::msg_params] = 0;
+
+ event.set_smart_object(*event_msg);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
+
+ MockAppPtr app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
+
+ command->on_event(event);
+}
+
+TEST_F(ReadDIDRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
+
+ ON_CALL(app_mngr_, application(_))
+ .WillByDefault(Return(SharedPtr<am::Application>()));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(ReadDIDRequestTest, Run_CommandLimitsExceeded_UNSUCCESS) {
+ SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
+
+ MockAppPtr app(CreateMockApp());
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ ON_CALL(*app, AreCommandLimitsExceeded(_, _)).WillByDefault(Return(true));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::REJECTED,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(ReadDIDRequestTest, Run_EmptyDidLocation_UNSUCCESS) {
+ MockAppPtr app(CreateMockApp());
+ SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ ON_CALL(*app, AreCommandLimitsExceeded(_, _)).WillByDefault(Return(false));
+
+ MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
+ EXPECT_EQ(mobile_apis::Result::INVALID_DATA,
+ static_cast<mobile_apis::Result::eType>(
+ (*result_msg)[am::strings::msg_params][am::strings::result_code]
+ .asInt()));
+}
+
+TEST_F(ReadDIDRequestTest, Run_SUCCESS) {
+ MockAppPtr app(CreateMockApp());
+ MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
+ (*msg)[am::strings::msg_params][am::strings::did_location]["SomeData"] = 0;
+ SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>(msg));
+
+ ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
+
+ ON_CALL(*app, AreCommandLimitsExceeded(_, _)).WillByDefault(Return(false));
+
+ MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command)));
+ EXPECT_EQ(hmi_apis::FunctionID::VehicleInfo_ReadDID,
+ static_cast<hmi_apis::FunctionID::eType>(
+ (*result_msg)[am::strings::params][am::strings::function_id]
+ .asInt()));
+}
+
+} // namespace read_did_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
new file mode 100644
index 0000000000..369a37e388
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc
@@ -0,0 +1,301 @@
+/*
+ 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 <stdint.h>
+#include <string>
+
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.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/unsubscribe_vehicle_data_request.h"
+#include "vehicle_info_plugin/vehicle_info_plugin.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace unsubscribe_vehicle_data_request {
+
+namespace am = ::application_manager;
+namespace mobile_result = mobile_apis::Result;
+
+using ::testing::_;
+
+using vehicle_info_plugin::commands::UnsubscribeVehicleDataRequest;
+using am::commands::MessageSharedPtr;
+
+typedef ::utils::SharedPtr<UnsubscribeVehicleDataRequest> CommandPtr;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const std::string kMsgParamKey = "test_key";
+const mobile_apis::VehicleDataType::eType kVehicleType =
+ mobile_apis::VehicleDataType::VEHICLEDATA_SPEED;
+} // namespace
+
+class UnsubscribeVehicleRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ UnsubscribeVehicleRequestTest()
+ : mock_app_(CreateMockApp())
+ , vi_app_extension_ptr_(
+ utils::MakeShared<vehicle_info_plugin::VehicleInfoAppExtension>(
+ vi_plugin_, *mock_app_))
+ , app_set_lock_ptr_(std::make_shared<sync_primitives::Lock>()) {}
+
+ protected:
+ void UnsubscribeSuccessfully();
+ void SetUp() OVERRIDE {
+ vi_plugin_.Init(app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_);
+ 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_));
+ }
+
+ 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_;
+};
+
+TEST_F(UnsubscribeVehicleRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>());
+ EXPECT_CALL(app_mngr_, application(_))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleRequestTest,
+ Run_DataToUnsubscribeIsNotExisted_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] =
+ kVehicleType;
+
+ am::VehicleData data;
+ EXPECT_CALL(mock_message_helper_, vehicle_data()).WillOnce(ReturnRef(data));
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleRequestTest,
+ Run_UnsubscribeFromSubscribedBeforeData_RequestSuccessfullySentToHmi) {
+ 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] = true;
+
+ am::VehicleData vehicle_data;
+ vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(vehicle_data));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData)))
+ .WillOnce(Return(true));
+ vehicle_info_plugin::VehicleInfoAppExtension* vi_app_extension =
+ dynamic_cast<vehicle_info_plugin::VehicleInfoAppExtension*>(
+ vi_app_extension_ptr_.get());
+ ASSERT_TRUE(vi_app_extension->subscribeToVehicleInfo(kVehicleType));
+ application_manager::ApplicationSet app_set = {mock_app_};
+ DataAccessor<application_manager::ApplicationSet> accessor(app_set,
+ app_set_lock_ptr_);
+ // Expectations
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleRequestTest,
+ Run_EmptyVehicleData_INVALID_DATA_SentToMobile) {
+ am::VehicleData vehicle_data;
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(vehicle_data));
+
+ MockAppPtr mock_app(CreateMockApp());
+ 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(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleRequestTest,
+ Run_UnsubscribeFromNotSubscribedBeforeData_UNSUCCESS) {
+ am::VehicleData vehicle_data;
+ vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(vehicle_data));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
+
+ 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] = true;
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleRequestTest, Run_UnsubscribeDataDisabled_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ am::VehicleData vehicle_data;
+ vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(vehicle_data));
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+
+ MockAppPtr mock_app(CreateMockApp());
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleRequestTest, OnEvent_DataNotSubscribed_IGNORED) {
+ 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] = true;
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+
+ am::VehicleData vehicle_data;
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+ vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillOnce(ReturnRef(vehicle_data));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
+ command->Init();
+ command->Run();
+
+ am::event_engine::Event test_event(
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
+ 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][kMsgParamKey] = true;
+ test_event.set_smart_object(message);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
+ EXPECT_CALL(*mock_app_, UpdateHash());
+
+ command->on_event(test_event);
+}
+
+TEST_F(UnsubscribeVehicleRequestTest, OnEvent_DataUnsubscribed_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][kMsgParamKey] = true;
+ CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+ am::event_engine::Event test_event(
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
+ 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][kMsgParamKey] = true;
+ test_event.set_smart_object(message);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
+
+ command->on_event(test_event);
+}
+
+} // namespace unsubscribe_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_response_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_response_test.cc
new file mode 100644
index 0000000000..bed9cffeb2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_response_test.cc
@@ -0,0 +1,114 @@
+/*
+ * 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 "mobile/unsubscribe_vehicle_data_response.h"
+#include <stdint.h>
+#include <string>
+#include "gtest/gtest.h"
+#include "utils/shared_ptr.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application_manager.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace unsubscribe_vehicle_data_response {
+
+namespace commands = ::application_manager::commands;
+
+using ::testing::_;
+using ::testing::NotNull;
+using ::testing::Types;
+
+using vehicle_info_plugin::commands::UnsubscribeVehicleDataResponse;
+using commands::MessageSharedPtr;
+namespace am = ::application_manager;
+
+class UnsubscribeVehicleResponseTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+MATCHER_P(ResultCodeIs, result_code, "") {
+ return result_code ==
+ static_cast<mobile_apis::Result::eType>(
+ (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
+}
+
+TEST_F(UnsubscribeVehicleResponseTest,
+ Run_SendFalseResponseToMobile_SendInvalidEnum) {
+ MessageSharedPtr command_msg =
+ ::utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
+ (*command_msg)[am::strings::msg_params][am::strings::success] = false;
+
+ ::utils::SharedPtr<UnsubscribeVehicleDataResponse> command =
+ CreateCommand<UnsubscribeVehicleDataResponse>(command_msg);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(ResultCodeIs(mobile_apis::Result::INVALID_ENUM), _));
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleResponseTest,
+ Run_SendSuccessfulResponseToMobile_SUCCESS) {
+ MessageSharedPtr command_msg =
+ ::utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
+ (*command_msg)[am::strings::msg_params][am::strings::success] = true;
+ ::utils::SharedPtr<UnsubscribeVehicleDataResponse> command =
+ CreateCommand<UnsubscribeVehicleDataResponse>(command_msg);
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(ResultCodeIs(mobile_apis::Result::SUCCESS), _));
+ command->Run();
+}
+
+TEST_F(UnsubscribeVehicleResponseTest,
+ Run_SendResponseToMobile_SendCodeToMobile) {
+ MessageSharedPtr command_msg =
+ ::utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
+ (*command_msg)[am::strings::msg_params][am::strings::success] = true;
+
+ mobile_apis::Result::eType result_type = mobile_apis::Result::WARNINGS;
+ (*command_msg)[am::strings::msg_params][am::strings::result_code] =
+ result_type;
+ ::utils::SharedPtr<UnsubscribeVehicleDataResponse> command =
+ CreateCommand<UnsubscribeVehicleDataResponse>(command_msg);
+
+ command->Run();
+}
+
+} // namespace unsubscribe_vehicle_data_response
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/src/application_data_impl.cc b/src/components/application_manager/src/application_data_impl.cc
index 6cf4e34c4a..a809112f54 100644
--- a/src/components/application_manager/src/application_data_impl.cc
+++ b/src/components/application_manager/src/application_data_impl.cc
@@ -44,6 +44,7 @@ InitialApplicationDataImpl::InitialApplicationDataImpl()
, vr_synonyms_(NULL)
, tts_name_(NULL)
, ngn_media_screen_name_(NULL)
+
, language_(mobile_api::Language::INVALID_ENUM)
, ui_language_(mobile_api::Language::INVALID_ENUM) {}
@@ -173,12 +174,17 @@ DynamicApplicationDataImpl::DynamicApplicationDataImpl()
, menu_title_(NULL)
, menu_icon_(NULL)
, tbt_show_command_(NULL)
+ , day_color_scheme_(NULL)
+ , night_color_scheme_(NULL)
+ , display_layout_("")
, commands_()
- , commands_lock_(true)
+ , commands_lock_ptr_(new sync_primitives::Lock(true))
, sub_menu_()
+ , sub_menu_lock_ptr_(std::make_shared<sync_primitives::Lock>())
, choice_set_map_()
+ , choice_set_map_lock_ptr_(std::make_shared<sync_primitives::Lock>())
, performinteraction_choice_set_map_()
- , performinteraction_choice_set_lock_(true)
+ , performinteraction_choice_set_lock_ptr_(new sync_primitives::Lock(true))
, is_perform_interaction_active_(false)
, is_reset_global_properties_active_(false)
, perform_interaction_mode_(-1) {}
@@ -214,6 +220,16 @@ DynamicApplicationDataImpl::~DynamicApplicationDataImpl() {
tbt_show_command_ = NULL;
}
+ if (day_color_scheme_) {
+ delete day_color_scheme_;
+ day_color_scheme_ = NULL;
+ }
+
+ if (night_color_scheme_) {
+ delete night_color_scheme_;
+ night_color_scheme_ = NULL;
+ }
+
for (CommandsMap::iterator command_it = commands_.begin();
commands_.end() != command_it;
++command_it) {
@@ -290,6 +306,20 @@ const smart_objects::SmartObject* DynamicApplicationDataImpl::menu_icon()
return menu_icon_;
}
+const smart_objects::SmartObject* DynamicApplicationDataImpl::day_color_scheme()
+ const {
+ return day_color_scheme_;
+}
+
+const smart_objects::SmartObject*
+DynamicApplicationDataImpl::night_color_scheme() const {
+ return night_color_scheme_;
+}
+
+const std::string& DynamicApplicationDataImpl::display_layout() const {
+ return display_layout_;
+}
+
void DynamicApplicationDataImpl::load_global_properties(
const smart_objects::SmartObject& properties_so) {
SetGlobalProperties(properties_so.getElement(strings::vr_help_title),
@@ -405,6 +435,28 @@ void DynamicApplicationDataImpl::set_menu_icon(
menu_icon_ = new smart_objects::SmartObject(menu_icon);
}
+void DynamicApplicationDataImpl::set_day_color_scheme(
+ const smart_objects::SmartObject& color_scheme) {
+ if (day_color_scheme_) {
+ delete day_color_scheme_;
+ }
+
+ day_color_scheme_ = new smart_objects::SmartObject(color_scheme);
+}
+
+void DynamicApplicationDataImpl::set_night_color_scheme(
+ const smart_objects::SmartObject& color_scheme) {
+ if (night_color_scheme_) {
+ delete night_color_scheme_;
+ }
+
+ night_color_scheme_ = new smart_objects::SmartObject(color_scheme);
+}
+
+void DynamicApplicationDataImpl::set_display_layout(const std::string& layout) {
+ display_layout_ = layout;
+}
+
void DynamicApplicationDataImpl::SetGlobalProperties(
const smart_objects::SmartObject& param,
void (DynamicApplicationData::*callback)(
@@ -422,7 +474,7 @@ void DynamicApplicationDataImpl::SetGlobalProperties(
void DynamicApplicationDataImpl::AddCommand(
uint32_t cmd_id, const smart_objects::SmartObject& command) {
- sync_primitives::AutoLock lock(commands_lock_);
+ sync_primitives::AutoLock lock(commands_lock_ptr_);
CommandsMap::const_iterator it = commands_.find(cmd_id);
if (commands_.end() == it) {
commands_[cmd_id] = new smart_objects::SmartObject(command);
@@ -432,7 +484,7 @@ void DynamicApplicationDataImpl::AddCommand(
}
void DynamicApplicationDataImpl::RemoveCommand(uint32_t cmd_id) {
- sync_primitives::AutoLock lock(commands_lock_);
+ sync_primitives::AutoLock lock(commands_lock_ptr_);
CommandsMap::iterator it = commands_.find(cmd_id);
if (commands_.end() != it) {
delete it->second;
@@ -444,7 +496,7 @@ void DynamicApplicationDataImpl::RemoveCommand(uint32_t cmd_id) {
smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
uint32_t cmd_id) {
- sync_primitives::AutoLock lock(commands_lock_);
+ sync_primitives::AutoLock lock(commands_lock_ptr_);
CommandsMap::const_iterator it = commands_.find(cmd_id);
if (it != commands_.end()) {
return it->second;
@@ -456,7 +508,7 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
// TODO(VS): Create common functions for processing collections
void DynamicApplicationDataImpl::AddSubMenu(
uint32_t menu_id, const smart_objects::SmartObject& menu) {
- sync_primitives::AutoLock lock(sub_menu_lock_);
+ sync_primitives::AutoLock lock(sub_menu_lock_ptr_);
SubMenuMap::const_iterator it = sub_menu_.find(menu_id);
if (sub_menu_.end() == it) {
sub_menu_[menu_id] = new smart_objects::SmartObject(menu);
@@ -464,7 +516,7 @@ void DynamicApplicationDataImpl::AddSubMenu(
}
void DynamicApplicationDataImpl::RemoveSubMenu(uint32_t menu_id) {
- sync_primitives::AutoLock lock(sub_menu_lock_);
+ sync_primitives::AutoLock lock(sub_menu_lock_ptr_);
SubMenuMap::iterator it = sub_menu_.find(menu_id);
if (sub_menu_.end() != it) {
@@ -475,7 +527,7 @@ void DynamicApplicationDataImpl::RemoveSubMenu(uint32_t menu_id) {
smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
uint32_t menu_id) const {
- sync_primitives::AutoLock lock(sub_menu_lock_);
+ 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;
@@ -486,7 +538,7 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
const std::string& name) {
- sync_primitives::AutoLock lock(sub_menu_lock_);
+ 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;
@@ -499,7 +551,7 @@ bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
void DynamicApplicationDataImpl::AddChoiceSet(
uint32_t choice_set_id, const smart_objects::SmartObject& choice_set) {
- sync_primitives::AutoLock lock(choice_set_map_lock_);
+ sync_primitives::AutoLock lock(choice_set_map_lock_ptr_);
ChoiceSetMap::const_iterator it = choice_set_map_.find(choice_set_id);
if (choice_set_map_.end() == it) {
choice_set_map_[choice_set_id] = new smart_objects::SmartObject(choice_set);
@@ -507,7 +559,7 @@ void DynamicApplicationDataImpl::AddChoiceSet(
}
void DynamicApplicationDataImpl::RemoveChoiceSet(uint32_t choice_set_id) {
- sync_primitives::AutoLock lock(choice_set_map_lock_);
+ sync_primitives::AutoLock lock(choice_set_map_lock_ptr_);
ChoiceSetMap::iterator it = choice_set_map_.find(choice_set_id);
if (choice_set_map_.end() != it) {
@@ -518,7 +570,7 @@ void DynamicApplicationDataImpl::RemoveChoiceSet(uint32_t choice_set_id) {
smart_objects::SmartObject* DynamicApplicationDataImpl::FindChoiceSet(
uint32_t choice_set_id) {
- sync_primitives::AutoLock lock(choice_set_map_lock_);
+ 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;
@@ -531,14 +583,14 @@ void DynamicApplicationDataImpl::AddPerformInteractionChoiceSet(
uint32_t correlation_id,
uint32_t choice_set_id,
const smart_objects::SmartObject& vr_commands) {
- sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
+ sync_primitives::AutoLock lock(performinteraction_choice_set_lock_ptr_);
performinteraction_choice_set_map_[correlation_id].insert(std::make_pair(
choice_set_id, new smart_objects::SmartObject(vr_commands)));
}
void DynamicApplicationDataImpl::DeletePerformInteractionChoiceSet(
uint32_t correlation_id) {
- sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
+ sync_primitives::AutoLock lock(performinteraction_choice_set_lock_ptr_);
PerformChoice::iterator it =
performinteraction_choice_set_map_[correlation_id].begin();
for (; performinteraction_choice_set_map_[correlation_id].end() != it; ++it) {
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index 3559480d10..6efd737f0c 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -72,7 +72,7 @@ mobile_apis::FileType::eType StringToFileType(const char* str) {
return mobile_apis::FileType::BINARY;
}
}
-}
+} // namespace
CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
@@ -105,6 +105,7 @@ ApplicationImpl::ApplicationImpl(
, active_message_(NULL)
, is_media_(false)
, is_navi_(false)
+ , is_remote_control_supported_(false)
, mobile_projection_enabled_(false)
, video_streaming_approved_(false)
, audio_streaming_approved_(false)
@@ -140,6 +141,8 @@ ApplicationImpl::ApplicationImpl(
"AudioStreamSuspend",
new ::timer::TimerTaskImpl<ApplicationImpl>(
this, &ApplicationImpl::OnAudioStreamSuspend))
+ , vi_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , button_lock_ptr_(std::make_shared<sync_primitives::Lock>())
, application_manager_(application_manager) {
cmd_number_to_time_limits_[mobile_apis::FunctionID::ReadDIDID] = {
date_time::DateTime::getCurrentTime(), 0};
@@ -169,7 +172,6 @@ ApplicationImpl::~ApplicationImpl() {
}
subscribed_buttons_.clear();
- subscribed_vehicle_info_.clear();
if (is_perform_interaction_active()) {
set_perform_interaction_active(0);
set_perform_interaction_mode(-1);
@@ -221,6 +223,14 @@ void ApplicationImpl::set_is_navi(bool allow) {
is_navi_ = allow;
}
+bool ApplicationImpl::is_remote_control_supported() const {
+ return is_remote_control_supported_;
+}
+
+void ApplicationImpl::set_remote_control_supported(const bool allow) {
+ is_remote_control_supported_ = allow;
+}
+
bool ApplicationImpl::is_voice_communication_supported() const {
return is_voice_communication_application_;
}
@@ -231,7 +241,26 @@ void ApplicationImpl::set_voice_communication_supported(
}
bool ApplicationImpl::IsAudioApplication() const {
- return is_media_ || is_voice_communication_application_ || is_navi_;
+ 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);
+ 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);
+ return is_video_app;
}
void ApplicationImpl::SetRegularState(HmiStatePtr state) {
@@ -713,13 +742,13 @@ const AppFile* ApplicationImpl::GetFile(const std::string& file_name) {
bool ApplicationImpl::SubscribeToButton(
mobile_apis::ButtonName::eType btn_name) {
- sync_primitives::AutoLock lock(button_lock_);
+ sync_primitives::AutoLock lock(button_lock_ptr_);
return subscribed_buttons_.insert(btn_name).second;
}
bool ApplicationImpl::IsSubscribedToButton(
mobile_apis::ButtonName::eType btn_name) {
- sync_primitives::AutoLock lock(button_lock_);
+ sync_primitives::AutoLock lock(button_lock_ptr_);
std::set<mobile_apis::ButtonName::eType>::iterator it =
subscribed_buttons_.find(btn_name);
return (subscribed_buttons_.end() != it);
@@ -727,31 +756,10 @@ bool ApplicationImpl::IsSubscribedToButton(
bool ApplicationImpl::UnsubscribeFromButton(
mobile_apis::ButtonName::eType btn_name) {
- sync_primitives::AutoLock lock(button_lock_);
+ sync_primitives::AutoLock lock(button_lock_ptr_);
return subscribed_buttons_.erase(btn_name);
}
-bool ApplicationImpl::SubscribeToIVI(uint32_t vehicle_info_type) {
- sync_primitives::AutoLock lock(vi_lock_);
- return subscribed_vehicle_info_
- .insert(
- static_cast<mobile_apis::VehicleDataType::eType>(vehicle_info_type))
- .second;
-}
-
-bool ApplicationImpl::IsSubscribedToIVI(uint32_t vehicle_info_type) const {
- sync_primitives::AutoLock lock(vi_lock_);
- VehicleInfoSubscriptions::const_iterator it = subscribed_vehicle_info_.find(
- static_cast<mobile_apis::VehicleDataType::eType>(vehicle_info_type));
- return (subscribed_vehicle_info_.end() != it);
-}
-
-bool ApplicationImpl::UnsubscribeFromIVI(uint32_t vehicle_info_type) {
- sync_primitives::AutoLock lock(vi_lock_);
- return subscribed_vehicle_info_.erase(
- static_cast<mobile_apis::VehicleDataType::eType>(vehicle_info_type));
-}
-
UsageStatistics& ApplicationImpl::usage_report() {
return usage_report_;
}
@@ -862,12 +870,8 @@ bool ApplicationImpl::AreCommandLimitsExceeded(
}
DataAccessor<ButtonSubscriptions> ApplicationImpl::SubscribedButtons() const {
- return DataAccessor<ButtonSubscriptions>(subscribed_buttons_, button_lock_);
-}
-
-DataAccessor<VehicleInfoSubscriptions> ApplicationImpl::SubscribedIVI() const {
- return DataAccessor<VehicleInfoSubscriptions>(subscribed_vehicle_info_,
- vi_lock_);
+ return DataAccessor<ButtonSubscriptions>(subscribed_buttons_,
+ button_lock_ptr_);
}
const std::string& ApplicationImpl::curHash() const {
@@ -1045,8 +1049,6 @@ void ApplicationImpl::UnsubscribeFromSoftButtons(int32_t cmd_id) {
}
}
-#ifdef SDL_REMOTE_CONTROL
-
void ApplicationImpl::set_system_context(
const mobile_api::SystemContext::eType& system_context) {
const HmiStatePtr hmi_state = CurrentHmiState();
@@ -1082,10 +1084,6 @@ void ApplicationImpl::set_hmi_level(
usage_report_.RecordHmiStateChanged(new_hmi_level);
}
-const VehicleInfoSubscriptions& ApplicationImpl::SubscribesIVI() const {
- return subscribed_vehicle_info_;
-}
-
AppExtensionPtr ApplicationImpl::QueryInterface(AppExtensionUID uid) {
std::list<AppExtensionPtr>::const_iterator it = extensions_.begin();
for (; it != extensions_.end(); ++it) {
@@ -1106,21 +1104,17 @@ bool ApplicationImpl::AddExtension(AppExtensionPtr extension) {
}
bool ApplicationImpl::RemoveExtension(AppExtensionUID uid) {
- for (std::list<AppExtensionPtr>::iterator it = extensions_.begin();
- extensions_.end() != it;
- ++it) {
- if ((*it)->uid() == uid) {
- extensions_.erase(it);
- return true;
- }
- }
- return false;
+ auto it = std::find_if(
+ extensions_.begin(),
+ extensions_.end(),
+ [uid](AppExtensionPtr extension) { return extension->uid() == uid; });
+
+ return it != extensions_.end();
}
-void ApplicationImpl::RemoveExtensions() {
- application_manager_.GetPluginManager().RemoveAppExtension(app_id_);
+const std::list<AppExtensionPtr>& ApplicationImpl::Extensions() const {
+ return extensions_;
}
-#endif // SDL_REMOTE_CONTROL
void ApplicationImpl::PushMobileMessage(
smart_objects::SmartObjectSPtr mobile_message) {
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index f0b02f30ff..3e44a54bf2 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -39,10 +39,11 @@
#include <bson_object.h>
#include "application_manager/application_manager_impl.h"
-#include "application_manager/mobile_command_factory.h"
#include "application_manager/commands/command_impl.h"
#include "application_manager/commands/command_notification_impl.h"
#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service_impl.h"
+#include "application_manager/rpc_handler_impl.h"
#include "application_manager/mobile_message_handler.h"
#include "application_manager/policies/policy_handler.h"
#include "application_manager/hmi_capabilities_impl.h"
@@ -51,6 +52,7 @@
#include "application_manager/app_launch/app_launch_data_db.h"
#include "application_manager/app_launch/app_launch_data_json.h"
#include "application_manager/helpers/application_helper.h"
+#include "application_manager/plugin_manager/rpc_plugin_manager_impl.h"
#include "protocol_handler/protocol_handler.h"
#include "hmi_message_handler/hmi_message_handler.h"
#include "application_manager/command_holder_impl.h"
@@ -73,17 +75,11 @@
#include "utils/custom_string.h"
#include <time.h>
-#ifdef SDL_REMOTE_CONTROL
-#include "policy/usage_statistics/counter.h"
-#include "functional_module/plugin_manager.h"
-#include "application_manager/core_service.h"
-#endif // SDL_REMOTE_CONTROL
-
namespace {
int get_rand_from_range(uint32_t from = 0, int to = RAND_MAX) {
return std::rand() % to + from;
}
-}
+} // namespace
namespace application_manager {
@@ -141,7 +137,8 @@ ApplicationManagerImpl::ApplicationManagerImpl(
const ApplicationManagerSettings& am_settings,
const policy::PolicySettings& policy_settings)
: settings_(am_settings)
- , applications_list_lock_(true)
+ , applications_list_lock_ptr_(std::make_shared<sync_primitives::Lock>(true))
+ , apps_to_register_list_lock_ptr_(std::make_shared<sync_primitives::Lock>())
, audio_pass_thru_active_(false)
, audio_pass_thru_app_id_(0)
, driver_distraction_state_(
@@ -157,11 +154,6 @@ ApplicationManagerImpl::ApplicationManagerImpl(
, request_ctrl_(am_settings)
, hmi_so_factory_(NULL)
, mobile_so_factory_(NULL)
- , messages_from_mobile_("AM FromMobile", this)
- , messages_to_mobile_("AM ToMobile", this)
- , messages_from_hmi_("AM FromHMI", this)
- , messages_to_hmi_("AM ToHMI", this)
- , audio_pass_thru_messages_("AudioPassThru", this)
, hmi_capabilities_(new HMICapabilitiesImpl(*this))
, unregister_reason_(
mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM)
@@ -170,9 +162,6 @@ ApplicationManagerImpl::ApplicationManagerImpl(
, navi_end_stream_timeout_(am_settings.stop_streaming_timeout())
, stopping_application_mng_lock_(true)
, state_ctrl_(*this)
-#ifdef TELEMETRY_MONITOR
- , metric_observer_(NULL)
-#endif // TELEMETRY_MONITOR
, application_list_update_timer_(
"AM ListUpdater",
new TimerTaskImpl<ApplicationManagerImpl>(
@@ -199,7 +188,13 @@ ApplicationManagerImpl::ApplicationManagerImpl(
const uint32_t timeout_ms = 10000u;
clearing_timer->Start(timeout_ms, timer::kSingleShot);
timer_pool_.push_back(clearing_timer);
+ rpc_handler_.reset(new rpc_handler::RPCHandlerImpl(*this));
commands_holder_.reset(new CommandHolderImpl(*this));
+ rpc_service_.reset(new rpc_service::RPCServiceImpl(*this,
+ request_ctrl_,
+ protocol_handler_,
+ hmi_handler_,
+ *commands_holder_));
}
ApplicationManagerImpl::~ApplicationManagerImpl() {
@@ -230,7 +225,8 @@ ApplicationManagerImpl::~ApplicationManagerImpl() {
}
DataAccessor<ApplicationSet> ApplicationManagerImpl::applications() const {
- DataAccessor<ApplicationSet> accessor(applications_, applications_list_lock_);
+ DataAccessor<ApplicationSet> accessor(applications_,
+ applications_list_lock_ptr_);
return accessor;
}
@@ -352,8 +348,7 @@ struct IsApplication {
connection_handler::DeviceHandle device_handle_;
const std::string& policy_app_id_;
};
-
-std::vector<ApplicationSharedPtr> ApplicationManagerImpl::IviInfoUpdated(
+void ApplicationManagerImpl::IviInfoUpdated(
mobile_apis::VehicleDataType::eType vehicle_info, int value) {
// Notify Policy Manager if available about info it's interested in,
// i.e. odometer etc
@@ -364,19 +359,21 @@ std::vector<ApplicationSharedPtr> ApplicationManagerImpl::IviInfoUpdated(
default:
break;
}
-
- SubscribedToIVIPredicate finder(vehicle_info);
- DataAccessor<ApplicationSet> accessor = applications();
- return FindAllApps(accessor, finder);
}
void ApplicationManagerImpl::OnApplicationRegistered(ApplicationSharedPtr app) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
- sync_primitives::AutoLock lock(applications_list_lock_);
+ sync_primitives::AutoLock lock(applications_list_lock_ptr_);
const mobile_apis::HMILevel::eType default_level = GetDefaultHmiLevel(app);
state_ctrl_.OnApplicationRegistered(app, default_level);
+ std::function<void(plugin_manager::RPCPlugin&)> on_app_registered =
+ [app](plugin_manager::RPCPlugin& plugin) {
+ plugin.OnApplicationEvent(plugin_manager::kApplicationRegistered, app);
+ };
+ plugin_manager_->ForEachPlugin(on_app_registered);
+
// TODO(AOleynik): Is neccessary to be able to know that registration process
// has been completed and default HMI level is set, otherwise policy will
// block all the requests/notifications to mobile
@@ -490,7 +487,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
mobile_apis::FunctionID::RegisterAppInterfaceID,
message[strings::params][strings::correlation_id].asUInt(),
mobile_apis::Result::GENERIC_ERROR));
- ManageMobileCommand(response, commands::Command::ORIGIN_SDL);
+ rpc_service_->ManageMobileCommand(response, commands::Command::SOURCE_SDL);
return ApplicationSharedPtr();
}
@@ -522,7 +519,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
mobile_apis::FunctionID::RegisterAppInterfaceID,
message[strings::params][strings::correlation_id].asUInt(),
mobile_apis::Result::DISALLOWED));
- ManageMobileCommand(response, commands::Command::ORIGIN_SDL);
+ rpc_service_->ManageMobileCommand(response, commands::Command::SOURCE_SDL);
return ApplicationSharedPtr();
}
@@ -541,7 +538,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
mobile_apis::FunctionID::RegisterAppInterfaceID,
message[strings::params][strings::correlation_id].asUInt(),
mobile_apis::Result::OUT_OF_MEMORY));
- ManageMobileCommand(response, commands::Command::ORIGIN_SDL);
+ rpc_service_->ManageMobileCommand(response, commands::Command::SOURCE_SDL);
return ApplicationSharedPtr();
}
@@ -549,6 +546,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
CreateRegularState(utils::SharedPtr<Application>(application),
mobile_apis::HMILevel::INVALID_ENUM,
mobile_apis::AudioStreamingState::INVALID_ENUM,
+ mobile_apis::VideoStreamingState::INVALID_ENUM,
mobile_api::SystemContext::SYSCTXT_MAIN);
application->SetInitialState(initial_state);
@@ -601,13 +599,13 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
}
// Keep HMI add id in case app is present in "waiting for registration" list
- apps_to_register_list_lock_.Acquire();
+ apps_to_register_list_lock_ptr_->Acquire();
AppsWaitRegistrationSet::iterator it = apps_to_register_.find(application);
if (apps_to_register_.end() != it) {
application->set_hmi_application_id((*it)->hmi_app_id());
apps_to_register_.erase(application);
}
- apps_to_register_list_lock_.Release();
+ apps_to_register_list_lock_ptr_->Release();
if (!application->hmi_app_id()) {
const bool is_saved =
@@ -623,6 +621,13 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
const std::string& bundle_id = app_info[strings::bundle_id].asString();
application->set_bundle_id(bundle_id);
}
+
+ const std::string app_icon_dir(settings_.app_icons_folder());
+ const std::string full_icon_path(app_icon_dir + "/" + policy_app_id);
+ if (file_system::FileExists(full_icon_path)) {
+ application->set_app_icon_path(full_icon_path);
+ }
+
PutDriverDistractionMessageToPostponed(application);
// Stops timer of saving data to resumption in order to
@@ -633,11 +638,11 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
// Add application to registered app list and set appropriate mark.
// Lock has to be released before adding app to policy DB to avoid possible
// deadlock with simultaneous PTU processing
- applications_list_lock_.Acquire();
+ applications_list_lock_ptr_->Acquire();
application->MarkRegistered();
applications_.insert(application);
apps_size_ = applications_.size();
- applications_list_lock_.Release();
+ applications_list_lock_ptr_->Release();
return application;
}
@@ -661,13 +666,18 @@ bool ApplicationManagerImpl::ActivateApplication(ApplicationSharedPtr app) {
const bool is_restore = false;
help_prompt_manager.OnAppActivated(is_restore);
+ LOG4CXX_DEBUG(logger_, "Activating application with id:" << app->app_id());
+
// remove from resumption if app was activated by user
resume_controller().OnAppActivated(app);
- HMILevel::eType hmi_level = HMILevel::HMI_FULL;
- AudioStreamingState::eType audio_state;
- app->IsAudioApplication() ? audio_state = AudioStreamingState::AUDIBLE
- : audio_state = AudioStreamingState::NOT_AUDIBLE;
- state_ctrl_.SetRegularState(app, hmi_level, audio_state, false);
+ const HMILevel::eType hmi_level = HMILevel::HMI_FULL;
+ const AudioStreamingState::eType audio_state =
+ app->IsAudioApplication() ? AudioStreamingState::AUDIBLE
+ : AudioStreamingState::NOT_AUDIBLE;
+ const VideoStreamingState::eType video_state =
+ app->IsVideoApplication() ? VideoStreamingState::STREAMABLE
+ : VideoStreamingState::NOT_STREAMABLE;
+ state_ctrl_.SetRegularState(app, hmi_level, audio_state, video_state, false);
return true;
}
@@ -679,10 +689,10 @@ mobile_api::HMILevel::eType ApplicationManagerImpl::IsHmiLevelFullAllowed(
NOTREACHED();
return mobile_api::HMILevel::INVALID_ENUM;
}
- bool is_audio_app = app->IsAudioApplication();
- bool does_audio_app_with_same_type_exist =
+ const bool is_audio_app = app->IsAudioApplication();
+ const bool does_audio_app_with_same_type_exist =
IsAppTypeExistsInFullOrLimited(app);
- bool is_active_app_exist = active_application().valid();
+ const bool is_active_app_exist = active_application().valid();
mobile_api::HMILevel::eType result = mobile_api::HMILevel::HMI_FULL;
if (is_audio_app && does_audio_app_with_same_type_exist) {
@@ -727,45 +737,43 @@ void ApplicationManagerImpl::OnHMIStartedCooperation() {
utils::SharedPtr<smart_objects::SmartObject> is_vr_ready(
MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_IsReady,
*this));
- ManageHMICommand(is_vr_ready);
+ rpc_service_->ManageHMICommand(is_vr_ready);
utils::SharedPtr<smart_objects::SmartObject> is_tts_ready(
MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_IsReady,
*this));
- ManageHMICommand(is_tts_ready);
+ rpc_service_->ManageHMICommand(is_tts_ready);
utils::SharedPtr<smart_objects::SmartObject> is_ui_ready(
MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_IsReady,
*this));
- ManageHMICommand(is_ui_ready);
+ rpc_service_->ManageHMICommand(is_ui_ready);
utils::SharedPtr<smart_objects::SmartObject> is_navi_ready(
MessageHelper::CreateModuleInfoSO(
hmi_apis::FunctionID::Navigation_IsReady, *this));
- ManageHMICommand(is_navi_ready);
+ rpc_service_->ManageHMICommand(is_navi_ready);
utils::SharedPtr<smart_objects::SmartObject> is_ivi_ready(
MessageHelper::CreateModuleInfoSO(
hmi_apis::FunctionID::VehicleInfo_IsReady, *this));
- ManageHMICommand(is_ivi_ready);
+ rpc_service_->ManageHMICommand(is_ivi_ready);
-#ifdef SDL_REMOTE_CONTROL
utils::SharedPtr<smart_objects::SmartObject> is_rc_ready(
MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::RC_IsReady,
*this));
- ManageHMICommand(is_rc_ready);
-#endif
+ rpc_service_->ManageHMICommand(is_rc_ready);
utils::SharedPtr<smart_objects::SmartObject> button_capabilities(
MessageHelper::CreateModuleInfoSO(
hmi_apis::FunctionID::Buttons_GetCapabilities, *this));
- ManageHMICommand(button_capabilities);
+ rpc_service_->ManageHMICommand(button_capabilities);
utils::SharedPtr<smart_objects::SmartObject> mixing_audio_supported_request(
MessageHelper::CreateModuleInfoSO(
hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported,
*this));
- ManageHMICommand(mixing_audio_supported_request);
+ rpc_service_->ManageHMICommand(mixing_audio_supported_request);
resume_controller().ResetLaunchTime();
}
@@ -844,10 +852,12 @@ HmiStatePtr ApplicationManagerImpl::CreateRegularState(
utils::SharedPtr<Application> app,
mobile_apis::HMILevel::eType hmi_level,
mobile_apis::AudioStreamingState::eType audio_state,
+ mobile_apis::VideoStreamingState::eType video_state,
mobile_apis::SystemContext::eType system_context) const {
HmiStatePtr state(new HmiState(app, *this));
state->set_hmi_level(hmi_level);
state->set_audio_streaming_state(audio_state);
+ state->set_video_streaming_state(video_state);
state->set_system_context(system_context);
return state;
}
@@ -864,12 +874,6 @@ HmiStatePtr ApplicationManagerImpl::CreateRegularState(
return state;
}
-bool ApplicationManagerImpl::IsStateActive(HmiState::StateID state_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Checking for active state id " << state_id);
- return state_ctrl_.IsStateActive(state_id);
-}
-
void ApplicationManagerImpl::StartAudioPassThruThread(int32_t session_key,
int32_t correlation_id,
int32_t max_duration,
@@ -883,23 +887,6 @@ void ApplicationManagerImpl::StartAudioPassThruThread(int32_t session_key,
session_key, get_settings().recording_file_name(), max_duration);
}
-void ApplicationManagerImpl::SendAudioPassThroughNotification(
- uint32_t session_key, std::vector<uint8_t>& binary_data) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!audio_pass_thru_active_) {
- LOG4CXX_ERROR(logger_,
- "Trying to send PassThroughNotification"
- " when PassThrough is not active");
- return;
- }
-
- impl::AudioData data;
- data.session_key = session_key;
- data.binary_data = binary_data;
- audio_pass_thru_messages_.PostMessage(data);
-}
-
void ApplicationManagerImpl::StopAudioPassThru(int32_t application_key) {
LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock lock(audio_pass_thru_lock_);
@@ -937,43 +924,6 @@ ApplicationManagerImpl::GetDeviceTransportType(
return result;
}
-void ApplicationManagerImpl::OnMessageReceived(
- const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- utils::SharedPtr<Message> outgoing_message = ConvertRawMsgToMessage(message);
-
- if (outgoing_message) {
- LOG4CXX_DEBUG(logger_, "Posting new Message");
- messages_from_mobile_.PostMessage(
- impl::MessageFromMobile(outgoing_message));
- }
-}
-
-void ApplicationManagerImpl::OnMobileMessageSent(
- const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
-}
-
-void ApplicationManagerImpl::OnMessageReceived(
- hmi_message_handler::MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- messages_from_hmi_.PostMessage(impl::MessageFromHmi(message));
-}
-
ApplicationConstSharedPtr ApplicationManagerImpl::WaitingApplicationByID(
const uint32_t hmi_id) const {
AppsWaitRegistrationSet app_list = AppsWaitingForRegistration().GetData();
@@ -992,12 +942,12 @@ ApplicationConstSharedPtr ApplicationManagerImpl::WaitingApplicationByID(
DataAccessor<AppsWaitRegistrationSet>
ApplicationManagerImpl::AppsWaitingForRegistration() const {
return DataAccessor<AppsWaitRegistrationSet>(apps_to_register_,
- apps_to_register_list_lock_);
+ apps_to_register_list_lock_ptr_);
}
bool ApplicationManagerImpl::IsAppsQueriedFrom(
const connection_handler::DeviceHandle handle) const {
- sync_primitives::AutoLock lock(apps_to_register_list_lock_);
+ sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
AppsWaitRegistrationSet::iterator it = apps_to_register_.begin();
AppsWaitRegistrationSet::const_iterator it_end = apps_to_register_.end();
for (; it != it_end; ++it) {
@@ -1018,7 +968,7 @@ const ApplicationManagerSettings& ApplicationManagerImpl::get_settings() const {
void application_manager::ApplicationManagerImpl::MarkAppsGreyOut(
const connection_handler::DeviceHandle handle, bool is_greyed_out) {
- sync_primitives::AutoLock lock(apps_to_register_list_lock_);
+ sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
AppsWaitRegistrationSet::iterator it = apps_to_register_.begin();
AppsWaitRegistrationSet::const_iterator it_end = apps_to_register_.end();
for (; it != it_end; ++it) {
@@ -1027,10 +977,6 @@ void application_manager::ApplicationManagerImpl::MarkAppsGreyOut(
}
}
}
-void ApplicationManagerImpl::OnErrorSending(
- hmi_message_handler::MessageSharedPointer message) {
- return;
-}
void ApplicationManagerImpl::OnDeviceListUpdated(
const connection_handler::DeviceMap& device_list) {
@@ -1072,7 +1018,7 @@ void ApplicationManagerImpl::OnDeviceListUpdated(
so_to_send[jhs::S_PARAMS][jhs::S_PROTOCOL_TYPE] = 1;
so_to_send[jhs::S_PARAMS][jhs::S_CORRELATION_ID] = GetNextHMICorrelationID();
so_to_send[jhs::S_MSG_PARAMS] = *msg_params;
- ManageHMICommand(update_list);
+ rpc_service_->ManageHMICommand(update_list);
}
void ApplicationManagerImpl::OnFindNewApplicationsRequest() {
@@ -1101,7 +1047,7 @@ void ApplicationManagerImpl::SendUpdateAppList() {
PrepareApplicationListSO(applications_, applications, *this);
PrepareApplicationListSO(apps_to_register_, applications, *this);
- ManageHMICommand(request);
+ rpc_service_->ManageHMICommand(request);
}
void ApplicationManagerImpl::RemoveDevice(
@@ -1159,7 +1105,7 @@ void ApplicationManagerImpl::OnDeviceSwitchingStart(
so_to_send[jhs::S_PARAMS][jhs::S_PROTOCOL_TYPE] = 1;
so_to_send[jhs::S_PARAMS][jhs::S_CORRELATION_ID] = GetNextHMICorrelationID();
so_to_send[jhs::S_MSG_PARAMS] = *msg_params;
- ManageHMICommand(update_list);
+ rpc_service_->ManageHMICommand(update_list);
}
void ApplicationManagerImpl::OnDeviceSwitchingFinish(
@@ -1188,7 +1134,7 @@ void ApplicationManagerImpl::SwitchApplication(ApplicationSharedPtr app,
const std::string& mac_address) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
- sync_primitives::AutoLock lock(applications_list_lock_);
+ sync_primitives::AutoLock lock(applications_list_lock_ptr_);
DCHECK_OR_RETURN_VOID(1 == applications_.erase(app));
LOG4CXX_DEBUG(logger_,
@@ -1627,10 +1573,10 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
is_resuming = true;
is_unexpected_disconnect = false;
- ManageMobileCommand(
+ rpc_service_->ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
session_key, AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
break;
}
case CloseSessionReason::kMalformed: {
@@ -1695,6 +1641,11 @@ bool ApplicationManagerImpl::OnHandshakeDone(
return false;
}
+bool ApplicationManagerImpl::OnHandshakeFailed() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return false;
+}
+
void ApplicationManagerImpl::OnCertificateUpdateRequired() {
LOG4CXX_AUTO_TRACE(logger_);
GetPolicyHandler().OnPTExchangeNeeded();
@@ -1722,6 +1673,7 @@ ApplicationManagerImpl::GetHandshakeContext(uint32_t key) const {
void ApplicationManagerImpl::set_hmi_message_handler(
hmi_message_handler::HMIMessageHandler* handler) {
hmi_handler_ = handler;
+ rpc_service_->set_hmi_message_handler(handler);
}
void ApplicationManagerImpl::set_connection_handler(
@@ -1742,447 +1694,35 @@ protocol_handler::ProtocolHandler& ApplicationManagerImpl::protocol_handler()
void ApplicationManagerImpl::set_protocol_handler(
protocol_handler::ProtocolHandler* handler) {
protocol_handler_ = handler;
+ rpc_service_->set_protocol_handler(handler);
}
void ApplicationManagerImpl::StartDevicesDiscovery() {
connection_handler().get_device_discovery_starter().StartDevicesDiscovery();
}
-void ApplicationManagerImpl::SendMessageToMobile(
- const commands::MessageSharedPtr message, bool final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- if (!protocol_handler_) {
- LOG4CXX_WARN(logger_, "No Protocol Handler set");
- return;
- }
-
- ApplicationSharedPtr app = application(
- (*message)[strings::params][strings::connection_key].asUInt());
-
- const bool is_result_code_exists =
- (*message)[strings::msg_params].keyExists(strings::result_code);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with connection key");
- if (is_result_code_exists &&
- ((*message)[strings::msg_params][strings::result_code] ==
- NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION)) {
- (*message)[strings::params][strings::protocol_version] =
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1;
- } else {
- (*message)[strings::params][strings::protocol_version] =
- SupportedSDLVersion();
- }
- } else {
- (*message)[strings::params][strings::protocol_version] =
- app->protocol_version();
- }
-
- if (app && is_result_code_exists &&
- (*message)[strings::msg_params][strings::result_code] ==
- mobile_apis::Result::OUT_OF_MEMORY) {
- app->usage_report().RecordRejectionsSyncOutOfMemory();
- }
-
- mobile_so_factory().attachSchema(*message, false);
- LOG4CXX_DEBUG(
- logger_,
- "Attached schema to message, result if valid: " << message->isValid());
-
- // Messages to mobile are not yet prioritized so use default priority value
- utils::SharedPtr<Message> message_to_send(
- new Message(protocol_handler::MessagePriority::kDefault));
- if (!ConvertSOtoMessage((*message), (*message_to_send))) {
- LOG4CXX_WARN(logger_, "Can't send msg to Mobile: failed to create string");
- return;
- }
-
- smart_objects::SmartObject& msg_to_mobile = *message;
- // If correlation_id is not present, it is from-HMI message which should be
- // checked against policy permissions
- if (msg_to_mobile[strings::params].keyExists(strings::correlation_id)) {
- request_ctrl_.OnMobileResponse(
- msg_to_mobile[strings::params][strings::correlation_id].asUInt(),
- msg_to_mobile[strings::params][strings::connection_key].asUInt(),
- msg_to_mobile[strings::params][strings::function_id].asInt());
-#ifdef SDL_REMOTE_CONTROL
- const mobile_apis::FunctionID::eType function_id =
- static_cast<mobile_apis::FunctionID::eType>(
- (*message)[strings::params][strings::function_id].asUInt());
- if (function_id == mobile_apis::FunctionID::RegisterAppInterfaceID &&
- (*message)[strings::msg_params][strings::success].asBool()) {
- LOG4CXX_INFO(logger_,
- "Registered app "
- << app->app_id() << " is "
- << (plugin_manager_.IsAppForPlugins(app) ? "" : "not ")
- << "for plugins.");
- }
-#endif // SDL_REMOTE_CONTROL
- } else if (app) {
- mobile_apis::FunctionID::eType function_id =
- static_cast<mobile_apis::FunctionID::eType>(
- (*message)[strings::params][strings::function_id].asUInt());
- RPCParams params;
-
- const smart_objects::SmartObject& s_map = (*message)[strings::msg_params];
- if (smart_objects::SmartType_Map == s_map.getType()) {
- smart_objects::SmartMap::iterator iter = s_map.map_begin();
- smart_objects::SmartMap::iterator iter_end = s_map.map_end();
-
- for (; iter != iter_end; ++iter) {
- if (true == iter->second.asBool()) {
- LOG4CXX_INFO(logger_, "Request's param: " << iter->first);
- params.insert(iter->first);
- }
- }
- }
- const std::string string_functionID =
- MessageHelper::StringifiedFunctionID(function_id);
- const mobile_apis::Result::eType check_result =
- CheckPolicyPermissions(app, string_functionID, params);
- if (mobile_apis::Result::SUCCESS != check_result) {
- LOG4CXX_WARN(logger_,
- "Function \"" << string_functionID << "\" (#" << function_id
- << ") not allowed by policy");
- return;
- }
-
-#ifdef EXTERNAL_PROPRIETARY_MODE
- if (function_id == mobile_apis::FunctionID::OnSystemRequestID) {
- mobile_apis::RequestType::eType request_type =
- static_cast<mobile_apis::RequestType::eType>(
- (*message)[strings::msg_params][strings::request_type].asUInt());
- if (mobile_apis::RequestType::PROPRIETARY == request_type ||
- mobile_apis::RequestType::HTTP == request_type) {
- GetPolicyHandler().OnUpdateRequestSentToMobile();
- }
- }
-#endif // EXTERNAL_PROPRIETARY_MODE
- }
-
- if (message_to_send->binary_data()) {
- LOG4CXX_DEBUG(
- logger_,
- "Binary data size: " << message_to_send->binary_data()->size());
- }
- messages_to_mobile_.PostMessage(
- impl::MessageToMobile(message_to_send, final_message));
-}
-
void ApplicationManagerImpl::TerminateRequest(const uint32_t connection_key,
const uint32_t corr_id,
const int32_t function_id) {
request_ctrl_.TerminateRequest(corr_id, connection_key, function_id, true);
}
-bool ApplicationManagerImpl::ManageMobileCommand(
- const commands::MessageSharedPtr message,
- commands::Command::CommandOrigin origin) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
- return false;
- }
-
- if (IsLowVoltage()) {
- LOG4CXX_WARN(logger_, "Low Voltage is active");
- return false;
- }
-#ifdef DEBUG
- MessageHelper::PrintSmartObject(*message);
-#endif
-
- LOG4CXX_DEBUG(logger_, "Trying to create message in mobile factory.");
- utils::SharedPtr<commands::Command> command(
- MobileCommandFactory::CreateCommand(message, origin, *this));
-
- if (!command) {
- LOG4CXX_WARN(logger_,
- "RET Failed to create mobile command from smart object");
- return false;
- }
-
- const uint32_t connection_key = static_cast<uint32_t>(
- (*message)[strings::params][strings::connection_key].asUInt());
-
- auto app_ptr = application(connection_key);
- if (app_ptr && IsAppInReconnectMode(app_ptr->policy_app_id())) {
- commands_holder_->Suspend(
- app_ptr, CommandHolder::CommandType::kMobileCommand, message);
- return true;
- }
-
- mobile_apis::FunctionID::eType function_id =
- static_cast<mobile_apis::FunctionID::eType>(
- (*message)[strings::params][strings::function_id].asInt());
-
- // Notifications from HMI have no such parameter
- uint32_t correlation_id =
- (*message)[strings::params].keyExists(strings::correlation_id)
- ? (*message)[strings::params][strings::correlation_id].asUInt()
- : 0;
-
- int32_t protocol_type =
- (*message)[strings::params][strings::protocol_type].asUInt();
-
- ApplicationSharedPtr app;
- int32_t message_type =
- (*message)[strings::params][strings::message_type].asInt();
-
- if (((mobile_apis::FunctionID::RegisterAppInterfaceID != function_id) &&
- (protocol_type == commands::CommandImpl::mobile_protocol_type_)) &&
- (mobile_apis::FunctionID::UnregisterAppInterfaceID != function_id)) {
- app = application(connection_key);
- if (!app) {
- LOG4CXX_ERROR(logger_, "RET APPLICATION_NOT_REGISTERED");
- smart_objects::SmartObjectSPtr response =
- MessageHelper::CreateNegativeResponse(
- connection_key,
- static_cast<int32_t>(function_id),
- correlation_id,
- static_cast<int32_t>(
- mobile_apis::Result::APPLICATION_NOT_REGISTERED));
-
- SendMessageToMobile(response);
- return false;
- }
-
- // Message for "CheckPermission" must be with attached schema
- mobile_so_factory().attachSchema(*message, false);
- }
-
- if (message_type == mobile_apis::messageType::response) {
- if (command->Init()) {
- command->Run();
- command->CleanUp();
- }
- return true;
- }
- if (message_type == mobile_apis::messageType::notification) {
- request_ctrl_.addNotification(command);
- if (command->Init()) {
- command->Run();
- if (command->CleanUp()) {
- request_ctrl_.removeNotification(command.get());
- }
- // If CleanUp returned false notification should remove it self.
- }
- return true;
- }
-
- if (message_type == mobile_apis::messageType::request) {
- // commands will be launched from requesr_ctrl
- mobile_apis::HMILevel::eType app_hmi_level =
- mobile_apis::HMILevel::INVALID_ENUM;
- if (app) {
- app_hmi_level = app->hmi_level();
- }
-
- // 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");
- } else if (result == request_controller::RequestController::
- TOO_MANY_PENDING_REQUESTS) {
- LOG4CXX_ERROR(logger_,
- "RET Unable top perform request: "
- << "TOO_MANY_PENDING_REQUESTS");
-
- smart_objects::SmartObjectSPtr response =
- MessageHelper::CreateNegativeResponse(
- connection_key,
- static_cast<int32_t>(function_id),
- correlation_id,
- static_cast<int32_t>(
- mobile_apis::Result::TOO_MANY_PENDING_REQUESTS));
- ApplicationSharedPtr app_ptr = application(connection_key);
- if (app_ptr) {
- app_ptr->usage_report().RecordRemovalsForBadBehavior();
- }
-
- SendMessageToMobile(response);
- return false;
- } else if (result ==
- request_controller::RequestController::TOO_MANY_REQUESTS) {
- LOG4CXX_ERROR(logger_,
- "RET Unable to perform request: "
- << "TOO_MANY_REQUESTS");
-
- ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key,
- mobile_api::AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS),
- commands::Command::ORIGIN_SDL);
-
- UnregisterApplication(connection_key,
- mobile_apis::Result::TOO_MANY_PENDING_REQUESTS,
- false);
- ApplicationSharedPtr app_ptr = application(connection_key);
- if (app_ptr) {
- app_ptr->usage_report().RecordRemovalsForBadBehavior();
- }
- 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");
-
- ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key,
- mobile_api::AppInterfaceUnregisteredReason::
- REQUEST_WHILE_IN_NONE_HMI_LEVEL),
- commands::Command::ORIGIN_SDL);
-
- ApplicationSharedPtr app_ptr = application(connection_key);
- if (app_ptr) {
- app_ptr->usage_report().RecordRemovalsForBadBehavior();
- }
- UnregisterApplication(
- connection_key, mobile_apis::Result::INVALID_ENUM, false);
- return false;
- } else {
- LOG4CXX_ERROR(logger_, "RET Unable to perform request: Unknown case");
- return false;
- }
- return true;
- }
-
- LOG4CXX_ERROR(logger_, "RET UNKNOWN MESSAGE TYPE " << message_type);
- return false;
-}
-
void ApplicationManagerImpl::RemoveHMIFakeParameters(
- application_manager::MessagePtr& message) {
+ application_manager::commands::MessageSharedPtr& message) {
LOG4CXX_AUTO_TRACE(logger_);
- using namespace NsSmartDeviceLink::NsSmartObjects;
- using namespace NsSmartDeviceLink::NsJSONHandler;
- SmartObject so;
-
- Formatters::FormatterJsonRpc::FromString<hmi_apis::FunctionID::eType,
- hmi_apis::messageType::eType>(
- message->json_message(), so);
-
- std::string formatted_message;
- namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
hmi_apis::HMI_API factory;
- factory.attachSchema(so, true);
- Formatters::FormatterJsonRpc::ToString(so, formatted_message);
- message->set_json_message(formatted_message);
-}
-
-void ApplicationManagerImpl::SendMessageToHMI(
- const commands::MessageSharedPtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- if (!hmi_handler_) {
- LOG4CXX_WARN(logger_, "No HMI Handler set");
- return;
- }
-
- // SmartObject |message| has no way to declare priority for now
- utils::SharedPtr<Message> message_to_send(
- new Message(protocol_handler::MessagePriority::kDefault));
- if (!message_to_send) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return;
- }
-
- hmi_so_factory().attachSchema(*message, false);
- LOG4CXX_INFO(
- logger_,
- "Attached schema to message, result if valid: " << message->isValid());
-
-#ifdef HMI_DBUS_API
- message_to_send->set_smart_object(*message);
-#else
- if (!ConvertSOtoMessage(*message, *message_to_send)) {
- LOG4CXX_WARN(logger_,
- "Cannot send message to HMI: failed to create string");
- return;
- }
-#endif // HMI_DBUS_API
-
- messages_to_hmi_.PostMessage(impl::MessageToHmi(message_to_send));
-}
-
-bool ApplicationManagerImpl::ManageHMICommand(
- const commands::MessageSharedPtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
- return false;
- }
-
- if (IsLowVoltage()) {
- LOG4CXX_WARN(logger_, "Low Voltage is active");
- return false;
- }
-
- MessageHelper::PrintSmartObject(*message);
-
- CommandSharedPtr command = HMICommandFactory::CreateCommand(message, *this);
- if (!command) {
- LOG4CXX_WARN(logger_, "Failed to create command from smart object");
- return false;
- }
-
- if ((*message).keyExists(strings::msg_params) &&
- (*message)[strings::msg_params].keyExists(strings::app_id)) {
- const auto connection_key =
- (*message)[strings::msg_params][strings::app_id].asUInt();
-
- auto app = application(static_cast<uint32_t>(connection_key));
- if (app && IsAppInReconnectMode(app->policy_app_id())) {
- commands_holder_->Suspend(
- app, CommandHolder::CommandType::kHmiCommand, message);
- return true;
- }
- }
-
- int32_t message_type =
- (*message)[strings::params][strings::message_type].asInt();
-
- if (kRequest == message_type) {
- LOG4CXX_DEBUG(logger_, "ManageHMICommand");
- request_ctrl_.addHMIRequest(command);
- }
-
- if (command->Init()) {
- command->Run();
- if (kResponse == message_type) {
- const uint32_t correlation_id =
- (*message)[strings::params][strings::correlation_id].asUInt();
- const int32_t function_id =
- (*message)[strings::params][strings::function_id].asInt();
- request_ctrl_.OnHMIResponse(correlation_id, function_id);
- }
- return true;
- }
- return false;
+ factory.attachSchema(*message, true);
}
bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
media_manager::MediaManager* media_manager) {
LOG4CXX_TRACE(logger_, "Init application manager");
+ plugin_manager_.reset(new plugin_manager::RPCPluginManagerImpl(
+ *this, *rpc_service_, *hmi_capabilities_, *policy_handler_));
+ if (!plugin_manager_->LoadPlugins(get_settings().plugins_folder())) {
+ LOG4CXX_ERROR(logger_, "Plugins are not loaded");
+ return false;
+ }
const std::string app_storage_folder = get_settings().app_storage_folder();
if (!InitDirectory(app_storage_folder, TYPE_STORAGE) ||
!IsReadWriteAllowed(app_storage_folder, TYPE_STORAGE)) {
@@ -2238,18 +1778,6 @@ bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
}
app_launch_ctrl_.reset(new app_launch::AppLaunchCtrlImpl(
*app_launch_dto_.get(), *this, settings_));
-
-#ifdef SDL_REMOTE_CONTROL
- if (!hmi_handler_) {
- LOG4CXX_ERROR(logger_, "HMI message handler was not initialized");
- return false;
- }
- plugin_manager_.SetServiceHandler(utils::MakeShared<CoreService>(*this));
- plugin_manager_.LoadPlugins(settings_.plugins_folder());
- plugin_manager_.OnServiceStateChanged(
- functional_modules::ServiceState::HMI_ADAPTER_INITIALIZED);
-#endif // SDL_REMOTE_CONTROL
-
return true;
}
@@ -2274,155 +1802,6 @@ bool ApplicationManagerImpl::Stop() {
return true;
}
-bool ApplicationManagerImpl::ConvertMessageToSO(
- const Message& message, smart_objects::SmartObject& output) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "\t\t\tMessage to convert: protocol "
- << message.protocol_version() << "; json "
- << message.json_message());
-
- switch (message.protocol_version()) {
- case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5:
- case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4:
- case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3:
- case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2: {
- const bool conversion_result =
- formatters::CFormatterJsonSDLRPCv2::fromString(
- message.json_message(),
- output,
- message.function_id(),
- message.type(),
- message.correlation_id());
-
- rpc::ValidationReport report("RPC");
-
- if (!conversion_result ||
- !mobile_so_factory().attachSchema(output, true) ||
- ((output.validate(&report) != smart_objects::Errors::OK))) {
- LOG4CXX_WARN(logger_,
- "Failed to parse string to smart object :"
- << message.json_message());
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- message.connection_key(),
- message.function_id(),
- message.correlation_id(),
- mobile_apis::Result::INVALID_DATA));
-
- (*response)[strings::msg_params][strings::info] =
- rpc::PrettyFormat(report);
- ManageMobileCommand(response, commands::Command::ORIGIN_SDL);
- return false;
- }
- LOG4CXX_DEBUG(logger_,
- "Convertion result for sdl object is true function_id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
-
- output[strings::params][strings::connection_key] =
- message.connection_key();
- output[strings::params][strings::protocol_version] =
- 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());
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- message.connection_key(),
- message.function_id(),
- message.correlation_id(),
- mobile_apis::Result::INVALID_DATA));
- ManageMobileCommand(response, commands::Command::ORIGIN_SDL);
- return false;
- }
- output[strings::params][strings::binary_data] =
- *(message.binary_data());
- }
- break;
- }
- case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI: {
-#ifdef ENABLE_LOG
- int32_t result =
-#endif
- 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());
- if (!hmi_so_factory().attachSchema(output, false)) {
- LOG4CXX_WARN(logger_, "Failed to attach schema to object.");
- return false;
- }
-
- rpc::ValidationReport report("RPC");
-
- if (output.validate(&report) != smart_objects::Errors::OK) {
- LOG4CXX_ERROR(logger_,
- "Incorrect parameter from HMI"
- << rpc::PrettyFormat(report));
-
- output.erase(strings::msg_params);
- output[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::INVALID_DATA;
- output[strings::msg_params][strings::info] = rpc::PrettyFormat(report);
- return false;
- }
- break;
- }
- case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1: {
- static NsSmartDeviceLinkRPC::V1::v4_protocol_v1_2_no_extra v1_shema;
-
- if (message.function_id() == 0 || message.type() == kUnknownType) {
- LOG4CXX_ERROR(logger_, "Message received: UNSUPPORTED_VERSION");
-
- int32_t conversation_result =
- formatters::CFormatterJsonSDLRPCv1::fromString<
- NsSmartDeviceLinkRPC::V1::FunctionID::eType,
- NsSmartDeviceLinkRPC::V1::messageType::eType>(
- message.json_message(), output);
-
- if (formatters::CFormatterJsonSDLRPCv1::kSuccess ==
- conversation_result) {
- smart_objects::SmartObject params = smart_objects::SmartObject(
- smart_objects::SmartType::SmartType_Map);
-
- output[strings::params][strings::message_type] =
- NsSmartDeviceLinkRPC::V1::messageType::response;
- output[strings::params][strings::connection_key] =
- message.connection_key();
-
- output[strings::msg_params] = smart_objects::SmartObject(
- smart_objects::SmartType::SmartType_Map);
- output[strings::msg_params][strings::success] = false;
- output[strings::msg_params][strings::result_code] =
- NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION;
-
- smart_objects::SmartObjectSPtr msg_to_send =
- new smart_objects::SmartObject(output);
- v1_shema.attachSchema(*msg_to_send, false);
- SendMessageToMobile(msg_to_send);
- return false;
- }
- }
- break;
- }
- default:
- LOG4CXX_WARN(logger_,
- "Application used unsupported protocol :"
- << message.protocol_version() << ".");
- return false;
- }
-
- LOG4CXX_DEBUG(logger_, "Successfully parsed message into smart object");
- return true;
-}
-
bool ApplicationManagerImpl::ConvertSOtoMessage(
const smart_objects::SmartObject& message, Message& output) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -2522,162 +1901,6 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
return true;
}
-MessageValidationResult ApplicationManagerImpl::ValidateMessageBySchema(
- const Message& message) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject so;
- using namespace protocol_handler;
- switch (message.protocol_version()) {
- case MajorProtocolVersion::PROTOCOL_VERSION_5:
- case MajorProtocolVersion::PROTOCOL_VERSION_4:
- case MajorProtocolVersion::PROTOCOL_VERSION_3:
- case MajorProtocolVersion::PROTOCOL_VERSION_2: {
- const bool conversion_result =
- formatters::CFormatterJsonSDLRPCv2::fromString(
- message.json_message(),
- so,
- message.function_id(),
- message.type(),
- message.correlation_id());
- if (!conversion_result) {
- return INVALID_JSON;
- }
-
- if (!mobile_so_factory().attachSchema(so, true)) {
- return INVALID_METADATA;
- }
- rpc::ValidationReport report("RPC");
- if (so.validate(&report) != smart_objects::Errors::OK) {
- LOG4CXX_WARN(logger_,
- "validate() failed for Mobile message - "
- << rpc::PrettyFormat(report));
- return SCHEMA_MISMATCH;
- }
- break;
- }
- case MajorProtocolVersion::PROTOCOL_VERSION_HMI: {
- const int32_t conversion_result = formatters::FormatterJsonRpc::
- FromString<hmi_apis::FunctionID::eType, hmi_apis::messageType::eType>(
- message.json_message(), so);
- if (0 != conversion_result) {
- LOG4CXX_WARN(logger_,
- "Failed to parse json from HMI: " << conversion_result);
- return INVALID_JSON;
- }
-
- if (!hmi_so_factory().attachSchema(so, true)) {
- return INVALID_METADATA;
- }
-
- rpc::ValidationReport report("RPC");
- if (so.validate(&report) != smart_objects::Errors::OK) {
- LOG4CXX_WARN(logger_,
- "validate() failed for HMI message - "
- << rpc::PrettyFormat(report));
- return SCHEMA_MISMATCH;
- }
- break;
- }
- default: { return UNSUPPORTED_PROTOCOL; }
- }
- return SUCCESS;
-}
-
-utils::SharedPtr<Message> ApplicationManagerImpl::ConvertRawMsgToMessage(
- const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(message);
- utils::SharedPtr<Message> outgoing_message;
-
- LOG4CXX_DEBUG(logger_, "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.");
- return outgoing_message;
- }
-
- Message* convertion_result =
- MobileMessageHandler::HandleIncomingMessageProtocol(message);
-
- if (convertion_result) {
- outgoing_message = convertion_result;
- } else {
- LOG4CXX_ERROR(logger_, "Received invalid message");
- }
- return outgoing_message;
-}
-
-void ApplicationManagerImpl::ProcessMessageFromMobile(
- const utils::SharedPtr<Message> message) {
- LOG4CXX_AUTO_TRACE(logger_);
-#ifdef TELEMETRY_MONITOR
- AMTelemetryObserver::MessageMetricSharedPtr metric(
- new AMTelemetryObserver::MessageMetric());
- metric->begin = date_time::DateTime::getCurrentTime();
-#endif // TELEMETRY_MONITOR
- smart_objects::SmartObjectSPtr so_from_mobile =
- utils::MakeShared<smart_objects::SmartObject>();
-
- DCHECK_OR_RETURN_VOID(so_from_mobile);
- if (!so_from_mobile) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return;
- }
-
- if (!ConvertMessageToSO(*message, *so_from_mobile)) {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
- return;
- }
-#ifdef TELEMETRY_MONITOR
- metric->message = so_from_mobile;
-#endif // TELEMETRY_MONITOR
-
- if (!ManageMobileCommand(so_from_mobile, commands::Command::ORIGIN_MOBILE)) {
- LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
- }
-#ifdef TELEMETRY_MONITOR
- metric->end = date_time::DateTime::getCurrentTime();
- if (metric_observer_) {
- metric_observer_->OnMessage(metric);
- }
-#endif // TELEMETRY_MONITOR
-}
-
-void ApplicationManagerImpl::ProcessMessageFromHMI(
- const utils::SharedPtr<Message> message) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObjectSPtr smart_object(new smart_objects::SmartObject);
-
- if (!smart_object) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return;
- }
-
-#ifdef HMI_DBUS_API
- *smart_object = message->smart_object();
-#else
- if (!ConvertMessageToSO(*message, *smart_object)) {
- if (application_manager::MessageType::kResponse ==
- (*smart_object)[strings::params][strings::message_type].asInt()) {
- (*smart_object).erase(strings::msg_params);
- (*smart_object)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::INVALID_DATA;
- (*smart_object)[strings::msg_params][strings::info] =
- std::string("Received invalid data on HMI response");
- } else {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
- return;
- }
- }
-#endif // HMI_DBUS_API
-
- LOG4CXX_DEBUG(logger_, "Converted message, trying to create hmi command");
- if (!ManageHMICommand(smart_object)) {
- LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
- }
-}
-
hmi_apis::HMI_API& ApplicationManagerImpl::hmi_so_factory() {
if (!hmi_so_factory_) {
hmi_so_factory_ = new hmi_apis::HMI_API;
@@ -2859,7 +2082,7 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
app->set_vr_synonyms(vrSynonym);
app->set_tts_name(ttsName);
- sync_primitives::AutoLock lock(apps_to_register_list_lock_);
+ 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(app);
@@ -2903,7 +2126,7 @@ bool ApplicationManagerImpl::is_attenuated_supported() const {
#ifdef TELEMETRY_MONITOR
void ApplicationManagerImpl::SetTelemetryObserver(
AMTelemetryObserver* observer) {
- metric_observer_ = observer;
+ rpc_handler_->SetTelemetryObserver(observer);
}
#endif // TELEMETRY_MONITOR
@@ -3103,10 +2326,10 @@ void ApplicationManagerImpl::UnregisterAllApplications() {
ApplicationSetConstIt it = accessor.GetData().begin();
while (it != accessor.GetData().end()) {
ApplicationSharedPtr app_to_remove = *it;
- ManageMobileCommand(
+ rpc_service_->ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app_to_remove->app_id(), unregister_reason_),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
UnregisterApplication(app_to_remove->app_id(),
mobile_apis::Result::INVALID_ENUM,
is_ignition_off,
@@ -3125,7 +2348,7 @@ void ApplicationManagerImpl::UnregisterAllApplications() {
void ApplicationManagerImpl::RemoveAppsWaitingForRegistration(
const connection_handler::DeviceHandle handle) {
DevicePredicate device_finder(handle);
- apps_to_register_list_lock_.Acquire();
+ apps_to_register_list_lock_ptr_->Acquire();
AppsWaitRegistrationSet::iterator it_app = std::find_if(
apps_to_register_.begin(), apps_to_register_.end(), device_finder);
@@ -3138,7 +2361,7 @@ void ApplicationManagerImpl::RemoveAppsWaitingForRegistration(
apps_to_register_.begin(), apps_to_register_.end(), device_finder);
}
- apps_to_register_list_lock_.Release();
+ apps_to_register_list_lock_ptr_->Release();
}
void ApplicationManagerImpl::UnregisterApplication(
@@ -3209,7 +2432,7 @@ void ApplicationManagerImpl::UnregisterApplication(
ApplicationSharedPtr app_to_remove;
connection_handler::DeviceHandle handle = 0;
{
- sync_primitives::AutoLock lock(applications_list_lock_);
+ sync_primitives::AutoLock lock(applications_list_lock_ptr_);
auto it_app = applications_.begin();
while (applications_.end() != it_app) {
if (app_id == (*it_app)->app_id()) {
@@ -3257,12 +2480,12 @@ void ApplicationManagerImpl::UnregisterApplication(
StopAudioPassThru(app_id);
MessageHelper::SendStopAudioPathThru(*this);
}
-
-#ifdef SDL_REMOTE_CONTROL
- plugin_manager_.OnApplicationEvent(
- functional_modules::ApplicationEvent::kApplicationUnregistered,
- app_to_remove);
-#endif
+ auto on_app_unregistered =
+ [app_to_remove](plugin_manager::RPCPlugin& plugin) {
+ plugin.OnApplicationEvent(plugin_manager::kApplicationUnregistered,
+ app_to_remove);
+ };
+ plugin_manager_->ForEachPlugin(on_app_unregistered);
MessageHelper::SendOnAppUnregNotificationToHMI(
app_to_remove, is_unexpected_disconnect, *this);
@@ -3275,144 +2498,12 @@ void ApplicationManagerImpl::OnAppUnauthorized(const uint32_t& app_id) {
connection_handler::kUnauthorizedApp);
}
-void ApplicationManagerImpl::Handle(const impl::MessageFromMobile message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- return;
- }
- sync_primitives::AutoLock lock(stopping_application_mng_lock_);
- if (is_stopping_) {
- LOG4CXX_INFO(logger_, "Application manager is stopping");
- return;
- }
-#ifdef SDL_REMOTE_CONTROL
- if (plugin_manager_.IsMessageForPlugin(message)) {
- if (functional_modules::ProcessResult::PROCESSED ==
- plugin_manager_.ProcessMessage(message)) {
- LOG4CXX_INFO(logger_, "Message is processed by plugin.");
- return;
- }
- }
-#endif
- ProcessMessageFromMobile(message);
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageToMobile message) {
- if (!protocol_handler_) {
- LOG4CXX_WARN(logger_,
- "Protocol Handler is not set; cannot send message to mobile.");
- return;
- }
-
- utils::SharedPtr<protocol_handler::RawMessage> rawMessage =
- MobileMessageHandler::HandleOutgoingMessageProtocol(message);
-
- if (!rawMessage) {
- LOG4CXX_ERROR(logger_, "Failed to create raw message.");
- return;
- }
-
- bool is_final = message.is_final;
- bool close_session = false;
- if (is_final) {
- if (1 < connection_handler().GetConnectionSessionsCount(
- message->connection_key())) {
- is_final = false;
- close_session = true;
- }
- }
-
- protocol_handler_->SendMessageToMobileApp(rawMessage, is_final);
- LOG4CXX_INFO(logger_, "Message for mobile given away");
-
- if (close_session) {
- connection_handler().CloseSession(message->connection_key(),
- connection_handler::kCommon);
- }
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageFromHmi message) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- return;
- }
-
-#ifdef SDL_REMOTE_CONTROL
- if (plugin_manager_.IsHMIMessageForPlugin(message)) {
- functional_modules::ProcessResult result =
- plugin_manager_.ProcessHMIMessage(message);
- if (functional_modules::ProcessResult::PROCESSED == result ||
- functional_modules::ProcessResult::FAILED == result) {
- LOG4CXX_INFO(logger_, "Message is processed by plugin.");
- return;
- }
- }
-#endif
-
- ProcessMessageFromHMI(message);
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageToHmi message) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!hmi_handler_) {
- LOG4CXX_ERROR(logger_, "Observer is not set for HMIMessageHandler");
- return;
- }
-
- hmi_handler_->SendMessageToHMI(message);
- LOG4CXX_INFO(logger_, "Message for HMI given away");
-}
-
-void ApplicationManagerImpl::Handle(const impl::AudioData message) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObjectSPtr on_audio_pass =
- new smart_objects::SmartObject();
-
- if (!on_audio_pass) {
- LOG4CXX_ERROR(logger_, "OnAudioPassThru NULL pointer");
- return;
- }
-
- LOG4CXX_DEBUG(logger_, "Fill smart object");
-
- (*on_audio_pass)[strings::params][strings::message_type] =
- application_manager::MessageType::kNotification;
-
- (*on_audio_pass)[strings::params][strings::connection_key] =
- static_cast<int32_t>(message.session_key);
- (*on_audio_pass)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnAudioPassThruID;
-
- LOG4CXX_DEBUG(logger_, "Fill binary data");
- // binary data
- (*on_audio_pass)[strings::params][strings::binary_data] =
- smart_objects::SmartObject(message.binary_data);
-
- LOG4CXX_DEBUG(logger_, "After fill binary data");
- LOG4CXX_DEBUG(logger_, "Send data");
- CommandSharedPtr command(MobileCommandFactory::CreateCommand(
- on_audio_pass, commands::Command::ORIGIN_SDL, *this));
- if (!command) {
- LOG4CXX_WARN(logger_, "Failed to create mobile command from smart object");
- return;
- }
-
- if (command->Init()) {
- command->Run();
- command->CleanUp();
- }
-}
-
mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
const ApplicationSharedPtr app,
const std::string& function_id,
const RPCParams& rpc_params,
CommandParametersPermissions* params_permissions) {
- LOG4CXX_INFO(logger_, "CheckPolicyPermissions");
+ LOG4CXX_AUTO_TRACE(logger_);
// TODO(AOleynik): Remove check of policy_enable, when this flag will be
// unused in config file
if (!GetPolicyHandler().PolicyEnabled()) {
@@ -3460,6 +2551,15 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
return mobile_api::Result::SUCCESS;
}
+bool ApplicationManagerImpl::is_stopping() const {
+ sync_primitives::AutoLock lock(stopping_application_mng_lock_);
+ return is_stopping_;
+}
+
+bool ApplicationManagerImpl::is_audio_pass_thru_active() const {
+ return audio_pass_thru_active_;
+}
+
void ApplicationManagerImpl::OnLowVoltage() {
LOG4CXX_AUTO_TRACE(logger_);
is_low_voltage_ = true;
@@ -3555,10 +2655,10 @@ void ApplicationManagerImpl::ForbidStreaming(uint32_t app_id) {
}
}
if (unregister) {
- ManageMobileCommand(
+ rpc_service_->ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app_id, PROTOCOL_VIOLATION),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
UnregisterApplication(app_id, ABORTED);
return;
}
@@ -3567,7 +2667,6 @@ void ApplicationManagerImpl::ForbidStreaming(uint32_t app_id) {
void ApplicationManagerImpl::OnAppStreaming(
uint32_t app_id, protocol_handler::ServiceType service_type, bool state) {
- using namespace protocol_handler;
LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application(app_id);
@@ -3580,11 +2679,11 @@ void ApplicationManagerImpl::OnAppStreaming(
DCHECK_OR_RETURN_VOID(media_manager_);
if (state) {
- state_ctrl_.OnNaviStreamingStarted();
+ state_ctrl_.OnVideoStreamingStarted(app);
media_manager_->StartStreaming(app_id, service_type);
} else {
media_manager_->StopStreaming(app_id, service_type);
- state_ctrl_.OnNaviStreamingStopped();
+ state_ctrl_.OnVideoStreamingStarted(app);
}
}
@@ -3659,21 +2758,20 @@ void ApplicationManagerImpl::ProcessPostponedMessages(const uint32_t app_id) {
}
MobileMessageQueue messages;
app->SwapMobileMessageQueue(messages);
- auto push_allowed_messages =
- [this, &app](smart_objects::SmartObjectSPtr message) {
- const std::string function_id = MessageHelper::StringifiedFunctionID(
- static_cast<mobile_apis::FunctionID::eType>(
- (*message)[strings::params][strings::function_id].asUInt()));
- const RPCParams params;
- const mobile_apis::Result::eType check_result =
- CheckPolicyPermissions(app, function_id, params);
- if (mobile_api::Result::SUCCESS == check_result) {
- ManageMobileCommand(message,
- commands::Command::CommandOrigin::ORIGIN_SDL);
- } else {
- app->PushMobileMessage(message);
- }
- };
+ auto push_allowed_messages = [this, &app](
+ smart_objects::SmartObjectSPtr message) {
+ const std::string function_id = MessageHelper::StringifiedFunctionID(
+ static_cast<mobile_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asUInt()));
+ const RPCParams params;
+ const mobile_apis::Result::eType check_result =
+ CheckPolicyPermissions(app, function_id, params);
+ if (mobile_api::Result::SUCCESS == check_result) {
+ rpc_service_->ManageMobileCommand(message, commands::Command::SOURCE_SDL);
+ } else {
+ app->PushMobileMessage(message);
+ }
+ };
std::for_each(messages.begin(), messages.end(), push_allowed_messages);
}
@@ -3745,10 +2843,14 @@ void ApplicationManagerImpl::SendHMIStatusNotification(
message[strings::msg_params][strings::audio_streaming_state] =
static_cast<int32_t>(app->audio_streaming_state());
+ message[strings::msg_params][strings::video_streaming_state] =
+ static_cast<int32_t>(app->video_streaming_state());
+
message[strings::msg_params][strings::system_context] =
static_cast<int32_t>(app->system_context());
- ManageMobileCommand(notification, commands::Command::ORIGIN_SDL);
+ rpc_service_->ManageMobileCommand(notification,
+ commands::Command::SOURCE_SDL);
}
void ApplicationManagerImpl::ClearTimerPool() {
@@ -3791,10 +2893,10 @@ void ApplicationManagerImpl::CloseNaviApp() {
if (unregister) {
LOG4CXX_INFO(logger_,
"App haven't answered for EndService. Unregister it.");
- ManageMobileCommand(
+ rpc_service_->ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app_id, PROTOCOL_VIOLATION),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
UnregisterApplication(app_id, ABORTED);
}
}
@@ -3976,9 +3078,9 @@ bool ApplicationManagerImpl::IsHMICooperating() const {
void ApplicationManagerImpl::OnApplicationListUpdateTimer() {
LOG4CXX_DEBUG(logger_, "Application list update timer finished");
- apps_to_register_list_lock_.Acquire();
+ apps_to_register_list_lock_ptr_->Acquire();
const bool trigger_ptu = apps_size_ != applications_.size();
- apps_to_register_list_lock_.Release();
+ apps_to_register_list_lock_ptr_->Release();
SendUpdateAppList();
GetPolicyHandler().OnAppsSearchCompleted(trigger_ptu);
}
@@ -4067,6 +3169,8 @@ mobile_apis::AppHMIType::eType ApplicationManagerImpl::StringToAppHMIType(
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) {
@@ -4208,13 +3312,15 @@ void ApplicationManagerImpl::ProcessReconnection(
}
void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) {
-#ifdef SDL_REMOTE_CONTROL
+ LOG4CXX_AUTO_TRACE(logger_);
if (!ptu_result) {
return;
}
- plugin_manager_.OnPolicyEvent(
- functional_modules::PolicyEvent::kApplicationPolicyUpdated);
-#endif // SDL_REMOTE_CONTROL
+ auto on_app_policy_updated = [](plugin_manager::RPCPlugin& plugin) {
+ plugin.OnPolicyEvent(plugin_manager::kApplicationPolicyUpdated);
+ };
+
+ plugin_manager_->ForEachPlugin(on_app_policy_updated);
}
void ApplicationManagerImpl::PutDriverDistractionMessageToPostponed(
@@ -4463,12 +3569,29 @@ std::vector<std::string> ApplicationManagerImpl::ConvertRejectedParamList(
return output;
}
+bool ApplicationManagerImpl::IsSOStructValid(
+ const hmi_apis::StructIdentifiers::eType struct_id,
+ const smart_objects::SmartObject& display_capabilities) {
+ smart_objects::SmartObject display_capabilities_so = display_capabilities;
+ if (hmi_so_factory().AttachSchema(struct_id, display_capabilities_so)) {
+ if (display_capabilities_so.isValid()) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ LOG4CXX_ERROR(logger_, "Could not find struct id: " << struct_id);
+ return false;
+ }
+ return true;
+}
+
#ifdef BUILD_TESTS
void ApplicationManagerImpl::AddMockApplication(ApplicationSharedPtr mock_app) {
- applications_list_lock_.Acquire();
+ applications_list_lock_ptr_->Acquire();
applications_.insert(mock_app);
apps_size_ = applications_.size();
- applications_list_lock_.Release();
+ applications_list_lock_ptr_->Release();
}
void ApplicationManagerImpl::SetMockMediaManager(
@@ -4476,7 +3599,6 @@ void ApplicationManagerImpl::SetMockMediaManager(
media_manager_ = mock_media_manager;
}
#endif // BUILD_TESTS
-#ifdef SDL_REMOTE_CONTROL
struct MobileAppIdPredicate {
std::string policy_app_id_;
MobileAppIdPredicate(const std::string& policy_app_id)
@@ -4530,7 +3652,6 @@ std::vector<std::string> ApplicationManagerImpl::devices(
void ApplicationManagerImpl::ChangeAppsHMILevel(
uint32_t app_id, mobile_apis::HMILevel::eType level) {
- using namespace mobile_apis::HMILevel;
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_, "AppID to change: " << app_id << " -> " << level);
ApplicationSharedPtr app = application(app_id);
@@ -4538,26 +3659,13 @@ void ApplicationManagerImpl::ChangeAppsHMILevel(
LOG4CXX_ERROR(logger_, "There is no app with id: " << app_id);
return;
}
- eType old_level = app->hmi_level();
+ const mobile_apis::HMILevel::eType old_level = app->hmi_level();
if (old_level != level) {
app->set_hmi_level(level);
OnHMILevelChanged(app_id, old_level, level);
-
- plugin_manager_.OnAppHMILevelChanged(app, old_level);
} else {
- LOG4CXX_WARN(logger_, "Redudant changing HMI level : " << level);
+ LOG4CXX_WARN(logger_, "Redundant changing HMI level: " << level);
}
}
-void ApplicationManagerImpl::SendPostMessageToMobile(
- const MessagePtr& message) {
- messages_to_mobile_.PostMessage(impl::MessageToMobile(message, false));
-}
-
-void ApplicationManagerImpl::SendPostMessageToHMI(const MessagePtr& message) {
- messages_to_hmi_.PostMessage(impl::MessageToHmi(message));
-}
-
-#endif // SDL_REMOTE_CONTROL
-
} // namespace application_manager
diff --git a/src/components/application_manager/src/application_state.cc b/src/components/application_manager/src/application_state.cc
index 101a565a8e..3f775ee4e2 100644
--- a/src/components/application_manager/src/application_state.cc
+++ b/src/components/application_manager/src/application_state.cc
@@ -101,7 +101,6 @@ void ApplicationState::RemoveState(HmiState::StateID state) {
}
HmiStatePtr ApplicationState::GetState(HmiState::StateID state_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
switch (state_id) {
case HmiState::StateID::STATE_ID_REGULAR:
LOG4CXX_DEBUG(logger_, "Getting regular state.");
diff --git a/src/components/application_manager/src/command_holder_impl.cc b/src/components/application_manager/src/command_holder_impl.cc
index afdaa2f1f4..9799b170dc 100644
--- a/src/components/application_manager/src/command_holder_impl.cc
+++ b/src/components/application_manager/src/command_holder_impl.cc
@@ -114,7 +114,7 @@ void CommandHolderImpl::ResumeHmiCommand(ApplicationSharedPtr application) {
for (auto cmd : app_commands->second) {
(*cmd)[strings::msg_params][strings::app_id] = application->hmi_app_id();
- app_manager_.ManageHMICommand(cmd);
+ app_manager_.GetRPCService().ManageHMICommand(cmd);
}
app_hmi_commands_.erase(app_commands);
@@ -133,8 +133,8 @@ void CommandHolderImpl::ResumeMobileCommand(ApplicationSharedPtr application) {
for (auto cmd : app_commands->second) {
(*cmd)[strings::params][strings::connection_key] = application->app_id();
- app_manager_.ManageMobileCommand(
- cmd, commands::Command::CommandOrigin::ORIGIN_MOBILE);
+ app_manager_.GetRPCService().ManageMobileCommand(
+ cmd, commands::Command::CommandSource::SOURCE_MOBILE);
}
app_mobile_commands_.erase(app_commands);
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index b928184148..dbe89b8881 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -35,6 +35,16 @@
#include "application_manager/application_manager.h"
namespace application_manager {
+
+namespace {
+struct AppExtensionPredicate {
+ AppExtensionUID uid;
+ bool operator()(const ApplicationSharedPtr app) {
+ return app ? app->QueryInterface(uid).valid() : false;
+ }
+};
+}
+
namespace commands {
CREATE_LOGGERPTR_LOCAL(CommandImpl::logger_, "Commands")
@@ -44,11 +54,17 @@ const int32_t CommandImpl::mobile_protocol_type_ = 0;
const int32_t CommandImpl::protocol_version_ = 3;
CommandImpl::CommandImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
: message_(message)
, default_timeout_(application_manager.get_settings().default_timeout())
, allowed_to_terminate_(true)
- , application_manager_(application_manager) {}
+ , application_manager_(application_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {}
CommandImpl::~CommandImpl() {
CleanUp();
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 5b44abeec9..4e9a2556de 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
@@ -32,6 +32,7 @@
#include "application_manager/commands/command_notification_from_mobile_impl.h"
#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
#include "application_manager/message_helper.h"
namespace application_manager {
@@ -39,8 +40,16 @@ namespace application_manager {
namespace commands {
CommandNotificationFromMobileImpl::CommandNotificationFromMobileImpl(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
CommandNotificationFromMobileImpl::~CommandNotificationFromMobileImpl() {}
@@ -63,7 +72,7 @@ void CommandNotificationFromMobileImpl::SendNotification() {
LOG4CXX_INFO(logger_, "SendNotification");
MessageHelper::PrintSmartObject(*message_);
- application_manager_.SendMessageToMobile(message_);
+ rpc_service_.SendMessageToMobile(message_);
}
} // namespace commands
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 b6b0e7d500..70df95986b 100644
--- a/src/components/application_manager/src/commands/command_notification_impl.cc
+++ b/src/components/application_manager/src/commands/command_notification_impl.cc
@@ -32,6 +32,7 @@
#include "application_manager/commands/command_notification_impl.h"
#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
#include "application_manager/message_helper.h"
namespace application_manager {
@@ -39,8 +40,16 @@ namespace application_manager {
namespace commands {
CommandNotificationImpl::CommandNotificationImpl(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
CommandNotificationImpl::~CommandNotificationImpl() {}
@@ -63,7 +72,7 @@ void CommandNotificationImpl::SendNotification() {
LOG4CXX_INFO(logger_, "SendNotification");
MessageHelper::PrintSmartObject(*message_);
- application_manager_.SendMessageToMobile(message_);
+ rpc_service_.SendMessageToMobile(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 515d8a998c..491fc72de4 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -37,8 +37,10 @@
#include "utils/make_shared.h"
#include "application_manager/commands/command_request_impl.h"
#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
#include "application_manager/message_helper.h"
#include "smart_objects/smart_object.h"
+
namespace application_manager {
namespace commands {
@@ -193,9 +195,17 @@ ResponseInfo::ResponseInfo(const hmi_apis::Common_Result::eType result,
hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == result_code;
}
-CommandRequestImpl::CommandRequestImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager)
+CommandRequestImpl::CommandRequestImpl(
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
, EventObserver(application_manager.event_dispatcher())
, current_state_(kAwaitingHMIResponse)
, hash_update_mode_(kSkipHashUpdate)
@@ -241,7 +251,7 @@ void CommandRequestImpl::onTimeOut() {
correlation_id(),
mobile_api::Result::GENERIC_ERROR);
AddTimeOutComponentInfoToMessage(*response);
- application_manager_.ManageMobileCommand(response, ORIGIN_SDL);
+ rpc_service_.ManageMobileCommand(response, SOURCE_SDL);
}
void CommandRequestImpl::on_event(const event_engine::Event& event) {}
@@ -304,7 +314,7 @@ void CommandRequestImpl::SendResponse(
is_success_result_ = success;
- application_manager_.ManageMobileCommand(result, ORIGIN_SDL);
+ rpc_service_.ManageMobileCommand(result, SOURCE_SDL);
}
bool CommandRequestImpl::CheckSyntax(const std::string& str,
@@ -432,7 +442,7 @@ uint32_t CommandRequestImpl::SendHMIRequest(
subscribe_on_event(function_id, hmi_correlation_id);
}
if (ProcessHMIInterfacesAvailability(hmi_correlation_id, function_id)) {
- if (!application_manager_.ManageHMICommand(result)) {
+ if (!rpc_service_.ManageHMICommand(result)) {
LOG4CXX_ERROR(logger_, "Unable to send request");
SendResponse(false, mobile_apis::Result::OUT_OF_MEMORY);
}
@@ -461,7 +471,7 @@ void CommandRequestImpl::CreateHMINotification(
notify[strings::params][strings::function_id] = function_id;
notify[strings::msg_params] = msg_params;
- if (!application_manager_.ManageHMICommand(result)) {
+ if (!rpc_service_.ManageHMICommand(result)) {
LOG4CXX_ERROR(logger_, "Unable to send HMI notification");
}
}
@@ -570,6 +580,10 @@ mobile_apis::Result::eType CommandRequestImpl::GetMobileResultCode(
mobile_result = mobile_apis::Result::SAVED;
break;
}
+ case hmi_apis::Common_Result::READ_ONLY: {
+ mobile_result = mobile_apis::Result::READ_ONLY;
+ break;
+ }
default: {
LOG4CXX_ERROR(logger_, "Unknown HMI result code " << hmi_code);
break;
@@ -605,10 +619,8 @@ bool CommandRequestImpl::CheckAllowedParameters() {
smart_objects::SmartMap::const_iterator iter_end = s_map.map_end();
for (; iter != iter_end; ++iter) {
- if (iter->second.asBool()) {
- LOG4CXX_DEBUG(logger_, "Request's param: " << iter->first);
- params.insert(iter->first);
- }
+ LOG4CXX_DEBUG(logger_, "Request's param: " << iter->first);
+ params.insert(iter->first);
}
mobile_apis::Result::eType check_result =
@@ -628,7 +640,7 @@ bool CommandRequestImpl::CheckAllowedParameters() {
correlation_id(),
app->app_id());
- application_manager_.SendMessageToMobile(response);
+ rpc_service_.SendMessageToMobile(response);
return false;
}
@@ -652,15 +664,13 @@ bool CommandRequestImpl::CheckHMICapabilities(
using namespace smart_objects;
using namespace mobile_apis;
- const HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- if (!hmi_capabilities.is_ui_cooperating()) {
+ if (!hmi_capabilities_.is_ui_cooperating()) {
LOG4CXX_ERROR(logger_, "UI is not supported by HMI");
return false;
}
const SmartObject* button_capabilities_so =
- hmi_capabilities.button_capabilities();
+ hmi_capabilities_.button_capabilities();
if (!button_capabilities_so) {
LOG4CXX_ERROR(logger_, "Invalid button capabilities object");
return false;
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 c3265230a8..b956a4c7a5 100644
--- a/src/components/application_manager/src/commands/command_response_impl.cc
+++ b/src/components/application_manager/src/commands/command_response_impl.cc
@@ -32,14 +32,23 @@
#include "application_manager/commands/command_response_impl.h"
#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
namespace application_manager {
namespace commands {
CommandResponseImpl::CommandResponseImpl(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
CommandResponseImpl::~CommandResponseImpl() {}
@@ -80,7 +89,7 @@ void CommandResponseImpl::SendResponse(
}
}
- application_manager_.SendMessageToMobile(message_, final_message);
+ rpc_service_.SendMessageToMobile(message_, final_message);
}
} // namespace commands
diff --git a/src/components/application_manager/src/commands/hmi/activate_app_request.cc b/src/components/application_manager/src/commands/hmi/activate_app_request.cc
deleted file mode 100644
index ea36cd2b0a..0000000000
--- a/src/components/application_manager/src/commands/hmi/activate_app_request.cc
+++ /dev/null
@@ -1,69 +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 "application_manager/commands/hmi/activate_app_request.h"
-
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ActivateAppRequest::ActivateAppRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-ActivateAppRequest::~ActivateAppRequest() {
- LOG4CXX_TRACE(logger_, "~ActivateAppRequest");
-}
-
-void ActivateAppRequest::Run() {
- LOG4CXX_TRACE(logger_, "enter " << correlation_id());
- uint32_t app_id = RequestToHMI::application_id();
- application_manager_.set_application_id(correlation_id(), app_id);
-#ifdef ENABLE_LOG
- if ((*message_)[strings::msg_params].keyExists(
- strings::activate_app_hmi_level)) {
- mobile_apis::HMILevel::eType requested_hmi_level =
- 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);
- }
-#endif
- SendRequest();
- LOG4CXX_TRACE(logger_, "exit");
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/activate_app_response.cc b/src/components/application_manager/src/commands/hmi/activate_app_response.cc
deleted file mode 100644
index 55e704b6c4..0000000000
--- a/src/components/application_manager/src/commands/hmi/activate_app_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/activate_app_response.h"
-
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ActivateAppResponse::ActivateAppResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-ActivateAppResponse::~ActivateAppResponse() {}
-
-void ActivateAppResponse::Run() {
- LOG4CXX_TRACE(logger_, "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");
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/add_statistics_info_notification.cc b/src/components/application_manager/src/commands/hmi/add_statistics_info_notification.cc
deleted file mode 100644
index ef75eba1e2..0000000000
--- a/src/components/application_manager/src/commands/hmi/add_statistics_info_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/add_statistics_info_notification.h"
-#include "application_manager/policies/policy_handler.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddStatisticsInfoNotification::AddStatisticsInfoNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {}
-
-void AddStatisticsInfoNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- int type = (*message_)[strings::msg_params][hmi_notification::statistic_type]
- .asInt();
-
- application_manager_.GetPolicyHandler().AddStatisticsInfo(type);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc b/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc
deleted file mode 100644
index 4e096a2cda..0000000000
--- a/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/allow_all_apps_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAllAppsRequest::AllowAllAppsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-AllowAllAppsRequest::~AllowAllAppsRequest() {}
-
-void AllowAllAppsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc b/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc
deleted file mode 100644
index ed05c3ba83..0000000000
--- a/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/allow_all_apps_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAllAppsResponse::AllowAllAppsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-AllowAllAppsResponse::~AllowAllAppsResponse() {}
-
-void AllowAllAppsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SetAllAppsAllowed(
- (*message_)[strings::msg_params][hmi_response::allowed].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/allow_app_request.cc b/src/components/application_manager/src/commands/hmi/allow_app_request.cc
deleted file mode 100644
index 5176b3b4fe..0000000000
--- a/src/components/application_manager/src/commands/hmi/allow_app_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/allow_app_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAppRequest::AllowAppRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-AllowAppRequest::~AllowAppRequest() {}
-
-void AllowAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/allow_app_response.cc b/src/components/application_manager/src/commands/hmi/allow_app_response.cc
deleted file mode 100644
index 5fd9c702b4..0000000000
--- a/src/components/application_manager/src/commands/hmi/allow_app_response.cc
+++ /dev/null
@@ -1,64 +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 "application_manager/commands/hmi/allow_app_response.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAppResponse::AllowAppResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-AllowAppResponse::~AllowAppResponse() {}
-
-void AllowAppResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- uint32_t connection_key =
- (*message_)[strings::params][strings::connection_key].asInt();
-
- ApplicationSharedPtr app = application_manager_.application(connection_key);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- app->set_app_allowed(
- (*message_)[strings::msg_params][hmi_response::allowed].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/basic_communication_on_awake_sdl.cc b/src/components/application_manager/src/commands/hmi/basic_communication_on_awake_sdl.cc
deleted file mode 100644
index c6c550a474..0000000000
--- a/src/components/application_manager/src/commands/hmi/basic_communication_on_awake_sdl.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2017, 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/commands/hmi/basic_communication_on_awake_sdl.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/resumption/resume_ctrl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAwakeSDLNotification::OnAwakeSDLNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnAwakeSDLNotification::~OnAwakeSDLNotification() {}
-
-void OnAwakeSDLNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!application_manager_.resume_controller().is_suspended()) {
- return;
- }
-
- {
- DataAccessor<ApplicationSet> accessor = application_manager_.applications();
- ApplicationSetIt itBegin = accessor.GetData().begin();
- ApplicationSetIt itEnd = accessor.GetData().end();
- for (; itBegin != itEnd; ++itBegin) {
- const ApplicationSharedPtr app = *itBegin;
- if (app && app->IsHashChangedDuringSuspend()) {
- MessageHelper::SendHashUpdateNotification(app->app_id(),
- application_manager_);
- app->SetHashChangedDuringSuspend(false);
- }
- }
- }
-
- application_manager_.resume_controller().OnAwake();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/basic_communication_system_request.cc b/src/components/application_manager/src/commands/hmi/basic_communication_system_request.cc
deleted file mode 100644
index 2499c21680..0000000000
--- a/src/components/application_manager/src/commands/hmi/basic_communication_system_request.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/basic_communication_system_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-BasicCommunicationSystemRequest::BasicCommunicationSystemRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {}
-
-void BasicCommunicationSystemRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/basic_communication_system_response.cc b/src/components/application_manager/src/commands/hmi/basic_communication_system_response.cc
deleted file mode 100644
index 16afce92e0..0000000000
--- a/src/components/application_manager/src/commands/hmi/basic_communication_system_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/basic_communication_system_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-BasicCommunicationSystemResponse::BasicCommunicationSystemResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {}
-
-void BasicCommunicationSystemResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_SystemRequest);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc b/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc
deleted file mode 100644
index e6b73879e5..0000000000
--- a/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {}
-
-void ButtonGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc b/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc
deleted file mode 100644
index a947fb7ba9..0000000000
--- a/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc
+++ /dev/null
@@ -1,68 +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 "application_manager/commands/hmi/button_get_capabilities_response.h"
-
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {}
-
-void ButtonGetCapabilitiesResponse::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());
-
- if (hmi_apis::Common_Result::SUCCESS != code) {
- LOG4CXX_ERROR(logger_, "Error is returned. Capabilities won't be updated.");
- return;
- }
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_button_capabilities(
- (*message_)[strings::msg_params][hmi_response::capabilities]);
-
- hmi_capabilities.set_preset_bank_capabilities(
- (*message_)[strings::msg_params][hmi_response::preset_bank_capabilities]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/close_popup_request.cc b/src/components/application_manager/src/commands/hmi/close_popup_request.cc
deleted file mode 100644
index d628475438..0000000000
--- a/src/components/application_manager/src/commands/hmi/close_popup_request.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/close_popup_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ClosePopupRequest::ClosePopupRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-ClosePopupRequest::~ClosePopupRequest() {}
-
-void ClosePopupRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/close_popup_response.cc b/src/components/application_manager/src/commands/hmi/close_popup_response.cc
deleted file mode 100644
index 15adb2ee32..0000000000
--- a/src/components/application_manager/src/commands/hmi/close_popup_response.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/close_popup_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ClosePopupResponse::ClosePopupResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-ClosePopupResponse::~ClosePopupResponse() {}
-
-void ClosePopupResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // TODO(VS): Process response from HMI
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/decrypt_certificate_request.cc b/src/components/application_manager/src/commands/hmi/decrypt_certificate_request.cc
deleted file mode 100644
index a09fe71bf2..0000000000
--- a/src/components/application_manager/src/commands/hmi/decrypt_certificate_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/decrypt_certificate_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DecryptCertificateRequest::DecryptCertificateRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-void DecryptCertificateRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/decrypt_certificate_response.cc b/src/components/application_manager/src/commands/hmi/decrypt_certificate_response.cc
deleted file mode 100644
index cea9290f7d..0000000000
--- a/src/components/application_manager/src/commands/hmi/decrypt_certificate_response.cc
+++ /dev/null
@@ -1,59 +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 "application_manager/commands/hmi/decrypt_certificate_response.h"
-
-#include "application_manager/policies/policy_handler.h"
-#ifdef EXTERNAL_PROPRIETARY_MODE
-namespace application_manager {
-
-namespace commands {
-
-DecryptCertificateResponse::DecryptCertificateResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-DecryptCertificateResponse::~DecryptCertificateResponse() {}
-
-void DecryptCertificateResponse::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());
-
- const bool is_succeeded = hmi_apis::Common_Result::SUCCESS == code;
-
- application_manager_.GetPolicyHandler().OnCertificateDecrypted(is_succeeded);
-}
-
-} // namespace commands
-} // namespace application_manager
-#endif // EXTERNAL_PROPRIETARY_MODE
diff --git a/src/components/application_manager/src/commands/hmi/dial_number_request.cc b/src/components/application_manager/src/commands/hmi/dial_number_request.cc
deleted file mode 100644
index b26541cb01..0000000000
--- a/src/components/application_manager/src/commands/hmi/dial_number_request.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/dial_number_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-DialNumberRequest::~DialNumberRequest() {}
-
-void DialNumberRequest::Run() {
- SendRequest();
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/dial_number_response.cc b/src/components/application_manager/src/commands/hmi/dial_number_response.cc
deleted file mode 100644
index 5511fa98f8..0000000000
--- a/src/components/application_manager/src/commands/hmi/dial_number_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/dial_number_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-DialNumberResponse::DialNumberResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-DialNumberResponse::~DialNumberResponse() {}
-
-void DialNumberResponse::Run() {
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_DialNumber);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/get_system_info_request.cc b/src/components/application_manager/src/commands/hmi/get_system_info_request.cc
deleted file mode 100644
index 379027c43a..0000000000
--- a/src/components/application_manager/src/commands/hmi/get_system_info_request.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/get_system_info_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetSystemInfoRequest::GetSystemInfoRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-GetSystemInfoRequest::~GetSystemInfoRequest() {}
-
-void GetSystemInfoRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- uint32_t correlation_id = RequestToHMI::correlation_id();
- uint32_t app_id = RequestToHMI::application_id();
- application_manager_.set_application_id(correlation_id, app_id);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/get_system_info_response.cc b/src/components/application_manager/src/commands/hmi/get_system_info_response.cc
deleted file mode 100644
index be6dabb292..0000000000
--- a/src/components/application_manager/src/commands/hmi/get_system_info_response.cc
+++ /dev/null
@@ -1,84 +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 "application_manager/commands/hmi/get_system_info_response.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-namespace commands {
-
-GetSystemInfoResponse::GetSystemInfoResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-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());
-
- const SystemInfo& info = GetSystemInfo(code);
-
- // We have to set preloaded flag as false in policy table on any response
- // of GetSystemInfo (SDLAQ-CRS-2365)
- application_manager_.GetPolicyHandler().OnGetSystemInfo(
- info.ccpu_version, info.wers_country_code, info.language);
-}
-
-const SystemInfo GetSystemInfoResponse::GetSystemInfo(
- const hmi_apis::Common_Result::eType code) 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();
-
- info.wers_country_code =
- (*message_)[strings::msg_params]["wersCountryCode"].asString();
-
- const uint32_t lang_code =
- (*message_)[strings::msg_params]["language"].asUInt();
- info.language = application_manager::MessageHelper::CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code));
-
- application_manager_.hmi_capabilities().set_ccpu_version(info.ccpu_version);
-
- return info;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/get_urls.cc b/src/components/application_manager/src/commands/hmi/get_urls.cc
deleted file mode 100644
index bfcdf4985e..0000000000
--- a/src/components/application_manager/src/commands/hmi/get_urls.cc
+++ /dev/null
@@ -1,223 +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 "application_manager/commands/hmi/get_urls.h"
-#include "application_manager/message.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/policy_handler.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-namespace commands {
-
-GetUrls::GetUrls(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {}
-
-GetUrls::~GetUrls() {}
-
-void GetUrls::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- namespace Common_Result = hmi_apis::Common_Result;
- using policy::EndpointUrls;
-
- if (!application_manager_.GetPolicyHandler().PolicyEnabled()) {
- SendResponseToHMI(Common_Result::DATA_NOT_AVAILABLE);
- return;
- }
-
- const uint32_t service_to_check =
- (*message_)[strings::msg_params][hmi_request::service].asUInt();
-
- EndpointUrls endpoints;
- application_manager_.GetPolicyHandler().GetUpdateUrls(service_to_check,
- endpoints);
-
- if (endpoints.empty()) {
- LOG4CXX_ERROR(logger_, "No URLs for service " << service_to_check);
- SendResponseToHMI(Common_Result::DATA_NOT_AVAILABLE);
- return;
- }
-
-#ifdef PROPRIETARY_MODE
- const uint32_t policy_service = 7u;
-
- if (policy_service == service_to_check) {
- ProcessPolicyServiceURLs(endpoints);
- return;
- }
-#endif // PROPRIETARY_MODE
-
- ProcessServiceURLs(endpoints);
-}
-
-void GetUrls::ProcessServiceURLs(const policy::EndpointUrls& endpoints) {
- namespace Common_Result = hmi_apis::Common_Result;
- using smart_objects::SmartObject;
-
- (*message_)[strings::msg_params].erase(hmi_request::service);
- SmartObject& urls = (*message_)[strings::msg_params][hmi_response::urls];
-
- size_t index = 0;
- for (size_t e = 0; e < endpoints.size(); ++e) {
- ApplicationSharedPtr app =
- application_manager_.application_by_policy_id(endpoints[e].app_id);
-
-#ifndef PROPRIETARY_MODE
- bool registered_not_default = false;
- if (policy::kDefaultId != endpoints[e].app_id) {
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Can't find application with policy id "
- << endpoints[e].app_id
- << " URLs adding for this application is skipped.");
- continue;
- }
- registered_not_default = true;
- }
-#endif // EXTERNAL_PROPRIETARY_MODE || HTTP
- for (size_t u = 0; u < endpoints[e].url.size(); ++u, ++index) {
- const std::string& app_url = endpoints[e].url[u];
- SmartObject& service_info = urls[index];
-
- service_info[strings::url] = app_url;
-#ifndef PROPRIETARY_MODE
- if (registered_not_default) {
- service_info[strings::app_id] = app->hmi_app_id();
- }
-#else // EXTERNAL_PROPRIETARY_MODE || HTTP
- service_info[hmi_response::policy_app_id] = endpoints[e].app_id;
-#endif
- }
- }
- SendResponseToHMI(Common_Result::SUCCESS);
-}
-
-void GetUrls::SendResponseToHMI(hmi_apis::Common_Result::eType result) {
- (*message_)[strings::params][strings::message_type] = MessageType::kResponse;
- (*message_)[strings::params][hmi_response::code] = result;
- application_manager_.ManageHMICommand(message_);
-}
-
-#ifdef PROPRIETARY_MODE
-struct PolicyAppIdComparator {
- PolicyAppIdComparator(const std::string& policy_app_id)
- : policy_app_id_(policy_app_id) {}
-
- bool operator()(const policy::EndpointData& data) {
- return data.app_id == policy_app_id_;
- }
- std::string policy_app_id_;
-};
-
-void FillSODefaultUrls(smart_objects::SmartObject& urls,
- const policy::EndpointUrls& endpoints) {
- using smart_objects::SmartObject;
- PolicyAppIdComparator comparator(policy::kDefaultId);
- policy::EndpointUrls::const_iterator it =
- std::find_if(endpoints.begin(), endpoints.end(), comparator);
- if (it == endpoints.end()) {
- return;
- }
- SmartObject service_info = SmartObject(smart_objects::SmartType_Map);
- for (size_t i = 0; i < (*it).url.size(); ++i) {
- service_info[strings::url] = (*it).url[i];
- urls[i] = service_info;
- }
-}
-
-void GetUrls::ProcessPolicyServiceURLs(const policy::EndpointUrls& endpoints) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace smart_objects;
- using namespace application_manager;
- using namespace strings;
- using namespace hmi_apis;
-
- const uint32_t app_id_to_send_to =
- application_manager_.GetPolicyHandler().GetAppIdForSending();
-
- if (!app_id_to_send_to) {
- LOG4CXX_ERROR(logger_,
- "There are no available applications for processing.");
- SmartObject urls(SmartType_Array);
- FillSODefaultUrls(urls, endpoints);
- if (!urls.empty()) {
- (*message_)[msg_params][hmi_response::urls] = urls;
- }
- (*message_).erase(hmi_request::service);
- SendResponseToHMI(Common_Result::SUCCESS);
- return;
- }
-
- ApplicationSharedPtr app =
- application_manager_.application(app_id_to_send_to);
-
- if (!app.valid()) {
- LOG4CXX_WARN(logger_,
- "There is no registered application with "
- "connection key '"
- << app_id_to_send_to << "'");
- SendResponseToHMI(Common_Result::DATA_NOT_AVAILABLE);
- return;
- }
-
- SmartObject& object = *message_;
- object[msg_params].erase(hmi_request::service);
- object[msg_params][hmi_response::urls] = SmartObject(SmartType_Array);
- SmartObject& urls = object[msg_params][hmi_response::urls];
- const std::string mobile_app_id = app->policy_app_id();
-
- size_t index = 0;
- for (size_t i = 0; i < endpoints.size(); ++i) {
- using namespace helpers;
-
- const bool to_add = Compare<std::string, EQ, ONE>(
- endpoints[i].app_id, mobile_app_id, policy::kDefaultId);
- const bool is_default = policy::kDefaultId == endpoints[i].app_id;
-
- if (to_add) {
- for (size_t k = 0; k < endpoints[i].url.size(); ++k) {
- if (!is_default) {
- urls[index][strings::app_id] = app_id_to_send_to;
- }
- urls[index][strings::url] = endpoints[i].url[k];
- ++index;
- }
- }
- }
- SendResponseToHMI(Common_Result::SUCCESS);
- return;
-}
-#endif // PROPRIETARY_MODE
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/get_urls_response.cc b/src/components/application_manager/src/commands/hmi/get_urls_response.cc
deleted file mode 100644
index dd9686fbce..0000000000
--- a/src/components/application_manager/src/commands/hmi/get_urls_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/get_urls_response.h"
-
-namespace application_manager {
-namespace commands {
-
-GetUrlsResponse::GetUrlsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseToHMI(message, application_manager) {}
-
-GetUrlsResponse::~GetUrlsResponse() {}
-
-void GetUrlsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc b/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc
deleted file mode 100644
index e38d1fc088..0000000000
--- a/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/mixing_audio_supported_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-MixingAudioSupportedRequest::MixingAudioSupportedRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {}
-
-void MixingAudioSupportedRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc b/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc
deleted file mode 100644
index f8b58e6f35..0000000000
--- a/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/mixing_audio_supported_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-MixingAudioSupportedResponse::MixingAudioSupportedResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {}
-
-void MixingAudioSupportedResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- hmi_capabilities.set_attenuated_supported(
- (*message_)[strings::msg_params][hmi_response::attenuated_supported]
- .asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc b/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc
deleted file mode 100644
index 582caaa8f3..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_alert_maneuver_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviAlertManeuverRequest::NaviAlertManeuverRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {}
-
-void NaviAlertManeuverRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc b/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc
deleted file mode 100644
index 5f0422bf6a..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/navi_alert_maneuver_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviAlertManeuverResponse::NaviAlertManeuverResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {}
-
-void NaviAlertManeuverResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_AlertManeuver);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc b/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc
deleted file mode 100644
index 42b8c64fc0..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc
+++ /dev/null
@@ -1,180 +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 "application_manager/commands/hmi/navi_audio_start_stream_request.h"
-
-#include "application_manager/message_helper.h"
-#include "protocol_handler/protocol_handler.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStartStreamRequest::AudioStartStreamRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher())
- , retry_number_(0) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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_
- << "; retry_number_ = " << retry_number_);
-}
-
-AudioStartStreamRequest::~AudioStartStreamRequest() {}
-
-void AudioStartStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!CheckAvailabilityHMIInterfaces(
- application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
- return;
- }
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Applcation with hmi_app_id " << application_id()
- << " does not exist");
- return;
- }
- SetAllowedToTerminate(false);
- subscribe_on_event(hmi_apis::FunctionID::Navigation_StartAudioStream,
- correlation_id());
- app->set_audio_streaming_allowed(true);
- SendRequest();
-}
-
-void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
- using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "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");
-
- 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");
- if (application_manager_.HMILevelAllowsStreaming(app->app_id(),
- ServiceType::kAudio)) {
- app->set_audio_streaming_approved(true);
- } else {
- LOG4CXX_WARN(
- logger_,
- "StartAudioStreamRequest aborted. Application can not stream");
- }
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
- break;
- }
- if (hmi_apis::Common_Result::REJECTED == code) {
- LOG4CXX_INFO(logger_, "StartAudioStream response REJECTED");
- RetryStartSession();
- break;
- }
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void AudioStartStreamRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
- RetryStartSession();
-}
-
-void AudioStartStreamRequest::RetryStartSession() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
-
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
- return;
- }
-
- if (!app->audio_streaming_allowed()) {
- LOG4CXX_WARN(logger_, "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;
- }
-
- uint32_t curr_retry_number = app->audio_stream_retry_number();
- LOG4CXX_DEBUG(
- logger_, "Retry number " << curr_retry_number << " of " << retry_number_);
-
- 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.");
-
- application_manager_.EndNaviServices(app->app_id());
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_response.cc b/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_response.cc
deleted file mode 100644
index c7fc7365e7..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/navi_audio_start_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStartStreamResponse::AudioStartStreamResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-AudioStartStreamResponse::~AudioStartStreamResponse() {}
-
-void AudioStartStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_StartAudioStream);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_request.cc b/src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_request.cc
deleted file mode 100644
index f86ee8302a..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_request.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/navi_audio_stop_stream_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStopStreamRequest::AudioStopStreamRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-AudioStopStreamRequest::~AudioStopStreamRequest() {}
-
-void AudioStopStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!CheckAvailabilityHMIInterfaces(
- application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
- return;
- }
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_response.cc b/src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_response.cc
deleted file mode 100644
index c669d399f9..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_response.cc
+++ /dev/null
@@ -1,50 +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 "application_manager/commands/hmi/navi_audio_stop_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStopStreamResponse::AudioStopStreamResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-AudioStopStreamResponse::~AudioStopStreamResponse() {}
-
-void AudioStopStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc b/src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc
deleted file mode 100644
index 51f862c957..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_get_way_points_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviGetWayPointsRequest::NaviGetWayPointsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviGetWayPointsRequest::~NaviGetWayPointsRequest() {}
-
-void NaviGetWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc b/src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc
deleted file mode 100644
index f295845b24..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/navi_get_way_points_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviGetWayPointsResponse::NaviGetWayPointsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {}
-
-void NaviGetWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc b/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc
deleted file mode 100644
index 4392258a31..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc
+++ /dev/null
@@ -1,79 +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 "application_manager/commands/hmi/navi_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviIsReadyRequest::NaviIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-NaviIsReadyRequest::~NaviIsReadyRequest() {}
-
-void NaviIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- subscribe_on_event(hmi_apis::FunctionID::Navigation_IsReady,
- correlation_id());
- SendRequest();
-}
-
-void NaviIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::Navigation_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received Navigation_IsReady event");
- unsubscribe_from_event(hmi_apis::FunctionID::Navigation_IsReady);
- const bool is_available =
- ChangeInterfaceState(application_manager_,
- message,
- HmiInterfaces::HMI_INTERFACE_Navigation);
-
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- hmi_capabilities.set_is_navi_cooperating(is_available);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc
deleted file mode 100644
index 7daba4258b..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_is_ready_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviIsReadyResponse::NaviIsReadyResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviIsReadyResponse::~NaviIsReadyResponse() {}
-
-void NaviIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::Navigation_IsReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_send_location_request.cc b/src/components/application_manager/src/commands/hmi/navi_send_location_request.cc
deleted file mode 100644
index ad878033ca..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_send_location_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_send_location_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviSendLocationRequest::NaviSendLocationRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviSendLocationRequest::~NaviSendLocationRequest() {}
-
-void NaviSendLocationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_send_location_response.cc b/src/components/application_manager/src/commands/hmi/navi_send_location_response.cc
deleted file mode 100644
index a3d9f4c9e5..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_send_location_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/navi_send_location_response.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviSendLocationResponse::NaviSendLocationResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviSendLocationResponse::~NaviSendLocationResponse() {}
-
-void NaviSendLocationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_SendLocation);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_set_video_config_request.cc b/src/components/application_manager/src/commands/hmi/navi_set_video_config_request.cc
deleted file mode 100644
index d19db515ab..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_set_video_config_request.cc
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 names of the copyright holders 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/commands/hmi/navi_set_video_config_request.h"
-#include <string>
-#include <vector>
-
-namespace application_manager {
-
-namespace commands {
-
-NaviSetVideoConfigRequest::NaviSetVideoConfigRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-NaviSetVideoConfigRequest::~NaviSetVideoConfigRequest() {}
-
-void NaviSetVideoConfigRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!CheckAvailabilityHMIInterfaces(
- application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_WARN(logger_, "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");
- return;
- }
-
- subscribe_on_event(hmi_apis::FunctionID::Navigation_SetVideoConfig,
- correlation_id());
- SendRequest();
-}
-
-void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application is not found, abort NaviSetVideoConfigRequest");
- return;
- }
-
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::Navigation_SetVideoConfig: {
- 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;
- } else {
- LOG4CXX_DEBUG(logger_,
- "Received SetVideoConfig failure response (" << event.id()
- << ")");
- result = false;
- if (message[strings::msg_params].keyExists(strings::rejected_params)) {
- const smart_objects::SmartArray* list =
- message[strings::msg_params][strings::rejected_params].asArray();
- if (list != NULL) {
- for (unsigned int i = 0; i < list->size(); i++) {
- const std::string& param = (*list)[i].asString();
- // Make sure that we actually sent the parameter in the request
- if ((*message_)[strings::msg_params].keyExists(strings::config) &&
- (*message_)[strings::msg_params][strings::config].keyExists(
- param)) {
- rejected_params.push_back(param);
- }
- }
- }
- }
- }
- application_manager_.OnStreamingConfigured(
- app->app_id(),
- protocol_handler::ServiceType::kMobileNav,
- result,
- rejected_params);
- break;
- }
- default:
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
-}
-
-void NaviSetVideoConfigRequest::onTimeOut() {
- LOG4CXX_WARN(logger_, "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");
- return;
- }
-
- std::vector<std::string> empty;
- application_manager_.OnStreamingConfigured(
- app->app_id(), protocol_handler::ServiceType::kMobileNav, false, empty);
-
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_set_video_config_response.cc b/src/components/application_manager/src/commands/hmi/navi_set_video_config_response.cc
deleted file mode 100644
index 03679eb3b1..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_set_video_config_response.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 names of the copyright holders 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/commands/hmi/navi_set_video_config_response.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviSetVideoConfigResponse::NaviSetVideoConfigResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviSetVideoConfigResponse::~NaviSetVideoConfigResponse() {}
-
-void NaviSetVideoConfigResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_SetVideoConfig);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc b/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc
deleted file mode 100644
index a92ef07d12..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviShowConstantTBTRequest::NaviShowConstantTBTRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {}
-
-void NaviShowConstantTBTRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc b/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc
deleted file mode 100644
index ede3272e8e..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/navi_show_constant_tbt_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviShowConstantTBTResponse::NaviShowConstantTBTResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {}
-
-void NaviShowConstantTBTResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc b/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
deleted file mode 100644
index ffc325b5e4..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
+++ /dev/null
@@ -1,180 +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 "application_manager/commands/hmi/navi_start_stream_request.h"
-
-#include "application_manager/message_helper.h"
-#include "protocol_handler/protocol_handler.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStartStreamRequest::NaviStartStreamRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher())
- , retry_number_(0) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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_
- << "; retry_number_ = " << retry_number_);
-}
-
-NaviStartStreamRequest::~NaviStartStreamRequest() {}
-
-void NaviStartStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!CheckAvailabilityHMIInterfaces(
- application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
- return;
- }
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Applcation with hmi_app_id " << application_id()
- << "does not exist");
- return;
- }
- SetAllowedToTerminate(false);
- subscribe_on_event(hmi_apis::FunctionID::Navigation_StartStream,
- correlation_id());
- app->set_video_streaming_allowed(true);
- SendRequest();
-}
-
-void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
- using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "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");
-
- 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");
- if (application_manager_.HMILevelAllowsStreaming(
- app->app_id(), ServiceType::kMobileNav)) {
- app->set_video_streaming_approved(true);
- } else {
- LOG4CXX_DEBUG(
- logger_,
- "NaviStartStreamRequest aborted. Application can not stream");
- }
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
- break;
- }
- if (hmi_apis::Common_Result::REJECTED == code) {
- LOG4CXX_INFO(logger_, "StartStream response REJECTED ");
- RetryStartSession();
- break;
- }
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void NaviStartStreamRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
- RetryStartSession();
-}
-
-void NaviStartStreamRequest::RetryStartSession() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
-
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
- return;
- }
-
- if (!app->video_streaming_allowed()) {
- LOG4CXX_WARN(logger_, "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;
- }
-
- uint32_t curr_retry_number = app->video_stream_retry_number();
- LOG4CXX_DEBUG(
- logger_, "Retry number " << curr_retry_number << " of " << retry_number_);
-
- 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");
-
- application_manager_.EndNaviServices(app->app_id());
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc b/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc
deleted file mode 100644
index b0b9e672c3..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/navi_start_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStartStreamResponse::NaviStartStreamResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviStartStreamResponse::~NaviStartStreamResponse() {}
-
-void NaviStartStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_StartStream);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc b/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc
deleted file mode 100644
index a40ee13b68..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStopStreamRequest::NaviStopStreamRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviStopStreamRequest::~NaviStopStreamRequest() {}
-
-void NaviStopStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!CheckAvailabilityHMIInterfaces(
- application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
- return;
- }
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc b/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc
deleted file mode 100644
index 3a7fc75260..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc
+++ /dev/null
@@ -1,50 +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 "application_manager/commands/hmi/navi_stop_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStopStreamResponse::NaviStopStreamResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviStopStreamResponse::~NaviStopStreamResponse() {}
-
-void NaviStopStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc b/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc
deleted file mode 100644
index f2106c8724..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviSubscribeWayPointsRequest::~NaviSubscribeWayPointsRequest() {}
-
-void NaviSubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc b/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc
deleted file mode 100644
index f641051560..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/navi_subscribe_way_points_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviSubscribeWayPointsResponse::~NaviSubscribeWayPointsResponse() {}
-
-void NaviSubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(
- hmi_apis::FunctionID::Navigation_SubscribeWayPoints);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc b/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc
deleted file mode 100644
index e66069feef..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviUnSubscribeWayPointsRequest::NaviUnSubscribeWayPointsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviUnSubscribeWayPointsRequest::~NaviUnSubscribeWayPointsRequest() {}
-
-void NaviUnSubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc b/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc
deleted file mode 100644
index 61216321e8..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc
+++ /dev/null
@@ -1,59 +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 "application_manager/commands/hmi/navi_unsubscribe_way_points_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviUnsubscribeWayPointsResponse::~NaviUnsubscribeWayPointsResponse() {}
-
-void NaviUnsubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(
- hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc b/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc
deleted file mode 100644
index c37c3d12f9..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/navi_update_turn_list_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviUpdateTurnListRequest::NaviUpdateTurnListRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {}
-
-void NaviUpdateTurnListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc b/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc
deleted file mode 100644
index faf5719d05..0000000000
--- a/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/navi_update_turn_list_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviUpdateTurnListResponse::NaviUpdateTurnListResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {}
-
-void NaviUpdateTurnListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc b/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc
deleted file mode 100644
index 3c2d73b10c..0000000000
--- a/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc
+++ /dev/null
@@ -1,101 +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 "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NotificationFromHMI::NotificationFromHMI(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {
- // Replace HMI app id with Mobile connection id
- ReplaceHMIWithMobileAppId(*message);
-}
-
-NotificationFromHMI::~NotificationFromHMI() {}
-
-bool NotificationFromHMI::Init() {
- return true;
-}
-
-bool NotificationFromHMI::CleanUp() {
- return true;
-}
-
-void NotificationFromHMI::Run() {}
-
-void NotificationFromHMI::SendNotificationToMobile(
- const MessageSharedPtr& message) {
- (*message)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
- application_manager_.ManageMobileCommand(message, ORIGIN_SDL);
-}
-
-void NotificationFromHMI::CreateHMIRequest(
- const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject& msg_params) const {
- smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
-
- // get hmi correlation id for chaining further request from this object
- const uint32_t hmi_correlation_id_ =
- application_manager_.GetNextHMICorrelationID();
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
- request[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kRequest);
- request[strings::params][strings::function_id] =
- static_cast<int32_t>(function_id);
- request[strings::params][strings::correlation_id] = hmi_correlation_id_;
- request[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- request[strings::params][strings::protocol_type] =
- CommandImpl::hmi_protocol_type_;
-
- request[strings::msg_params] = msg_params;
-
- if (!application_manager_.ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- return;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc b/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc
deleted file mode 100644
index d52df950c3..0000000000
--- a/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc
+++ /dev/null
@@ -1,65 +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 "application_manager/commands/hmi/notification_to_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NotificationToHMI::NotificationToHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
-
-NotificationToHMI::~NotificationToHMI() {}
-
-bool NotificationToHMI::Init() {
- // Replace Mobile connection id with HMI app id
- return ReplaceMobileWithHMIAppId(*message_);
-}
-
-bool NotificationToHMI::CleanUp() {
- return true;
-}
-
-void NotificationToHMI::Run() {}
-
-void NotificationToHMI::SendNotification() {
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_allow_sdl_functionality_notification.cc b/src/components/application_manager/src/commands/hmi/on_allow_sdl_functionality_notification.cc
deleted file mode 100644
index 70e5e7cefd..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_allow_sdl_functionality_notification.cc
+++ /dev/null
@@ -1,60 +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 "application_manager/commands/hmi/on_allow_sdl_functionality_notification.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/policy_handler.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnAllowSDLFunctionalityNotification::~OnAllowSDLFunctionalityNotification() {}
-
-void OnAllowSDLFunctionalityNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- std::string device_id;
- if ((*message_)[strings::msg_params].keyExists("device")) {
- device_id = (*message_)[strings::msg_params]["device"]["id"].asString();
- }
- application_manager_.GetPolicyHandler().OnAllowSDLFunctionalityNotification(
- (*message_)[strings::msg_params][hmi_response::allowed].asBool(),
- device_id);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc
deleted file mode 100644
index 76252a50fd..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_app_activated_notification.h"
-
-#include "application_manager/message_helper.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppActivatedNotification::OnAppActivatedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnAppActivatedNotification::~OnAppActivatedNotification() {}
-
-void OnAppActivatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_OnAppActivated);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc
deleted file mode 100644
index 86ce6a830c..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc
+++ /dev/null
@@ -1,60 +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 "application_manager/commands/hmi/on_app_deactivated_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppDeactivatedNotification::OnAppDeactivatedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {}
-
-void OnAppDeactivatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_app_permission_changed_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_permission_changed_notification.cc
deleted file mode 100644
index fa7293513a..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_app_permission_changed_notification.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/on_app_permission_changed_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppPermissionChangedNotification::OnAppPermissionChangedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {}
-
-void OnAppPermissionChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_app_permission_consent_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_permission_consent_notification.cc
deleted file mode 100644
index 19577f0127..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_app_permission_consent_notification.cc
+++ /dev/null
@@ -1,175 +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 "application_manager/commands/hmi/on_app_permission_consent_notification.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/message_helper.h"
-#include <algorithm>
-#include <functional>
-#include <string>
-#include "policy/policy_types.h"
-#include "smart_objects/smart_object.h"
-#include "utils/make_shared.h"
-
-namespace {
-
-/**
- * @brief Converts SmartObject data to group permission status and appends to
- * collection
- */
-struct PermissionsAppender
- : public std::unary_function<void,
- const smart_objects::SmartArray::value_type&> {
- PermissionsAppender(policy::PermissionConsent& consents)
- : allowed_key_(application_manager::hmi_response::allowed)
- , consents_(consents) {}
- void operator()(const smart_objects::SmartArray::value_type& item) const {
- using namespace policy;
- using namespace application_manager;
-
- FunctionalGroupPermission permissions;
-
- permissions.group_id = static_cast<int32_t>(item[strings::id].asInt());
- permissions.group_alias = item[strings::name].asString();
-
- if (item.keyExists(allowed_key_)) {
- permissions.state =
- item[allowed_key_].asBool() ? kGroupAllowed : kGroupDisallowed;
- }
-
- consents_.group_permissions.push_back(permissions);
- }
-
- private:
- const std::string allowed_key_;
- policy::PermissionConsent& consents_;
-};
-
-#ifdef EXTERNAL_PROPRIETARY_MODE
-/**
- * @brief Converts SmartObject data to customer connectivity status item and
- * appends to collection
- */
-struct ExternalConsentStatusAppender
- : std::unary_function<void, const smart_objects::SmartArray::value_type&> {
- ExternalConsentStatusAppender(
- policy::ExternalConsentStatus& external_consent_status)
- : external_consent_status_(external_consent_status) {}
- void operator()(const smart_objects::SmartArray::value_type& item) const {
- using namespace policy;
- using namespace hmi_apis;
- using namespace application_manager;
-
- ExternalConsentStatusItem status_item(
- static_cast<uint32_t>(item[strings::entity_type].asUInt()),
- static_cast<uint32_t>(item[strings::entity_id].asUInt()),
- static_cast<Common_EntityStatus::eType>(
- item[strings::status].asUInt()) == Common_EntityStatus::ON
- ? policy::kStatusOn
- : policy::kStatusOff);
-
- external_consent_status_.insert(status_item);
- }
-
- private:
- policy::ExternalConsentStatus& external_consent_status_;
-};
-#endif
-} // namespace
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppPermissionConsentNotification::OnAppPermissionConsentNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {}
-
-void OnAppPermissionConsentNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
-
- uint32_t connection_key = 0;
-
- policy::PermissionConsent permission_consent;
-
- // If user defined group permissions for specific app
- if (msg_params.keyExists(strings::app_id)) {
- connection_key = msg_params[strings::app_id].asUInt();
- }
-
- if (msg_params.keyExists(strings::consented_functions)) {
- const smart_objects::SmartArray* user_consent =
- msg_params[strings::consented_functions].asArray();
-
- smart_objects::SmartArray::const_iterator it = user_consent->begin();
- smart_objects::SmartArray::const_iterator it_end = user_consent->end();
- for (; it != it_end; ++it) {
- policy::FunctionalGroupPermission permissions;
- permissions.group_id = (*it)["id"].asInt();
- permissions.group_alias = (*it)["name"].asString();
- if ((*it).keyExists("allowed")) {
- permissions.state = (*it)["allowed"].asBool()
- ? policy::kGroupAllowed
- : policy::kGroupDisallowed;
- } else {
- permissions.state = policy::kGroupUndefined;
- }
-
- permission_consent.group_permissions.push_back(permissions);
- }
-
- permission_consent.consent_source = msg_params[strings::source].asString();
- }
-#ifdef EXTERNAL_PROPRIETARY_MODE
- policy::ExternalConsentStatus external_consent_status;
- if (msg_params.keyExists(strings::external_consent_status)) {
- const smart_objects::SmartArray* system_external_consent_status =
- msg_params[strings::external_consent_status].asArray();
- ExternalConsentStatusAppender status_appender(external_consent_status);
- std::for_each(system_external_consent_status->begin(),
- system_external_consent_status->end(),
- status_appender);
- }
- application_manager_.GetPolicyHandler().OnAppPermissionConsent(
- connection_key, permission_consent, external_consent_status);
-#else
- application_manager_.GetPolicyHandler().OnAppPermissionConsent(
- connection_key, permission_consent);
-#endif
-}
-} // commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc
deleted file mode 100644
index a97e19b556..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_app_registered_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppRegisteredNotification::OnAppRegisteredNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnAppRegisteredNotification::~OnAppRegisteredNotification() {}
-
-void OnAppRegisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- // SDL must notify system about app registration before any dependent actions
- // will be started
- SendNotification();
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc
deleted file mode 100644
index f64e3e111b..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc
+++ /dev/null
@@ -1,67 +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 "application_manager/commands/hmi/on_app_unregistered_notification.h"
-
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppUnregisteredNotification::OnAppUnregisteredNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {}
-
-bool OnAppUnregisteredNotification::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Replacement of hmi id is skipped.");
- return true;
-}
-
-void OnAppUnregisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // sending event for delete VRCommand on PerformInteraction
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc b/src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc
deleted file mode 100644
index c3e81bdc30..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/on_audio_data_streaming_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAudioDataStreamingNotification::OnAudioDataStreamingNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() {}
-
-void OnAudioDataStreamingNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc b/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc
deleted file mode 100644
index fc8d5989a1..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc
+++ /dev/null
@@ -1,61 +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 "application_manager/commands/hmi/on_button_event_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnButtonEventNotification::OnButtonEventNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-void OnButtonEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc b/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc
deleted file mode 100644
index abff87c962..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/hmi/on_button_press_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "utils/logger.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnButtonPressNotification::OnButtonPressNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-void OnButtonPressNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::Buttons_OnButtonPress);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
- (*message_)[strings::params][strings::function_id] =
- static_cast<int>(mobile_apis::FunctionID::eType::OnButtonPressID);
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_button_subscription_notification.cc b/src/components/application_manager/src/commands/hmi/on_button_subscription_notification.cc
deleted file mode 100644
index aae994ea34..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_button_subscription_notification.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/on_button_subscription_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnButtonSubscriptionNotification::OnButtonSubscriptionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnButtonSubscriptionNotification::~OnButtonSubscriptionNotification() {}
-
-void OnButtonSubscriptionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc b/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc
deleted file mode 100644
index 83ec785a9d..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/on_device_chosen_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnDeviceChosenNotification::OnDeviceChosenNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnDeviceChosenNotification::~OnDeviceChosenNotification() {}
-
-void OnDeviceChosenNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
- application_manager_.ConnectToDevice(
- (*message_)[strings::msg_params][strings::device_info][strings::id]
- .asString());
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_device_state_changed_notification.cc b/src/components/application_manager/src/commands/hmi/on_device_state_changed_notification.cc
deleted file mode 100644
index 346c05032b..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_device_state_changed_notification.cc
+++ /dev/null
@@ -1,115 +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 <algorithm>
-#include "application_manager/commands/hmi/on_device_state_changed_notification.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/HMI_API.h"
-#include "encryption/hashing.h"
-
-namespace {
-// TODO(AOleynik) : replace this !!!
-void check_zero(const char& a, const char& b, std::string& bt_mac) {
- if ('0' != a && '0' == b) {
- bt_mac.push_back(a);
- bt_mac.push_back(b);
- } else if ('0' == a) {
- bt_mac.push_back(b);
- } else {
- bt_mac.push_back(a);
- bt_mac.push_back(b);
- }
-}
-
-std::string convert_to_bt_mac(std::string& deviceInternalId) {
- std::transform(deviceInternalId.begin(),
- deviceInternalId.end(),
- deviceInternalId.begin(),
- ::tolower);
-
- std::string bt_mac;
- check_zero(deviceInternalId[10], deviceInternalId[11], bt_mac);
- bt_mac.push_back(':');
- check_zero(deviceInternalId[8], deviceInternalId[9], bt_mac);
- bt_mac.push_back(':');
- check_zero(deviceInternalId[6], deviceInternalId[7], bt_mac);
- bt_mac.push_back(':');
- check_zero(deviceInternalId[4], deviceInternalId[5], bt_mac);
- bt_mac.push_back(':');
- check_zero(deviceInternalId[2], deviceInternalId[3], bt_mac);
- bt_mac.push_back(':');
- check_zero(deviceInternalId[0], deviceInternalId[1], bt_mac);
-
- return bt_mac;
-}
-}
-
-namespace application_manager {
-
-namespace commands {
-
-OnDeviceStateChangedNotification::OnDeviceStateChangedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {}
-
-void OnDeviceStateChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if ((*message_)[strings::msg_params]["deviceState"] ==
- hmi_apis::Common_DeviceState::UNPAIRED) {
- // It is expected, that "deviceInternalId" is the device MAC address in
- // form XXXXXXXXXX
- std::string device_id =
- (*message_)[strings::msg_params]["deviceInternalId"].asString();
- if (device_id.empty()) {
- if ((*message_)[strings::msg_params].keyExists("deviceId")) {
- device_id =
- (*message_)[strings::msg_params]["deviceId"]["id"].asString();
- }
- } else {
- // Policy uses hashed MAC address as device_id
- LOG4CXX_DEBUG(logger_, "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);
- device_id = encryption::MakeHash(bt_mac);
- LOG4CXX_DEBUG(logger_, "Device_id hashed as BT MAC : " << device_id);
- }
- application_manager_.GetPolicyHandler().RemoveDevice(device_id);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc b/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc
deleted file mode 100644
index a895d353ce..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc
+++ /dev/null
@@ -1,134 +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 <set>
-#include "application_manager/commands/hmi/on_driver_distraction_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/make_shared.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-namespace {
-struct OnDriverDistractionProcessor {
- OnDriverDistractionProcessor(
- OnDriverDistractionNotification& command,
- smart_objects::SmartObjectSPtr on_driver_distraction_so,
- ApplicationManager& application_manager)
- : command_(command)
- , on_driver_distraction_so_(on_driver_distraction_so)
- , application_manager_(application_manager)
- , stringified_function_id_(MessageHelper::StringifiedFunctionID(
- mobile_api::FunctionID::OnDriverDistractionID)) {}
-
- void operator()(ApplicationSharedPtr application) {
- if (application) {
- (*on_driver_distraction_so_)[strings::params][strings::connection_key] =
- application->app_id();
- const RPCParams params;
- policy::CheckPermissionResult result;
- application_manager_.GetPolicyHandler().CheckPermissions(
- application, stringified_function_id_, params, result);
- if (result.hmi_level_permitted != policy::kRpcAllowed) {
- MobileMessageQueue messages;
- application->SwapMobileMessageQueue(messages);
- messages.erase(
- std::remove_if(
- messages.begin(),
- messages.end(),
- [this](smart_objects::SmartObjectSPtr message) {
- return (*message)[strings::params][strings::function_id]
- .asString() == stringified_function_id_;
- }),
- messages.end());
- application->PushMobileMessage(on_driver_distraction_so_);
- return;
- }
- command_.SendNotificationToMobile(on_driver_distraction_so_);
- }
- }
-
- private:
- OnDriverDistractionNotification& command_;
- smart_objects::SmartObjectSPtr on_driver_distraction_so_;
- ApplicationManager& application_manager_;
- std::string stringified_function_id_;
-};
-}
-
-OnDriverDistractionNotification::OnDriverDistractionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
-
-void OnDriverDistractionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- const hmi_apis::Common_DriverDistractionState::eType state =
- static_cast<hmi_apis::Common_DriverDistractionState::eType>(
- (*message_)[strings::msg_params][hmi_notification::state].asInt());
- application_manager_.set_driver_distraction_state(state);
-
- smart_objects::SmartObjectSPtr on_driver_distraction =
- utils::MakeShared<smart_objects::SmartObject>();
-
- if (!on_driver_distraction) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- (*on_driver_distraction)[strings::params][strings::function_id] =
- mobile_api::FunctionID::OnDriverDistractionID;
- (*on_driver_distraction)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
- (*on_driver_distraction)[strings::msg_params][mobile_notification::state] =
- state;
-
- const ApplicationSet applications =
- application_manager_.applications().GetData();
-
- OnDriverDistractionProcessor processor(
- *this, on_driver_distraction, application_manager_);
- std::for_each(applications.begin(), applications.end(), processor);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_event_changed_notification.cc b/src/components/application_manager/src/commands/hmi/on_event_changed_notification.cc
deleted file mode 100644
index c211ffde50..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_event_changed_notification.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/on_event_changed_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnEventChangedNotification::OnEventChangedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnEventChangedNotification::~OnEventChangedNotification() {}
-
-void OnEventChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc b/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc
deleted file mode 100644
index cb68b21263..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc
+++ /dev/null
@@ -1,114 +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 "application_manager/commands/hmi/on_exit_all_applications_notification.h"
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <signal.h>
-
-#include "application_manager/application_manager.h"
-#include "application_manager/resumption/resume_ctrl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnExitAllApplicationsNotification::OnExitAllApplicationsNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {}
-
-void OnExitAllApplicationsNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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);
-
- mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
- mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM;
-
- switch (reason) {
- case hmi_apis::Common_ApplicationsCloseReason::IGNITION_OFF: {
- mob_reason = mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF;
- break;
- }
- case hmi_apis::Common_ApplicationsCloseReason::MASTER_RESET: {
- mob_reason = mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET;
- break;
- }
- case hmi_apis::Common_ApplicationsCloseReason::FACTORY_DEFAULTS: {
- mob_reason = mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS;
- break;
- }
- case hmi_apis::Common_ApplicationsCloseReason::SUSPEND: {
- application_manager_.resume_controller().OnSuspend();
- SendOnSDLPersistenceComplete();
- return;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Unknown Application close reason" << reason);
- return;
- }
- }
-
- application_manager_.SetUnregisterAllApplicationsReason(mob_reason);
-
- if (mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET == mob_reason ||
- mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS ==
- mob_reason) {
- application_manager_.HeadUnitReset(mob_reason);
- }
- kill(getpid(), SIGINT);
-}
-
-void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObjectSPtr message =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
- (*message)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete;
- (*message)[strings::params][strings::message_type] =
- MessageType::kNotification;
- (*message)[strings::params][strings::correlation_id] =
- application_manager_.GetNextHMICorrelationID();
-
- application_manager_.ManageHMICommand(message);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc b/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc
deleted file mode 100644
index efdfaf8f3e..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2017, 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/commands/hmi/on_exit_application_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/state_controller.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#ifdef SDL_REMOTE_CONTROL
-#include "functional_module/plugin_manager.h"
-#endif // SDL_REMOTE_CONTROL
-
-namespace application_manager {
-
-namespace commands {
-
-OnExitApplicationNotification::OnExitApplicationNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnExitApplicationNotification::~OnExitApplicationNotification() {}
-
-void OnExitApplicationNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- using namespace mobile_apis;
- using namespace hmi_apis;
-
- uint32_t app_id = (*message_)[strings::msg_params][strings::app_id].asUInt();
- ApplicationSharedPtr app_impl = application_manager_.application(app_id);
-
- if (!(app_impl.valid())) {
- LOG4CXX_ERROR(logger_, "Application does not exist");
- return;
- }
-
-#ifdef SDL_REMOTE_CONTROL
- application_manager_.GetPluginManager().OnApplicationEvent(
- functional_modules::ApplicationEvent::kApplicationExit, app_impl);
-#endif // SDL_REMOTE_CONTROL
-
- Common_ApplicationExitReason::eType reason;
- reason = static_cast<Common_ApplicationExitReason::eType>(
- (*message_)[strings::msg_params][strings::reason].asInt());
-
- switch (reason) {
- case Common_ApplicationExitReason::DRIVER_DISTRACTION_VIOLATION: {
- break;
- }
- case Common_ApplicationExitReason::USER_EXIT: {
- break;
- }
- case Common_ApplicationExitReason::UNAUTHORIZED_TRANSPORT_REGISTRATION: {
- application_manager_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app_id, AppInterfaceUnregisteredReason::APP_UNAUTHORIZED),
- commands::Command::ORIGIN_SDL);
- // HMI rejects registration for navi application
- application_manager_.UnregisterApplication(app_id, Result::SUCCESS);
- return;
- }
- case Common_ApplicationExitReason::UNSUPPORTED_HMI_RESOURCE: {
- application_manager_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app_id, AppInterfaceUnregisteredReason::UNSUPPORTED_HMI_RESOURCE),
- commands::Command::ORIGIN_SDL);
- application_manager_.UnregisterApplication(app_id, Result::SUCCESS);
- return;
- }
- default: {
- LOG4CXX_WARN(logger_, "Unhandled reason");
- return;
- }
- }
-
- application_manager_.state_controller().SetRegularState(
- app_impl, HMILevel::HMI_NONE, AudioStreamingState::NOT_AUDIBLE, false);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_file_removed_notification.cc b/src/components/application_manager/src/commands/hmi/on_file_removed_notification.cc
deleted file mode 100644
index e69d111d2c..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_file_removed_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_file_removed_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnFileRemovedNotification::OnFileRemovedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnFileRemovedNotification::~OnFileRemovedNotification() {}
-
-void OnFileRemovedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_find_applications.cc b/src/components/application_manager/src/commands/hmi/on_find_applications.cc
deleted file mode 100644
index 9d3633ba6d..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_find_applications.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_find_applications.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnFindApplications::OnFindApplications(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnFindApplications::~OnFindApplications() {}
-
-void OnFindApplications::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // TODO(PV): add UpdateAppsOnDevice to ApplicationManager
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ignition_cycle_over_notification.cc b/src/components/application_manager/src/commands/hmi/on_ignition_cycle_over_notification.cc
deleted file mode 100644
index 8c772d6dcd..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ignition_cycle_over_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_ignition_cycle_over_notification.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {}
-
-void OnIgnitionCycleOverNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager_.GetPolicyHandler().OnIgnitionCycleOver();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc b/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc
deleted file mode 100644
index e25de1f3a9..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {}
-
-void OnNaviTBTClientStateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnTBTClientStateID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc b/src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc
deleted file mode 100644
index 17d1b420be..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/on_navi_way_point_change_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& app_man)
- : NotificationFromHMI(message, app_man) {}
-
-OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {}
-
-void OnNaviWayPointChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnWayPointChangeID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_policy_update.cc b/src/components/application_manager/src/commands/hmi/on_policy_update.cc
deleted file mode 100644
index 39b179f967..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_policy_update.cc
+++ /dev/null
@@ -1,51 +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 "application_manager/commands/hmi/on_policy_update.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-namespace commands {
-
-OnPolicyUpdate::OnPolicyUpdate(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnPolicyUpdate::~OnPolicyUpdate() {}
-
-void OnPolicyUpdate::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager_.GetPolicyHandler().OnPTExchangeNeeded();
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_put_file_notification.cc b/src/components/application_manager/src/commands/hmi/on_put_file_notification.cc
deleted file mode 100644
index 596b7d4549..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_put_file_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_put_file_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnPutFileNotification::OnPutFileNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnPutFileNotification::~OnPutFileNotification() {}
-
-void OnPutFileNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ready_notification.cc b/src/components/application_manager/src/commands/hmi/on_ready_notification.cc
deleted file mode 100644
index 3a45e0f934..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ready_notification.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/on_ready_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnReadyNotification::OnReadyNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnReadyNotification::~OnReadyNotification() {}
-
-void OnReadyNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.OnHMIStartedCooperation();
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_received_policy_update.cc b/src/components/application_manager/src/commands/hmi/on_received_policy_update.cc
deleted file mode 100644
index 8724a072ed..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_received_policy_update.cc
+++ /dev/null
@@ -1,69 +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 <string>
-#include "application_manager/commands/hmi/on_received_policy_update.h"
-#include "application_manager/application_manager.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnReceivedPolicyUpdate::OnReceivedPolicyUpdate(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {}
-
-void OnReceivedPolicyUpdate::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-#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.");
- return;
- }
- application_manager_.GetPolicyHandler().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.");
-#endif
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_record_start_notification.cc b/src/components/application_manager/src/commands/hmi/on_record_start_notification.cc
deleted file mode 100644
index 4d126ac67d..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_record_start_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_record_start_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnRecordStartdNotification::OnRecordStartdNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnRecordStartdNotification::~OnRecordStartdNotification() {}
-
-void OnRecordStartdNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_resume_audio_source_notification.cc b/src/components/application_manager/src/commands/hmi/on_resume_audio_source_notification.cc
deleted file mode 100644
index ce3c371cf8..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_resume_audio_source_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_resume_audio_source_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnResumeAudioSourceNotification::OnResumeAudioSourceNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {}
-
-void OnResumeAudioSourceNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc b/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc
deleted file mode 100644
index 0517ea8d24..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_sdl_close_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSDLCloseNotification::OnSDLCloseNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnSDLCloseNotification::~OnSDLCloseNotification() {}
-
-void OnSDLCloseNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_sdl_consent_needed_notification.cc b/src/components/application_manager/src/commands/hmi/on_sdl_consent_needed_notification.cc
deleted file mode 100644
index a9c36813f6..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_sdl_consent_needed_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_sdl_consent_needed_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSDLConsentNeededNotification::OnSDLConsentNeededNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {}
-
-void OnSDLConsentNeededNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_sdl_persistence_complete_notification.cc b/src/components/application_manager/src/commands/hmi/on_sdl_persistence_complete_notification.cc
deleted file mode 100644
index e30a0fb902..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_sdl_persistence_complete_notification.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/on_sdl_persistence_complete_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnSDLPersistenceCompleteNotification::~OnSDLPersistenceCompleteNotification() {}
-
-void OnSDLPersistenceCompleteNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc b/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc
deleted file mode 100644
index 8e94b2b004..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_start_device_discovery.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnStartDeviceDiscovery::OnStartDeviceDiscovery(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {}
-
-void OnStartDeviceDiscovery::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.StartDevicesDiscovery();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_status_update_notification.cc b/src/components/application_manager/src/commands/hmi/on_status_update_notification.cc
deleted file mode 100644
index 78a6b68324..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_status_update_notification.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/on_status_update_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnStatusUpdateNotification::OnStatusUpdateNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnStatusUpdateNotification::~OnStatusUpdateNotification() {}
-
-void OnStatusUpdateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc b/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc
deleted file mode 100644
index 887aacf5b9..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc
+++ /dev/null
@@ -1,79 +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 "application_manager/commands/hmi/on_system_context_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/state_controller.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-namespace commands {
-
-OnSystemContextNotification::OnSystemContextNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnSystemContextNotification::~OnSystemContextNotification() {}
-
-void OnSystemContextNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- mobile_api::SystemContext::eType system_context =
- static_cast<mobile_api::SystemContext::eType>(
- (*message_)[strings::msg_params][hmi_notification::system_context]
- .asInt());
-
- ApplicationSharedPtr app;
- if ((mobile_api::SystemContext::SYSCTXT_VRSESSION == system_context) ||
- (mobile_api::SystemContext::SYSCTXT_MENU == system_context) ||
- (mobile_api::SystemContext::SYSCTXT_HMI_OBSCURED == system_context)) {
- app = application_manager_.active_application();
- } else if ((mobile_api::SystemContext::SYSCTXT_ALERT == system_context) ||
- (mobile_api::SystemContext::SYSCTXT_MAIN == system_context)) {
- if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
- app = application_manager_.application(
- (*message_)[strings::msg_params][strings::app_id].asUInt());
- }
- }
-
- if (app && mobile_api::SystemContext::INVALID_ENUM != system_context) {
- application_manager_.state_controller().SetRegularState(app,
- system_context);
- } else {
- LOG4CXX_ERROR(logger_, "Application does not exist");
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_system_error_notification.cc b/src/components/application_manager/src/commands/hmi/on_system_error_notification.cc
deleted file mode 100644
index 4885420f1c..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_system_error_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_system_error_notification.h"
-#include "application_manager/application_manager.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSystemErrorNotification::OnSystemErrorNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnSystemErrorNotification::~OnSystemErrorNotification() {}
-
-void OnSystemErrorNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const int code =
- (*message_)[strings::msg_params][hmi_notification::error].asInt();
-
- application_manager_.GetPolicyHandler().OnSystemError(code);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_system_info_changed_notification.cc b/src/components/application_manager/src/commands/hmi/on_system_info_changed_notification.cc
deleted file mode 100644
index 00b3649284..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_system_info_changed_notification.cc
+++ /dev/null
@@ -1,60 +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 "application_manager/commands/hmi/on_system_info_changed_notification.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSystemInfoChangedNotification::OnSystemInfoChangedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {}
-
-void OnSystemInfoChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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));
-
- application_manager_.GetPolicyHandler().OnSystemInfoChanged(language);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc b/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
deleted file mode 100644
index ea91dca5f1..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
+++ /dev/null
@@ -1,117 +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 "application_manager/application_impl.h"
-
-#include "application_manager/commands/hmi/on_system_request_notification.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-using policy::PolicyHandlerInterface;
-
-namespace application_manager {
-
-namespace commands {
-
-OnSystemRequestNotification::OnSystemRequestNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnSystemRequestNotification::~OnSystemRequestNotification() {}
-
-void OnSystemRequestNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObject& params = (*message_)[strings::params];
- smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
-
- params[strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
-
- // According to HMI API, this should be HMI unique id, but during processing
- // messages from HMI this param is replaced by connection key, so below it
- // will be treated as connection key
- 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.");
- 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.");
- const PolicyHandlerInterface& policy_handler =
- application_manager_.GetPolicyHandler();
- const uint32_t selected_app_id = policy_handler.GetAppIdForSending();
- if (0 == selected_app_id) {
- LOG4CXX_WARN(logger_,
- "Can't select application to forward OnSystemRequest.");
- return;
- }
- app = application_manager_.application(selected_app_id);
- }
-
- if (!app.valid()) {
- LOG4CXX_WARN(logger_,
- "No valid application found to forward OnSystemRequest.");
- return;
- }
-
- std::string device_mac;
- application_manager_.connection_handler()
- .get_session_observer()
- .GetDataOnDeviceID(app->device(), NULL, NULL, &device_mac, NULL);
-
- if (policy::kDeviceAllowed !=
- application_manager_.GetPolicyHandler().GetUserConsentForDevice(
- device_mac)) {
- LOG4CXX_WARN(logger_,
- "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());
-
- params[strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc b/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc
deleted file mode 100644
index bd152c2af0..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc
+++ /dev/null
@@ -1,93 +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 "application_manager/commands/hmi/on_tts_language_change_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {}
-
-void OnTTSLanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- 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(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
-
- (*message_)[strings::msg_params][strings::hmi_display_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();
- ApplicationSetIt it = accessor.begin();
- for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *it++;
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
-
- if (static_cast<int>(app->language()) !=
- (*message_)[strings::msg_params][strings::language].asInt()) {
- application_manager_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
- commands::Command::ORIGIN_SDL);
- application_manager_.UnregisterApplication(
- app->app_id(), mobile_apis::Result::SUCCESS, false);
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_tts_reset_timeout_notification.cc b/src/components/application_manager/src/commands/hmi/on_tts_reset_timeout_notification.cc
deleted file mode 100644
index 283e2056ba..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_tts_reset_timeout_notification.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "application_manager/commands/hmi/on_tts_reset_timeout_notification.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {}
-
-void OnTTSResetTimeoutNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc b/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc
deleted file mode 100644
index 317465f354..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/on_tts_started_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTTSStartedNotification::OnTTSStartedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnTTSStartedNotification::~OnTTSStartedNotification() {}
-
-void OnTTSStartedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::TTS_Started);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc b/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc
deleted file mode 100644
index 7f763d8598..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/on_tts_stopped_notification.h"
-
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTTSStoppedNotification::OnTTSStoppedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnTTSStoppedNotification::~OnTTSStoppedNotification() {}
-
-void OnTTSStoppedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_Stopped);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc b/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc
deleted file mode 100644
index 9f91d99a85..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc
+++ /dev/null
@@ -1,59 +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 "application_manager/commands/hmi/on_ui_command_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnUICommandNotification::OnUICommandNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnUICommandNotification::~OnUICommandNotification() {}
-
-void OnUICommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
-
- (*message_)[strings::msg_params][strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_MENU);
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc b/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc
deleted file mode 100644
index 117fec5741..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc
+++ /dev/null
@@ -1,61 +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 "application_manager/commands/hmi/on_ui_keyboard_input_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {}
-
-void OnUIKeyBoardInputNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnKeyboardInputID;
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc b/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
deleted file mode 100644
index 6e8e38f757..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
+++ /dev/null
@@ -1,92 +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 "application_manager/commands/hmi/on_ui_language_change_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnUILanguageChangeNotification::OnUILanguageChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {}
-
-void OnUILanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_active_ui_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
-
- (*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();
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
-
- const ApplicationSet& accessor =
- application_manager_.applications().GetData();
-
- ApplicationSetConstIt it = accessor.begin();
- for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *it++;
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
-
- if (app->ui_language() !=
- (*message_)[strings::msg_params][strings::hmi_display_language]
- .asInt()) {
- application_manager_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
- commands::Command::ORIGIN_SDL);
- application_manager_.UnregisterApplication(
- app->app_id(), mobile_apis::Result::SUCCESS, false);
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc b/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc
deleted file mode 100644
index a5fea7bf8d..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc
+++ /dev/null
@@ -1,61 +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 "application_manager/commands/hmi/on_ui_reset_timeout_notification.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnUIResetTimeoutNotification::OnUIResetTimeoutNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {}
-
-void OnUIResetTimeoutNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc b/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc
deleted file mode 100644
index 7709af8720..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc
+++ /dev/null
@@ -1,61 +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 "application_manager/commands/hmi/on_ui_touch_event_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnUITouchEventNotification::OnUITouchEventNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnUITouchEventNotification::~OnUITouchEventNotification() {}
-
-void OnUITouchEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnTouchEventID;
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_update_device_list.cc b/src/components/application_manager/src/commands/hmi/on_update_device_list.cc
deleted file mode 100644
index b245ea21aa..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_update_device_list.cc
+++ /dev/null
@@ -1,50 +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 "application_manager/commands/hmi/on_update_device_list.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnUpdateDeviceList::OnUpdateDeviceList(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnUpdateDeviceList::~OnUpdateDeviceList() {}
-
-void OnUpdateDeviceList::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
deleted file mode 100644
index 9b10055e2c..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {}
-
-void OnVIAccPedalPositionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc
deleted file mode 100644
index 58f9add514..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_belt_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIBeltStatusNotification::OnVIBeltStatusNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {}
-
-void OnVIBeltStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc
deleted file mode 100644
index 33f2944c38..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_body_information_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIBodyInformationNotification::OnVIBodyInformationNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {}
-
-void OnVIBodyInformationNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc
deleted file mode 100644
index 9cbf612be1..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_device_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIDeviceStatusNotification::OnVIDeviceStatusNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {}
-
-void OnVIDeviceStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc
deleted file mode 100644
index e521ac3a37..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_driver_braking_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIDriverBrakingNotification::OnVIDriverBrakingNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {}
-
-void OnVIDriverBrakingNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc
deleted file mode 100644
index ebed955270..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_engine_torque_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIEngineTorqueNotification::OnVIEngineTorqueNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {}
-
-void OnVIEngineTorqueNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc
deleted file mode 100644
index 9f0696fdc6..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_external_temperature_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {}
-
-void OnVIExternalTemperatureNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc
deleted file mode 100644
index ef650a9f99..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_fuel_level_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIFuelLevelNotification::OnVIFuelLevelNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {}
-
-void OnVIFuelLevelNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc
deleted file mode 100644
index a5267d8dac..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_fuel_level_state_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {}
-
-void OnVIFuelLevelStateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc
deleted file mode 100644
index 63b95bf6dc..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_gps_data_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIGpsDataNotification::OnVIGpsDataNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIGpsDataNotification::~OnVIGpsDataNotification() {}
-
-void OnVIGpsDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc
deleted file mode 100644
index 7d494f02d3..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_head_lamp_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {}
-
-void OnVIHeadLampStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
deleted file mode 100644
index a62f4cacea..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
+++ /dev/null
@@ -1,59 +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 "application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIInstantFuelConsumptionNotification::OnVIInstantFuelConsumptionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIInstantFuelConsumptionNotification::
- ~OnVIInstantFuelConsumptionNotification() {}
-
-void OnVIInstantFuelConsumptionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc
deleted file mode 100644
index 229d50667b..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_my_key_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIMyKeyNotification::OnVIMyKeyNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIMyKeyNotification::~OnVIMyKeyNotification() {}
-
-void OnVIMyKeyNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc
deleted file mode 100644
index 10f236539c..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_odometer_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIOdometerNotification::OnVIOdometerNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIOdometerNotification::~OnVIOdometerNotification() {}
-
-void OnVIOdometerNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc
deleted file mode 100644
index 81585eabca..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_prndl_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIPrndlNotification::OnVIPrndlNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIPrndlNotification::~OnVIPrndlNotification() {}
-
-void OnVIPrndlNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc
deleted file mode 100644
index b5c0703917..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_rpm_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIRpmNotification::OnVIRpmNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIRpmNotification::~OnVIRpmNotification() {}
-
-void OnVIRpmNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc
deleted file mode 100644
index aacafb71c9..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_speed_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVISpeedNotification::OnVISpeedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVISpeedNotification::~OnVISpeedNotification() {}
-
-void OnVISpeedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
deleted file mode 100644
index af102ea926..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {}
-
-void OnVISteeringWheelAngleNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc
deleted file mode 100644
index 99506e6171..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_tire_pressure_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVITirePressureNotification::OnVITirePressureNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVITirePressureNotification::~OnVITirePressureNotification() {}
-
-void OnVITirePressureNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc
deleted file mode 100644
index bba7e2f3ff..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc
+++ /dev/null
@@ -1,66 +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 "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIVehicleDataNotification::OnVIVehicleDataNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {}
-
-void OnVIVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
- if (msg_params.keyExists(strings::odometer)) {
- application_manager_.IviInfoUpdated(
- mobile_apis::VehicleDataType::VEHICLEDATA_ODOMETER,
- msg_params[strings::odometer].asInt());
- }
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc
deleted file mode 100644
index c360e41dff..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_vin_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIVinNotification::OnVIVinNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIVinNotification::~OnVIVinNotification() {}
-
-void OnVIVinNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc b/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc
deleted file mode 100644
index 08fb3f31d4..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/on_vi_wiper_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIWiperStatusNotification::OnVIWiperStatusNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {}
-
-void OnVIWiperStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc b/src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc
deleted file mode 100644
index ee0a91f5ef..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/on_video_data_streaming_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVideoDataStreamingNotification::OnVideoDataStreamingNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {}
-
-OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() {}
-
-void OnVideoDataStreamingNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc b/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc
deleted file mode 100644
index c609e2dc0a..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc
+++ /dev/null
@@ -1,104 +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 "application_manager/commands/hmi/on_vr_command_notification.h"
-
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/state_controller.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRCommandNotification::OnVRCommandNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVRCommandNotification::~OnVRCommandNotification() {}
-
-void OnVRCommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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 standart VR commands (i.e. "Help")
- if (cmd_id > max_cmd_id + 1) {
- LOG4CXX_INFO(logger_, "Switched App");
- const uint32_t app_id = cmd_id - max_cmd_id;
- ApplicationSharedPtr app = application_manager_.application(app_id);
- if (app) {
- application_manager_.state_controller().SetRegularState(
- app, mobile_apis::HMILevel::HMI_FULL, true);
- } else {
- LOG4CXX_ERROR(logger_, "Unable to find appication " << app_id);
- }
- return;
- }
-
- // Check if this is "Help"
- if (cmd_id == max_cmd_id + 1) {
- return;
- }
- const uint32_t app_id =
- (*message_)[strings::msg_params][strings::app_id].asUInt();
- ApplicationSharedPtr app = application_manager_.application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- /* check if perform interaction is active
- * if it is active we should sent to HMI DeleteCommand request
- * and PerformInterActionResponse to mobile
- */
- if (0 != app->is_perform_interaction_active()) {
- event_engine::Event event(hmi_apis::FunctionID::VR_OnCommand);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
- } else {
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
-
- (*message_)[strings::msg_params][strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR);
- SendNotificationToMobile(message_);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc b/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc
deleted file mode 100644
index bbdb55cde6..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc
+++ /dev/null
@@ -1,91 +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 "application_manager/commands/hmi/on_vr_language_change_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/state_controller.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRLanguageChangeNotification::OnVRLanguageChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {}
-
-void OnVRLanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_active_vr_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
-
- (*message_)[strings::msg_params][strings::hmi_display_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();
-
- ApplicationSetConstIt it = accessor.begin();
- for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *it++;
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
- if (static_cast<int32_t>(app->language()) !=
- (*message_)[strings::msg_params][strings::language].asInt()) {
- application_manager_.state_controller().SetRegularState(
- app, mobile_api::HMILevel::HMI_NONE, false);
-
- application_manager_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
- commands::Command::ORIGIN_SDL);
- application_manager_.UnregisterApplication(
- app->app_id(), mobile_apis::Result::SUCCESS, false);
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc b/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc
deleted file mode 100644
index 68942fcf01..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/on_vr_started_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRStartedNotification::OnVRStartedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVRStartedNotification::~OnVRStartedNotification() {}
-
-void OnVRStartedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VR_Started);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc b/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc
deleted file mode 100644
index e8f9fab847..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/on_vr_stopped_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRStoppedNotification::OnVRStoppedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {}
-
-OnVRStoppedNotification::~OnVRStoppedNotification() {}
-
-void OnVRStoppedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VR_Stopped);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/rc_get_capabilities_request.cc b/src/components/application_manager/src/commands/hmi/rc_get_capabilities_request.cc
deleted file mode 100644
index 32b296a3b9..0000000000
--- a/src/components/application_manager/src/commands/hmi/rc_get_capabilities_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/rc_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RCGetCapabilitiesRequest::RCGetCapabilitiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-RCGetCapabilitiesRequest::~RCGetCapabilitiesRequest() {}
-
-void RCGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/rc_get_capabilities_response.cc b/src/components/application_manager/src/commands/hmi/rc_get_capabilities_response.cc
deleted file mode 100644
index 82cbd7f128..0000000000
--- a/src/components/application_manager/src/commands/hmi/rc_get_capabilities_response.cc
+++ /dev/null
@@ -1,60 +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 "application_manager/commands/hmi/rc_get_capabilities_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RCGetCapabilitiesResponse::RCGetCapabilitiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-RCGetCapabilitiesResponse::~RCGetCapabilitiesResponse() {}
-
-void RCGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- bool capability_exists =
- (*message_)[strings::msg_params].keyExists(strings::rc_capability);
-
- if (capability_exists) {
- hmi_capabilities.set_rc_capability(
- (*message_)[strings::msg_params][strings::rc_capability]);
- }
- hmi_capabilities.set_rc_supported(capability_exists);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/rc_is_ready_request.cc b/src/components/application_manager/src/commands/hmi/rc_is_ready_request.cc
deleted file mode 100644
index a976ce1044..0000000000
--- a/src/components/application_manager/src/commands/hmi/rc_is_ready_request.cc
+++ /dev/null
@@ -1,99 +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 "application_manager/commands/hmi/rc_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RCIsReadyRequest::RCIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-RCIsReadyRequest::~RCIsReadyRequest() {}
-
-void RCIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- subscribe_on_event(hmi_apis::FunctionID::RC_IsReady, correlation_id());
- SendRequest();
-}
-
-void RCIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::RC_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received RC_IsReady event");
- unsubscribe_from_event(hmi_apis::FunctionID::RC_IsReady);
- const bool is_available = ChangeInterfaceState(
- application_manager_, message, HmiInterfaces::HMI_INTERFACE_RC);
-
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- hmi_capabilities.set_is_rc_cooperating(is_available);
- if (!is_available) {
- hmi_capabilities.set_rc_supported(false);
- }
-
- if (!CheckAvailabilityHMIInterfaces(application_manager_,
- HmiInterfaces::HMI_INTERFACE_RC)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_RC isn't available");
- return;
- }
- SendMessageToHMI();
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void RCIsReadyRequest::onTimeOut() {
- // Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void RCIsReadyRequest::SendMessageToHMI() {
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::RC_GetCapabilities, application_manager_));
- application_manager_.ManageHMICommand(get_capabilities);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/rc_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/rc_is_ready_response.cc
deleted file mode 100644
index 6756b294f3..0000000000
--- a/src/components/application_manager/src/commands/hmi/rc_is_ready_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/rc_is_ready_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RCIsReadyResponse::RCIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-RCIsReadyResponse::~RCIsReadyResponse() {}
-
-void RCIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::RC_IsReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/request_from_hmi.cc b/src/components/application_manager/src/commands/hmi/request_from_hmi.cc
deleted file mode 100644
index 5a4e7b149e..0000000000
--- a/src/components/application_manager/src/commands/hmi/request_from_hmi.cc
+++ /dev/null
@@ -1,108 +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 "application_manager/commands/hmi/request_from_hmi.h"
-#include "application_manager/application_manager.h"
-#include "utils/make_shared.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RequestFromHMI::RequestFromHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {
- // Replace HMI app id with Mobile connection id
- ReplaceHMIWithMobileAppId(*message);
-}
-
-RequestFromHMI::~RequestFromHMI() {}
-
-bool RequestFromHMI::Init() {
- return true;
-}
-
-bool RequestFromHMI::CleanUp() {
- return true;
-}
-
-void RequestFromHMI::Run() {}
-
-void RequestFromHMI::on_event(const event_engine::Event& event) {}
-
-void RequestFromHMI::SendResponse(
- const bool success,
- const uint32_t correlation_id,
- const hmi_apis::FunctionID::eType function_id,
- const hmi_apis::Common_Result::eType result_code) {
- smart_objects::SmartObjectSPtr message =
- ::utils::MakeShared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- FillCommonParametersOfSO(*message, correlation_id, function_id);
- (*message)[strings::params][strings::message_type] = MessageType::kResponse;
- (*message)[strings::params][hmi_response::code] = 0;
- (*message)[strings::msg_params][strings::success] = success;
- (*message)[strings::msg_params][strings::result_code] = result_code;
-
- application_manager_.ManageHMICommand(message);
-}
-
-void RequestFromHMI::SendErrorResponse(
- const uint32_t correlation_id,
- const hmi_apis::FunctionID::eType function_id,
- const hmi_apis::Common_Result::eType result_code,
- const std::string error_message) {
- smart_objects::SmartObjectSPtr message =
- ::utils::MakeShared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- FillCommonParametersOfSO(*message, correlation_id, function_id);
- (*message)[strings::params][strings::message_type] =
- MessageType::kErrorResponse;
- (*message)[strings::params][hmi_response::code] = result_code;
- (*message)[strings::params][strings::error_msg] = error_message;
-
- application_manager_.ManageHMICommand(message);
-}
-
-void RequestFromHMI::FillCommonParametersOfSO(
- smart_objects::SmartObject& message,
- const uint32_t correlation_id,
- const hmi_apis::FunctionID::eType function_id) {
- (message)[strings::params][strings::function_id] = function_id;
- (message)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (message)[strings::params][strings::protocol_version] = protocol_version_;
- (message)[strings::params][strings::correlation_id] = correlation_id;
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/request_to_hmi.cc b/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
deleted file mode 100644
index 6905e7cdef..0000000000
--- a/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
+++ /dev/null
@@ -1,87 +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 "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
- HmiInterfaces::InterfaceID interface) {
- const HmiInterfaces::InterfaceState state =
- application_manager.hmi_interfaces().GetInterfaceState(interface);
- return HmiInterfaces::STATE_NOT_AVAILABLE != state;
-}
-
-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;
- }
- return false;
-}
-
-RequestToHMI::RequestToHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
-
-RequestToHMI::~RequestToHMI() {}
-
-bool RequestToHMI::Init() {
- // Replace Mobile connection id with HMI app id
- return ReplaceMobileWithHMIAppId(*message_);
-}
-
-bool RequestToHMI::CleanUp() {
- return true;
-}
-
-void RequestToHMI::Run() {}
-
-void RequestToHMI::SendRequest() {
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/response_from_hmi.cc b/src/components/application_manager/src/commands/hmi/response_from_hmi.cc
deleted file mode 100644
index d6d5d95d07..0000000000
--- a/src/components/application_manager/src/commands/hmi/response_from_hmi.cc
+++ /dev/null
@@ -1,106 +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 "application_manager/commands/hmi/response_from_hmi.h"
-
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResponseFromHMI::ResponseFromHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {
- // If it is error response, shift info
- if ((*message)[strings::params].keyExists(hmi_response::message)) {
- (*message)[strings::msg_params][strings::info] =
- (*message)[strings::params][hmi_response::message];
- }
-
- // Replace HMI app id with Mobile connection id
- ReplaceHMIWithMobileAppId(*message);
-}
-
-ResponseFromHMI::~ResponseFromHMI() {}
-
-bool ResponseFromHMI::Init() {
- return true;
-}
-
-bool ResponseFromHMI::CleanUp() {
- return true;
-}
-
-void ResponseFromHMI::Run() {}
-
-void ResponseFromHMI::SendResponseToMobile(
- const MessageSharedPtr& message, ApplicationManager& application_manager) {
- (*message)[strings::params][strings::message_type] = MessageType::kResponse;
-
- application_manager_.ManageMobileCommand(message, ORIGIN_SDL);
-}
-
-void ResponseFromHMI::CreateHMIRequest(
- const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject& msg_params) const {
- smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
-
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
-
- // get hmi correlation id for chaining further request from this object
- const uint32_t hmi_correlation_id_ =
- application_manager_.GetNextHMICorrelationID();
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
- request[strings::params][strings::message_type] = MessageType::kRequest;
- request[strings::params][strings::function_id] = function_id;
- request[strings::params][strings::correlation_id] = hmi_correlation_id_;
- request[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- request[strings::params][strings::protocol_type] =
- CommandImpl::hmi_protocol_type_;
-
- request[strings::msg_params] = msg_params;
-
- if (!application_manager_.ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- return;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/response_to_hmi.cc b/src/components/application_manager/src/commands/hmi/response_to_hmi.cc
deleted file mode 100644
index de1e1e0fde..0000000000
--- a/src/components/application_manager/src/commands/hmi/response_to_hmi.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/hmi/response_to_hmi.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResponseToHMI::ResponseToHMI(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
-
-ResponseToHMI::~ResponseToHMI() {}
-
-bool ResponseToHMI::Init() {
- // Replace Mobile connection id with HMI app id
- return ReplaceMobileWithHMIAppId(*message_);
-}
-
-bool ResponseToHMI::CleanUp() {
- return true;
-}
-
-void ResponseToHMI::Run() {
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc b/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
deleted file mode 100644
index 6961c15f76..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
+++ /dev/null
@@ -1,288 +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 "application_manager/commands/hmi/sdl_activate_app_request.h"
-#include "application_manager/state_controller.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace {
-struct ProtoV4AppsOnDevice : std::unary_function<ApplicationSharedPtr, bool> {
- connection_handler::DeviceHandle handle_;
- ProtoV4AppsOnDevice(const connection_handler::DeviceHandle handle)
- : handle_(handle) {}
- bool operator()(const ApplicationSharedPtr app) const {
- return app
- ? handle_ == app->device() &&
- Message::is_sufficient_version(
- protocol_handler::MajorProtocolVersion::
- PROTOCOL_VERSION_4,
- app->protocol_version())
- : false;
- }
-};
-
-struct ForegroundApp
- : std::unary_function<SDLActivateAppRequest::V4ProtoApps::value_type,
- bool> {
- bool operator()(
- const SDLActivateAppRequest::V4ProtoApps::value_type ptr) const {
- return ptr ? ptr->is_foreground() : false;
- }
-};
-
-struct SendLaunchApp
- : std::unary_function<SDLActivateAppRequest::V4ProtoApps::value_type,
- void> {
- ApplicationConstSharedPtr app_to_launch_;
- ApplicationManager& application_manager_;
- SendLaunchApp(ApplicationConstSharedPtr app_to_launch, ApplicationManager& am)
- : app_to_launch_(app_to_launch), application_manager_(am) {}
- void operator()(
- const SDLActivateAppRequest::V4ProtoApps::value_type ptr) const {
- MessageHelper::SendLaunchApp((*ptr).app_id(),
- app_to_launch_->SchemaUrl(),
- app_to_launch_->PackageName(),
- application_manager_);
- return;
- }
-};
-}
-
-SDLActivateAppRequest::SDLActivateAppRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {}
-
-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.");
- return 0;
- }
- if (!(*message_)[msg_params].keyExists(strings::app_id)) {
- LOG4CXX_DEBUG(logger_,
- strings::app_id << " section is absent in the message.");
- return 0;
- }
- return (*message_)[msg_params][strings::app_id].asUInt();
-}
-
-#ifdef EXTERNAL_PROPRIETARY_MODE
-void SDLActivateAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace hmi_apis::FunctionID;
-
- if (application_manager_.state_controller().IsStateActive(
- HmiState::STATE_ID_DEACTIVATE_HMI)) {
- LOG4CXX_DEBUG(logger_,
- "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 {
- const uint32_t application_id = app_id();
- application_manager_.GetPolicyHandler().OnActivateApp(application_id,
- correlation_id());
- }
-}
-
-#else // EXTERNAL_PROPRIETARY_MODE
-void SDLActivateAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace hmi_apis::FunctionID;
- using namespace hmi_apis::Common_Result;
-
- const uint32_t application_id = app_id();
-
- ApplicationConstSharedPtr app_to_activate =
- application_manager_.application(application_id);
-
- if (!app_to_activate) {
- LOG4CXX_WARN(
- logger_,
- "Can't find application within regular apps: " << application_id);
-
- // Here is the hack - in fact SDL gets hmi_app_id in appID field and
- // replaces it with connection_key only for normally registered apps, but
- // for apps_to_be_registered (waiting) it keeps original value (hmi_app_id)
- // so method does lookup for hmi_app_id
- app_to_activate =
- application_manager_.WaitingApplicationByID(application_id);
-
- if (!app_to_activate) {
- LOG4CXX_WARN(
- logger_,
- "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());
-
- 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");
- SendErrorResponse(correlation_id(),
- static_cast<hmi_apis::FunctionID::eType>(function_id()),
- hmi_apis::Common_Result::REJECTED,
- "HMIDeactivate is active");
- return;
- }
-
- if (app_to_activate->IsRegistered()) {
- LOG4CXX_DEBUG(logger_, "Application is registered. Activating.");
- application_manager_.GetPolicyHandler().OnActivateApp(application_id,
- correlation_id());
- return;
- }
-
- connection_handler::DeviceHandle device_handle = app_to_activate->device();
- ApplicationSharedPtr foreground_v4_app = get_foreground_app(device_handle);
- 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);
- SendErrorResponse(
- correlation_id(), SDL_ActivateApp, NO_APPS_REGISTERED, "");
- return;
- }
-
- LOG4CXX_DEBUG(logger_,
- "Application is not registered yet. "
- "Sending launch request.");
-
- if (foreground_v4_app) {
- LOG4CXX_DEBUG(logger_, "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.");
- std::for_each(v4_proto_apps.begin(),
- v4_proto_apps.end(),
- SendLaunchApp(app_to_activate, application_manager_));
- }
-
- subscribe_on_event(BasicCommunication_OnAppRegistered);
-}
-
-#endif // EXTERNAL_PROPRIETARY_MODE
-void SDLActivateAppRequest::onTimeOut() {
- using namespace hmi_apis::FunctionID;
- using namespace hmi_apis::Common_Result;
- using namespace application_manager;
- unsubscribe_from_event(BasicCommunication_OnAppRegistered);
- SendErrorResponse(
- correlation_id(), SDL_ActivateApp, APPLICATION_NOT_REGISTERED, "");
-}
-
-void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
- using namespace hmi_apis::FunctionID;
- if (event.id() != BasicCommunication_OnAppRegistered) {
- return;
- }
- unsubscribe_from_event(BasicCommunication_OnAppRegistered);
-
- // Have to use HMI app id from event, since HMI app id from original request
- // message will be changed after app, initially requested for launch via
- // SDL.ActivateApp, will be registered
- const uint32_t hmi_application_id = hmi_app_id(event.smart_object());
-
- 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);
- return;
- }
- application_manager_.GetPolicyHandler().OnActivateApp(app->app_id(),
- correlation_id());
-}
-
-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.");
- return 0;
- }
- if (!so[msg_params].keyExists(application)) {
- LOG4CXX_DEBUG(logger_, 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.");
- return 0;
- }
- return so[msg_params][application][strings::app_id].asUInt();
-}
-
-SDLActivateAppRequest::V4ProtoApps SDLActivateAppRequest::get_v4_proto_apps(
- const connection_handler::DeviceHandle handle) const {
- const ApplicationSet app_list = application_manager_.applications().GetData();
- V4ProtoApps v4_proto_apps;
- std::copy_if(app_list.begin(),
- app_list.end(),
- std::back_inserter(v4_proto_apps),
- ProtoV4AppsOnDevice(handle));
- return v4_proto_apps;
-}
-
-ApplicationSharedPtr SDLActivateAppRequest::get_foreground_app(
- const connection_handler::DeviceHandle handle) const {
- V4ProtoApps v4_proto_apps = get_v4_proto_apps(handle);
- V4ProtoApps::iterator foreground_app =
- std::find_if(v4_proto_apps.begin(), v4_proto_apps.end(), ForegroundApp());
- return foreground_app != v4_proto_apps.end() ? *foreground_app
- : ApplicationSharedPtr();
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_activate_app_response.cc b/src/components/application_manager/src/commands/hmi/sdl_activate_app_response.cc
deleted file mode 100644
index 75a8c0b241..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_activate_app_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/sdl_activate_app_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLActivateAppResponse::SDLActivateAppResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseToHMI(message, application_manager) {}
-
-SDLActivateAppResponse::~SDLActivateAppResponse() {}
-
-void SDLActivateAppResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_request.cc b/src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_request.cc
deleted file mode 100644
index 4b150cda60..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_request.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/sdl_get_list_of_permissions_request.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {}
-
-SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {}
-
-void SDLGetListOfPermissionsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- uint32_t connection_key = 0;
- if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
- connection_key = (*message_)[strings::msg_params][strings::app_id].asUInt();
- }
- application_manager_.GetPolicyHandler().OnGetListOfPermissions(
- connection_key,
- (*message_)[strings::params][strings::correlation_id].asUInt());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_response.cc b/src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_response.cc
deleted file mode 100644
index 521b59a0ec..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/sdl_get_list_of_permissions_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLGetListOfPermissionsResponse::SDLGetListOfPermissionsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseToHMI(message, application_manager) {}
-
-SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {}
-
-void SDLGetListOfPermissionsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_status_update_request.cc b/src/components/application_manager/src/commands/hmi/sdl_get_status_update_request.cc
deleted file mode 100644
index afa7569746..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_get_status_update_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/sdl_get_status_update_request.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {}
-
-SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {}
-
-void SDLGetStatusUpdateRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager_.GetPolicyHandler().OnGetStatusUpdate(
- (*message_)[strings::params][strings::correlation_id].asUInt());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_status_update_response.cc b/src/components/application_manager/src/commands/hmi/sdl_get_status_update_response.cc
deleted file mode 100644
index 0af7e0217a..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_get_status_update_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/sdl_get_status_update_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLGetStatusUpdateResponse::SDLGetStatusUpdateResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseToHMI(message, application_manager) {}
-
-SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {}
-
-void SDLGetStatusUpdateResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc b/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc
deleted file mode 100644
index ea959389ef..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc
+++ /dev/null
@@ -1,87 +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 "application_manager/commands/hmi/sdl_get_user_friendly_message_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {}
-
-SDLGetUserFriendlyMessageRequest::~SDLGetUserFriendlyMessageRequest() {}
-
-void SDLGetUserFriendlyMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- const std::string messageCodes = "messageCodes";
- if (!(*message_)[strings::msg_params].keyExists(messageCodes)) {
- LOG4CXX_WARN(logger_,
- "Mandatory parameter '" + messageCodes + "'' is missing");
- return;
- }
- smart_objects::SmartArray* msg =
- (*message_)[strings::msg_params][messageCodes].asArray();
-
- std::vector<std::string> msg_codes;
-
- 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 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));
- } else {
- hmi_apis::Common_Language::eType ui_language =
- application_manager_.hmi_capabilities().active_ui_language();
-
- required_language =
- application_manager::MessageHelper::CommonLanguageToString(ui_language);
- }
-
- application_manager_.GetPolicyHandler().OnGetUserFriendlyMessage(
- msg_codes,
- required_language,
- (*message_)[strings::params][strings::correlation_id].asInt());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_response.cc b/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_response.cc
deleted file mode 100644
index c693625dbb..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/sdl_get_user_friendly_message_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLGetUserFriendlyMessageResponse::SDLGetUserFriendlyMessageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseToHMI(message, application_manager) {}
-
-SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {}
-
-void SDLGetUserFriendlyMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_policy_update.cc b/src/components/application_manager/src/commands/hmi/sdl_policy_update.cc
deleted file mode 100644
index f1fb9ccead..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_policy_update.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/sdl_policy_update.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SDLPolicyUpdate::SDLPolicyUpdate(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-SDLPolicyUpdate::~SDLPolicyUpdate() {}
-
-void SDLPolicyUpdate::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-#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.");
-#endif
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/sdl_policy_update_response.cc b/src/components/application_manager/src/commands/hmi/sdl_policy_update_response.cc
deleted file mode 100644
index 38b57a5b9f..0000000000
--- a/src/components/application_manager/src/commands/hmi/sdl_policy_update_response.cc
+++ /dev/null
@@ -1,50 +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 "application_manager/commands/hmi/sdl_policy_update_response.h"
-
-namespace application_manager {
-
-namespace commands {
-SDLPolicyUpdateResponse::SDLPolicyUpdateResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {}
-
-void SDLPolicyUpdateResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- // TODO(PV): add some logic here
-}
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc b/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc
deleted file mode 100644
index bb1f29d889..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_change_registration_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSChangeRegistrationRequest::TTSChangeRegistrationRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {}
-
-void TTSChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc b/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc
deleted file mode 100644
index e63ee5f74d..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/tts_change_registration_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSChangeRegistratioResponse::TTSChangeRegistratioResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {}
-
-void TTSChangeRegistratioResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_ChangeRegistration);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc b/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc
deleted file mode 100644
index 4dbf5e8ee7..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {}
-
-void TTSGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc b/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc
deleted file mode 100644
index ce629b36d7..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/hmi/tts_get_capabilities_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {}
-
-void TTSGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- if ((*message_)[strings::msg_params].keyExists(
- 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(
- (*message_)[strings::msg_params]
- [hmi_response::prerecorded_speech_capabilities]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc b/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc
deleted file mode 100644
index c44667a223..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_get_language_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetLanguageRequest::TTSGetLanguageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSGetLanguageRequest::~TTSGetLanguageRequest() {}
-
-void TTSGetLanguageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc b/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
deleted file mode 100644
index 37aed2c6cb..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
+++ /dev/null
@@ -1,71 +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 "application_manager/commands/hmi/tts_get_language_response.h"
-
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetLanguageResponse::TTSGetLanguageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSGetLanguageResponse::~TTSGetLanguageResponse() {}
-
-void TTSGetLanguageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace hmi_apis;
-
- Common_Language::eType language = Common_Language::INVALID_ENUM;
-
- if ((*message_).keyExists(strings::msg_params) &&
- (*message_)[strings::msg_params].keyExists(hmi_response::language)) {
- language = static_cast<Common_Language::eType>(
- (*message_)[strings::msg_params][hmi_response::language].asInt());
- }
-
- application_manager_.hmi_capabilities().set_active_tts_language(language);
-
- LOG4CXX_DEBUG(logger_,
- "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());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc b/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc
deleted file mode 100644
index 941adca01d..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_get_supported_languages_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {}
-
-void TTSGetSupportedLanguagesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc b/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc
deleted file mode 100644
index 79af1d3cc2..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/hmi/tts_get_supported_languages_response.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {}
-
-void TTSGetSupportedLanguagesResponse::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());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_tts_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc b/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc
deleted file mode 100644
index 71e89dd9b9..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc
+++ /dev/null
@@ -1,106 +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 "application_manager/commands/hmi/tts_is_ready_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSIsReadyRequest::TTSIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-TTSIsReadyRequest::~TTSIsReadyRequest() {}
-
-void TTSIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- subscribe_on_event(hmi_apis::FunctionID::TTS_IsReady, correlation_id());
- SendRequest();
-}
-
-void TTSIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::TTS_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received TTS_IsReady event");
- unsubscribe_from_event(hmi_apis::FunctionID::TTS_IsReady);
- const bool is_available = ChangeInterfaceState(
- application_manager_, message, HmiInterfaces::HMI_INTERFACE_TTS);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- hmi_capabilities.set_is_tts_cooperating(is_available);
- if (!CheckAvailabilityHMIInterfaces(application_manager_,
- HmiInterfaces::HMI_INTERFACE_TTS)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_TTS isn't available");
- return;
- }
- SendMessageToHMI();
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void TTSIsReadyRequest::onTimeOut() {
- // Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void TTSIsReadyRequest::SendMessageToHMI() {
- utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_GetLanguage,
- application_manager_));
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- hmi_capabilities.set_handle_response_for(*get_language);
- application_manager_.ManageHMICommand(get_language);
- utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetSupportedLanguages,
- application_manager_));
- application_manager_.ManageHMICommand(get_all_languages);
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetCapabilities, application_manager_));
- application_manager_.ManageHMICommand(get_capabilities);
-}
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc
deleted file mode 100644
index 30e2f4816b..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_is_ready_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSIsReadyResponse::TTSIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSIsReadyResponse::~TTSIsReadyResponse() {}
-
-void TTSIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::TTS_IsReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc b/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc
deleted file mode 100644
index bf035ffe23..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_set_global_properties_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {}
-
-void TTSSetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc b/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc
deleted file mode 100644
index f494fb1a8e..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/tts_set_global_properties_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {}
-
-void TTSSetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_speak_request.cc b/src/components/application_manager/src/commands/hmi/tts_speak_request.cc
deleted file mode 100644
index 2e386449d0..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_speak_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_speak_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSpeakRequest::TTSSpeakRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSSpeakRequest::~TTSSpeakRequest() {}
-
-void TTSSpeakRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_speak_response.cc b/src/components/application_manager/src/commands/hmi/tts_speak_response.cc
deleted file mode 100644
index 5cffdccf34..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_speak_response.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/hmi/tts_speak_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSpeakResponse::TTSSpeakResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSSpeakResponse::~TTSSpeakResponse() {}
-
-void TTSSpeakResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc b/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc
deleted file mode 100644
index c2275dda72..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/tts_stop_speaking_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSStopSpeakingRequest::TTSStopSpeakingRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {}
-
-void TTSStopSpeakingRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc b/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc
deleted file mode 100644
index 67d747f464..0000000000
--- a/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/tts_stop_speaking_response.h"
-
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSStopSpeakingResponse::TTSStopSpeakingResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {}
-
-void TTSStopSpeakingResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_StopSpeaking);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc b/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc
deleted file mode 100644
index c0edad3f80..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_add_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddCommandRequest::UIAddCommandRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIAddCommandRequest::~UIAddCommandRequest() {}
-
-void UIAddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc b/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc
deleted file mode 100644
index a7eaabc91e..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_add_command_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddCommandResponse::UIAddCommandResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIAddCommandResponse::~UIAddCommandResponse() {}
-
-void UIAddCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_AddCommand);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc b/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc
deleted file mode 100644
index f0a233853c..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_add_submenu_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddSubmenuRequest::UIAddSubmenuRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIAddSubmenuRequest::~UIAddSubmenuRequest() {}
-
-void UIAddSubmenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc b/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc
deleted file mode 100644
index 6c6c18cbad..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_add_submenu_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddSubmenuResponse::UIAddSubmenuResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIAddSubmenuResponse::~UIAddSubmenuResponse() {}
-
-void UIAddSubmenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_AddSubMenu);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_alert_request.cc b/src/components/application_manager/src/commands/hmi/ui_alert_request.cc
deleted file mode 100644
index 44673d4981..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_alert_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_alert_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAlertRequest::UIAlertRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIAlertRequest::~UIAlertRequest() {}
-
-void UIAlertRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_alert_response.cc b/src/components/application_manager/src/commands/hmi/ui_alert_response.cc
deleted file mode 100644
index 6d552a1eb7..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_alert_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_alert_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAlertResponse::UIAlertResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIAlertResponse::~UIAlertResponse() {}
-
-void UIAlertResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_Alert);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc b/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc
deleted file mode 100644
index dcc88125fc..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_change_registration_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIChangeRegistrationRequest::UIChangeRegistrationRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {}
-
-void UIChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc b/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc
deleted file mode 100644
index 52805a93c8..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_change_registration_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIChangeRegistratioResponse::UIChangeRegistratioResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {}
-
-void UIChangeRegistratioResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_ChangeRegistration);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc b/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc
deleted file mode 100644
index 7bd529e8dc..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_delete_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteCommandRequest::UIDeleteCommandRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIDeleteCommandRequest::~UIDeleteCommandRequest() {}
-
-void UIDeleteCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc b/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc
deleted file mode 100644
index 74a1bd64c2..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_delete_command_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteCommandResponse::UIDeleteCommandResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIDeleteCommandResponse::~UIDeleteCommandResponse() {}
-
-void UIDeleteCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_DeleteCommand);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc b/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc
deleted file mode 100644
index 335d97eee4..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_delete_submenu_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {}
-
-void UIDeleteSubmenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc b/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc
deleted file mode 100644
index 302343da5e..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_delete_submenu_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteSubmenuResponse::UIDeleteSubmenuResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {}
-
-void UIDeleteSubmenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc
deleted file mode 100644
index e1cd11f922..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_end_audio_pass_thru_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIEndAudioPassThruRequest::UIEndAudioPassThruRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {}
-
-void UIEndAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc b/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc
deleted file mode 100644
index e9eb596b85..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_end_audio_pass_thru_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIEndAudioPassThruResponse::UIEndAudioPassThruResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {}
-
-void UIEndAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc b/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc
deleted file mode 100644
index 0ae4258d6b..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetCapabilitiesRequest::UIGetCapabilitiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {}
-
-void UIGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc b/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc
deleted file mode 100644
index 3b5aeac639..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc
+++ /dev/null
@@ -1,112 +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 "application_manager/commands/hmi/ui_get_capabilities_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetCapabilitiesResponse::UIGetCapabilitiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {}
-
-void UIGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- if (msg_params.keyExists(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(
- msg_params[hmi_response::hmi_zone_capabilities]);
- }
-
- if (msg_params.keyExists(hmi_response::soft_button_capabilities)) {
- hmi_capabilities.set_soft_button_capabilities(
- msg_params[hmi_response::soft_button_capabilities]);
- }
-
- if (msg_params.keyExists(strings::audio_pass_thru_capabilities)) {
- hmi_capabilities.set_audio_pass_thru_capabilities(
- msg_params[strings::audio_pass_thru_capabilities]);
- }
-
- if (msg_params.keyExists(strings::hmi_capabilities)) {
- if (msg_params[strings::hmi_capabilities].keyExists(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(
- 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(
- 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]);
- }
- if (msg_params[strings::system_capabilities].keyExists(
- strings::phone_capability)) {
- hmi_capabilities.set_phone_capability(
- msg_params[strings::system_capabilities][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]);
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc b/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc
deleted file mode 100644
index 59d9eef6e3..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_get_language_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetLanguageRequest::UIGetLanguageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIGetLanguageRequest::~UIGetLanguageRequest() {}
-
-void UIGetLanguageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc b/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
deleted file mode 100644
index dfbdb89804..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
+++ /dev/null
@@ -1,72 +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 "application_manager/commands/hmi/ui_get_language_response.h"
-
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetLanguageResponse::UIGetLanguageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIGetLanguageResponse::~UIGetLanguageResponse() {}
-
-void UIGetLanguageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace hmi_apis;
-
- Common_Language::eType language = Common_Language::INVALID_ENUM;
-
- if ((*message_).keyExists(strings::msg_params) &&
- (*message_)[strings::msg_params].keyExists(hmi_response::language)) {
- language = static_cast<Common_Language::eType>(
- (*message_)[strings::msg_params][hmi_response::language].asInt());
- }
-
- application_manager_.hmi_capabilities().set_active_ui_language(language);
-
- LOG4CXX_DEBUG(logger_,
- "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());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc b/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc
deleted file mode 100644
index 598ff39f79..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_get_supported_languages_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {}
-
-void UIGetSupportedLanguagesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc b/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc
deleted file mode 100644
index e5849f5f63..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/hmi/ui_get_supported_languages_response.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {}
-
-void UIGetSupportedLanguagesResponse::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());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_ui_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc b/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc
deleted file mode 100644
index 9e27e23d34..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc
+++ /dev/null
@@ -1,106 +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 "application_manager/commands/hmi/ui_is_ready_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIIsReadyRequest::UIIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-UIIsReadyRequest::~UIIsReadyRequest() {}
-
-void UIIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- subscribe_on_event(hmi_apis::FunctionID::UI_IsReady, correlation_id());
- SendRequest();
-}
-
-void UIIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received UI_IsReady event");
- unsubscribe_from_event(hmi_apis::FunctionID::UI_IsReady);
- const bool is_available = ChangeInterfaceState(
- application_manager_, message, HmiInterfaces::HMI_INTERFACE_UI);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- hmi_capabilities.set_is_ui_cooperating(is_available);
- if (!CheckAvailabilityHMIInterfaces(application_manager_,
- HmiInterfaces::HMI_INTERFACE_UI)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_UI isn't available");
- return;
- }
- SendMessageToHMI();
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void UIIsReadyRequest::onTimeOut() {
- // Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void UIIsReadyRequest::SendMessageToHMI() {
- utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetLanguage,
- application_manager_));
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- hmi_capabilities.set_handle_response_for(*get_language);
- application_manager_.ManageHMICommand(get_language);
- utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetSupportedLanguages,
- application_manager_));
- application_manager_.ManageHMICommand(get_all_languages);
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetCapabilities, application_manager_));
- application_manager_.ManageHMICommand(get_capabilities);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc
deleted file mode 100644
index 088baeb8b2..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/ui_is_ready_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIIsReadyResponse::UIIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIIsReadyResponse::~UIIsReadyResponse() {}
-
-void UIIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_IsReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
deleted file mode 100644
index a88719d303..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {}
-
-void UIPerformAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc b/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
deleted file mode 100644
index 0736cca526..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {}
-
-void UIPerformAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc b/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc
deleted file mode 100644
index 82a900f1ae..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_perform_interaction_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformInteractionRequest::UIPerformInteractionRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIPerformInteractionRequest::~UIPerformInteractionRequest() {}
-
-void UIPerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc b/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc
deleted file mode 100644
index ea78c0cd66..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/ui_perform_interaction_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformInteractionResponse::UIPerformInteractionResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIPerformInteractionResponse::~UIPerformInteractionResponse() {}
-
-void UIPerformInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::UI_PerformInteraction);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc b/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc
deleted file mode 100644
index 006944d404..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_scrollable_message_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIScrollableMessageRequest::UIScrollableMessageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIScrollableMessageRequest::~UIScrollableMessageRequest() {}
-
-void UIScrollableMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc b/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc
deleted file mode 100644
index c39a99fc61..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_scrollable_message_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIScrollableMessageResponse::UIScrollableMessageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIScrollableMessageResponse::~UIScrollableMessageResponse() {}
-
-void UIScrollableMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_send_haptic_data_request.cc b/src/components/application_manager/src/commands/hmi/ui_send_haptic_data_request.cc
deleted file mode 100644
index 9484906a17..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_send_haptic_data_request.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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/commands/hmi/ui_send_haptic_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISendHapticDataRequest::UISendHapticDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UISendHapticDataRequest::~UISendHapticDataRequest() {}
-
-void UISendHapticDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_send_haptic_data_response.cc b/src/components/application_manager/src/commands/hmi/ui_send_haptic_data_response.cc
deleted file mode 100644
index a8239a40e8..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_send_haptic_data_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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/commands/hmi/ui_send_haptic_data_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISendHapticDataResponse::UISendHapticDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UISendHapticDataResponse::~UISendHapticDataResponse() {}
-
-void UISendHapticDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::UI_SendHapticData);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc
deleted file mode 100644
index 2666eedfc8..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_set_app_icon_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetAppIconRequest::UISetAppIconRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UISetAppIconRequest::~UISetAppIconRequest() {}
-
-void UISetAppIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc b/src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc
deleted file mode 100644
index 18fc5a5761..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_set_app_icon_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetAppIconResponse::UISetAppIconResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UISetAppIconResponse::~UISetAppIconResponse() {}
-
-void UISetAppIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc
deleted file mode 100644
index cd69c9c8e6..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/ui_set_display_layout_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {}
-
-void UiSetDisplayLayoutRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc b/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc
deleted file mode 100644
index c5a439636f..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/ui_set_display_layout_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {}
-
-void UiSetDisplayLayoutResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc
deleted file mode 100644
index 8658a043b0..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_set_global_properties_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {}
-
-void UISetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc b/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc
deleted file mode 100644
index d10c206a7c..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_set_global_properties_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {}
-
-void UISetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
deleted file mode 100644
index 1653ec0744..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_set_icon_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetIconRequest::UISetIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UISetIconRequest::~UISetIconRequest() {}
-
-void UISetIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc
deleted file mode 100644
index 955cb1d57b..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_set_media_clock_timer_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetMediaClockTimerRequest::UISetMediaClockTimerRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {}
-
-void UISetMediaClockTimerRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc b/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc
deleted file mode 100644
index 32acef4994..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_set_media_clock_timer_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetMediaClockTimerResponse::UISetMediaClockTimerResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {}
-
-void UISetMediaClockTimerResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_show_request.cc b/src/components/application_manager/src/commands/hmi/ui_show_request.cc
deleted file mode 100644
index 9c0e90feff..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_show_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_show_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIShowRequest::UIShowRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UIShowRequest::~UIShowRequest() {}
-
-void UIShowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_show_response.cc b/src/components/application_manager/src/commands/hmi/ui_show_response.cc
deleted file mode 100644
index 333d9e96c5..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_show_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/ui_show_response.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIShowResponse::UIShowResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UIShowResponse::~UIShowResponse() {}
-
-void UIShowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_Show);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_slider_request.cc b/src/components/application_manager/src/commands/hmi/ui_slider_request.cc
deleted file mode 100644
index 26e6ed76b0..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_slider_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/ui_slider_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISliderRequest::UISliderRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UISliderRequest::~UISliderRequest() {}
-
-void UISliderRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_slider_response.cc b/src/components/application_manager/src/commands/hmi/ui_slider_response.cc
deleted file mode 100644
index 091eb50e0d..0000000000
--- a/src/components/application_manager/src/commands/hmi/ui_slider_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/ui_slider_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISliderResponse::UISliderResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UISliderResponse::~UISliderResponse() {}
-
-void UISliderResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::UI_Slider);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/update_app_list_request.cc b/src/components/application_manager/src/commands/hmi/update_app_list_request.cc
deleted file mode 100644
index 286d269727..0000000000
--- a/src/components/application_manager/src/commands/hmi/update_app_list_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/update_app_list_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateAppListRequest::UpdateAppListRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UpdateAppListRequest::~UpdateAppListRequest() {}
-
-void UpdateAppListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/update_app_list_response.cc b/src/components/application_manager/src/commands/hmi/update_app_list_response.cc
deleted file mode 100644
index 6546d03805..0000000000
--- a/src/components/application_manager/src/commands/hmi/update_app_list_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/update_app_list_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateAppListResponse::UpdateAppListResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UpdateAppListResponse::~UpdateAppListResponse() {}
-
-void UpdateAppListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // TODO(PV): add check
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/update_device_list_request.cc b/src/components/application_manager/src/commands/hmi/update_device_list_request.cc
deleted file mode 100644
index 74d104b36d..0000000000
--- a/src/components/application_manager/src/commands/hmi/update_device_list_request.cc
+++ /dev/null
@@ -1,94 +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 "application_manager/commands/hmi/update_device_list_request.h"
-
-#include "interfaces/HMI_API.h"
-
-#include <unistd.h>
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateDeviceListRequest::UpdateDeviceListRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager_.event_dispatcher()) {}
-
-UpdateDeviceListRequest::~UpdateDeviceListRequest() {}
-
-void UpdateDeviceListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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
- // exclude
- // hit code to RTC
- if (true == application_manager_.get_settings().launch_hmi()) {
- if (!application_manager_.IsHMICooperating()) {
- LOG4CXX_INFO(logger_, "Wait for HMI Cooperation");
- subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
- termination_condition_.Wait(auto_lock);
- LOG4CXX_DEBUG(logger_, "HMI Cooperation OK");
- }
- }
-
- SendRequest();
-}
-
-void UpdateDeviceListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- switch (event.id()) {
- case hmi_apis::FunctionID::BasicCommunication_OnReady: {
- LOG4CXX_INFO(logger_, "received OnReady");
- unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
- termination_condition_.Broadcast();
- break;
- };
- default: {
- LOG4CXX_ERROR(logger_, "Unknown event ");
- break;
- };
- }
-}
-
-bool UpdateDeviceListRequest::CleanUp() {
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- termination_condition_.Broadcast();
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/update_device_list_response.cc b/src/components/application_manager/src/commands/hmi/update_device_list_response.cc
deleted file mode 100644
index 6d9dec92f8..0000000000
--- a/src/components/application_manager/src/commands/hmi/update_device_list_response.cc
+++ /dev/null
@@ -1,52 +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 "application_manager/commands/hmi/update_device_list_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateDeviceListResponse::UpdateDeviceListResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UpdateDeviceListResponse::~UpdateDeviceListResponse() {}
-
-void UpdateDeviceListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // TODO(PV): add check for correctness.
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/update_sdl_request.cc b/src/components/application_manager/src/commands/hmi/update_sdl_request.cc
deleted file mode 100644
index 44f7547964..0000000000
--- a/src/components/application_manager/src/commands/hmi/update_sdl_request.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/update_sdl_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateSDLRequest::UpdateSDLRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-UpdateSDLRequest::~UpdateSDLRequest() {}
-
-void UpdateSDLRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.GetPolicyHandler().PTExchangeAtUserRequest(
- (*message_)[strings::params][strings::correlation_id].asInt());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/update_sdl_response.cc b/src/components/application_manager/src/commands/hmi/update_sdl_response.cc
deleted file mode 100644
index 0e8978fe89..0000000000
--- a/src/components/application_manager/src/commands/hmi/update_sdl_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/update_sdl_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateSDLResponse::UpdateSDLResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-UpdateSDLResponse::~UpdateSDLResponse() {}
-
-void UpdateSDLResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- application_manager_.SendMessageToHMI(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc b/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc
deleted file mode 100644
index 5fe81fcbd8..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_diagnostic_message_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {}
-
-void VIDiagnosticMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc b/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc
deleted file mode 100644
index e19af75b54..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/vi_diagnostic_message_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {}
-
-void VIDiagnosticMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc b/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc
deleted file mode 100644
index b373471c43..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_get_dtcs_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetDTCsRequest::VIGetDTCsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VIGetDTCsRequest::~VIGetDTCsRequest() {}
-
-void VIGetDTCsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc b/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc
deleted file mode 100644
index 3e720f9dbc..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/vi_get_dtcs_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetDTCsResponse::VIGetDTCsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIGetDTCsResponse::~VIGetDTCsResponse() {}
-
-void VIGetDTCsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc b/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc
deleted file mode 100644
index 05424c4967..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_get_vehicle_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleDataRequest::VIGetVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {}
-
-void VIGetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc b/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc
deleted file mode 100644
index 2794f6eddd..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc
+++ /dev/null
@@ -1,80 +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 "application_manager/commands/hmi/vi_get_vehicle_data_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-namespace commands {
-
-VIGetVehicleDataResponse::VIGetVehicleDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {}
-
-void VIGetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
-
- if ((*message_)[strings::params][strings::message_type] ==
- static_cast<int32_t>(hmi_apis::messageType::error_response)) {
- smart_objects::SmartObject result(smart_objects::SmartType_Map);
-
- if ((*message_)[strings::params].keyExists(strings::data)) {
- result[strings::msg_params] = (*message_)[strings::params][strings::data];
- result[strings::params][hmi_response::code] =
- (*message_)[strings::params][hmi_response::code];
- result[strings::params][strings::correlation_id] =
- (*message_)[strings::params][strings::correlation_id];
- result[strings::params][strings::error_msg] =
- (*message_)[strings::params][strings::error_msg];
- result[strings::params][strings::message_type] =
- (*message_)[strings::params][strings::message_type];
- result[strings::params][strings::protocol_type] =
- (*message_)[strings::params][strings::protocol_type];
- result[strings::params][strings::protocol_version] =
- (*message_)[strings::params][strings::protocol_version];
- }
-
- event.set_smart_object(result);
- } else {
- event.set_smart_object(*message_);
- application_manager_.GetPolicyHandler().OnVehicleDataUpdated(*message_);
- }
-
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc b/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc
deleted file mode 100644
index 64a3831e1c..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_get_vehicle_type_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {}
-
-void VIGetVehicleTypeRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc b/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc
deleted file mode 100644
index 2369eb7eee..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/vi_get_vehicle_type_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {}
-
-void VIGetVehicleTypeResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_vehicle_type(
- (*message_)[strings::msg_params][hmi_response::vehicle_type]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc b/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc
deleted file mode 100644
index ddd08695a0..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc
+++ /dev/null
@@ -1,103 +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 "application_manager/commands/hmi/vi_is_ready_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIIsReadyRequest::VIIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-VIIsReadyRequest::~VIIsReadyRequest() {}
-
-void VIIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- subscribe_on_event(hmi_apis::FunctionID::VehicleInfo_IsReady,
- correlation_id());
- SendRequest();
-}
-
-void VIIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_IsReady: {
- LOG4CXX_DEBUG(logger_, "VehicleInfo_IsReady event");
- unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- const bool is_available =
- ChangeInterfaceState(application_manager_,
- message,
- HmiInterfaces::HMI_INTERFACE_VehicleInfo);
-
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- hmi_capabilities.set_is_ivi_cooperating(is_available);
- application_manager_.GetPolicyHandler().OnVIIsReady();
- if (!CheckAvailabilityHMIInterfaces(
- application_manager_, HmiInterfaces::HMI_INTERFACE_VehicleInfo)) {
- LOG4CXX_INFO(
- logger_,
- "HmiInterfaces::HMI_INTERFACE_VehicleInfo isn't available");
- return;
- }
- SendMessageToHMI();
-
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void VIIsReadyRequest::onTimeOut() {
- // Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void VIIsReadyRequest::SendMessageToHMI() {
- utils::SharedPtr<smart_objects::SmartObject> get_type(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
- application_manager_));
- application_manager_.ManageHMICommand(get_type);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
deleted file mode 100644
index 2f84190494..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_is_ready_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIIsReadyResponse::VIIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIIsReadyResponse::~VIIsReadyResponse() {}
-
-void VIIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc b/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc
deleted file mode 100644
index d72fcb8157..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_read_did_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIReadDIDRequest::VIReadDIDRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VIReadDIDRequest::~VIReadDIDRequest() {}
-
-void VIReadDIDRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc b/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc
deleted file mode 100644
index 568a573f88..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/vi_read_did_response.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIReadDIDResponse::VIReadDIDResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIReadDIDResponse::~VIReadDIDResponse() {}
-
-void VIReadDIDResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_ReadDID);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
deleted file mode 100644
index 5c953334bb..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {}
-
-void VISubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc b/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
deleted file mode 100644
index 4df2d9190a..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {}
-
-void VISubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
deleted file mode 100644
index 2211cde19c..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {}
-
-void VIUnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc b/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
deleted file mode 100644
index 5044f0ef43..0000000000
--- a/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {}
-
-void VIUnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc b/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc
deleted file mode 100644
index 04af05d4e7..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_add_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRAddCommandRequest::VRAddCommandRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRAddCommandRequest::~VRAddCommandRequest() {}
-
-void VRAddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc b/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc
deleted file mode 100644
index 496bd47605..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/hmi/vr_add_command_response.h"
-#include "application_manager/event_engine/event.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRAddCommandResponse::VRAddCommandResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRAddCommandResponse::~VRAddCommandResponse() {}
-
-void VRAddCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc b/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc
deleted file mode 100644
index e64e7cc388..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_change_registration_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRChangeRegistrationRequest::VRChangeRegistrationRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {}
-
-void VRChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc b/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc
deleted file mode 100644
index 8084688c15..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/vr_change_registration_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRChangeRegistrationResponse::VRChangeRegistrationResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {}
-
-void VRChangeRegistrationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VR_ChangeRegistration);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc b/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc
deleted file mode 100644
index 1db85529da..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_delete_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRDeleteCommandRequest::VRDeleteCommandRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRDeleteCommandRequest::~VRDeleteCommandRequest() {}
-
-void VRDeleteCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc b/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc
deleted file mode 100644
index 08711be2c8..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/hmi/vr_delete_command_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRDeleteCommandResponse::VRDeleteCommandResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRDeleteCommandResponse::~VRDeleteCommandResponse() {}
-
-void VRDeleteCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- event_engine::Event event(hmi_apis::FunctionID::VR_DeleteCommand);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc b/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc
deleted file mode 100644
index 3159380c17..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetCapabilitiesRequest::VRGetCapabilitiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {}
-
-void VRGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc b/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc
deleted file mode 100644
index 9aa0fc6668..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/hmi/vr_get_capabilities_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetCapabilitiesResponse::VRGetCapabilitiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {}
-
-void VRGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
-
- hmi_capabilities.set_vr_capabilities(
- (*message_)[strings::msg_params][strings::vr_capabilities]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc b/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc
deleted file mode 100644
index baf34c8017..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_get_language_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetLanguageRequest::VRGetLanguageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRGetLanguageRequest::~VRGetLanguageRequest() {}
-
-void VRGetLanguageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc b/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
deleted file mode 100644
index a55dca44a3..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
+++ /dev/null
@@ -1,72 +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 "application_manager/commands/hmi/vr_get_language_response.h"
-
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetLanguageResponse::VRGetLanguageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRGetLanguageResponse::~VRGetLanguageResponse() {}
-
-void VRGetLanguageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace hmi_apis;
-
- Common_Language::eType language = Common_Language::INVALID_ENUM;
-
- if ((*message_).keyExists(strings::msg_params) &&
- (*message_)[strings::msg_params].keyExists(hmi_response::language)) {
- language = static_cast<Common_Language::eType>(
- (*message_)[strings::msg_params][hmi_response::language].asInt());
- }
-
- application_manager_.hmi_capabilities().set_active_vr_language(language);
-
- LOG4CXX_DEBUG(logger_,
- "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());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc b/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc
deleted file mode 100644
index def4a64699..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_get_supported_languages_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {}
-
-void VRGetSupportedLanguagesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc b/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc
deleted file mode 100644
index e5a6ed0b86..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/hmi/vr_get_supported_languages_response.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {}
-
-void VRGetSupportedLanguagesResponse::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());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- hmi_capabilities.set_vr_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc b/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc
deleted file mode 100644
index 086b5d4490..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc
+++ /dev/null
@@ -1,106 +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 "application_manager/commands/hmi/vr_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRIsReadyRequest::VRIsReadyRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager)
- , EventObserver(application_manager.event_dispatcher()) {}
-
-VRIsReadyRequest::~VRIsReadyRequest() {}
-
-void VRIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- subscribe_on_event(hmi_apis::FunctionID::VR_IsReady, correlation_id());
- SendRequest();
-}
-
-void VRIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::VR_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received VR_IsReady event");
- unsubscribe_from_event(hmi_apis::FunctionID::VR_IsReady);
- const bool is_available = ChangeInterfaceState(
- application_manager_, message, HmiInterfaces::HMI_INTERFACE_VR);
-
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- hmi_capabilities.set_is_vr_cooperating(is_available);
- if (!CheckAvailabilityHMIInterfaces(application_manager_,
- HmiInterfaces::HMI_INTERFACE_VR)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_VR isn't available");
- return;
- }
- SendMessageToHMI();
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void VRIsReadyRequest::onTimeOut() {
- // Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void VRIsReadyRequest::SendMessageToHMI() {
- utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetLanguage,
- application_manager_));
- HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
- hmi_capabilities.set_handle_response_for(*get_language);
- application_manager_.ManageHMICommand(get_language);
- utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VR_GetSupportedLanguages,
- application_manager_));
- application_manager_.ManageHMICommand(get_all_languages);
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VR_GetCapabilities, application_manager_));
- application_manager_.ManageHMICommand(get_capabilities);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
deleted file mode 100644
index 78e2dae23b..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_is_ready_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRIsReadyResponse::VRIsReadyResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRIsReadyResponse::~VRIsReadyResponse() {}
-
-void VRIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::VR_IsReady);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_perform_interaction_request.cc b/src/components/application_manager/src/commands/hmi/vr_perform_interaction_request.cc
deleted file mode 100644
index c4646e59f4..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_perform_interaction_request.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/hmi/vr_perform_interaction_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRPerformInteractionRequest::VRPerformInteractionRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {}
-
-VRPerformInteractionRequest::~VRPerformInteractionRequest() {}
-
-void VRPerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vr_perform_interaction_response.cc b/src/components/application_manager/src/commands/hmi/vr_perform_interaction_response.cc
deleted file mode 100644
index bb5ceb3755..0000000000
--- a/src/components/application_manager/src/commands/hmi/vr_perform_interaction_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/hmi/vr_perform_interaction_response.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRPerformInteractionResponse::VRPerformInteractionResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {}
-
-VRPerformInteractionResponse::~VRPerformInteractionResponse() {}
-
-void VRPerformInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::VR_PerformInteraction);
- event.set_smart_object(*message_);
- event.raise(application_manager_.event_dispatcher());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/add_command_request.cc b/src/components/application_manager/src/commands/mobile/add_command_request.cc
deleted file mode 100644
index 69948b8122..0000000000
--- a/src/components/application_manager/src/commands/mobile/add_command_request.cc
+++ /dev/null
@@ -1,616 +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 <string>
-#include "application_manager/commands/mobile/add_command_request.h"
-
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "utils/file_system.h"
-#include "utils/helpers.h"
-#include "utils/custom_string.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-AddCommandRequest::AddCommandRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , send_ui_(false)
- , send_vr_(false)
- , is_ui_received_(false)
- , is_vr_received_(false)
- , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
- , vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
-
-AddCommandRequest::~AddCommandRequest() {}
-
-void AddCommandRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
- RemoveCommand();
- CommandRequestImpl::onTimeOut();
-}
-
-bool AddCommandRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-void AddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) {
- mobile_apis::Result::eType verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::cmd_icon],
- app,
- application_manager_);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
- SendResponse(false, verification_result);
- return;
- }
- }
-
- if (!((*message_)[strings::msg_params].keyExists(strings::cmd_id))) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- bool data_exist = false;
-
- if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
- if (!CheckCommandName(app)) {
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
- if (((*message_)[strings::msg_params][strings::menu_params].keyExists(
- hmi_request::parent_id)) &&
- (0 !=
- (*message_)[strings::msg_params][strings::menu_params]
- [hmi_request::parent_id].asUInt())) {
- if (!CheckCommandParentId(app)) {
- SendResponse(
- false, mobile_apis::Result::INVALID_ID, "Parent ID doesn't exist");
- return;
- }
- }
- data_exist = true;
- }
-
- if (((*message_)[strings::msg_params].keyExists(strings::vr_commands)) &&
- ((*message_)[strings::msg_params][strings::vr_commands].length() > 0)) {
- if (!CheckCommandVRSynonym(app)) {
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
-
- data_exist = true;
- }
-
- if (!data_exist) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "Incoming add command has contains \t\n \\t \\n");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- app->AddCommand((*message_)[strings::msg_params][strings::cmd_id].asUInt(),
- (*message_)[strings::msg_params]);
-
- smart_objects::SmartObject ui_msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
- ui_msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- ui_msg_params[strings::menu_params] =
- (*message_)[strings::msg_params][strings::menu_params];
-
- ui_msg_params[strings::app_id] = app->app_id();
-
- if (((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) &&
- ((*message_)[strings::msg_params][strings::cmd_icon].keyExists(
- strings::value)) &&
- (0 < (*message_)[strings::msg_params][strings::cmd_icon][strings::value]
- .length())) {
- ui_msg_params[strings::cmd_icon] =
- (*message_)[strings::msg_params][strings::cmd_icon];
- }
-
- send_ui_ = true;
- }
-
- smart_objects::SmartObject vr_msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- if ((*message_)[strings::msg_params].keyExists(strings::vr_commands)) {
- vr_msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- vr_msg_params[strings::vr_commands] =
- (*message_)[strings::msg_params][strings::vr_commands];
- vr_msg_params[strings::app_id] = app->app_id();
-
- vr_msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
- vr_msg_params[strings::grammar_id] = app->get_grammar_id();
-
- send_vr_ = true;
- }
-
- if (send_ui_) {
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_AddCommand, &ui_msg_params, true);
- }
-
- if (send_vr_) {
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &vr_msg_params, true);
- }
-}
-
-bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
- CommandsMap::const_iterator i = commands.begin();
- uint32_t saved_parent_id = 0;
- uint32_t parent_id = 0;
- if ((*message_)[strings::msg_params][strings::menu_params].keyExists(
- hmi_request::parent_id)) {
- parent_id = (*message_)[strings::msg_params][strings::menu_params]
- [hmi_request::parent_id].asUInt();
- }
-
- for (; commands.end() != i; ++i) {
- if (!(*i->second).keyExists(strings::menu_params)) {
- continue;
- }
-
- saved_parent_id = 0;
- if ((*i->second)[strings::menu_params].keyExists(hmi_request::parent_id)) {
- saved_parent_id =
- (*i->second)[strings::menu_params][hmi_request::parent_id].asUInt();
- }
- if (((*i->second)[strings::menu_params][strings::menu_name].asString() ==
- (*message_)[strings::msg_params][strings::menu_params]
- [strings::menu_name].asString()) &&
- (saved_parent_id == parent_id)) {
- LOG4CXX_INFO(logger_,
- "AddCommandRequest::CheckCommandName received"
- " command name already exist in same level menu");
- return false;
- }
- }
- return true;
-}
-
-bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
- CommandsMap::const_iterator it = commands.begin();
-
- for (; commands.end() != it; ++it) {
- if (!(*it->second).keyExists(strings::vr_commands)) {
- continue;
- }
-
- for (size_t i = 0; i < (*it->second)[strings::vr_commands].length(); ++i) {
- for (size_t j = 0;
- j < (*message_)[strings::msg_params][strings::vr_commands].length();
- ++j) {
- const custom_str::CustomString& vr_cmd_i =
- (*it->second)[strings::vr_commands][i].asCustomString();
- const custom_str::CustomString& vr_cmd_j =
- (*message_)[strings::msg_params][strings::vr_commands][j]
- .asCustomString();
-
- if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) {
- LOG4CXX_INFO(logger_,
- "AddCommandRequest::CheckCommandVRSynonym"
- " received command vr synonym already exist");
- return false;
- }
- }
- }
- }
- return true;
-}
-
-bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const int32_t parent_id =
- (*message_)[strings::msg_params][strings::menu_params]
- [hmi_request::parent_id].asInt();
- smart_objects::SmartObject* parent = app->FindSubMenu(parent_id);
-
- if (!parent) {
- LOG4CXX_INFO(logger_,
- "AddCommandRequest::CheckCommandParentId received"
- " submenu doesn't exist");
- return false;
- }
- return true;
-}
-
-// TODO(AKUTSAN) APPLINK-26973: Refactor AddCommandRequest
-void AddCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- smart_objects::SmartObject msg_param(smart_objects::SmartType_Map);
- msg_param[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- msg_param[strings::app_id] = application->app_id();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_AddCommand: {
- LOG4CXX_INFO(logger_, "Received UI_AddCommand event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, ui_info_);
- if (hmi_apis::Common_Result::SUCCESS != ui_result_) {
- (*message_)[strings::msg_params].erase(strings::menu_params);
- }
- break;
- }
- case hmi_apis::FunctionID::VR_AddCommand: {
- LOG4CXX_INFO(logger_, "Received VR_AddCommand event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- is_vr_received_ = true;
- vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, vr_info_);
- if (hmi_apis::Common_Result::SUCCESS != vr_result_) {
- (*message_)[strings::msg_params].erase(strings::vr_commands);
- }
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- if (IsPendingResponseExist()) {
- return;
- }
-
- smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- msg_params[strings::app_id] = application->app_id();
-
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
-
- const bool is_vr_invalid_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- vr_result_,
- hmi_apis::Common_Result::INVALID_ENUM,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- const bool is_ui_invalid_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_,
- hmi_apis::Common_Result::INVALID_ENUM,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
- const bool is_vr_unsupported =
- vr_result_ == hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- const bool is_ui_unsupported =
- ui_result_ == hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
-
- const bool is_no_ui_error = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_,
- 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,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- const bool is_no_vr_error = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- vr_result_,
- 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,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- bool result = (is_no_ui_error && is_no_vr_error) ||
- (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
- << " " << is_no_vr_error);
- const bool is_vr_or_ui_warning =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::WARNINGS, ui_result_, vr_result_);
-
- const bool is_vr_or_ui_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- ui_result_,
- vr_result_);
-
- const bool is_vr_and_ui_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ALL>(
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- ui_result_,
- vr_result_);
-
- if (!result && hmi_apis::Common_Result::REJECTED == ui_result_) {
- result_code = MessageHelper::HMIToMobileResult(ui_result_);
- } else if (result && is_vr_or_ui_unsupported) {
- result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
- } else if (is_vr_or_ui_warning) {
- result_code = mobile_apis::Result::WARNINGS;
- } else {
- result_code =
- MessageHelper::HMIToMobileResult(std::max(ui_result_, vr_result_));
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_) {
- result_code = MessageHelper::HMIToMobileResult(vr_result_);
- }
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == vr_result_) {
- result_code = MessageHelper::HMIToMobileResult(ui_result_);
- }
- LOG4CXX_DEBUG(logger_, "HMIToMobileResult " << result_code);
- }
-
- if (BothSend() && hmi_apis::Common_Result::SUCCESS == vr_result_) {
- const bool is_ui_not_ok = Compare<hmi_apis::Common_Result::eType, NEQ, ALL>(
- ui_result_,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::WARNINGS,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- if (is_ui_not_ok) {
- result_code = ui_result_ == hmi_apis::Common_Result::REJECTED
- ? mobile_apis::Result::REJECTED
- : mobile_apis::Result::GENERIC_ERROR;
-
- msg_params[strings::grammar_id] = application->get_grammar_id();
- msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
-
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
- application->RemoveCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asUInt());
- result = false;
- LOG4CXX_DEBUG(logger_, "Result " << result);
- }
- }
-
- if (BothSend() && hmi_apis::Common_Result::SUCCESS == ui_result_ &&
- !is_no_vr_error &&
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != vr_result_) {
- result_code = vr_result_ == hmi_apis::Common_Result::REJECTED
- ? mobile_apis::Result::REJECTED
- : mobile_apis::Result::GENERIC_ERROR;
-
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
-
- application->RemoveCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asUInt());
- result = false;
- LOG4CXX_DEBUG(logger_, "Result " << result);
- }
-
- HmiInterfaces::InterfaceState ui_interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_UI);
- HmiInterfaces::InterfaceState vr_interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_VR);
-
- if (!BothSend() &&
- ((is_vr_unsupported &&
- 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");
- result = false;
- }
-
- if (is_vr_and_ui_unsupported) {
- LOG4CXX_DEBUG(logger_, "UI and VR interface both unsupported");
- result = false;
- }
-
- if (!result) {
- RemoveCommand();
- }
-
- const std::string info = GenerateMobileResponseInfo();
- SendResponse(result,
- result_code,
- info.empty() ? NULL : info.c_str(),
- &(message[strings::msg_params]));
-}
-
-bool AddCommandRequest::IsPendingResponseExist() {
- return send_ui_ != is_ui_received_ || send_vr_ != is_vr_received_;
-}
-
-bool AddCommandRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
- str = (*message_)[strings::msg_params][strings::menu_params]
- [strings::menu_name].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid menu name syntax check failed.");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::vr_commands)) {
- const size_t len =
- (*message_)[strings::msg_params][strings::vr_commands].length();
-
- for (size_t i = 0; i < len; ++i) {
- str = (*message_)[strings::msg_params][strings::vr_commands][i]
- .asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) {
- str = (*message_)[strings::msg_params][strings::cmd_icon][strings::value]
- .asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid cmd_icon value syntax check failed");
- return true;
- }
- }
- return false;
-}
-
-bool AddCommandRequest::BothSend() const {
- return send_vr_ && send_ui_;
-}
-
-const std::string AddCommandRequest::GenerateMobileResponseInfo() {
- // In case if vr_result_ is UNSUPPORTED_RESOURCE vr_info should be on the
- // first place
- // In case if ui_result_ is UNSUPPORTED_RESOURCE ui_info should be on the
- // first place
- // Other way order is doesn't matter
-
- HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- HmiInterfaces::InterfaceState ui_interface_state =
- hmi_interfaces.GetInterfaceState(HmiInterfaces::HMI_INTERFACE_UI);
-
- HmiInterfaces::InterfaceState vr_interface_state =
- hmi_interfaces.GetInterfaceState(HmiInterfaces::HMI_INTERFACE_VR);
-
- if ((ui_interface_state == HmiInterfaces::STATE_NOT_AVAILABLE) &&
- (vr_interface_state != HmiInterfaces::STATE_NOT_AVAILABLE) &&
- !vr_info_.empty()) {
- return vr_info_;
- }
-
- if ((vr_interface_state == HmiInterfaces::STATE_NOT_AVAILABLE) &&
- (ui_interface_state != HmiInterfaces::STATE_NOT_AVAILABLE) &&
- !ui_info_.empty()) {
- return ui_info_;
- }
-
- return MergeInfos(ui_info_, vr_info_);
-}
-
-void AddCommandRequest::RemoveCommand() {
- LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(connection_key());
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
- return;
- }
-
- smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- msg_params[strings::app_id] = app->app_id();
-
- app->RemoveCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asUInt());
-
- if (BothSend() && !(is_vr_received_ || is_ui_received_)) {
- // in case we have send bth UI and VR and no one respond
- // we have nothing to remove from HMI so no DeleteCommand expected
- return;
- }
-
- if (BothSend() && !is_vr_received_) {
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
- }
-
- if (BothSend() && !is_ui_received_) {
- msg_params[strings::grammar_id] = app->get_grammar_id();
- msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/add_command_response.cc b/src/components/application_manager/src/commands/mobile/add_command_response.cc
deleted file mode 100644
index fc468f9c57..0000000000
--- a/src/components/application_manager/src/commands/mobile/add_command_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/add_command_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddCommandResponse::AddCommandResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-AddCommandResponse::~AddCommandResponse() {}
-
-void AddCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc b/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
deleted file mode 100644
index fe44e5a41f..0000000000
--- a/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
+++ /dev/null
@@ -1,161 +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 "application_manager/commands/mobile/add_sub_menu_request.h"
-
-#include "application_manager/message_helper.h"
-#include "application_manager/application.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddSubMenuRequest::AddSubMenuRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-AddSubMenuRequest::~AddSubMenuRequest() {}
-
-void AddSubMenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_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.");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- const std::string& menu_name =
- (*message_)[strings::msg_params][strings::menu_name].asString();
-
- if (app->IsSubMenuNameAlreadyExist(menu_name)) {
- LOG4CXX_ERROR(logger_, "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.");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::menu_id] =
- (*message_)[strings::msg_params][strings::menu_id];
- if ((*message_)[strings::msg_params].keyExists(strings::position)) {
- msg_params[strings::menu_params][strings::position] =
- (*message_)[strings::msg_params][strings::position];
- }
- msg_params[strings::menu_params][strings::menu_name] =
- (*message_)[strings::msg_params][strings::menu_name];
- msg_params[strings::app_id] = app->app_id();
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_AddSubMenu, &msg_params, true);
-}
-
-void AddSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_AddSubMenu: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (result) {
- application->AddSubMenu(
- (*message_)[strings::msg_params][strings::menu_id].asInt(),
- (*message_)[strings::msg_params]);
- }
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-bool AddSubMenuRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-bool AddSubMenuRequest::CheckSubMenuName() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- str = (*message_)[strings::msg_params][strings::menu_name].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_INFO(logger_, "Invalid subMenu name.");
- return false;
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc b/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc
deleted file mode 100644
index 1fbdb4e66c..0000000000
--- a/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/mobile/add_sub_menu_response.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddSubMenuResponse::AddSubMenuResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-AddSubMenuResponse::~AddSubMenuResponse() {}
-
-void AddSubMenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc b/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
deleted file mode 100644
index d5767690d7..0000000000
--- a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
+++ /dev/null
@@ -1,267 +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 <cstring>
-#include <string>
-#include "application_manager/commands/mobile/alert_maneuver_request.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertManeuverRequest::AlertManeuverRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , tts_speak_result_code_(hmi_apis::Common_Result::INVALID_ENUM)
- , navi_alert_maneuver_result_code_(hmi_apis::Common_Result::INVALID_ENUM) {
- subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
-}
-
-AlertManeuverRequest::~AlertManeuverRequest() {}
-
-void AlertManeuverRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if ((!(*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
- (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) {
- LOG4CXX_ERROR(logger_, "AlertManeuverRequest::Request without parameters!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- ApplicationSharedPtr app = application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (NULL == app.get()) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- // ProcessSoftButtons checks strings on the contents incorrect character
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
- app,
- application_manager_.GetPolicyHandler(),
- application_manager_);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
- SendResponse(false, processing_result);
- return;
- }
-
- // Checking parameters and how many HMI requests should be sent
- bool tts_is_ok = false;
-
- // check TTSChunk parameter
- if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
- if (0 < (*message_)[strings::msg_params][strings::tts_chunks].length()) {
- pending_requests_.Add(hmi_apis::FunctionID::TTS_Speak);
- tts_is_ok = true;
- }
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = app->app_id();
-
- 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());
- }
-
- pending_requests_.Add(hmi_apis::FunctionID::Navigation_AlertManeuver);
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(
- hmi_apis::FunctionID::Navigation_AlertManeuver, &msg_params, true);
-
- if (tts_is_ok) {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[hmi_request::tts_chunks] =
- (*message_)[strings::msg_params][strings::tts_chunks];
- msg_params[hmi_request::speak_type] =
- hmi_apis::Common_MethodName::ALERT_MANEUVER;
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
- }
-}
-
-void AlertManeuverRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- pending_requests_.Remove(event_id);
- navi_alert_maneuver_result_code_ =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, info_navi_);
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "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>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, info_tts_);
- break;
- }
- case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
-
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- SendResponse(
- 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.");
- return;
- }
- std::string return_info;
- mobile_apis::Result::eType result_code;
- const bool result = PrepareResponseParameters(result_code, return_info);
- bool must_be_empty_info = false;
- if (return_info.find("\n") != std::string::npos ||
- return_info.find("\t") != std::string::npos) {
- must_be_empty_info = true;
- }
- SendResponse(result,
- result_code,
- (must_be_empty_info) ? NULL : return_info.c_str(),
- &(message[strings::msg_params]));
-}
-
-bool AlertManeuverRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& return_info) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- application_manager::commands::ResponseInfo navigation_alert_info(
- navi_alert_maneuver_result_code_,
- HmiInterfaces::HMI_INTERFACE_Navigation,
- application_manager_);
-
- application_manager::commands::ResponseInfo tts_alert_info(
- tts_speak_result_code_,
- HmiInterfaces::HMI_INTERFACE_TTS,
- application_manager_);
- const bool result =
- PrepareResultForMobileResponse(navigation_alert_info, tts_alert_info);
-
- if (result && (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE ==
- tts_speak_result_code_ &&
- (HmiInterfaces::STATE_AVAILABLE ==
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_TTS)))) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string("Unsupported phoneme type sent in a prompt");
- return result;
- }
- result_code =
- PrepareResultCodeForResponse(navigation_alert_info, tts_alert_info);
- return_info =
- MergeInfos(navigation_alert_info, info_navi_, tts_alert_info, info_tts_);
- return result;
-}
-
-bool AlertManeuverRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- using smart_objects::SmartArray;
-
- if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
- const SmartArray* tts_chunks_arr =
- (*message_)[strings::msg_params][strings::tts_chunks].asArray();
-
- SmartArray::const_iterator it_tts_chunk = tts_chunks_arr->begin();
-
- 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");
- return true;
- }
- }
- }
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- DCHECK_OR_RETURN(
- (*message_)[strings::msg_params][strings::soft_buttons].getType() ==
- smart_objects::SmartType_Array,
- true);
- const smart_objects::SmartArray* soft_button_array =
- (*message_)[strings::msg_params][strings::soft_buttons].asArray();
-
- SmartArray::const_iterator it_soft_button = soft_button_array->begin();
-
- for (; it_soft_button != soft_button_array->end(); ++it_soft_button) {
- 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");
- return true;
- }
- }
- }
-
- return false;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc b/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc
deleted file mode 100644
index 2f441594c2..0000000000
--- a/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/mobile/alert_maneuver_response.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertManeuverResponse::AlertManeuverResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-AlertManeuverResponse::~AlertManeuverResponse() {}
-
-void AlertManeuverResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/alert_request.cc b/src/components/application_manager/src/commands/mobile/alert_request.cc
deleted file mode 100644
index 3c42e43767..0000000000
--- a/src/components/application_manager/src/commands/mobile/alert_request.cc
+++ /dev/null
@@ -1,426 +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 "application_manager/commands/mobile/alert_request.h"
-
-#include <string.h>
-
-#include "application_manager/message_helper.h"
-#include "application_manager/application_impl.h"
-
-#include "application_manager/policies/policy_handler.h"
-#include "utils/helpers.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertRequest::AlertRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , 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) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
- subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
-}
-
-AlertRequest::~AlertRequest() {}
-
-bool AlertRequest::Init() {
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::duration)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::duration].asUInt();
- } else {
- const int32_t def_value = 5000;
- default_timeout_ = def_value;
- }
-
- // If soft buttons are present, SDL will not use initiate timeout tracking for
- // response.
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- LOG4CXX_INFO(logger_,
- "Request contains soft buttons - request timeout "
- "will be set to 0.");
- default_timeout_ = 0;
- }
-
- return true;
-}
-
-void AlertRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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();
- }
-
- if ((tts_chunks_exists && length_tts_chunks) ||
- ((*message_)[strings::msg_params].keyExists(strings::play_tone) &&
- (*message_)[strings::msg_params][strings::play_tone].asBool())) {
- awaiting_tts_speak_response_ = true;
- }
-
- SendAlertRequest(app_id);
- if (awaiting_tts_speak_response_) {
- SendSpeakRequest(app_id, tts_chunks_exists, length_tts_chunks);
- }
-}
-
-void AlertRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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_);
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- break;
- }
- case hmi_apis::FunctionID::UI_Alert: {
- LOG4CXX_INFO(logger_, "Received UI_Alert event");
- // Unsubscribe from event to avoid unwanted messages
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- unsubscribe_from_event(hmi_apis::FunctionID::UI_Alert);
- awaiting_ui_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);
- }
- alert_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- // Mobile Alert request is successful when UI_Alert is successful
- alert_response_params_ = message[strings::msg_params];
- GetInfo(message, ui_response_info_);
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "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: {
- LOG4CXX_INFO(logger_, "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: {
- LOG4CXX_ERROR(logger_, "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(),
- &alert_response_params_);
-}
-
-bool AlertRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& info) {
- ResponseInfo ui_alert_info(
- alert_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
- ResponseInfo tts_alert_info(tts_speak_result_,
- HmiInterfaces::HMI_INTERFACE_TTS,
- application_manager_);
-
- bool result = PrepareResultForMobileResponse(ui_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 responce for
- * TTS.IsReady.
- */
- if (result && ui_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_alert_info.is_ok || ui_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 = MergeInfos(
- ui_alert_info, ui_response_info_, tts_alert_info, tts_response_info_);
- return result;
- }
- result_code = PrepareResultCodeForResponse(ui_alert_info, tts_alert_info);
- info = MergeInfos(
- ui_alert_info, ui_response_info_, tts_alert_info, tts_response_info_);
- // Mobile Alert request is successful when UI_Alert is successful
- if (is_ui_alert_sent_ && !ui_alert_info.is_ok) {
- return false;
- }
- return result;
-}
-
-bool AlertRequest::Validate(uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "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() &&
- app->AreCommandLimitsExceeded(
- static_cast<mobile_apis::FunctionID::eType>(function_id()),
- application_manager::TLimitSource::POLICY_TABLE)) {
- LOG4CXX_ERROR(logger_, "Alert frequency is too high.");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return false;
- }
-
- if (!CheckStringsOfAlertRequest()) {
- 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,
- application_manager_.GetPolicyHandler(),
- application_manager_);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "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) &&
- (1 > (*message_)[strings::msg_params][strings::tts_chunks].length()))) {
- LOG4CXX_ERROR(logger_, "Mandatory parameters are missing");
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "Mandatory parameters are missing");
- return false;
- }
-
- return true;
-}
-
-void AlertRequest::SendAlertRequest(int32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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);
-
- 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::alertText1;
- 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::alertText2;
- msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::alert_text2];
- index++;
- }
- if ((*message_)[strings::msg_params].keyExists(strings::alert_text3)) {
- msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
- hmi_apis::Common_TextFieldName::alertText3;
- msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::alert_text3];
- }
-
- // 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());
- }
- // app_id
- msg_params[strings::app_id] = app_id;
- msg_params[strings::duration] = default_timeout_;
-
- // NAVI platform progressIndicator
- if ((*message_)[strings::msg_params].keyExists(strings::progress_indicator)) {
- msg_params[strings::progress_indicator] =
- (*message_)[strings::msg_params][strings::progress_indicator];
- }
-
- // 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_alert_response_ = true;
- is_ui_alert_sent_ = true;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_Alert, &msg_params, true);
- }
-}
-
-void AlertRequest::SendSpeakRequest(int32_t app_id,
- bool tts_chunks_exists,
- size_t length_tts_chunks) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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) &&
- (*message_)[strings::msg_params][strings::play_tone].asBool()) {
- msg_params[strings::play_tone] = true;
- }
- msg_params[strings::app_id] = app_id;
- msg_params[hmi_request::speak_type] = Common_MethodName::ALERT;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
-}
-
-bool AlertRequest::CheckStringsOfAlertRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- return false;
- }
- }
-
- 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");
- return false;
- }
- }
-
- 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");
- 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)) {
- LOG4CXX_ERROR(logger_, "Invalid tts_chunks text syntax check failed");
- return false;
- }
- }
- }
- return true;
-}
-
-bool AlertRequest::HasHmiResponsesToWait() {
- LOG4CXX_AUTO_TRACE(logger_);
- return awaiting_ui_alert_response_ || awaiting_tts_speak_response_ ||
- awaiting_tts_stop_speaking_response_;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/alert_response.cc b/src/components/application_manager/src/commands/mobile/alert_response.cc
deleted file mode 100644
index f8ca487eae..0000000000
--- a/src/components/application_manager/src/commands/mobile/alert_response.cc
+++ /dev/null
@@ -1,58 +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 "application_manager/commands/mobile/alert_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertResponse::AlertResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-AlertResponse::~AlertResponse() {}
-
-void AlertResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/change_registration_request.cc b/src/components/application_manager/src/commands/mobile/change_registration_request.cc
deleted file mode 100644
index f55767c723..0000000000
--- a/src/components/application_manager/src/commands/mobile/change_registration_request.cc
+++ /dev/null
@@ -1,661 +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 <string.h>
-#include <algorithm>
-#include "application_manager/commands/mobile/change_registration_request.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/message_helper.h"
-
-namespace {
-namespace custom_str = utils::custom_string;
-struct IsSameNickname {
- 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());
- }
-
- private:
- const custom_str::CustomString& app_id_;
-};
-}
-
-namespace application_manager {
-
-namespace commands {
-
-ChangeRegistrationRequest::ChangeRegistrationRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
- , vr_result_(hmi_apis::Common_Result::INVALID_ENUM)
- , tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
-
-ChangeRegistrationRequest::~ChangeRegistrationRequest() {}
-
-void ChangeRegistrationRequest::SendVRRequest(
- ApplicationSharedPtr app, smart_objects::SmartObject& msg_params) {
- const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- auto function = hmi_apis::FunctionID::VR_ChangeRegistration;
- pending_requests_.Add(function);
- smart_objects::SmartObject vr_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- vr_params[strings::language] = msg_params[strings::language];
-
- vr_params[strings::app_id] = app->app_id();
- if (msg_params.keyExists(strings::vr_synonyms)) {
- vr_params[strings::vr_synonyms] = msg_params[strings::vr_synonyms];
- app->set_vr_synonyms(msg_params[strings::vr_synonyms]);
- }
- StartAwaitForInterface(hmi_interfaces.GetInterfaceFromFunction(function));
- SendHMIRequest(function, &vr_params, true);
-}
-
-void ChangeRegistrationRequest::SendTTSRequest(
- ApplicationSharedPtr app, smart_objects::SmartObject& msg_params) {
- const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- auto function = hmi_apis::FunctionID::TTS_ChangeRegistration;
- pending_requests_.Add(function);
-
- smart_objects::SmartObject tts_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- tts_params[strings::language] = msg_params[strings::language];
-
- tts_params[strings::app_id] = app->app_id();
- if (msg_params.keyExists(strings::tts_name)) {
- tts_params[strings::tts_name] = msg_params[strings::tts_name];
- app->set_tts_name(msg_params[strings::tts_name]);
- }
- StartAwaitForInterface(hmi_interfaces.GetInterfaceFromFunction(function));
- SendHMIRequest(function, &tts_params, true);
-}
-
-void ChangeRegistrationRequest::SendUIRequest(
- ApplicationSharedPtr app,
- smart_objects::SmartObject& msg_params,
- const int32_t hmi_language) {
- const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- auto function = hmi_apis::FunctionID::UI_ChangeRegistration;
- pending_requests_.Add(function);
- // UI processing
- smart_objects::SmartObject ui_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- ui_params[strings::language] = hmi_language;
- ui_params[strings::app_id] = app->app_id();
- if (msg_params.keyExists(strings::app_name)) {
- ui_params[strings::app_name] = msg_params[strings::app_name];
- app->set_name(msg_params[strings::app_name].asCustomString());
- }
- if (msg_params.keyExists(strings::ngn_media_screen_app_name)) {
- ui_params[strings::ngn_media_screen_app_name] =
- msg_params[strings::ngn_media_screen_app_name];
- app->set_ngn_media_screen_name(
- msg_params[strings::ngn_media_screen_app_name]);
- }
-
- StartAwaitForInterface(hmi_interfaces.GetInterfaceFromFunction(function));
- SendHMIRequest(function, &ui_params, true);
-}
-
-void ChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace smart_objects;
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
- if (!app) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (mobile_apis::Result::SUCCESS != CheckCoincidence()) {
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
-
- SmartObject& msg_params = (*message_)[strings::msg_params];
-
- const int32_t hmi_language =
- msg_params[strings::hmi_display_language].asInt();
-
- const int32_t language = msg_params[strings::language].asInt();
-
- if (false == (IsLanguageSupportedByUI(hmi_language) &&
- IsLanguageSupportedByVR(language) &&
- IsLanguageSupportedByTTS(language))) {
- LOG4CXX_ERROR(logger_, "Language is not supported");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- if (msg_params.keyExists(strings::app_name) &&
- !IsNicknameAllowed(msg_params[strings::app_name].asCustomString())) {
- LOG4CXX_ERROR(logger_, "Nickname is not allowed.");
- SendResponse(false, mobile_apis::Result::DISALLOWED);
- return;
- }
-
- const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
-
- const HmiInterfaces::InterfaceState vr_state =
- hmi_interfaces.GetInterfaceState(
- HmiInterfaces::InterfaceID::HMI_INTERFACE_VR);
- const HmiInterfaces::InterfaceState ui_state =
- hmi_interfaces.GetInterfaceState(
- HmiInterfaces::InterfaceID::HMI_INTERFACE_UI);
- const HmiInterfaces::InterfaceState tts_state =
- hmi_interfaces.GetInterfaceState(
- HmiInterfaces::InterfaceID::HMI_INTERFACE_TTS);
-
- using helpers::Compare;
- using helpers::EQ;
- using helpers::ALL;
-
- if (Compare<HmiInterfaces::InterfaceState, EQ, ALL>(
- HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE,
- vr_state,
- tts_state,
- ui_state)) {
- SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
- return;
- }
- if (HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE != vr_state) {
- // VR processing
- SendVRRequest(app, msg_params);
- }
- if (HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE != tts_state) {
- // TTS processing
- SendTTSRequest(app, msg_params);
- }
-
- if (HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE != ui_state) {
- SendUIRequest(app, msg_params, hmi_language);
- }
-}
-
-void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- pending_requests_.Remove(event_id);
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, ui_response_info_);
- break;
- }
- case hmi_apis::FunctionID::VR_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received VR_ChangeRegistration event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- pending_requests_.Remove(event_id);
- vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, vr_response_info_);
- break;
- }
- case hmi_apis::FunctionID::TTS_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received TTS_ChangeRegistration event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- pending_requests_.Remove(event_id);
- tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, tts_response_info_);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event_id);
- return;
- }
- }
-
- if (pending_requests_.IsFinal(event_id)) {
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (hmi_apis::Common_Result::SUCCESS == ui_result_) {
- application->set_ui_language(static_cast<mobile_api::Language::eType>(
- (*message_)[strings::msg_params][strings::hmi_display_language]
- .asInt()));
- }
-
- if (hmi_apis::Common_Result::SUCCESS == vr_result_ ||
- hmi_apis::Common_Result::SUCCESS == tts_result_) {
- application->set_language(static_cast<mobile_api::Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
- }
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- std::string response_info;
- const bool result = PrepareResponseParameters(result_code, response_info);
-
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::eType::ChangeRegistrationID;
-
- SendResponse(result,
- result_code,
- 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.");
- }
-}
-
-namespace {
-void CheckInfo(std::string& str) {
- if (std::string::npos != str.find("is not supported by system")) {
- str.clear();
- }
-}
-} // namespace
-
-bool ChangeRegistrationRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& response_info) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
- const bool is_tts_succeeded_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- tts_result_,
- 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,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- const bool is_ui_succeeded_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_,
- 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,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- const bool is_vr_succeeded_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- vr_result_,
- 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,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- const bool is_tts_ui_vr_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ALL>(
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- tts_result_,
- ui_result_,
- vr_result_);
-
- const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- const HmiInterfaces::InterfaceState tts_state =
- hmi_interfaces.GetInterfaceState(
- HmiInterfaces::InterfaceID::HMI_INTERFACE_TTS);
- const HmiInterfaces::InterfaceState vr_state =
- hmi_interfaces.GetInterfaceState(
- HmiInterfaces::InterfaceID::HMI_INTERFACE_VR);
- const HmiInterfaces::InterfaceState ui_state =
- hmi_interfaces.GetInterfaceState(
- HmiInterfaces::InterfaceID::HMI_INTERFACE_UI);
-
- ResponseInfo ui_properties_info(
- ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
-
- ResponseInfo tts_properties_info(
- tts_result_, HmiInterfaces::HMI_INTERFACE_TTS, application_manager_);
-
- ResponseInfo vr_properties_info(
- ui_result_, HmiInterfaces::HMI_INTERFACE_VR, application_manager_);
-
- bool result = ((!is_tts_ui_vr_unsupported) && is_tts_succeeded_unsupported &&
- is_ui_succeeded_unsupported && is_vr_succeeded_unsupported);
-
- const bool is_tts_or_ui_or_vr_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- tts_result_,
- ui_result_,
- vr_result_);
-
- if ((result && is_tts_or_ui_or_vr_unsupported)) {
- result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
- result =
- PrepareResultForMobileResponse(ui_properties_info,
- tts_properties_info) &&
- PrepareResultForMobileResponse(tts_properties_info, vr_properties_info);
- } else {
- // If response contains erroneous result code SDL need return erroneus
- // result code.
- hmi_apis::Common_Result::eType ui_result =
- hmi_apis::Common_Result::INVALID_ENUM;
- hmi_apis::Common_Result::eType vr_result =
- hmi_apis::Common_Result::INVALID_ENUM;
- hmi_apis::Common_Result::eType tts_result =
- hmi_apis::Common_Result::INVALID_ENUM;
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != ui_result_) {
- ui_result = ui_result_;
- }
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != vr_result_) {
- vr_result = vr_result_;
- }
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != tts_result_) {
- tts_result = tts_result_;
- }
- result_code = MessageHelper::HMIToMobileResult(
- std::max(std::max(ui_result, vr_result), tts_result));
- if (mobile_api::Result::INVALID_ENUM == result_code) {
- result_code = mobile_api::Result::UNSUPPORTED_RESOURCE;
- }
- }
-
- const bool is_tts_state_available =
- tts_state == HmiInterfaces::STATE_AVAILABLE;
- const bool is_vr_state_available = vr_state == HmiInterfaces::STATE_AVAILABLE;
- const bool is_ui_state_available = ui_state == HmiInterfaces::STATE_AVAILABLE;
-
- const bool is_tts_hmi_info =
- is_tts_state_available && !tts_response_info_.empty();
- const bool is_vr_hmi_info =
- is_vr_state_available && !vr_response_info_.empty();
- const bool is_ui_hmi_info =
- is_ui_state_available && !ui_response_info_.empty();
-
- if (is_tts_hmi_info || is_vr_hmi_info || is_ui_hmi_info) {
- if (!is_tts_hmi_info)
- CheckInfo(tts_response_info_);
- if (!is_vr_hmi_info)
- CheckInfo(ui_response_info_);
- if (!is_ui_hmi_info)
- CheckInfo(vr_response_info_);
- }
-
- response_info =
- MergeInfos(ui_response_info_, vr_response_info_, tts_response_info_);
- return result;
-}
-
-bool ChangeRegistrationRequest::IsLanguageSupportedByUI(
- const int32_t& hmi_display_lang) {
- const HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- const smart_objects::SmartObject* ui_languages =
- hmi_capabilities.ui_supported_languages();
-
- if (!ui_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return false;
- }
-
- for (size_t i = 0; i < ui_languages->length(); ++i) {
- if (hmi_display_lang == ui_languages->getElement(i).asInt()) {
- return true;
- }
- }
-
- LOG4CXX_ERROR(logger_, "Language isn't supported by UI");
-
- return false;
-}
-
-bool ChangeRegistrationRequest::IsLanguageSupportedByVR(
- const int32_t& hmi_display_lang) {
- const HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- const smart_objects::SmartObject* vr_languages =
- hmi_capabilities.vr_supported_languages();
-
- if (!vr_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return false;
- }
-
- for (size_t i = 0; i < vr_languages->length(); ++i) {
- if (hmi_display_lang == vr_languages->getElement(i).asInt()) {
- return true;
- }
- }
-
- LOG4CXX_ERROR(logger_, "Language isn't supported by VR");
-
- return false;
-}
-
-bool ChangeRegistrationRequest::IsLanguageSupportedByTTS(
- const int32_t& hmi_display_lang) {
- const HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- const smart_objects::SmartObject* tts_languages =
- hmi_capabilities.tts_supported_languages();
-
- if (!tts_languages) {
- LOG4CXX_ERROR(logger_, "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");
- return false;
-}
-
-bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
- const char* str = NULL;
-
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::tts_name)) {
- const smart_objects::SmartArray* tn_array =
- (*message_)[strings::msg_params][strings::tts_name].asArray();
-
- smart_objects::SmartArray::const_iterator it_tn = tn_array->begin();
- smart_objects::SmartArray::const_iterator it_tn_end = tn_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(
- strings::ngn_media_screen_app_name)) {
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::vr_synonyms)) {
- const smart_objects::SmartArray* vs_array =
- (*message_)[strings::msg_params][strings::vr_synonyms].asArray();
-
- smart_objects::SmartArray::const_iterator it_vs = vs_array->begin();
- smart_objects::SmartArray::const_iterator it_vs_end = vs_array->end();
-
- for (; it_vs != it_vs_end; ++it_vs) {
- str = (*it_vs).asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_synonyms syntax check failed");
- return true;
- }
- }
- }
- return false;
-}
-
-mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- ApplicationSet accessor = application_manager_.applications().GetData();
- custom_str::CustomString app_name;
- uint32_t app_id = connection_key();
- if (msg_params.keyExists(strings::app_name)) {
- app_name = msg_params[strings::app_name].asCustomString();
- }
-
- ApplicationSetConstIt it = accessor.begin();
- for (; accessor.end() != it; ++it) {
- if (app_id == (*it)->app_id()) {
- continue;
- }
-
- const custom_str::CustomString& cur_name = (*it)->name();
- if (msg_params.keyExists(strings::app_name)) {
- if (app_name.CompareIgnoreCase(cur_name)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- const smart_objects::SmartObject* vr = (*it)->vr_synonyms();
- const std::vector<smart_objects::SmartObject>* curr_vr = NULL;
- if (NULL != vr) {
- curr_vr = vr->asArray();
- CoincidencePredicateVR v(app_name);
-
- if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
- }
-
- // vr check
- if (msg_params.keyExists(strings::vr_synonyms)) {
- const std::vector<smart_objects::SmartObject>* new_vr =
- msg_params[strings::vr_synonyms].asArray();
-
- 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 .");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- } // end vr check
- } // application for end
- return mobile_apis::Result::SUCCESS;
-}
-
-bool ChangeRegistrationRequest::IsNicknameAllowed(
- const custom_str::CustomString& app_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "Can't find appication with connection key "
- << connection_key());
- return false;
- }
-
- const std::string policy_app_id = app->policy_app_id();
-
- policy::StringArray app_nicknames;
- policy::StringArray app_hmi_types;
-
- bool init_result = application_manager_.GetPolicyHandler().GetInitialAppData(
- 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);
- return false;
- }
-
- if (!app_nicknames.empty()) {
- IsSameNickname compare(app_name);
- 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.");
-
- usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
- application_manager_.GetPolicyHandler().GetStatisticManager(),
- policy_app_id,
- usage_statistics::REJECTIONS_NICKNAME_MISMATCH);
- ++count_of_rejections_nickname_mismatch;
-
- return false;
- }
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/change_registration_response.cc b/src/components/application_manager/src/commands/mobile/change_registration_response.cc
deleted file mode 100644
index 210cae64c5..0000000000
--- a/src/components/application_manager/src/commands/mobile/change_registration_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/change_registration_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ChangeRegistrationResponse::ChangeRegistrationResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-ChangeRegistrationResponse::~ChangeRegistrationResponse() {}
-
-void ChangeRegistrationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
deleted file mode 100644
index 20387ef230..0000000000
--- a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
+++ /dev/null
@@ -1,442 +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 <string>
-#include <cstring>
-#include <algorithm>
-#include <vector>
-#include "application_manager/commands/mobile/create_interaction_choice_set_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "utils/gen_hash.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , choice_set_id_(0)
- , expected_chs_count_(0)
- , received_chs_count_(0)
- , error_from_hmi_(false)
- , is_timed_out_(false)
- , vr_commands_lock_(true) {}
-
-CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
-}
-
-void CreateInteractionChoiceSetRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace mobile_apis;
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
- for (uint32_t i = 0;
- i < (*message_)[strings::msg_params][strings::choice_set].length();
- ++i) {
- Result::eType verification_result_image = Result::SUCCESS;
- Result::eType verification_result_secondary_image = Result::SUCCESS;
- if ((*message_)[strings::msg_params][strings::choice_set][i].keyExists(
- strings::image)) {
- verification_result_image = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::choice_set][i]
- [strings::image],
- app,
- application_manager_);
- }
- if ((*message_)[strings::msg_params][strings::choice_set][i].keyExists(
- strings::secondary_image)) {
- verification_result_secondary_image = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::choice_set][i]
- [strings::secondary_image],
- app,
- application_manager_);
- }
- if (verification_result_image == Result::INVALID_DATA ||
- verification_result_secondary_image == Result::INVALID_DATA) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
- SendResponse(false, Result::INVALID_DATA);
- return;
- }
- }
-
- choice_set_id_ =
- (*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.");
- SendResponse(false, Result::INVALID_ID);
- return;
- }
-
- Result::eType result = CheckChoiceSet(app);
- if (Result::SUCCESS != result) {
- SendResponse(false, result);
- return;
- }
- uint32_t grammar_id = application_manager_.GenerateGrammarID();
- (*message_)[strings::msg_params][strings::grammar_id] = grammar_id;
- app->AddChoiceSet(choice_set_id_, (*message_)[strings::msg_params]);
- SendVRAddCommandRequests(app);
-}
-
-mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
- ApplicationConstSharedPtr app) {
- using namespace smart_objects;
- LOG4CXX_AUTO_TRACE(logger_);
-
- std::set<uint32_t> choice_id_set;
-
- const SmartArray* choice_set =
- (*message_)[strings::msg_params][strings::choice_set].asArray();
-
- SmartArray::const_iterator current_choice_set_it = choice_set->begin();
- SmartArray::const_iterator next_choice_set_it;
-
- for (; choice_set->end() != current_choice_set_it; ++current_choice_set_it) {
- std::pair<std::set<uint32_t>::iterator, bool> ins_res =
- choice_id_set.insert(
- (*current_choice_set_it)[strings::choice_id].asInt());
- if (!ins_res.second) {
- LOG4CXX_ERROR(logger_,
- "Choise 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");
- return mobile_apis::Result::INVALID_DATA;
- }
- for (next_choice_set_it = current_choice_set_it + 1;
- choice_set->end() != next_choice_set_it;
- ++next_choice_set_it) {
- if (compareSynonyms(*current_choice_set_it, *next_choice_set_it)) {
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
- }
- return mobile_apis::Result::SUCCESS;
-}
-
-bool CreateInteractionChoiceSetRequest::compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2) {
- smart_objects::SmartArray* vr_cmds_1 =
- choice1[strings::vr_commands].asArray();
- DCHECK(vr_cmds_1 != NULL);
- smart_objects::SmartArray* vr_cmds_2 =
- choice2[strings::vr_commands].asArray();
- DCHECK(vr_cmds_2 != NULL);
-
- smart_objects::SmartArray::iterator it;
- it = std::find_first_of(vr_cmds_1->begin(),
- vr_cmds_1->end(),
- vr_cmds_2->begin(),
- vr_cmds_2->end(),
- CreateInteractionChoiceSetRequest::compareStr);
-
- if (it != vr_cmds_1->end()) {
- LOG4CXX_INFO(logger_,
- "Incoming choice set has duplicated VR synonyms "
- << it->asString());
- return true;
- }
-
- return false;
-}
-
-bool CreateInteractionChoiceSetRequest::compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2) {
- return 0 == strcasecmp(str1.asCharArray(), str2.asCharArray());
-}
-
-bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
- const smart_objects::SmartObject& choice_set) {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- str = choice_set[strings::menu_name].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "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");
- return true;
- }
- }
-
- 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");
- return true;
- }
- }
-
- if (choice_set.keyExists(strings::vr_commands)) {
- const size_t len = choice_set[strings::vr_commands].length();
-
- 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");
- return true;
- }
- }
- }
-
- 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");
- return true;
- }
- }
-
- 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");
- return true;
- }
- }
- return false;
-}
-
-void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObject& choice_set = (*message_)[strings::msg_params];
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::grammar_id] = choice_set[strings::grammar_id];
- const uint32_t choice_count = choice_set[strings::choice_set].length();
- SetAllowedToTerminate(false);
-
- expected_chs_count_ = choice_count;
- size_t chs_num = 0;
- for (; chs_num < choice_count; ++chs_num) {
- {
- sync_primitives::AutoLock error_lock(error_from_hmi_lock_);
- if (error_from_hmi_) {
- LOG4CXX_WARN(logger_,
- "Error from HMI received. Stop sending VRCommands");
- break;
- }
- }
-
- 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_);
- const uint32_t vr_cmd_id = msg_params[strings::cmd_id].asUInt();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- const uint32_t vr_corr_id =
- SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &msg_params, true);
-
- 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);
- }
- expected_chs_count_ = chs_num;
- LOG4CXX_DEBUG(logger_, "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");
- if (!error_from_hmi_) {
- error_from_hmi_ = true;
- std::string info =
- vr_result == hmi_apis::Common_Result::UNSUPPORTED_RESOURCE
- ? "VR is not supported by system"
- : "";
- SendResponse(false, GetMobileResultCode(vr_result), info.c_str());
- }
-}
-
-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");
- return false;
- }
- VRCommandInfo& vr_command = it->second;
- vr_command.succesful_response_received_ = true;
- return true;
-}
-
-void CreateInteractionChoiceSetRequest::CountReceivedVRResponses() {
- received_chs_count_++;
- LOG4CXX_DEBUG(logger_,
- "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");
- } else {
- OnAllHMIResponsesReceived();
- }
-}
-
-void CreateInteractionChoiceSetRequest::on_event(
- const event_engine::Event& event) {
- using namespace hmi_apis;
- using namespace helpers;
- LOG4CXX_AUTO_TRACE(logger_);
-
- const smart_objects::SmartObject& message = event.smart_object();
- const Common_Result::eType result = static_cast<Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool is_no_error = Compare<Common_Result::eType, EQ, ONE>(
- result, Common_Result::SUCCESS, Common_Result::WARNINGS);
- uint32_t corr_id = static_cast<uint32_t>(
- message[strings::params][strings::correlation_id].asUInt());
- if (event.id() == hmi_apis::FunctionID::VR_AddCommand) {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- {
- sync_primitives::AutoLock commands_lock(vr_commands_lock_);
- if (is_no_error) {
- if (!ProcessSuccesfulHMIResponse(corr_id)) {
- return;
- }
- } else {
- ProcessHmiError(result);
- }
- }
- CountReceivedVRResponses();
- }
-}
-
-void CreateInteractionChoiceSetRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!error_from_hmi_) {
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
- }
- CommandRequestImpl::onTimeOut();
- DeleteChoices();
-
- // 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_);
- is_timed_out_ = true;
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
-}
-
-bool CreateInteractionChoiceSetRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-void CreateInteractionChoiceSetRequest::DeleteChoices() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- application->RemoveChoiceSet(choice_set_id_);
-
- smart_objects::SmartObject msg_param(smart_objects::SmartType_Map);
- msg_param[strings::app_id] = application->app_id();
-
- sync_primitives::AutoLock commands_lock(vr_commands_lock_);
- SentCommandsMap::const_iterator it = sent_commands_map_.begin();
- for (; it != sent_commands_map_.end(); ++it) {
- const VRCommandInfo& vr_command_info = it->second;
- if (vr_command_info.succesful_response_received_) {
- 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_);
- }
- }
- sent_commands_map_.clear();
-}
-
-void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!error_from_hmi_) {
- SendResponse(true, mobile_apis::Result::SUCCESS);
- } else {
- DeleteChoices();
- }
-
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc b/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc
deleted file mode 100644
index 0cc137d6a0..0000000000
--- a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc
+++ /dev/null
@@ -1,66 +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 "application_manager/commands/mobile/create_interaction_choice_set_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {}
-
-void CreateInteractionChoiceSetResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // 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");
- SendResponse(false);
- return;
- }
- }
-
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_command_request.cc b/src/components/application_manager/src/commands/mobile/delete_command_request.cc
deleted file mode 100644
index f894ed452c..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_command_request.cc
+++ /dev/null
@@ -1,224 +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 "application_manager/commands/mobile/delete_command_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteCommandRequest::DeleteCommandRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , is_ui_send_(false)
- , is_vr_send_(false)
- , is_ui_received_(false)
- , is_vr_received_(false)
- , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
- , vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
-
-DeleteCommandRequest::~DeleteCommandRequest() {}
-
-void DeleteCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const int32_t cmd_id =
- (*message_)[strings::msg_params][strings::cmd_id].asInt();
-
- smart_objects::SmartObject* command = application->FindCommand(cmd_id);
-
- if (!command) {
- LOG4CXX_ERROR(logger_, "Command with id " << cmd_id << " is not found.");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::cmd_id] =
- (*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)) {
- is_ui_send_ = true;
- }
- // check vr params
- if ((*command).keyExists(strings::vr_commands)) {
- is_vr_send_ = true;
- }
- if (is_ui_send_) {
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params, true);
- }
- if (is_vr_send_) {
- // VR params
- msg_params[strings::grammar_id] = application->get_grammar_id();
- msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params, true);
- }
-}
-
-bool DeleteCommandRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& info) {
- using namespace helpers;
- ResponseInfo ui_delete_info(
- ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
- ResponseInfo vr_delete_info(
- vr_result_, HmiInterfaces::HMI_INTERFACE_VR, application_manager_);
- const bool result =
- PrepareResultForMobileResponse(ui_delete_info, vr_delete_info);
-
- const bool is_vr_or_ui_warning =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::WARNINGS, ui_result_, vr_result_);
- info = MergeInfos(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");
- 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"));
- return result;
-}
-
-void DeleteCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_DeleteCommand: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- 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_));
- GetInfo(message, ui_info_);
- break;
- }
- case hmi_apis::FunctionID::VR_DeleteCommand: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- 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_));
- GetInfo(message, vr_info_);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- if (IsPendingResponseExist()) {
- LOG4CXX_DEBUG(logger_, "Still awaiting for other responses.");
- return;
- }
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
- smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
-
- const int32_t cmd_id = msg_params[strings::cmd_id].asInt();
-
- smart_objects::SmartObject* command = application->FindCommand(cmd_id);
-
- if (!command) {
- LOG4CXX_ERROR(logger_,
- "Command id " << cmd_id << " not found for "
- "application with connection key "
- << connection_key());
- return;
- }
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- std::string info;
- const bool result = PrepareResponseParameters(result_code, info);
- if (result) {
- application->RemoveCommand(msg_params[strings::cmd_id].asInt());
- }
- SendResponse(
- result, result_code, info.empty() ? NULL : info.c_str(), &msg_params);
-}
-
-bool DeleteCommandRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-bool DeleteCommandRequest::IsPendingResponseExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- return is_ui_send_ != is_ui_received_ || is_vr_send_ != is_vr_received_;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_command_response.cc b/src/components/application_manager/src/commands/mobile/delete_command_response.cc
deleted file mode 100644
index 7abc1c11d4..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_command_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/delete_command_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteCommandResponse::DeleteCommandResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-DeleteCommandResponse::~DeleteCommandResponse() {}
-
-void DeleteCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_file_request.cc b/src/components/application_manager/src/commands/mobile/delete_file_request.cc
deleted file mode 100644
index 984c7a1725..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_file_request.cc
+++ /dev/null
@@ -1,121 +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 "application_manager/commands/mobile/delete_file_request.h"
-
-#include "application_manager/application_impl.h"
-
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteFileRequest::DeleteFileRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-DeleteFileRequest::~DeleteFileRequest() {}
-
-void DeleteFileRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if ((mobile_api::HMILevel::HMI_NONE == application->hmi_level()) &&
- (application_manager_.get_settings().delete_file_in_none() <=
- 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 ");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- const std::string& sync_file_name =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
-
- if (!file_system::IsFileNameValid(sync_file_name)) {
- const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
- SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
- return;
- }
-
- std::string full_file_path =
- application_manager_.get_settings().app_storage_folder() + "/";
- full_file_path += application->folder_name();
- full_file_path += "/";
- full_file_path += sync_file_name;
-
- if (file_system::FileExists(full_file_path)) {
- if (file_system::DeleteFile(full_file_path)) {
- const AppFile* file = application->GetFile(full_file_path);
- if (file) {
- SendFileRemovedNotification(file);
- }
-
- application->DeleteFile(full_file_path);
- application->increment_delete_file_in_none_count();
- SendResponse(true, mobile_apis::Result::SUCCESS);
- } else {
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
- }
- } else {
- SendResponse(false, mobile_apis::Result::REJECTED);
- }
-}
-
-void DeleteFileRequest::SendFileRemovedNotification(const AppFile* file) const {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = connection_key();
- msg_params[strings::file_name] = file->file_name;
- msg_params[strings::file_type] = file->file_type;
-
- CreateHMINotification(hmi_apis::FunctionID::BasicCommunication_OnFileRemoved,
- msg_params);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_file_response.cc b/src/components/application_manager/src/commands/mobile/delete_file_response.cc
deleted file mode 100644
index 8ed6f7ba2e..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_file_response.cc
+++ /dev/null
@@ -1,66 +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 "application_manager/commands/mobile/delete_file_response.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteFileResponse::DeleteFileResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-DeleteFileResponse::~DeleteFileResponse() {}
-
-void DeleteFileResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- (*message_)[strings::msg_params][strings::space_available] =
- static_cast<uint32_t>(app->GetAvailableDiskSpace());
- SendResponse((*message_)[strings::msg_params][strings::success].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc b/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
deleted file mode 100644
index bfbb2429ac..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
+++ /dev/null
@@ -1,159 +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 "application_manager/commands/mobile/delete_interaction_choice_set_request.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {}
-
-void DeleteInteractionChoiceSetRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "No application associated with connection key "
- << connection_key());
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const int32_t choice_set_id =
- (*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.");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- if (ChoiceSetInUse(app)) {
- LOG4CXX_ERROR(logger_, "Choice set currently in use.");
- SendResponse(false, mobile_apis::Result::IN_USE);
- return;
- }
- SendVrDeleteCommand(app);
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::interaction_choice_set_id] = choice_set_id;
- msg_params[strings::app_id] = app->app_id();
-
- app->RemoveChoiceSet(choice_set_id);
-
- // Checking of HMI responses will be implemented with APPLINK-14600
- const bool result = true;
- SendResponse(result, mobile_apis::Result::SUCCESS);
-}
-
-bool DeleteInteractionChoiceSetRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
- ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!app->is_perform_interaction_active()) {
- return false;
- }
- const DataAccessor<PerformChoiceSetMap> accessor =
- app->performinteraction_choice_set_map();
- const PerformChoiceSetMap& choice_set_map = accessor.GetData();
-
- const uint32_t choice_set_id =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id]
- .asUInt();
-
- PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
- for (; choice_set_map.end() != it; ++it) {
- const PerformChoice& choice = it->second;
- 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.");
- return true;
- }
- }
- }
- return true;
-}
-
-void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand(
- application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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);
-
- if (!choice_set) {
- LOG4CXX_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is not found.");
- return;
- }
-
- smart_objects::SmartObject msg_params =
- 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];
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc b/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc
deleted file mode 100644
index 97e07529af..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc
+++ /dev/null
@@ -1,75 +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 "application_manager/commands/mobile/delete_interaction_choice_set_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {}
-
-void DeleteInteractionChoiceSetResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // 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");
- SendResponse(false);
- return;
- }
- }
-
- const int32_t code =
- (*message_)[strings::msg_params][strings::result_code].asInt();
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- SendResponse(true);
- } else {
- // TODO(DK): Some logic
- SendResponse(false);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc b/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
deleted file mode 100644
index 09f3139245..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
+++ /dev/null
@@ -1,192 +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 "application_manager/commands/mobile/delete_sub_menu_request.h"
-
-#include "application_manager/message_helper.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteSubMenuRequest::DeleteSubMenuRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-DeleteSubMenuRequest::~DeleteSubMenuRequest() {}
-
-void DeleteSubMenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "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.");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::menu_id] =
- (*message_)[strings::msg_params][strings::menu_id];
- msg_params[strings::app_id] = app->app_id();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
-
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteSubMenu, &msg_params, true);
-}
-
-void DeleteSubMenuRequest::DeleteSubMenuVRCommands(
- ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
- CommandsMap::const_iterator it = commands.begin();
-
- for (; commands.end() != it; ++it) {
- if (!(*it->second).keyExists(strings::vr_commands)) {
- continue;
- }
-
- if ((*message_)[strings::msg_params][strings::menu_id].asInt() ==
- (*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::grammar_id] = app->get_grammar_id();
- msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
-
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
- }
- }
-}
-
-void DeleteSubMenuRequest::DeleteSubMenuUICommands(
- ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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");
- ++it;
- continue;
- }
-
- if ((*message_)[strings::msg_params][strings::menu_id].asInt() ==
- (*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
- app->RemoveCommand((*it->second)[strings::cmd_id].asInt());
- it = commands.begin(); // Can not relay on
- // iterators after erase was called
-
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
- } else {
- ++it;
- }
- }
-}
-
-void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_DeleteSubMenu: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (result) {
- // delete sub menu items from SDL and HMI
- DeleteSubMenuVRCommands(application);
- DeleteSubMenuUICommands(application);
- application->RemoveSubMenu(
- (*message_)[strings::msg_params][strings::menu_id].asInt());
- }
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-bool DeleteSubMenuRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc b/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc
deleted file mode 100644
index ad9d2ad858..0000000000
--- a/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/delete_sub_menu_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteSubMenuResponse::DeleteSubMenuResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-DeleteSubMenuResponse::~DeleteSubMenuResponse() {}
-
-void DeleteSubMenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc b/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
deleted file mode 100644
index 7704d700f9..0000000000
--- a/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
+++ /dev/null
@@ -1,121 +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 <algorithm>
-#include "application_manager/commands/mobile/diagnostic_message_request.h"
-
-#include "application_manager/application_impl.h"
-
-#include "interfaces/HMI_API.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DiagnosticMessageRequest::DiagnosticMessageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-DiagnosticMessageRequest::~DiagnosticMessageRequest() {}
-
-void DiagnosticMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const std::vector<uint32_t>& supported_diag_modes =
- application_manager_.get_settings().supported_diag_modes();
-
- smart_objects::SmartObject& msg_data =
- (*message_)[strings::msg_params][strings::message_data];
-
- const uint8_t mode_position = 0;
- const uint32_t msg_diagnostic_mode = msg_data[mode_position].asUInt();
- 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
- << " is not supported.");
- SendResponse(false,
- mobile_apis::Result::REJECTED,
- "Received diagnostic mode is not supported.");
- return;
- }
-
- // Add app_id for HMI request
- (*message_)[strings::msg_params][strings::app_id] = app->app_id();
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage,
- &(*message_)[strings::msg_params],
- true);
-}
-
-void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- std::string response_info;
- GetInfo(message, response_info);
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc b/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc
deleted file mode 100644
index 8c59a97a8b..0000000000
--- a/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/diagnostic_message_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DiagnosticMessageResponse::DiagnosticMessageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-DiagnosticMessageResponse::~DiagnosticMessageResponse() {}
-
-void DiagnosticMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/dial_number_request.cc b/src/components/application_manager/src/commands/mobile/dial_number_request.cc
deleted file mode 100644
index d0ab42e266..0000000000
--- a/src/components/application_manager/src/commands/mobile/dial_number_request.cc
+++ /dev/null
@@ -1,147 +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 <algorithm>
-#include <string>
-#include "application_manager/commands/mobile/dial_number_request.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-DialNumberRequest::~DialNumberRequest() {}
-
-bool DialNumberRequest::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- default_timeout_ = 0;
-
- return true;
-}
-
-void DialNumberRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- std::string number =
- (*message_)[strings::msg_params][strings::number].asString();
- if (!CheckSyntax(number)) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::number] =
- (*message_)[strings::msg_params][strings::number].asString();
- msg_params[strings::app_id] = application->hmi_app_id();
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
- SendHMIRequest(
- hmi_apis::FunctionID::BasicCommunication_DialNumber, &msg_params, true);
-}
-
-void DialNumberRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- const smart_objects::SmartObject& message = event.smart_object();
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
- result_code = CommandRequestImpl::GetMobileResultCode(
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt()));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- const bool is_success = mobile_apis::Result::SUCCESS == result_code;
- const bool is_info_valid =
- message[strings::msg_params].keyExists(strings::info);
-
- if (is_info_valid) {
- const char* info_char_array =
- message[strings::msg_params][strings::info].asCharArray();
- SendResponse(is_success, result_code, info_char_array);
- return;
- }
-
- SendResponse(is_success, result_code);
-}
-
-void DialNumberRequest::StripNumberParam(std::string& number) {
- std::size_t found = 0;
- while (std::string::npos !=
- (found = number.find_first_not_of("0123456789*#,;+"))) {
- number.erase(number.begin() + found);
- }
- (*message_)[strings::msg_params][strings::number] = number;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/dial_number_response.cc b/src/components/application_manager/src/commands/mobile/dial_number_response.cc
deleted file mode 100644
index 750dcf25c4..0000000000
--- a/src/components/application_manager/src/commands/mobile/dial_number_response.cc
+++ /dev/null
@@ -1,53 +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 "application_manager/commands/mobile/dial_number_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DialNumberResponse::DialNumberResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-DialNumberResponse::~DialNumberResponse() {}
-
-void DialNumberResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
deleted file mode 100644
index fb168e4256..0000000000
--- a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,91 +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 "application_manager/commands/mobile/end_audio_pass_thru_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-EndAudioPassThruRequest::EndAudioPassThruRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-EndAudioPassThruRequest::~EndAudioPassThruRequest() {}
-
-void EndAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_EndAudioPassThru: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
- if (result) {
- uint32_t app_id = connection_key();
- bool ended_successfully = application_manager_.EndAudioPassThru(app_id);
- if (ended_successfully) {
- application_manager_.StopAudioPassThru(app_id);
- }
- }
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc b/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc
deleted file mode 100644
index bb477f5083..0000000000
--- a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/end_audio_pass_thru_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-EndAudioPassThruResponse::EndAudioPassThruResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-EndAudioPassThruResponse::~EndAudioPassThruResponse() {}
-
-void EndAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/generic_response.cc b/src/components/application_manager/src/commands/mobile/generic_response.cc
deleted file mode 100644
index 20f6931bb9..0000000000
--- a/src/components/application_manager/src/commands/mobile/generic_response.cc
+++ /dev/null
@@ -1,65 +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 "application_manager/commands/mobile/generic_response.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void GenericResponse::Run() {
- /*NsSmartDeviceLink::NsSmartObjects::SmartObject response;
-
- response[strings::params][strings::correlation_id] =
- (*message_)[strings::params][strings::correlation_id];
- response[strings::params][strings::protocol_version] =
- (*message_)[strings::params][strings::protocol_version];
- response[strings::params][strings::connection_key] =
- (*message_)[strings::params][strings::connection_key];
-
- response[strings::msg_params][strings::success] = false;
- */
-
- (*message_)[strings::params][strings::message_type] = MessageType::kResponse;
- (*message_)[strings::msg_params][strings::success] = false;
- (*message_)[strings::msg_params][strings::result_code] =
- mobile_apis::Result::INVALID_DATA;
-
- SendResponse(false);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc b/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc
deleted file mode 100644
index 88fd07234a..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc
+++ /dev/null
@@ -1,110 +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 "application_manager/commands/mobile/get_dtcs_request.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetDTCsRequest::GetDTCsRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-GetDTCsRequest::~GetDTCsRequest() {}
-
-void GetDTCsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::ecu_name] =
- (*message_)[strings::msg_params][strings::ecu_name];
-
- if ((*message_)[strings::msg_params].keyExists(strings::dtc_mask)) {
- msg_params[strings::dtc_mask] =
- (*message_)[strings::msg_params][strings::dtc_mask];
- }
-
- msg_params[strings::app_id] = app->app_id();
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_GetDTCs, &msg_params, true);
-}
-
-void GetDTCsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_GetDTCs: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- std::string response_info;
- GetInfo(message, response_info);
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc b/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc
deleted file mode 100644
index ecaf5c3d8f..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/get_dtcs_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetDTCsResponse::GetDTCsResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-GetDTCsResponse::~GetDTCsResponse() {}
-
-void GetDTCsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc b/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc
deleted file mode 100644
index 71cde5158d..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-#include "application_manager/commands/mobile/get_system_capability_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetSystemCapabilityRequest::GetSystemCapabilityRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-GetSystemCapabilityRequest::~GetSystemCapabilityRequest() {}
-
-void GetSystemCapabilityRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "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.");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- mobile_apis::SystemCapabilityType::eType response_type =
- static_cast<mobile_apis::SystemCapabilityType::eType>(
- (*message_)[strings::msg_params][strings::system_capability_type]
- .asInt());
- response_params[strings::system_capability][strings::system_capability_type] =
- response_type;
-
- const HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
-
- switch (response_type) {
- case mobile_apis::SystemCapabilityType::NAVIGATION: {
- if (hmi_capabilities.navigation_capability()) {
- response_params[strings::system_capability]
- [strings::navigation_capability] =
- *hmi_capabilities.navigation_capability();
- } else {
- SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
- return;
- }
- break;
- }
- case mobile_apis::SystemCapabilityType::PHONE_CALL: {
- if (hmi_capabilities.phone_capability()) {
- response_params[strings::system_capability][strings::phone_capability] =
- *hmi_capabilities.phone_capability();
- } else {
- SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
- return;
- }
- break;
- }
- case mobile_apis::SystemCapabilityType::REMOTE_CONTROL: {
- if (hmi_capabilities.rc_capability()) {
- response_params[strings::system_capability][strings::rc_capability] =
- *hmi_capabilities.rc_capability();
- } else {
- SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
- return;
- }
- break;
- }
- case mobile_apis::SystemCapabilityType::VIDEO_STREAMING:
- if (hmi_capabilities.video_streaming_capability()) {
- response_params[strings::system_capability]
- [strings::video_streaming_capability] =
- *hmi_capabilities.video_streaming_capability();
- } else {
- SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
- return;
- }
- break;
- default: // Return unsupported resource
- SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
- return;
- }
- SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
-}
-
-void GetSystemCapabilityRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetSystemCapabilityRequest on_event");
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_system_capability_response.cc b/src/components/application_manager/src/commands/mobile/get_system_capability_response.cc
deleted file mode 100644
index 91c2562cd3..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_system_capability_response.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/get_system_capability_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetSystemCapabilityResponse::GetSystemCapabilityResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-GetSystemCapabilityResponse::~GetSystemCapabilityResponse() {}
-
-void GetSystemCapabilityResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
deleted file mode 100644
index f81d0a8c2a..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
+++ /dev/null
@@ -1,306 +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 <string>
-#include "application_manager/commands/mobile/get_vehicle_data_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-#ifdef HMI_DBUS_API
-GetVehicleDataRequest::GetVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-GetVehicleDataRequest::~GetVehicleDataRequest() {}
-
-void GetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- int32_t app_id =
- (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app = application_manager_.application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[str::msg_params].keyExists(it->first) &&
- true == (*message_)[str::msg_params][it->first].asBool()) {
- SendRequestsToHmi(app->app_id());
- return;
- }
- }
-
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
-}
-
-namespace {
-struct Subrequest {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
-};
-Subrequest subrequests[] = {
- {hmi_apis::FunctionID::VehicleInfo_GetGpsData, str::gps},
- {hmi_apis::FunctionID::VehicleInfo_GetSpeed, str::speed},
- {hmi_apis::FunctionID::VehicleInfo_GetRpm, str::rpm},
- {hmi_apis::FunctionID::VehicleInfo_GetFuelLevel, str::fuel_level},
- {hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState,
- str::fuel_level_state},
- {hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption,
- str::instant_fuel_consumption},
- {hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature,
- str::external_temp},
- {hmi_apis::FunctionID::VehicleInfo_GetVin, str::vin},
- {hmi_apis::FunctionID::VehicleInfo_GetPrndl, str::prndl},
- {hmi_apis::FunctionID::VehicleInfo_GetTirePressure, str::tire_pressure},
- {hmi_apis::FunctionID::VehicleInfo_GetOdometer, str::odometer},
- {hmi_apis::FunctionID::VehicleInfo_GetBeltStatus, str::belt_status},
- {hmi_apis::FunctionID::VehicleInfo_GetBodyInformation,
- str::body_information},
- {hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus, str::device_status},
- {hmi_apis::FunctionID::VehicleInfo_GetDriverBraking, str::driver_braking},
- {hmi_apis::FunctionID::VehicleInfo_GetWiperStatus, str::wiper_status},
- {hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus,
- str::head_lamp_status},
- {hmi_apis::FunctionID::VehicleInfo_GetEngineTorque, str::engine_torque},
- {hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition, str::acc_pedal_pos},
- {hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle,
- str::steering_wheel_angle},
- {hmi_apis::FunctionID::VehicleInfo_GetECallInfo, str::e_call_info},
- {hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus, str::airbag_status},
- {hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent, str::emergency_event},
- {hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus,
- str::cluster_mode_status},
- {hmi_apis::FunctionID::VehicleInfo_GetMyKey, str::my_key},
-};
-}
-
-void GetVehicleDataRequest::SendRequestsToHmi(const int32_t app_id) {
- smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app_id;
-
- for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
- const Subrequest& sr = subrequests[i];
- if (true == (*message_)[str::msg_params].keyExists(sr.str) &&
- true == (*message_)[str::msg_params][sr.str].asBool()) {
- HmiRequest hmi_request;
- hmi_request.str = sr.str;
- hmi_request.func_id = sr.func_id;
- hmi_request.complete = false;
- hmi_requests_.push_back(hmi_request);
- }
- }
-
- LOG4CXX_INFO(logger_,
- hmi_requests_.size() << " requests are going to be sent to HMI");
-
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- SendHMIRequest(it->func_id, &msg_params, true);
- }
-}
-
-void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event " << event.id());
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- HmiRequest& hmi_request = *it;
- if (hmi_request.func_id == event.id()) {
- hmi_request.status = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
- hmi_request.value = message[str::msg_params][hmi_request.str];
- hmi_request.complete = true;
- break;
- }
- }
-
- bool all_complete = true;
- bool any_arg_success = false;
- mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- if (!it->complete) {
- all_complete = false;
- break;
- }
- if (hmi_apis::Common_Result::SUCCESS != it->status) {
- if (mobile_api::Result::SUCCESS == status) {
- status = static_cast<mobile_apis::Result::eType>(it->status);
- } else if (status !=
- static_cast<mobile_apis::Result::eType>(it->status)) {
- status = mobile_api::Result::eType::GENERIC_ERROR;
- }
- LOG4CXX_TRACE(logger_,
- "Status from HMI: " << it->status
- << ", so response status become "
- << status);
- } else {
- any_arg_success = true;
- }
- }
-
- if (all_complete) {
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- if (any_arg_success) {
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- response_params[it->str] = it->value;
- }
- }
- LOG4CXX_INFO(logger_, "All HMI requests are complete");
- const char* info = NULL;
- std::string error_message;
- if (true == message[strings::params].keyExists(strings::error_msg)) {
- error_message = message[strings::params][strings::error_msg].asString();
- info = error_message.c_str();
- }
- SendResponse(any_arg_success, status, info, &response_params);
- }
-}
-#else
-GetVehicleDataRequest::GetVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-GetVehicleDataRequest::~GetVehicleDataRequest() {}
-
-void GetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- int32_t app_id =
- (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app = application_manager_.application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (app->AreCommandLimitsExceeded(
- static_cast<mobile_apis::FunctionID::eType>(function_id()),
- application_manager::TLimitSource::CONFIG_FILE)) {
- LOG4CXX_ERROR(logger_, "GetVehicleData frequency is too high.");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- const uint32_t min_length_msg_params = 1;
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[str::msg_params].keyExists(it->first) &&
- true == (*message_)[str::msg_params][it->first].asBool()) {
- msg_params[it->first] = (*message_)[strings::msg_params][it->first];
- }
- }
- if (msg_params.length() > min_length_msg_params) {
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- SendHMIRequest(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData, &msg_params, true);
- return;
- } else if (HasDisallowedParams()) {
- SendResponse(false, mobile_apis::Result::DISALLOWED);
- } else {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- }
-}
-
-void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- std::string response_info;
- GetInfo(message, response_info);
- result = result ||
- ((hmi_apis::Common_Result::DATA_NOT_AVAILABLE == result_code) &&
- (message[strings::msg_params].length() > 1));
-
- if (true ==
- message[strings::msg_params].keyExists(hmi_response::method)) {
- message[strings::msg_params].erase(hmi_response::method);
- }
- if (true == message[strings::params].keyExists(strings::error_msg)) {
- response_info = message[strings::params][strings::error_msg].asString();
- }
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-#endif // #ifdef HMI_DBUS_API
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc b/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc
deleted file mode 100644
index 1e64746262..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/mobile/get_vehicle_data_response.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetVehicleDataResponse::GetVehicleDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-GetVehicleDataResponse::~GetVehicleDataResponse() {}
-
-void GetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
deleted file mode 100644
index da4ce38646..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/get_way_points_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetWayPointsRequest::GetWayPointsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
-}
-
-GetWayPointsRequest::~GetWayPointsRequest() {}
-
-void GetWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "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];
- msg_params[strings::app_id] = app->app_id();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(hmi_apis::FunctionID::Navigation_GetWayPoints,
- msg_params.empty() ? NULL : &msg_params,
- true);
-}
-
-void GetWayPointsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- const hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_way_points_response.cc b/src/components/application_manager/src/commands/mobile/get_way_points_response.cc
deleted file mode 100644
index 7956b34cae..0000000000
--- a/src/components/application_manager/src/commands/mobile/get_way_points_response.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/get_way_points_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetWayPointsResponse::GetWayPointsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-GetWayPointsResponse::~GetWayPointsResponse() {}
-
-void GetWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/list_files_request.cc b/src/components/application_manager/src/commands/mobile/list_files_request.cc
deleted file mode 100644
index 794fba631d..0000000000
--- a/src/components/application_manager/src/commands/mobile/list_files_request.cc
+++ /dev/null
@@ -1,106 +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 <string>
-#include "application_manager/commands/mobile/list_files_request.h"
-
-#include "application_manager/application_impl.h"
-
-#include "application_manager/mobile_command_factory.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ListFilesRequest::ListFilesRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-ListFilesRequest::~ListFilesRequest() {}
-
-void ListFilesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if ((mobile_api::HMILevel::HMI_NONE == application->hmi_level()) &&
- (application_manager_.get_settings().list_files_in_none() <=
- 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 ");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- application->increment_list_files_in_none_count();
-
- (*message_)[strings::msg_params][strings::space_available] =
- static_cast<int32_t>(application->GetAvailableDiskSpace());
- // Enumarating through File system
- uint32_t i = 0;
- std::string directory_name =
- application_manager_.get_settings().app_storage_folder();
- directory_name += "/" + application->folder_name();
- std::vector<std::string> persistent_files =
- file_system::ListFiles(directory_name);
- 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");
- (*message_)[strings::msg_params][strings::filenames][i++] = *it;
- } else {
- LOG4CXX_DEBUG(logger_,
- "File " + *it + " not added to ListFiles response");
- }
- }
- (*message_)[strings::params][strings::message_type] =
- application_manager::MessageType::kResponse;
- SendResponse(true,
- mobile_apis::Result::SUCCESS,
- NULL,
- &(*message_)[strings::msg_params]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/list_files_response.cc b/src/components/application_manager/src/commands/mobile/list_files_response.cc
deleted file mode 100644
index fde15a94ef..0000000000
--- a/src/components/application_manager/src/commands/mobile/list_files_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/mobile/list_files_response.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ListFilesResponse::ListFilesResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-ListFilesResponse::~ListFilesResponse() {}
-
-void ListFilesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc b/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc
deleted file mode 100644
index 6064374dab..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/on_app_interface_unregistered_notification.h"
-#include "application_manager/message.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-OnAppInterfaceUnregisteredNotification::OnAppInterfaceUnregisteredNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnAppInterfaceUnregisteredNotification::
- ~OnAppInterfaceUnregisteredNotification() {}
-
-void OnAppInterfaceUnregisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc b/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc
deleted file mode 100644
index d0fa3597bc..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc
+++ /dev/null
@@ -1,51 +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 "application_manager/commands/mobile/on_audio_pass_thru_notification.h"
-
-namespace application_manager {
-namespace commands {
-
-OnAudioPassThruNotification::OnAudioPassThruNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnAudioPassThruNotification::~OnAudioPassThruNotification() {}
-
-void OnAudioPassThruNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
deleted file mode 100644
index 7c631d6d4b..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
+++ /dev/null
@@ -1,174 +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 "application_manager/commands/mobile/on_button_event_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnButtonEventNotification::OnButtonEventNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnButtonEventNotification::~OnButtonEventNotification() {}
-
-void OnButtonEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const uint32_t btn_id = static_cast<uint32_t>(
- (*message_)[strings::msg_params][hmi_response::button_name].asInt());
-
- const bool is_app_id_exists =
- (*message_)[strings::msg_params].keyExists(strings::app_id);
- ApplicationSharedPtr app;
-
- // 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 OnButtonEvent 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 OnButtonEvent without custom_button_id.");
- return;
- }
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application doesn't exist.");
- return;
- }
-
- uint32_t custom_btn_id = 0;
- custom_btn_id =
- (*message_)[strings::msg_params][hmi_response::custom_button_id]
- .asUInt();
-
- if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
- return;
- }
-
- if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) &&
- (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) {
- LOG4CXX_WARN(logger_,
- "CUSTOM_BUTTON OnButtonEvent notification is allowed only "
- << "in FULL or LIMITED hmi level");
- return;
- }
-
- SendButtonEvent(app);
- return;
- }
-
- const std::vector<ApplicationSharedPtr>& subscribed_apps =
- application_manager_.applications_by_button(btn_id);
-
- std::vector<ApplicationSharedPtr>::const_iterator it =
- subscribed_apps.begin();
- for (; subscribed_apps.end() != it; ++it) {
- ApplicationSharedPtr subscribed_app = *it;
- if (!subscribed_app) {
- LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
- continue;
- }
-
- // Send ButtonEvent notification only in HMI_FULL or HMI_LIMITED mode
- if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
- (mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
- LOG4CXX_WARN(logger_,
- "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()) {
- SendButtonEvent(subscribed_app);
- }
- }
-}
-
-void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
- if (!app) {
- LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer");
- return;
- }
-
- smart_objects::SmartObjectSPtr on_btn_event =
- new smart_objects::SmartObject();
-
- if (!on_btn_event) {
- LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer");
- return;
- }
-
- (*on_btn_event)[strings::params][strings::connection_key] = app->app_id();
-
- (*on_btn_event)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnButtonEventID);
-
- (*on_btn_event)[strings::msg_params][strings::button_name] =
- (*message_)[strings::msg_params][hmi_response::button_name];
- (*on_btn_event)[strings::msg_params][strings::button_event_mode] =
- (*message_)[strings::msg_params][hmi_response::button_mode];
-
- if ((*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
- (*on_btn_event)[strings::msg_params][strings::custom_button_id] =
- (*message_)[strings::msg_params][strings::custom_button_id];
- }
-
- message_ = on_btn_event;
- SendNotification();
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
deleted file mode 100644
index ae6658b93a..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
+++ /dev/null
@@ -1,181 +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 "application_manager/commands/mobile/on_button_press_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnButtonPressNotification::OnButtonPressNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnButtonPressNotification::~OnButtonPressNotification() {}
-
-void OnButtonPressNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const uint32_t btn_id = static_cast<uint32_t>(
- (*message_)[strings::msg_params][hmi_response::button_name].asInt());
-
- const bool is_app_id_exists =
- (*message_)[strings::msg_params].keyExists(strings::app_id);
- ApplicationSharedPtr app;
-
- // 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.");
- 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.");
- return;
- }
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application doesn't exist.");
- return;
- }
-
- uint32_t custom_btn_id = 0;
- custom_btn_id =
- (*message_)[strings::msg_params][hmi_response::custom_button_id]
- .asUInt();
-
- if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
- return;
- }
-
- // Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode
- if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) &&
- (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) {
- LOG4CXX_WARN(logger_,
- "CUSTOM_BUTTON OnButtonPress notification is allowed only "
- << "in FULL or LIMITED hmi level");
- return;
- }
-
- SendButtonPress(app);
- return;
- }
-
- const std::vector<ApplicationSharedPtr>& subscribed_apps =
- application_manager_.applications_by_button(btn_id);
-
- std::vector<ApplicationSharedPtr>::const_iterator it =
- subscribed_apps.begin();
- for (; subscribed_apps.end() != it; ++it) {
- ApplicationSharedPtr subscribed_app = *it;
- if (!subscribed_app) {
- LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
- continue;
- }
-
- // Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode
- if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
- (mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
- LOG4CXX_WARN(logger_,
- "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
- // LIMITED
- if (app.valid()) {
- if (app->app_id() == subscribed_app->app_id()) {
- SendButtonPress(subscribed_app);
- }
- } else if (subscribed_app->IsFullscreen()) {
- // if No "appID" - send it FULL apps only.
- SendButtonPress(subscribed_app);
- }
- }
-}
-
-void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
- if (!app) {
- LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
- return;
- }
-
- smart_objects::SmartObjectSPtr on_btn_press =
- new smart_objects::SmartObject();
-
- if (!on_btn_press) {
- LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
- return;
- }
-
- (*on_btn_press)[strings::params][strings::connection_key] = app->app_id();
-
- (*on_btn_press)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnButtonPressID);
-
- (*on_btn_press)[strings::msg_params][strings::button_name] =
- (*message_)[strings::msg_params][hmi_response::button_name];
- (*on_btn_press)[strings::msg_params][strings::button_press_mode] =
- (*message_)[strings::msg_params][hmi_response::button_mode];
-
- if ((*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
- (*on_btn_press)[strings::msg_params][strings::custom_button_id] =
- (*message_)[strings::msg_params][strings::custom_button_id];
- }
-
- message_ = on_btn_press;
- SendNotification();
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_command_notification.cc b/src/components/application_manager/src/commands/mobile/on_command_notification.cc
deleted file mode 100644
index ae8aeff771..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_command_notification.cc
+++ /dev/null
@@ -1,78 +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 "application_manager/commands/mobile/on_command_notification.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnCommandNotification::OnCommandNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnCommandNotification::~OnCommandNotification() {}
-
-void OnCommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(
- (*message_)[strings::msg_params][strings::app_id].asInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "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);
- return;
- }
-
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- // remove app_id from notification
- if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
- (*message_)[strings::msg_params].erase(strings::app_id);
- }
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc b/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc
deleted file mode 100644
index 44ed2cf3b7..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc
+++ /dev/null
@@ -1,61 +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 "application_manager/commands/mobile/on_driver_distraction_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnDriverDistractionNotification::OnDriverDistractionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
-
-void OnDriverDistractionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc b/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
deleted file mode 100644
index 19b93f2cbf..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
+++ /dev/null
@@ -1,75 +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 "application_manager/commands/mobile/on_hash_change_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include <string>
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnHashChangeNotification::OnHashChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnHashChangeNotification::~OnHashChangeNotification() {}
-
-void OnHashChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- int32_t app_id;
- app_id = (*message_)[strings::params][strings::connection_key].asInt();
- ApplicationSharedPtr app = application_manager_.application(app_id);
- if (app) {
- (*message_)[strings::msg_params][strings::hash_id] = app->curHash();
- SendNotification();
- } else {
- LOG4CXX_WARN(logger_,
- "Application with app_id " << app_id << " does not exist");
- }
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
deleted file mode 100644
index f408d04955..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
+++ /dev/null
@@ -1,77 +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 "application_manager/commands/mobile/on_hmi_status_notification.h"
-
-#include "application_manager/message_helper.h"
-#include "application_manager/message.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-OnHMIStatusNotification::OnHMIStatusNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnHMIStatusNotification::~OnHMIStatusNotification() {}
-
-void OnHMIStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
- ApplicationSharedPtr app = application_manager_.application(connection_key());
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "OnHMIStatusNotification application doesn't exist");
- return;
- }
-
- mobile_apis::HMILevel::eType hmi_level =
- static_cast<mobile_apis::HMILevel::eType>(
- (*message_)[strings::msg_params][strings::hmi_level].asInt());
- if ((mobile_apis::HMILevel::HMI_FULL == hmi_level) ||
- (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");
- application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id());
- }
- }
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
deleted file mode 100644
index 4bb6cfe9d5..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
+++ /dev/null
@@ -1,126 +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 "application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/message.h"
-
-namespace application_manager {
-namespace commands {
-
-OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationFromMobileImpl(message, application_manager) {}
-
-OnHMIStatusNotificationFromMobile::~OnHMIStatusNotificationFromMobile() {}
-
-void OnHMIStatusNotificationFromMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app.valid()) {
- LOG4CXX_ERROR(
- logger_, "OnHMIStatusNotificationFromMobile application doesn't exist");
- return;
- }
-
- mobile_apis::HMILevel::eType current_hmi_state =
- static_cast<mobile_apis::HMILevel::eType>(
- (*message_)[strings::msg_params][strings::hmi_level].asUInt());
-
- bool is_current_state_foreground =
- mobile_apis::HMILevel::HMI_FULL == current_hmi_state;
-
- app->set_foreground(is_current_state_foreground);
-
- connection_handler::DeviceHandle handle = app->device();
- 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);
-
- if (!is_apps_requested_before &&
- Message::is_sufficient_version(
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
- app->protocol_version()) &&
- app->is_foreground()) {
- // In case this notification will be received from mobile side with
- // foreground level for app on mobile, this should trigger remote
- // apps list query for SDL 4.0+ app
- MessageHelper::SendQueryApps(connection_key(), application_manager_);
- return;
- }
-
- if (is_apps_requested_before) {
- LOG4CXX_DEBUG(logger_,
- "Remote apps list had been requested already "
- " for handle: "
- << handle);
-
- if (Message::is_sufficient_version(
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
- app->protocol_version())) {
- const ApplicationSet& accessor =
- application_manager_.applications().GetData();
-
- bool is_another_foreground_sdl4_app = false;
- ApplicationSetConstIt it = accessor.begin();
- for (; accessor.end() != it; ++it) {
- if (connection_key() != (*it)->app_id() &&
- Message::is_sufficient_version(
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
- (*it)->protocol_version()) &&
- (*it)->is_foreground()) {
- is_another_foreground_sdl4_app = true;
- break;
- }
- }
-
- if (!is_another_foreground_sdl4_app) {
- application_manager_.MarkAppsGreyOut(handle,
- !is_current_state_foreground);
- application_manager_.SendUpdateAppList();
- }
- }
- return;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
deleted file mode 100644
index 427f52c12b..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
+++ /dev/null
@@ -1,87 +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 "application_manager/commands/mobile/on_keyboard_input_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnKeyBoardInputNotification::OnKeyBoardInputNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnKeyBoardInputNotification::~OnKeyBoardInputNotification() {}
-
-void OnKeyBoardInputNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app_to_notify;
-
- DataAccessor<ApplicationSet> accessor = application_manager_.applications();
- ApplicationSetIt it = accessor.GetData().begin();
- for (; accessor.GetData().end() != it; ++it) {
- // if there is app with active perform interaction use it for notification
- ApplicationSharedPtr app = *it;
- if (app->is_perform_interaction_active() &&
- (*it)->perform_interaction_layout() ==
- mobile_apis::LayoutMode::KEYBOARD) {
- LOG4CXX_INFO(logger_,
- "There is application with active PerformInteraction");
- app_to_notify = app;
- break;
- }
-
- if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level()) {
- LOG4CXX_INFO(logger_, "There is application in HMI_FULL level");
- app_to_notify = app;
- }
- }
-
- if (app_to_notify.valid()) {
- (*message_)[strings::params][strings::connection_key] =
- app_to_notify->app_id();
- SendNotification();
- }
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc b/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc
deleted file mode 100644
index 76420b85b6..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/on_language_change_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnLanguageChangeNotification::OnLanguageChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnLanguageChangeNotification::~OnLanguageChangeNotification() {}
-
-void OnLanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc b/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc
deleted file mode 100644
index 09c407b8b5..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/mobile/on_permissions_change_notification.h"
-#include "application_manager/message.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnPermissionsChangeNotification::OnPermissionsChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {}
-
-void OnPermissionsChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
deleted file mode 100644
index c29ff3e2d3..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
+++ /dev/null
@@ -1,201 +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 <cstring>
-#include <cstdio>
-#include <string>
-#include "application_manager/commands/mobile/on_system_request_notification.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/policy_handler_interface.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnSystemRequestNotification::OnSystemRequestNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnSystemRequestNotification::~OnSystemRequestNotification() {}
-
-void OnSystemRequestNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace application_manager;
- using namespace mobile_apis;
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key " << connection_key()
- << " is not registered.");
- return;
- }
-
- RequestType::eType request_type = static_cast<RequestType::eType>(
- (*message_)[strings::msg_params][strings::request_type].asInt());
- const policy::PolicyHandlerInterface& policy_handler =
- application_manager_.GetPolicyHandler();
- if (!policy_handler.IsRequestTypeAllowed(app->policy_app_id(),
- request_type)) {
- LOG4CXX_WARN(logger_,
- "Request type " << request_type
- << " is not allowed by policies");
- return;
- }
-
- if (RequestType::PROPRIETARY == request_type) {
- /* According to requirements:
- "If the requestType = PROPRIETARY, add to mobile API fileType = JSON
- If the requestType = HTTP, add to mobile API fileType = BINARY"
- Also in Genivi SDL we don't save the PT to file - we put it directly in
- binary_data */
-
- const std::string filename =
- (*message_)[strings::msg_params][strings::file_name].asString();
- BinaryMessage binary_data;
- file_system::ReadBinaryFile(filename, binary_data);
-#if defined(PROPRIETARY_MODE)
- AddHeader(binary_data);
-#endif // PROPRIETARY_MODE
-
-#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
- (*message_)[strings::params][strings::binary_data] = binary_data;
-#endif // PROPRIETARY_MODE
-
- (*message_)[strings::msg_params][strings::file_type] = FileType::JSON;
- } else if (RequestType::HTTP == request_type) {
- (*message_)[strings::msg_params][strings::file_type] = FileType::BINARY;
- if ((*message_)[strings::msg_params].keyExists(strings::url)) {
- (*message_)[strings::msg_params][strings::timeout] =
- policy_handler.TimeoutExchangeSec();
- }
- }
-
- SendNotification();
-}
-
-#ifdef PROPRIETARY_MODE
-void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
- LOG4CXX_AUTO_TRACE(logger_);
- const uint32_t timeout =
- application_manager_.GetPolicyHandler().TimeoutExchangeSec();
-
- size_t content_length;
- char size_str[24];
-
- if (0 > sprintf(size_str, "%zu", static_cast<size_t>(message.size()))) {
- memset(size_str, 0, sizeof(size_str));
- }
-
- char timeout_str[24];
- if (0 > sprintf(timeout_str, "%d", timeout)) {
- memset(timeout_str, 0, sizeof(timeout_str));
- }
-
- std::string policy_table_string = std::string(message.begin(), message.end());
-
- /* The Content-Length to be sent in the HTTP Request header should be
- calculated before additional escape characters are added to the
- policy table string. The mobile proxy will remove the escape
- characters after receiving this request. */
-
- content_length = ParsePTString(policy_table_string);
-
- if (0 > sprintf(size_str, "%zu", content_length)) {
- memset(size_str, 0, sizeof(size_str));
- }
-
- const std::string header =
-
- "{"
- " \"HTTPRequest\": {"
- "\"headers\": {"
- "\"ContentType\": \"application/json\","
- "\"ConnectTimeout\": " +
- std::string(timeout_str) +
- ","
- "\"DoOutput\": true,"
- "\"DoInput\": true,"
- "\"UseCaches\": false,"
- "\"RequestMethod\": \"POST\","
- "\"ReadTimeout\":" +
- std::string(timeout_str) +
- ","
- "\"InstanceFollowRedirects\": false,"
- "\"charset\": \"utf-8\","
- "\"Content-Length\": " +
- std::string(size_str) +
- "},"
- "\"body\": \"" +
- policy_table_string +
- "\""
- "}"
- "}";
-
- message.clear();
- message.assign(header.begin(), header.end());
-
- LOG4CXX_DEBUG(
- logger_, "Header added: " << std::string(message.begin(), message.end()));
-}
-
-size_t OnSystemRequestNotification::ParsePTString(
- std::string& pt_string) const {
- std::string result;
- size_t length = pt_string.length();
- size_t result_length = length;
- result.reserve(length * 2);
- for (size_t i = 0; i < length; ++i) {
- if (pt_string[i] == '\"' || pt_string[i] == '\\') {
- result += '\\';
- } else if (pt_string[i] == '\n') {
- result_length--; // contentLength is adjusted when this character is not
- // copied to result.
- continue;
- }
- result += pt_string[i];
- }
- pt_string = result;
- return result_length;
-}
-#endif // PROPRIETARY_MODE
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc b/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc
deleted file mode 100644
index 894469ac34..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc
+++ /dev/null
@@ -1,70 +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 "application_manager/commands/mobile/on_tbt_client_state_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTBTClientStateNotification::OnTBTClientStateNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnTBTClientStateNotification::~OnTBTClientStateNotification() {}
-
-void OnTBTClientStateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- const std::vector<ApplicationSharedPtr>& applications =
- application_manager_.applications_with_navi();
-
- std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotification();
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc b/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc
deleted file mode 100644
index 2a9969eac4..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc
+++ /dev/null
@@ -1,87 +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 "application_manager/commands/mobile/on_touch_event_notification.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnTouchEventNotification::OnTouchEventNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnTouchEventNotification::~OnTouchEventNotification() {}
-
-void OnTouchEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const std::vector<ApplicationSharedPtr>& applications_with_navi =
- application_manager_.applications_with_navi();
-
- const std::vector<ApplicationSharedPtr>& projection_applications =
- application_manager_.applications_with_mobile_projection();
-
- std::vector<ApplicationSharedPtr>::const_iterator nav_it =
- applications_with_navi.begin();
-
- for (; applications_with_navi.end() != nav_it; ++nav_it) {
- ApplicationSharedPtr app = *nav_it;
- if (app->IsFullscreen()) {
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotification();
- }
- }
-
- std::vector<ApplicationSharedPtr>::const_iterator projection_it =
- projection_applications.begin();
-
- for (; projection_applications.end() != projection_it; ++projection_it) {
- ApplicationSharedPtr projection_app = *projection_it;
- if (projection_app->IsFullscreen()) {
- (*message_)[strings::params][strings::connection_key] =
- projection_app->app_id();
- SendNotification();
- }
- }
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
deleted file mode 100644
index 37abbab351..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
+++ /dev/null
@@ -1,112 +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 "application_manager/commands/mobile/on_vehicle_data_notification.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVehicleDataNotification::OnVehicleDataNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnVehicleDataNotification::~OnVehicleDataNotification() {}
-
-void OnVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- std::vector<ApplicationSharedPtr> appNotification;
- std::vector<ApplicationSharedPtr>::iterator appNotification_it =
- appNotification.begin();
- std::vector<smart_objects::SmartObject> appSO;
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[strings::msg_params].keyExists(it->first)) {
- const std::vector<ApplicationSharedPtr>& applications =
- application_manager_.IviInfoUpdated(
- it->second, (*message_)[strings::msg_params][it->first].asInt());
-
- std::vector<ApplicationSharedPtr>::const_iterator app_it =
- applications.begin();
-
- for (; applications.end() != app_it; ++app_it) {
- const ApplicationSharedPtr app = *app_it;
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- continue;
- }
-
- appNotification_it =
- find(appNotification.begin(), appNotification.end(), app);
- if (appNotification_it == appNotification.end()) {
- appNotification.push_back(app);
- smart_objects::SmartObject msg_param =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_param[it->first] = (*message_)[strings::msg_params][it->first];
- appSO.push_back(msg_param);
- } else {
- size_t idx =
- std::distance(appNotification.begin(), appNotification_it);
- appSO[idx][it->first] = (*message_)[strings::msg_params][it->first];
- }
- }
- }
- }
-
- LOG4CXX_DEBUG(
- logger_,
- "Number of Notifications to be send: " << appNotification.size());
-
- for (size_t idx = 0; idx < appNotification.size(); idx++) {
- LOG4CXX_INFO(logger_,
- "Send OnVehicleData PRNDL notification to "
- << appNotification[idx]->name().c_str()
- << " application id " << appNotification[idx]->app_id());
- (*message_)[strings::params][strings::connection_key] =
- appNotification[idx]->app_id();
- (*message_)[strings::msg_params] = appSO[idx];
- SendNotification();
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc b/src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc
deleted file mode 100644
index 0b24228810..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc
+++ /dev/null
@@ -1,61 +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 "application_manager/commands/mobile/on_way_point_change_notification.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-namespace commands {
-
-OnWayPointChangeNotification::OnWayPointChangeNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {}
-
-OnWayPointChangeNotification::~OnWayPointChangeNotification() {}
-
-void OnWayPointChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- std::set<int32_t> subscribed_for_way_points =
- application_manager_.GetAppsSubscribedForWayPoints();
-
- for (std::set<int32_t>::const_iterator app_id =
- subscribed_for_way_points.begin();
- app_id != subscribed_for_way_points.end();
- ++app_id) {
- (*message_)[strings::params][strings::connection_key] = *app_id;
- SendNotification();
- }
-}
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
deleted file mode 100644
index 20076ac50c..0000000000
--- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,433 +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 <cstring>
-#include "application_manager/commands/mobile/perform_audio_pass_thru_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-PerformAudioPassThruRequest::PerformAudioPassThruRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , result_tts_speak_(hmi_apis::Common_Result::INVALID_ENUM)
- , result_ui_(hmi_apis::Common_Result::INVALID_ENUM) {
- subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
-}
-
-PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {}
-
-void PerformAudioPassThruRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- FinishTTSSpeak();
- CommandRequestImpl::onTimeOut();
-}
-
-bool PerformAudioPassThruRequest::Init() {
- default_timeout_ +=
- (((*message_)[str::msg_params][str::max_duration].asUInt()));
- return true;
-}
-
-void PerformAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- // According with new implementation processing of UNSUPPORTE_RESOURCE
- // need set flag before sending to hmi
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- if ((*message_)[str::msg_params].keyExists(str::initial_prompt) &&
- (0 < (*message_)[str::msg_params][str::initial_prompt].length())) {
- // In case TTS Speak, subscribe on notification
- SendSpeakRequest();
- SendPerformAudioPassThruRequest();
- } else {
- SendPerformAudioPassThruRequest();
- SendRecordStartNotification();
- StartMicrophoneRecording();
- }
-}
-
-void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
-
- result_ui_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt());
- GetInfo(message, ui_info_);
-
- // 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");
- SendResponse(false,
- MessageHelper::HMIToMobileResult(result_ui_),
- NULL,
- &(message[strings::msg_params]));
- return;
- }
- FinishTTSSpeak();
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "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_);
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- const bool is_tts_speak_success_unsuported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- result_tts_speak_,
- 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,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- if (is_tts_speak_success_unsuported) {
- SendRecordStartNotification();
- StartMicrophoneRecording();
-
- // update request timeout to get time for perform audio recording
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
-
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
- if (IsWaitingHMIResponse()) {
- return;
- }
-
- const ResponseParams response_params = PrepareResponseParameters();
-
- SendResponse(
- response_params.success,
- response_params.result_code,
- response_params.info.empty() ? NULL : response_params.info.c_str(),
- &(message[strings::msg_params]));
-}
-
-const PerformAudioPassThruRequest::ResponseParams&
-PerformAudioPassThruRequest::PrepareResponseParameters() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ResponseInfo ui_perform_info(
- result_ui_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
- ResponseInfo tts_perform_info(result_tts_speak_,
- HmiInterfaces::HMI_INTERFACE_TTS,
- application_manager_);
-
- // Note(dtrunov): According to requirment "WARNINGS, success:true on getting
- // UNSUPPORTED_RESOURCE for "ttsChunks"
- if (ui_perform_info.is_ok && tts_perform_info.is_unsupported_resource &&
- HmiInterfaces::STATE_AVAILABLE == tts_perform_info.interface_state) {
- response_params_.result_code = mobile_apis::Result::WARNINGS;
- tts_info_ = "Unsupported phoneme type sent in a prompt";
- response_params_.info =
- MergeInfos(ui_perform_info, ui_info_, tts_perform_info, tts_info_);
- response_params_.success = true;
- return response_params_;
- }
-
- response_params_.success =
- PrepareResultForMobileResponse(ui_perform_info, tts_perform_info);
- if (IsResultCodeUnsupported(ui_perform_info, tts_perform_info)) {
- response_params_.result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
- } else {
- AudioPassThruResults results = PrepareAudioPassThruResultCodeForResponse(
- ui_perform_info, tts_perform_info);
- response_params_.success = results.second;
- response_params_.result_code = results.first;
- }
- response_params_.info =
- MergeInfos(ui_perform_info, ui_info_, tts_perform_info, tts_info_);
-
- return response_params_;
-}
-
-bool PerformAudioPassThruRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& info) {
- LOG4CXX_AUTO_TRACE(logger_);
- NOTREACHED();
- return false;
-}
-
-void PerformAudioPassThruRequest::SendSpeakRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- using namespace hmi_apis;
- using namespace smart_objects;
-
- SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
- for (uint32_t i = 0;
- i < (*message_)[str::msg_params][str::initial_prompt].length();
- ++i) {
- msg_params[hmi_request::tts_chunks][i][str::text] =
- (*message_)[str::msg_params][str::initial_prompt][i][str::text];
- msg_params[hmi_request::tts_chunks][i][str::type] =
- (*message_)[str::msg_params][str::initial_prompt][i][str::type];
- }
- // app_id
- msg_params[strings::app_id] = connection_key();
- msg_params[hmi_request::speak_type] = Common_MethodName::AUDIO_PASS_THRU;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
-}
-
-void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[str::app_id] = connection_key();
-
- msg_params[hmi_request::max_duration] =
- (*message_)[str::msg_params][str::max_duration];
-
- msg_params[hmi_request::audio_pass_display_texts] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text1)) {
- msg_params[hmi_request::audio_pass_display_texts][0]
- [hmi_request::field_name] = static_cast<int32_t>(
- hmi_apis::Common_TextFieldName::audioPassThruDisplayText1);
- msg_params[hmi_request::audio_pass_display_texts][0]
- [hmi_request::field_text] =
- (*message_)[str::msg_params][str::audio_pass_display_text1];
- }
-
- if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text2)) {
- msg_params[hmi_request::audio_pass_display_texts][1]
- [hmi_request::field_name] = static_cast<int32_t>(
- hmi_apis::Common_TextFieldName::audioPassThruDisplayText2);
- msg_params[hmi_request::audio_pass_display_texts][1]
- [hmi_request::field_text] =
- (*message_)[str::msg_params][str::audio_pass_display_text2];
- }
-
- if ((*message_)[str::msg_params].keyExists(str::mute_audio)) {
- msg_params[str::mute_audio] =
- (*message_)[str::msg_params][str::mute_audio].asBool();
- } else {
- // If omitted, the value is set to true
- msg_params[str::mute_audio] = true;
- }
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(
- hmi_apis::FunctionID::UI_PerformAudioPassThru, &msg_params, true);
-}
-
-void PerformAudioPassThruRequest::SendRecordStartNotification() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = connection_key();
-
- CreateHMINotification(hmi_apis::FunctionID::UI_OnRecordStart, msg_params);
-}
-
-void PerformAudioPassThruRequest::StartMicrophoneRecording() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- uint32_t app_id = connection_key();
- application_manager_.BeginAudioPassThru(app_id);
-
- application_manager_.StartAudioPassThruThread(
- connection_key(),
- correlation_id(),
- (*message_)[str::msg_params][str::max_duration].asInt(),
- (*message_)[str::msg_params][str::sampling_rate].asInt(),
- (*message_)[str::msg_params][str::bits_per_sample].asInt(),
- (*message_)[str::msg_params][str::audio_type].asInt());
-}
-
-bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
- const smart_objects::SmartArray* ip_array =
- (*message_)[strings::msg_params][strings::initial_prompt].asArray();
-
- smart_objects::SmartArray::const_iterator it_ip = ip_array->begin();
- smart_objects::SmartArray::const_iterator it_ip_end = ip_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(
- strings::audio_pass_display_text1)) {
- str = (*message_)[strings::msg_params][strings::audio_pass_display_text1]
- .asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_,
- "Invalid audio_pass_display_text1 value syntax check failed");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(
- strings::audio_pass_display_text2)) {
- str = (*message_)[strings::msg_params][strings::audio_pass_display_text2]
- .asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_,
- "Invalid audio_pass_display_text2 value syntax check failed");
- return true;
- }
- }
- return false;
-}
-
-void PerformAudioPassThruRequest::FinishTTSSpeak() {
- LOG4CXX_AUTO_TRACE(logger_);
- uint32_t app_id = connection_key();
- if (application_manager_.EndAudioPassThru(app_id)) {
- LOG4CXX_DEBUG(logger_, "Stop AudioPassThru.");
- application_manager_.StopAudioPassThru(app_id);
- }
- if (!IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS)) {
- LOG4CXX_WARN(logger_, "TTS Speak is inactive.");
- return;
- }
- SendHMIRequest(hmi_apis::FunctionID::TTS_StopSpeaking, NULL);
-}
-
-PerformAudioPassThruRequest::AudioPassThruResults
-PerformAudioPassThruRequest::PrepareAudioPassThruResultCodeForResponse(
- const ResponseInfo& ui_response, const ResponseInfo& tts_response) {
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
-
- hmi_apis::Common_Result::eType common_result =
- hmi_apis::Common_Result::INVALID_ENUM;
- const hmi_apis::Common_Result::eType ui_result = ui_response.result_code;
- const hmi_apis::Common_Result::eType tts_result = tts_response.result_code;
- bool result = false;
-
- if ((ui_result == hmi_apis::Common_Result::SUCCESS) &&
- (tts_result == hmi_apis::Common_Result::SUCCESS)) {
- result = true;
- }
-
- if ((ui_result == hmi_apis::Common_Result::SUCCESS) &&
- (tts_result == hmi_apis::Common_Result::INVALID_ENUM)) {
- result = true;
- }
-
- if ((ui_result == hmi_apis::Common_Result::SUCCESS) &&
- (tts_result != hmi_apis::Common_Result::SUCCESS) &&
- (tts_result != hmi_apis::Common_Result::INVALID_ENUM)) {
- common_result = hmi_apis::Common_Result::WARNINGS;
- result = true;
- } else if (ui_response.is_ok &&
- tts_result == hmi_apis::Common_Result::WARNINGS) {
- common_result = hmi_apis::Common_Result::WARNINGS;
- result = true;
- } else if (ui_result == hmi_apis::Common_Result::INVALID_ENUM) {
- common_result = tts_result;
- } else {
- common_result = ui_result;
- }
- result_code = MessageHelper::HMIToMobileResult(common_result);
- return std::make_pair(result_code, result);
-}
-
-bool PerformAudioPassThruRequest::IsWaitingHMIResponse() {
- LOG4CXX_AUTO_TRACE(logger_);
- return IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS) ||
- IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_UI);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc
deleted file mode 100644
index e8a638c076..0000000000
--- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/perform_audio_pass_thru_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PerformAudioPassThruResponse::PerformAudioPassThruResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {}
-
-void PerformAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
deleted file mode 100644
index 68940158b9..0000000000
--- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
+++ /dev/null
@@ -1,953 +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 <string.h>
-#include <string>
-#include "application_manager/commands/mobile/perform_interaction_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/file_system.h"
-#include "utils/helpers.h"
-#include "utils/custom_string.h"
-#include "utils/gen_hash.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-uint32_t PerformInteractionRequest::pi_requests_count_ = 0;
-
-PerformInteractionRequest::PerformInteractionRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , interaction_mode_(mobile_apis::InteractionMode::INVALID_ENUM)
- , ui_response_received_(false)
- , vr_response_received_(false)
- , app_pi_was_active_before_(false)
- , vr_result_code_(hmi_apis::Common_Result::INVALID_ENUM)
- , ui_result_code_(hmi_apis::Common_Result::INVALID_ENUM) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
- subscribe_on_event(hmi_apis::FunctionID::VR_OnCommand);
- subscribe_on_event(hmi_apis::FunctionID::Buttons_OnButtonPress);
-}
-
-PerformInteractionRequest::~PerformInteractionRequest() {}
-
-bool PerformInteractionRequest::Init() {
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- }
-
- interaction_mode_ = static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::BOTH == interaction_mode_ ||
- mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) {
- default_timeout_ *= 2;
- }
- return true;
-}
-
-void PerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "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");
- app_pi_was_active_before_ = true;
- }
-
- smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
- mobile_apis::LayoutMode::eType interaction_layout =
- mobile_apis::LayoutMode::INVALID_ENUM;
-
- if (msg_params.keyExists(hmi_request::interaction_layout)) {
- interaction_layout = static_cast<mobile_apis::LayoutMode::eType>(
- msg_params[hmi_request::interaction_layout].asInt());
- }
-
- 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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- const size_t choice_set_id_list_length =
- msg_params[strings::interaction_choice_set_id_list].length();
-
- 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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- } else {
- LOG4CXX_ERROR(logger_,
- "interactionChoiceSetIDList is empty"
- " and interactionLayout!=KEYBOARD");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- }
-
- if (!CheckChoiceIDFromRequest(
- 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");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- if (msg_params.keyExists(strings::vr_help)) {
- if (mobile_apis::Result::SUCCESS !=
- MessageHelper::VerifyImageVrHelpItems(
- msg_params[strings::vr_help], app, application_manager_)) {
- LOG4CXX_ERROR(logger_,
- "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- switch (interaction_mode_) {
- case mobile_apis::InteractionMode::BOTH: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
- if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
- !CheckVrHelpItemPositions(app)) {
- return;
- }
- break;
- }
- case mobile_apis::InteractionMode::MANUAL_ONLY: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: MANUAL_ONLY");
- if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
- !CheckVrHelpItemPositions(app)) {
- return;
- }
- break;
- }
- case mobile_apis::InteractionMode::VR_ONLY: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY");
- if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app)) {
- return;
- }
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Unknown interaction mode");
- return;
- }
- }
-
- app->set_perform_interaction_mode(static_cast<int32_t>(interaction_mode_));
- app->set_perform_interaction_active(true);
- app->set_perform_interaction_layout(interaction_layout);
- // increment amount of active requests
- ++pi_requests_count_;
- SendVRPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
-}
-
-void PerformInteractionRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
- smart_objects::SmartObject msg_param =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_DEBUG(logger_, "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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- ui_response_received_ = true;
- unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
- ui_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt());
- GetInfo(message, ui_info_);
- ProcessUIResponse(event.smart_object(), msg_param);
- break;
- }
- case hmi_apis::FunctionID::VR_PerformInteraction: {
- LOG4CXX_DEBUG(logger_, "Received VR_PerformInteraction");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- vr_response_received_ = true;
- unsubscribe_from_event(hmi_apis::FunctionID::VR_PerformInteraction);
- vr_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt());
- GetInfo(message, vr_info_);
- if (ProcessVRResponse(event.smart_object(), msg_param)) {
- return;
- }
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-
- if (!HasHMIResponsesToWait()) {
- LOG4CXX_DEBUG(logger_, "Send response in BOTH iteraction mode");
- SendBothModeResponse(msg_param);
- }
-}
-
-void PerformInteractionRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- switch (interaction_mode_) {
- case mobile_apis::InteractionMode::BOTH: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
- if (true == vr_response_received_) {
- unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
- DisablePerformInteraction();
- CommandRequestImpl::onTimeOut();
- } else {
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- }
- break;
- }
- case mobile_apis::InteractionMode::VR_ONLY: {
- LOG4CXX_DEBUG(logger_, "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");
- unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
- DisablePerformInteraction();
- CommandRequestImpl::onTimeOut();
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "INVALID ENUM");
- return;
- }
- };
-}
-
-bool PerformInteractionRequest::ProcessVRResponse(
- const smart_objects::SmartObject& message,
- smart_objects::SmartObject& msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace hmi_apis;
- using namespace mobile_apis;
- using namespace smart_objects;
- using namespace helpers;
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return false;
- }
-
- msg_params[strings::trigger_source] =
- static_cast<int32_t>(TriggerSource::TS_VR);
-
- const bool is_vr_aborted_timeout = Compare<Common_Result::eType, EQ, ONE>(
- vr_result_code_, Common_Result::ABORTED, Common_Result::TIMED_OUT);
-
- if (is_vr_aborted_timeout) {
- LOG4CXX_DEBUG(logger_, "VR response aborted");
- if (InteractionMode::VR_ONLY == interaction_mode_) {
- LOG4CXX_DEBUG(logger_, "Aborted or Timeout Send Close Popup");
- TerminatePerformInteraction();
- SendResponse(false, MessageHelper::HMIToMobileResult(vr_result_code_));
- return true;
- }
- LOG4CXX_DEBUG(logger_, "Update timeout for UI");
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- return false;
- }
-
- if (Common_Result::SUCCESS == vr_result_code_ &&
- InteractionMode::MANUAL_ONLY == interaction_mode_) {
- LOG4CXX_DEBUG(logger_,
- "VR response SUCCESS in MANUAL_ONLY mode "
- << "Wait for UI response");
- // in case MANUAL_ONLY mode VR.PI SUCCESS just return
- return false;
- }
-
- const SmartObject& hmi_msg_params = message[strings::msg_params];
- if (hmi_msg_params.keyExists(strings::choice_id)) {
- const int choise_id = hmi_msg_params[strings::choice_id].asInt();
- if (!CheckChoiceIDFromResponse(app, choise_id)) {
- LOG4CXX_ERROR(logger_, "Wrong choiceID was received from HMI");
- TerminatePerformInteraction();
- SendResponse(
- false, Result::GENERIC_ERROR, "Wrong choiceID was received from HMI");
- return true;
- }
- msg_params[strings::choice_id] = choise_id;
- }
- return false;
-}
-
-void PerformInteractionRequest::ProcessUIResponse(
- const smart_objects::SmartObject& message,
- smart_objects::SmartObject& msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
- using namespace smart_objects;
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- HmiInterfaces::InterfaceState ui_interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_UI);
- bool result = false;
- result = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_code_,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::WARNINGS);
-
- result = result ||
- (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_code_ &&
- HmiInterfaces::STATE_NOT_AVAILABLE != ui_interface_state);
-
- const bool is_pi_warning = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_code_, hmi_apis::Common_Result::WARNINGS);
-
- const bool is_pi_unsupported =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_code_, hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
-
- if (result) {
- if (is_pi_warning) {
- ui_result_code_ = hmi_apis::Common_Result::WARNINGS;
- ui_info_ = message[strings::msg_params][strings::info].asString();
- if (message.keyExists(strings::params) &&
- message[strings::params].keyExists(strings::data)) {
- msg_params = message[strings::params][strings::data];
- }
- } else if (is_pi_unsupported) {
- ui_result_code_ = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- ui_info_ = message[strings::msg_params][strings::info].asString();
- } else if (message.keyExists(strings::msg_params)) {
- msg_params = message[strings::msg_params];
- }
- // result code must be GENERIC_ERROR in case wrong choice_id
- if (msg_params.keyExists(strings::choice_id)) {
- if (!CheckChoiceIDFromResponse(app,
- msg_params[strings::choice_id].asInt())) {
- ui_result_code_ = hmi_apis::Common_Result::GENERIC_ERROR;
- ui_info_ = "Wrong choiceID was received from HMI";
- } else {
- msg_params[strings::trigger_source] =
- mobile_apis::TriggerSource::TS_MENU;
- }
- } else if (msg_params.keyExists(strings::manual_text_entry)) {
- msg_params[strings::trigger_source] =
- mobile_apis::TriggerSource::TS_KEYBOARD;
- if (msg_params[strings::manual_text_entry].empty()) {
- msg_params.erase(strings::manual_text_entry);
- }
- }
- }
-}
-
-void PerformInteractionRequest::SendUIPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject& choice_set_id_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::VR_ONLY != mode) {
- msg_params[hmi_request::initial_text][hmi_request::field_name] =
- static_cast<int32_t>(
- hmi_apis::Common_TextFieldName::initialInteractionText);
- msg_params[hmi_request::initial_text][hmi_request::field_text] =
- (*message_)[strings::msg_params][hmi_request::initial_text];
- }
- bool is_vr_help_item = false;
- if (mobile_apis::InteractionMode::MANUAL_ONLY != mode) {
- msg_params[strings::vr_help_title] =
- (*message_)[strings::msg_params][strings::initial_text].asString();
- if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- is_vr_help_item = true;
- msg_params[strings::vr_help] =
- (*message_)[strings::msg_params][strings::vr_help];
- }
- }
-
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- msg_params[strings::timeout] = default_timeout_ / 2;
- } else {
- msg_params[strings::timeout] = default_timeout_;
- }
- msg_params[strings::app_id] = app->app_id();
- if (mobile_apis::InteractionMode::VR_ONLY != mode) {
- msg_params[strings::choice_set] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- }
- 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 =
- app->FindChoiceSet(choice_set_id_list[i].asInt());
- if (choice_set) {
- // 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) {
- 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];
- // 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];
- if (0 < vr_commands.length()) {
- // copy only first synonym
- smart_objects::SmartObject item(smart_objects::SmartType_Map);
- item[strings::text] = vr_commands[0].asString();
- item[strings::position] = index_array_of_vr_help + 1;
- msg_params[strings::vr_help][index_array_of_vr_help++] = item;
- }
- }
- }
- }
- }
- if ((*message_)[strings::msg_params].keyExists(
- hmi_request::interaction_layout) &&
- mobile_apis::InteractionMode::VR_ONLY != mode) {
- msg_params[hmi_request::interaction_layout] =
- (*message_)[strings::msg_params][hmi_request::interaction_layout]
- .asInt();
- }
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(
- hmi_apis::FunctionID::UI_PerformInteraction, &msg_params, true);
-}
-
-void PerformInteractionRequest::SendVRPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- if (mobile_apis::InteractionMode::MANUAL_ONLY != interaction_mode_) {
- msg_params[strings::grammar_id] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- 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 choiset");
- continue;
- }
- msg_params[strings::grammar_id][grammar_id_index++] =
- (*choice_set)[strings::grammar_id].asUInt();
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::help_prompt)) {
- msg_params[strings::help_prompt] =
- (*message_)[strings::msg_params][strings::help_prompt];
- } else {
- if (choice_list.length() != 0) {
- msg_params[strings::help_prompt] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- }
- int32_t 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) {
- 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];
- if (0 < vr_commands.length()) {
- // copy only first synonym
- smart_objects::SmartObject item(smart_objects::SmartType_Map);
- // Since there is no custom data from application side, SDL should
- // construct prompt and append delimiter to each item
- item[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
- item[strings::text] =
- vr_commands[0].asString() +
- application_manager_.get_settings().tts_delimiter();
- msg_params[strings::help_prompt][index++] = item;
- }
- }
- } else {
- LOG4CXX_ERROR(logger_, "Can't found choiceSet!");
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::timeout_prompt)) {
- msg_params[strings::timeout_prompt] =
- (*message_)[strings::msg_params][strings::timeout_prompt];
- } else {
- if (msg_params.keyExists(strings::help_prompt)) {
- msg_params[strings::timeout_prompt] = msg_params[strings::help_prompt];
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
- msg_params[strings::initial_prompt] =
- (*message_)[strings::msg_params][strings::initial_prompt];
- }
-
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- msg_params[strings::timeout] = default_timeout_ / 2;
- } else {
- msg_params[strings::timeout] = default_timeout_;
- }
- msg_params[strings::app_id] = app->app_id();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
- SendHMIRequest(
- hmi_apis::FunctionID::VR_PerformInteraction, &msg_params, true);
-}
-
-bool PerformInteractionRequest::CheckChoiceSetMenuNames(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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 =
- app->FindChoiceSet(choice_list[i].asInt());
-
- for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject* j_choice_set =
- app->FindChoiceSet(choice_list[j].asInt());
-
- if (i == j) {
- // skip check the same element
- continue;
- }
-
- if (!i_choice_set || !j_choice_set) {
- LOG4CXX_ERROR(logger_, "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) {
- const std::string& ii_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]
- .asString();
-
- if (ii_menu_name == jj_menu_name) {
- LOG4CXX_ERROR(logger_, "Choice set has duplicated menu name");
- SendResponse(false,
- mobile_apis::Result::DUPLICATE_NAME,
- "Choice set has duplicated menu name");
- return false;
- }
- }
- }
- }
- }
-
- return true;
-}
-
-bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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 =
- app->FindChoiceSet(choice_list[i].asInt());
-
- for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject* j_choice_set =
- app->FindChoiceSet(choice_list[j].asInt());
-
- if (i == j) {
- // skip check the same element
- continue;
- }
-
- if ((!i_choice_set) || (!j_choice_set)) {
- LOG4CXX_ERROR(logger_, "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) {
- // choice_set pointer contains SmartObject msg_params
- smart_objects::SmartObject& ii_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];
-
- for (size_t iii = 0; iii < ii_vr_commands.length(); ++iii) {
- for (size_t jjj = 0; jjj < jj_vr_commands.length(); ++jjj) {
- const custom_str::CustomString& vr_cmd_i =
- ii_vr_commands[iii].asCustomString();
- 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");
- SendResponse(false,
- mobile_apis::Result::DUPLICATE_NAME,
- "Choice set has duplicated VR synonym");
- return false;
- }
- }
- }
- }
- }
- }
- }
- return true;
-}
-
-bool PerformInteractionRequest::CheckVrHelpItemPositions(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!(*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- LOG4CXX_DEBUG(logger_, strings::vr_help << " is omitted.");
- return true;
- }
-
- smart_objects::SmartObject& vr_help =
- (*message_)[strings::msg_params][strings::vr_help];
-
- 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");
- SendResponse(false,
- mobile_apis::Result::REJECTED,
- "Non-sequential vrHelp item position");
- return false;
- }
- ++position;
- }
- return true;
-}
-
-void PerformInteractionRequest::DisablePerformInteraction() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (app->is_perform_interaction_active()) {
- // decrease amount of active requests
- --pi_requests_count_;
- if (!pi_requests_count_) {
- app->set_perform_interaction_active(false);
- app->set_perform_interaction_mode(-1);
- }
- }
- app->DeletePerformInteractionChoiceSet(correlation_id());
-}
-
-bool PerformInteractionRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- str = (*message_)[strings::msg_params][strings::initial_text].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid initial_text syntax check failed");
- return true;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
- const smart_objects::SmartArray* ip_array =
- (*message_)[strings::msg_params][strings::initial_prompt].asArray();
-
- smart_objects::SmartArray::const_iterator it_ip = ip_array->begin();
- smart_objects::SmartArray::const_iterator it_ip_end = ip_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::help_prompt)) {
- const smart_objects::SmartArray* hp_array =
- (*message_)[strings::msg_params][strings::help_prompt].asArray();
-
- smart_objects::SmartArray::const_iterator it_hp = hp_array->begin();
- smart_objects::SmartArray::const_iterator it_hp_end = hp_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::timeout_prompt)) {
- const smart_objects::SmartArray* tp_array =
- (*message_)[strings::msg_params][strings::timeout_prompt].asArray();
-
- smart_objects::SmartArray::const_iterator it_tp = tp_array->begin();
- smart_objects::SmartArray::const_iterator it_tp_end = tp_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- const smart_objects::SmartArray* vh_array =
- (*message_)[strings::msg_params][strings::vr_help].asArray();
-
- smart_objects::SmartArray::const_iterator it_vh = vh_array->begin();
- smart_objects::SmartArray::const_iterator it_vh_end = vh_array->end();
-
- 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");
- 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");
- return true;
- }
- }
- }
- }
- return false;
-}
-
-void PerformInteractionRequest::TerminatePerformInteraction() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[hmi_request::method_name] = "UI.PerformInteraction";
- SendHMIRequest(hmi_apis::FunctionID::UI_ClosePopUp, &msg_params);
- DisablePerformInteraction();
-}
-
-bool PerformInteractionRequest::CheckChoiceIDFromResponse(
- ApplicationSharedPtr app, int32_t choice_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- const DataAccessor<PerformChoiceSetMap> accessor =
- app->performinteraction_choice_set_map();
- const PerformChoiceSetMap& choice_set_map = accessor.GetData();
-
- PerformChoiceSetMap::const_iterator choice_set_map_it =
- choice_set_map.find(correlation_id());
- if (choice_set_map.end() != choice_set_map_it) {
- const PerformChoice& choice = choice_set_map_it->second;
- PerformChoice::const_iterator it = choice.begin();
- for (; choice.end() != it; ++it) {
- const smart_objects::SmartObject& choice_set =
- (*it->second).getElement(strings::choice_set);
- for (size_t j = 0; j < choice_set.length(); ++j) {
- if (choice_id ==
- choice_set.getElement(j).getElement(strings::choice_id).asInt()) {
- return true;
- }
- }
- }
- }
- return false;
-}
-
-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_);
-
- 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_,
- "Couldn't find choiset_id = " << choice_set_id_list[i].asInt());
- return false;
- }
- choice_list_length = (*choice_set)[strings::choice_set].length();
- const smart_objects::SmartObject& choices_list =
- (*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_,
- "Choise with ID "
- << choices_list[k][strings::choice_id].asInt()
- << " already exists");
- return false;
- }
- }
- }
- return true;
-}
-
-const bool PerformInteractionRequest::HasHMIResponsesToWait() const {
- LOG4CXX_AUTO_TRACE(logger_);
- 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;
- ResponseInfo ui_perform_info(
- ui_result_code_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
- 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 =
- PrepareResultCodeForResponse(ui_perform_info, vr_perform_info);
- const smart_objects::SmartObject* response_params =
- msg_param.empty() ? NULL : &msg_param;
- std::string info =
- MergeInfos(ui_perform_info, ui_info_, vr_perform_info, vr_info_);
- DisablePerformInteraction();
- SendResponse(result,
- perform_interaction_result_code,
- info.empty() ? NULL : info.c_str(),
- response_params);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc
deleted file mode 100644
index 6003751669..0000000000
--- a/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/perform_interaction_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PerformInteractionResponse::PerformInteractionResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-PerformInteractionResponse::~PerformInteractionResponse() {}
-
-void PerformInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/put_file_request.cc b/src/components/application_manager/src/commands/mobile/put_file_request.cc
deleted file mode 100644
index 602b420ba0..0000000000
--- a/src/components/application_manager/src/commands/mobile/put_file_request.cc
+++ /dev/null
@@ -1,283 +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 <algorithm>
-#include "application_manager/commands/mobile/put_file_request.h"
-
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/application_impl.h"
-
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PutFileRequest::PutFileRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , offset_(0)
- , sync_file_name_()
- , length_(0)
- , file_type_(mobile_apis::FileType::INVALID_ENUM)
- , is_persistent_file_(false) {}
-
-PutFileRequest::~PutFileRequest() {}
-
-void PutFileRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
- smart_objects::SmartObject response_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() &&
- application_manager_.get_settings().put_file_in_none() <=
- 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 ");
- SendResponse(false,
- mobile_apis::Result::REJECTED,
- "Too many requests from the app with HMILevel HMI_NONE",
- &response_params);
- return;
- }
-
- if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_ERROR(logger_, "Binary data empty");
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "Binary data empty",
- &response_params);
- return;
- }
-
- if (!(*message_)[strings::msg_params].keyExists(strings::sync_file_name)) {
- LOG4CXX_ERROR(logger_, "No file name");
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "No file name",
- &response_params);
- return;
- }
-
- if (!(*message_)[strings::msg_params].keyExists(strings::file_type)) {
- LOG4CXX_ERROR(logger_, "No file type");
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "No file type",
- &response_params);
- return;
- }
- sync_file_name_ =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
-
- if (!file_system::IsFileNameValid(sync_file_name_)) {
- const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- err_msg.c_str(),
- &response_params);
- return;
- }
-
- file_type_ = static_cast<mobile_apis::FileType::eType>(
- (*message_)[strings::msg_params][strings::file_type].asInt());
- const std::vector<uint8_t> binary_data =
- (*message_)[strings::params][strings::binary_data].asBinary();
-
- // Policy table update in json format is currently to be received via PutFile
- // TODO(PV): after latest discussion has to be changed
- if (mobile_apis::FileType::JSON == file_type_) {
- application_manager_.GetPolicyHandler().ReceiveMessageFromSDK(
- sync_file_name_, binary_data);
- }
-
- offset_ = 0;
- is_persistent_file_ = false;
- bool is_system_file = false;
- length_ = binary_data.size();
- bool is_download_compleate = true;
- bool offset_exist =
- (*message_)[strings::msg_params].keyExists(strings::offset);
-
- if (offset_exist) {
- offset_ = (*message_)[strings::msg_params][strings::offset].asInt();
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::persistent_file)) {
- is_persistent_file_ =
- (*message_)[strings::msg_params][strings::persistent_file].asBool();
- }
- if ((*message_)[strings::msg_params].keyExists(strings::system_file)) {
- is_system_file =
- (*message_)[strings::msg_params][strings::system_file].asBool();
- }
-
- std::string file_path;
-
- if (is_system_file) {
- response_params[strings::space_available] = 0;
- file_path = application_manager_.get_settings().system_files_path();
- } else {
- file_path = application_manager_.get_settings().app_storage_folder();
- file_path += "/" + application->folder_name();
-
- uint32_t space_available = application->GetAvailableDiskSpace();
-
- if (binary_data.size() > space_available) {
- response_params[strings::space_available] =
- static_cast<uint32_t>(space_available);
-
- LOG4CXX_ERROR(logger_, "Out of memory");
- SendResponse(false,
- mobile_apis::Result::OUT_OF_MEMORY,
- "Out of memory",
- &response_params);
- return;
- }
- }
-
- if (!file_system::CreateDirectoryRecursively(file_path)) {
- LOG4CXX_ERROR(logger_, "Can't create folder");
- SendResponse(false,
- mobile_apis::Result::GENERIC_ERROR,
- "Can't create folder.",
- &response_params);
- return;
- }
- const std::string full_path = file_path + "/" + sync_file_name_;
- UNUSED(full_path);
- LOG4CXX_DEBUG(logger_,
- "Wrtiting " << 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 "
- << file_system::FileSize(full_path) << " bytes");
- if (!is_system_file) {
- response_params[strings::space_available] =
- static_cast<uint32_t>(application->GetAvailableDiskSpace());
- }
-
- sync_file_name_ = file_path + "/" + sync_file_name_;
- switch (save_result) {
- case mobile_apis::Result::SUCCESS: {
- LOG4CXX_INFO(logger_, "PutFile is successful");
- if (!is_system_file) {
- AppFile file(sync_file_name_,
- is_persistent_file_,
- is_download_compleate,
- file_type_);
-
- if (0 == offset_) {
- LOG4CXX_INFO(logger_, "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)");
- /* 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");
- /* If it is impossible to update file, application doesn't
- know about existing this file */
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "Couldn't update file",
- &response_params);
- return;
- }
- } else {
- /* if file added - increment it's count
- ( may be application->AddFile have to incapsulate it? )
- Any way now this method evals not only in "none"*/
- application->increment_put_file_in_none_count();
- }
- }
- }
-
- SendResponse(true, save_result, "File was downloaded", &response_params);
- if (is_system_file) {
- SendOnPutFileNotification();
- }
- break;
- }
- default:
- LOG4CXX_WARN(logger_,
- "PutFile is unsuccessful. Result = " << save_result);
- SendResponse(false, save_result, "Can't save file", &response_params);
- break;
- }
-}
-
-void PutFileRequest::SendOnPutFileNotification() {
- LOG4CXX_INFO(logger_, "SendOnPutFileNotification");
- smart_objects::SmartObjectSPtr notification =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& message = *notification;
- message[strings::params][strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_OnPutFile;
-
- message[strings::params][strings::message_type] = MessageType::kNotification;
- message[strings::msg_params][strings::app_id] = connection_key();
- message[strings::msg_params][strings::sync_file_name] = sync_file_name_;
- message[strings::msg_params][strings::offset] = offset_;
- if (0 == offset_) {
- message[strings::msg_params][strings::file_size] =
- (*message_)[strings::msg_params][strings::length];
- }
- message[strings::msg_params][strings::length] = length_;
- message[strings::msg_params][strings::persistent_file] = is_persistent_file_;
- message[strings::msg_params][strings::file_type] = file_type_;
- application_manager_.ManageHMICommand(notification);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/put_file_response.cc b/src/components/application_manager/src/commands/mobile/put_file_response.cc
deleted file mode 100644
index 50c62aef7f..0000000000
--- a/src/components/application_manager/src/commands/mobile/put_file_response.cc
+++ /dev/null
@@ -1,64 +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 "application_manager/commands/mobile/put_file_response.h"
-#include "utils/file_system.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PutFileResponse::PutFileResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-PutFileResponse::~PutFileResponse() {}
-
-void PutFileResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- SendResponse((*message_)[strings::msg_params][strings::success].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/read_did_request.cc b/src/components/application_manager/src/commands/mobile/read_did_request.cc
deleted file mode 100644
index c51f545e7e..0000000000
--- a/src/components/application_manager/src/commands/mobile/read_did_request.cc
+++ /dev/null
@@ -1,125 +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 <string>
-#include "application_manager/commands/mobile/read_did_request.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ReadDIDRequest::ReadDIDRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-ReadDIDRequest::~ReadDIDRequest() {}
-
-void ReadDIDRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- uint32_t app_id =
- (*message_)[strings::params][strings::connection_key].asUInt();
-
- ApplicationSharedPtr app = application_manager_.application(app_id);
- LOG4CXX_INFO(
- logger_,
- "Correlation_id :"
- << (*message_)[strings::params][strings::correlation_id].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "An application is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (app->AreCommandLimitsExceeded(
- static_cast<mobile_apis::FunctionID::eType>(function_id()),
- application_manager::TLimitSource::CONFIG_FILE)) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::ecu_name] =
- (*message_)[strings::msg_params][strings::ecu_name];
- msg_params[strings::did_location] =
- (*message_)[strings::msg_params][strings::did_location];
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
-
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_ReadDID, &msg_params, true);
-}
-
-void ReadDIDRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_ReadDID: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- std::string response_info;
- GetInfo(message, response_info);
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/read_did_response.cc b/src/components/application_manager/src/commands/mobile/read_did_response.cc
deleted file mode 100644
index e54c4ba005..0000000000
--- a/src/components/application_manager/src/commands/mobile/read_did_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/read_did_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ReadDIDResponse::ReadDIDResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-ReadDIDResponse::~ReadDIDResponse() {}
-
-void ReadDIDResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
deleted file mode 100644
index a3a30ddb20..0000000000
--- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
+++ /dev/null
@@ -1,1287 +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 "application_manager/commands/mobile/register_app_interface_request.h"
-
-#include <unistd.h>
-#include <algorithm>
-#include <map>
-#include <string.h>
-
-#include <utils/make_shared.h>
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/app_launch/app_launch_ctrl.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/resumption/resume_ctrl.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/helpers/application_helper.h"
-#include "config_profile/profile.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/generated_msg_version.h"
-
-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;
-#ifdef SDL_REMOTE_CONTROL
- } else if ("REMOTE_CONTROL" == str) {
- return mobile_apis::AppHMIType::REMOTE_CONTROL;
-#endif
- } 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"},
-#ifdef SDL_REMOTE_CONTROL
- {mobile_apis::AppHMIType::REMOTE_CONTROL, "REMOTE_CONTROL"},
-#endif // SDL_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)
- : index_(0), so_array_(so_array) {}
-
- bool operator()(const std::string& app_hmi_type) {
- so_array_[index_] = StringToAppHMIType(app_hmi_type);
- ++index_;
- return true;
- }
-
- private:
- uint32_t index_;
- smart_objects::SmartObject& so_array_;
-};
-
-struct CheckMissedTypes {
- CheckMissedTypes(const policy::StringArray& policy_app_types,
- std::string& log)
- : policy_app_types_(policy_app_types), log_(log) {}
-
- bool operator()(const smart_objects::SmartArray::value_type& value) {
- std::string app_type_str = AppHMITypeToString(
- static_cast<mobile_apis::AppHMIType::eType>(value.asInt()));
- if (!app_type_str.empty()) {
- policy::StringArray::const_iterator it = policy_app_types_.begin();
- policy::StringArray::const_iterator it_end = policy_app_types_.end();
- for (; it != it_end; ++it) {
- if (app_type_str == *it) {
- return true;
- }
- }
- }
-
- log_ += app_type_str;
- log_ += ",";
-
- return true;
- }
-
- private:
- const policy::StringArray& policy_app_types_;
- std::string& log_;
-};
-
-class SmartArrayValueExtractor {
- public:
- AppHmiType operator()(const smart_objects::SmartObject& so) const {
- return static_cast<AppHmiType>(so.asInt());
- }
-};
-
-struct IsSameNickname {
- 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());
- }
-
- private:
- const custom_str::CustomString& app_id_;
-};
-}
-
-namespace application_manager {
-
-namespace commands {
-
-RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , result_checking_app_hmi_type_(mobile_apis::Result::INVALID_ENUM) {}
-
-RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {}
-
-bool RegisterAppInterfaceRequest::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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
-
- // wait till HMI started
- 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());
- sleep(1);
- // TODO(DK): timer_->StartWait(1);
- }
-
- if (application_manager_.IsStopping()) {
- LOG4CXX_WARN(logger_, "The ApplicationManager is stopping!");
- return;
- }
-
- if (IsApplicationSwitched()) {
- return;
- }
-
- const std::string mobile_app_id =
- (*message_)[strings::msg_params][strings::app_id].asString();
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY);
- return;
- }
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- const std::string policy_app_id = msg_params[strings::app_id].asString();
- std::string new_policy_app_id = policy_app_id;
- std::transform(policy_app_id.begin(),
- policy_app_id.end(),
- new_policy_app_id.begin(),
- ::tolower);
- (*message_)[strings::msg_params][strings::app_id] = new_policy_app_id;
-
- if (application_manager_.IsApplicationForbidden(connection_key(),
- policy_app_id)) {
- SendResponse(false, mobile_apis::Result::TOO_MANY_PENDING_REQUESTS);
- return;
- }
-
- if (IsApplicationWithSameAppIdRegistered()) {
- SendResponse(false, mobile_apis::Result::DISALLOWED);
- return;
- }
-
- mobile_apis::Result::eType policy_result = CheckWithPolicyData();
-
- if (Compare<mobile_apis::Result::eType, NEQ, ALL>(
- policy_result,
- mobile_apis::Result::SUCCESS,
- mobile_apis::Result::WARNINGS)) {
- SendResponse(false, policy_result);
- return;
- }
-
- mobile_apis::Result::eType coincidence_result = CheckCoincidence();
-
- if (mobile_apis::Result::SUCCESS != coincidence_result) {
- LOG4CXX_ERROR(logger_, "Coincidence check failed.");
- if (mobile_apis::Result::DUPLICATE_NAME == coincidence_result) {
- usage_statistics::AppCounter count_of_rejections_duplicate_name(
- GetPolicyHandler().GetStatisticManager(),
- policy_app_id,
- usage_statistics::REJECTIONS_DUPLICATE_NAME);
- ++count_of_rejections_duplicate_name;
- }
- SendResponse(false, coincidence_result);
- return;
- }
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_INFO(logger_,
- "Incoming register app interface has contains \t\n \\t \\n");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- application = application_manager_.RegisterApplication(message_);
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application hasn't been registered!");
- return;
- }
- // For resuming application need to restore hmi_app_id from resumeCtrl
- resumption::ResumeCtrl& resumer = application_manager_.resume_controller();
- const std::string& device_mac = application->mac_address();
-
- // there is side affect with 2 mobile app with the same mobile app_id
- if (resumer.IsApplicationSaved(policy_app_id, device_mac)) {
- application->set_hmi_application_id(
- resumer.GetHMIApplicationID(policy_app_id, device_mac));
- } else {
- application->set_hmi_application_id(
- application_manager_.GenerateNewHMIAppID());
- }
-
- 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)) {
- application->set_tts_name(msg_params[strings::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) {
- if (mobile_apis::AppHMIType::NAVIGATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt())) {
- application->set_is_navi(true);
- }
- if (mobile_apis::AppHMIType::COMMUNICATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt())) {
- application->set_voice_communication_supported(true);
- }
- if (mobile_apis::AppHMIType::PROJECTION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt())) {
- application->set_mobile_projection_enabled(true);
- }
- }
- }
-
- // 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);
- }
-
- GetPolicyHandler().SetDeviceInfo(device_mac, device_info);
-
- SendRegisterAppInterfaceResponseToMobile(ApplicationType::kNewApplication);
- smart_objects::SmartObjectSPtr so =
- GetLockScreenIconUrlNotification(connection_key(), application);
- application_manager_.ManageMobileCommand(so, commands::Command::ORIGIN_SDL);
-}
-
-smart_objects::SmartObjectSPtr
-RegisterAppInterfaceRequest::GetLockScreenIconUrlNotification(
- const uint32_t connection_key, ApplicationSharedPtr app) {
- DCHECK_OR_RETURN(app.get(), smart_objects::SmartObjectSPtr());
- smart_objects::SmartObjectSPtr message =
- utils::MakeShared<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] =
- commands::CommandImpl::mobile_protocol_type_;
- (*message)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*message)[strings::msg_params][strings::request_type] =
- mobile_apis::RequestType::LOCK_SCREEN_ICON_URL;
- (*message)[strings::msg_params][strings::url] =
- GetPolicyHandler().GetLockScreenIconUrl();
- return message;
-}
-
-void FillVRRelatedFields(smart_objects::SmartObject& response_params,
- const HMICapabilities& hmi_capabilities) {
- response_params[strings::language] = hmi_capabilities.active_vr_language();
- if (hmi_capabilities.vr_capabilities()) {
- response_params[strings::vr_capabilities] =
- *hmi_capabilities.vr_capabilities();
- }
-}
-
-void FillVIRelatedFields(smart_objects::SmartObject& response_params,
- const HMICapabilities& hmi_capabilities) {
- if (hmi_capabilities.vehicle_type()) {
- response_params[hmi_response::vehicle_type] =
- *hmi_capabilities.vehicle_type();
- }
-}
-
-void FillTTSRelatedFields(smart_objects::SmartObject& response_params,
- const HMICapabilities& hmi_capabilities) {
- response_params[strings::language] = hmi_capabilities.active_tts_language();
- if (hmi_capabilities.speech_capabilities()) {
- response_params[strings::speech_capabilities] =
- *hmi_capabilities.speech_capabilities();
- }
- if (hmi_capabilities.prerecorded_speech()) {
- response_params[strings::prerecorded_speech] =
- *(hmi_capabilities.prerecorded_speech());
- }
-}
-
-void FillUIRelatedFields(smart_objects::SmartObject& response_params,
- const HMICapabilities& hmi_capabilities) {
- response_params[strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
- if (hmi_capabilities.display_capabilities()) {
- response_params[hmi_response::display_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& display_caps =
- response_params[hmi_response::display_capabilities];
-
- display_caps[hmi_response::display_type] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::display_type);
-
- display_caps[hmi_response::text_fields] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::text_fields);
-
- display_caps[hmi_response::image_fields] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::image_fields);
-
- display_caps[hmi_response::media_clock_formats] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::media_clock_formats);
-
- display_caps[hmi_response::templates_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::templates_available);
-
- display_caps[hmi_response::screen_params] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::screen_params);
-
- display_caps[hmi_response::num_custom_presets_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::num_custom_presets_available);
-
- display_caps[hmi_response::graphic_supported] =
- (hmi_capabilities.display_capabilities()
- ->getElement(hmi_response::image_capabilities)
- .length() > 0);
-
- display_caps[hmi_response::templates_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::templates_available);
-
- display_caps[hmi_response::screen_params] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::screen_params);
-
- display_caps[hmi_response::num_custom_presets_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::num_custom_presets_available);
- }
-
- if (hmi_capabilities.audio_pass_thru_capabilities()) {
- if (smart_objects::SmartType_Array ==
- hmi_capabilities.audio_pass_thru_capabilities()->getType()) {
- // hmi_capabilities json contains array and HMI response object
- response_params[strings::audio_pass_thru_capabilities] =
- *hmi_capabilities.audio_pass_thru_capabilities();
- } else {
- response_params[strings::audio_pass_thru_capabilities][0] =
- *hmi_capabilities.audio_pass_thru_capabilities();
- }
- }
- response_params[strings::hmi_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- response_params[strings::hmi_capabilities][strings::navigation] =
- hmi_capabilities.navigation_supported();
- response_params[strings::hmi_capabilities][strings::phone_call] =
- hmi_capabilities.phone_call_supported();
- response_params[strings::hmi_capabilities][strings::video_streaming] =
- hmi_capabilities.video_streaming_supported();
- response_params[strings::hmi_capabilities][strings::remote_control] =
- hmi_capabilities.rc_supported();
-}
-
-void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
- ApplicationType app_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
-
- mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
-
- const HMICapabilities& hmi_capabilities =
- application_manager_.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;
- }
-
- response_params[strings::sync_msg_version][strings::major_version] =
- major_version; // From generated file interfaces/generated_msg_version.h
- response_params[strings::sync_msg_version][strings::minor_version] =
- minor_version; // From generated file interfaces/generated_msg_version.h
- response_params[strings::sync_msg_version][strings::patch_version] =
- patch_version; // From generated file interfaces/generated_msg_version.h
-
- 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)) {
- FillTTSRelatedFields(response_params, hmi_capabilities);
- }
-
- if (HmiInterfaces::STATE_NOT_AVAILABLE !=
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_VR)) {
- FillVRRelatedFields(response_params, hmi_capabilities);
- }
-
- if (HmiInterfaces::STATE_NOT_AVAILABLE !=
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_UI)) {
- FillUIRelatedFields(response_params, hmi_capabilities);
- }
-
- if (HmiInterfaces::STATE_NOT_AVAILABLE !=
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_VehicleInfo)) {
- FillVIRelatedFields(response_params, hmi_capabilities);
- }
-
- if (hmi_capabilities.button_capabilities()) {
- response_params[hmi_response::button_capabilities] =
- *hmi_capabilities.button_capabilities();
- }
-
- if (hmi_capabilities.soft_button_capabilities()) {
- response_params[hmi_response::soft_button_capabilities] =
- *hmi_capabilities.soft_button_capabilities();
- }
-
- if (hmi_capabilities.preset_bank_capabilities()) {
- response_params[hmi_response::preset_bank_capabilities] =
- *hmi_capabilities.preset_bank_capabilities();
- }
-
- 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_capabilities.hmi_zone_capabilities();
- } else {
- response_params[hmi_response::hmi_zone_capabilities][0] =
- *hmi_capabilities.hmi_zone_capabilities();
- }
- }
-
- if (hmi_capabilities.pcm_stream_capabilities()) {
- response_params[strings::pcm_stream_capabilities] =
- *hmi_capabilities.pcm_stream_capabilities();
- }
-
- const std::vector<uint32_t>& diag_modes =
- application_manager_.get_settings().supported_diag_modes();
- if (!diag_modes.empty()) {
- std::vector<uint32_t>::const_iterator it = diag_modes.begin();
- uint32_t index = 0;
- for (; it != diag_modes.end(); ++it) {
- response_params[strings::supported_diag_modes][index] = *it;
- ++index;
- }
- }
-
- response_params[strings::sdl_version] =
- application_manager_.get_settings().sdl_version();
- const std::string ccpu_version =
- application_manager_.hmi_capabilities().ccpu_version();
- if (!ccpu_version.empty()) {
- response_params[strings::system_software_version] = ccpu_version;
- }
-
- if (ApplicationType::kSwitchedApplicationWrongHashId == app_type) {
- LOG4CXX_DEBUG(logger_,
- "Application has been switched from another transport, "
- "but doesn't have correct hashID.");
-
- application_manager::DeleteApplicationData(application,
- application_manager_);
-
- SendResponse(
- true, mobile_apis::Result::RESUME_FAILED, NULL, &response_params);
- return;
- }
-
- if (ApplicationType::kSwitchedApplicationHashOk == app_type) {
- LOG4CXX_DEBUG(logger_,
- "Application has been switched from another transport "
- "and has correct hashID.");
- SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
- return;
- }
-
- bool resumption =
- (*message_)[strings::msg_params].keyExists(strings::hash_id);
-
- bool need_restore_vr = resumption;
-
- std::string hash_id;
- std::string add_info;
- if (resumption) {
- hash_id = (*message_)[strings::msg_params][strings::hash_id].asString();
- 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.";
- }
- }
- if ((mobile_apis::Result::SUCCESS == result_code) &&
- (mobile_apis::Result::INVALID_ENUM != result_checking_app_hmi_type_)) {
- add_info += response_info_;
- result_code = result_checking_app_hmi_type_;
- }
-
- // in case application exist in resumption we need to send resumeVrgrammars
- if (false == resumption) {
- resumption = resumer.IsApplicationSaved(application->policy_app_id(),
- application->mac_address());
- }
-
- 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->policy_app_id(), hmi_types);
- SendResponse(true, result_code, add_info.c_str(), &response_params);
- SendOnAppRegisteredNotificationToHMI(
- *(application.get()), resumption, need_restore_vr);
-#ifdef SDL_REMOTE_CONTROL
- if (msg_params.keyExists(strings::app_hmi_type)) {
- GetPolicyHandler().SetDefaultHmiTypes(application->policy_app_id(),
- &(msg_params[strings::app_hmi_type]));
- }
-#endif // SDL_REMOTE_CONTROL
-
- // Default HMI level should be set before any permissions validation, since it
- // relies on HMI level.
- application_manager_.OnApplicationRegistered(application);
- (*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->policy_app_id());
-
- if (result_code != mobile_apis::Result::RESUME_FAILED) {
- resumer.StartResumption(application, hash_id);
- } else {
- resumer.StartResumptionOnlyHMILevel(application);
- }
-
- // By default app subscribed to CUSTOM_BUTTON
- SendSubscribeCustomButtonNotification();
- SendChangeRegistrationOnHMI(application);
-}
-
-DEPRECATED void
-RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
- SendRegisterAppInterfaceResponseToMobile(ApplicationType::kNewApplication);
-}
-
-void RegisterAppInterfaceRequest::SendChangeRegistration(
- const hmi_apis::FunctionID::eType function_id,
- const int32_t language,
- const uint32_t app_id) {
- using helpers::Compare;
- using helpers::EQ;
- using helpers::ONE;
- const HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- const HmiInterfaces::InterfaceID interface =
- hmi_interfaces.GetInterfaceFromFunction(function_id);
- if (hmi_interfaces.GetInterfaceState(interface) !=
- HmiInterfaces::STATE_NOT_AVAILABLE) {
- smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[strings::language] = language;
- msg_params[strings::app_id] = app_id;
- SendHMIRequest(function_id, &msg_params);
- } else {
- LOG4CXX_DEBUG(logger_, "Interface " << interface << "is not avaliable");
- }
-}
-
-void RegisterAppInterfaceRequest::SendChangeRegistrationOnHMI(
- ApplicationConstSharedPtr app) {
- using namespace hmi_apis::FunctionID;
- DCHECK_OR_RETURN_VOID(app);
- DCHECK_OR_RETURN_VOID(mobile_apis::Language::INVALID_ENUM != app->language());
- SendChangeRegistration(VR_ChangeRegistration, app->language(), app->app_id());
- SendChangeRegistration(
- TTS_ChangeRegistration, app->language(), app->app_id());
- SendChangeRegistration(UI_ChangeRegistration, app->language(), app->app_id());
-}
-
-void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
- const Application& application_impl,
- bool resumption,
- bool need_restore_vr) {
- using namespace smart_objects;
- SmartObjectSPtr notification = utils::MakeShared<SmartObject>(SmartType_Map);
- if (!notification) {
- LOG4CXX_ERROR(logger_, "Failed to create smart object");
- return;
- }
-
- (*notification)[strings::params] = SmartObject(SmartType_Map);
- smart_objects::SmartObject& params = (*notification)[strings::params];
- params[strings::function_id] = static_cast<int32_t>(
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
- params[strings::message_type] = static_cast<int32_t>(kNotification);
- params[strings::protocol_version] = commands::CommandImpl::protocol_version_;
- params[strings::protocol_type] = commands::CommandImpl::hmi_protocol_type_;
-
- (*notification)[strings::msg_params] = SmartObject(SmartType_Map);
- smart_objects::SmartObject& msg_params = (*notification)[strings::msg_params];
- // 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;
- }
-
- if (application_impl.vr_synonyms()) {
- msg_params[strings::vr_synonyms] = *(application_impl.vr_synonyms());
- }
-
- if (application_impl.tts_name()) {
- msg_params[strings::tts_name] = *(application_impl.tts_name());
- }
-
- std::string priority;
- GetPolicyHandler().GetPriority(application_impl.policy_app_id(), &priority);
-
- if (!priority.empty()) {
- msg_params[strings::priority] = MessageHelper::GetPriorityCode(priority);
- }
-
- msg_params[strings::msg_params] = SmartObject(SmartType_Map);
- smart_objects::SmartObject& application = msg_params[strings::application];
- application[strings::app_name] = application_impl.name();
- application[strings::app_id] = application_impl.app_id();
- application[hmi_response::policy_app_id] = application_impl.policy_app_id();
- application[strings::icon] = application_impl.app_icon_path();
-
- const smart_objects::SmartObject* ngn_media_screen_name =
- application_impl.ngn_media_screen_name();
- if (ngn_media_screen_name) {
- application[strings::ngn_media_screen_app_name] = *ngn_media_screen_name;
- }
-
- application[strings::hmi_display_language_desired] =
- static_cast<int32_t>(application_impl.ui_language());
-
- application[strings::is_media_application] =
- application_impl.is_media_application();
-
- const smart_objects::SmartObject* app_type = application_impl.app_types();
- if (app_type) {
- application[strings::app_type] = *app_type;
- }
-
- std::vector<std::string> request_types =
- GetPolicyHandler().GetAppRequestTypes(application_impl.policy_app_id());
-
- application[strings::request_type] = SmartObject(SmartType_Array);
- smart_objects::SmartObject& request_array =
- application[strings::request_type];
-
- uint32_t index = 0;
- std::vector<std::string>::const_iterator it = request_types.begin();
- for (; request_types.end() != it; ++it) {
- request_array[index] = *it;
- ++index;
- }
-
- application[strings::device_info] = SmartObject(SmartType_Map);
- smart_objects::SmartObject& device_info = application[strings::device_info];
- const protocol_handler::SessionObserver& session_observer =
- application_manager_.connection_handler().get_session_observer();
- std::string device_name;
- std::string mac_address;
- std::string transport_type;
- const connection_handler::DeviceHandle handle = application_impl.device();
- if (-1 ==
- session_observer.GetDataOnDeviceID(
- handle, &device_name, NULL, &mac_address, &transport_type)) {
- LOG4CXX_ERROR(logger_,
- "Failed to extract information for device " << handle);
- }
-
- device_info[strings::name] = device_name;
- device_info[strings::id] = mac_address;
-
- const policy::DeviceConsent device_consent =
- GetPolicyHandler().GetUserConsentForDevice(mac_address);
- device_info[strings::isSDLAllowed] =
- policy::DeviceConsent::kDeviceAllowed == device_consent;
-
- device_info[strings::transport_type] =
- application_manager_.GetDeviceTransportType(transport_type);
-
- DCHECK(application_manager_.ManageHMICommand(notification));
-}
-
-mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- ApplicationSet accessor = application_manager_.applications().GetData();
-
- ApplicationSetConstIt it = accessor.begin();
- const custom_str::CustomString& app_name =
- msg_params[strings::app_name].asCustomString();
-
- for (; accessor.end() != it; ++it) {
- // name check
- const custom_str::CustomString& cur_name = (*it)->name();
- if (app_name.CompareIgnoreCase(cur_name)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- const smart_objects::SmartObject* vr = (*it)->vr_synonyms();
- const std::vector<smart_objects::SmartObject>* curr_vr = NULL;
- if (NULL != vr) {
- curr_vr = vr->asArray();
- CoincidencePredicateVR v(app_name);
-
- if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
-
- // vr check
- if (msg_params.keyExists(strings::vr_synonyms)) {
- const std::vector<smart_objects::SmartObject>* new_vr =
- msg_params[strings::vr_synonyms].asArray();
-
- 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 .");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- } // end vr check
-
- } // application for end
-
- return mobile_apis::Result::SUCCESS;
-} // method end
-
-mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
- LOG4CXX_AUTO_TRACE(logger_);
- // TODO(AOleynik): Check is necessary to allow register application in case
- // of disabled policy
- // Remove this check, when HMI will support policy
- if (!GetPolicyHandler().PolicyEnabled()) {
- return mobile_apis::Result::WARNINGS;
- }
-
- smart_objects::SmartObject& message = *message_;
- policy::StringArray app_nicknames;
- policy::StringArray app_hmi_types;
-
- const std::string mobile_app_id =
- message[strings::msg_params][strings::app_id].asString();
- const bool init_result = GetPolicyHandler().GetInitialAppData(
- mobile_app_id, &app_nicknames, &app_hmi_types);
-
- if (!init_result) {
- LOG4CXX_ERROR(logger_, "Error during initial application data check.");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if (!app_nicknames.empty()) {
- IsSameNickname compare(
- message[strings::msg_params][strings::app_name].asCustomString());
- 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.");
- // App should be unregistered, if its name is not present in nicknames
- // list
- usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
- GetPolicyHandler().GetStatisticManager(),
- mobile_app_id,
- usage_statistics::REJECTIONS_NICKNAME_MISMATCH);
- ++count_of_rejections_nickname_mismatch;
- return mobile_apis::Result::DISALLOWED;
- }
- }
-
- mobile_apis::Result::eType 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_checking_app_hmi_type_ = 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);
-
- 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;
-}
-
-void RegisterAppInterfaceRequest::FillDeviceInfo(
- policy::DeviceInfo* device_info) {
- const std::string hardware = "hardware";
- const std::string firmware_rev = "firmwareRev";
- const std::string os = "os";
- const std::string os_ver = "osVersion";
- const std::string carrier = "carrier";
- const std::string max_number_rfcom_ports = "maxNumberRFCOMMPorts";
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- const smart_objects::SmartObject& device_info_so =
- msg_params[strings::device_info];
-
- if (device_info_so.keyExists(hardware)) {
- device_info->hardware =
- msg_params[strings::device_info][hardware].asString();
- }
- if (device_info_so.keyExists(firmware_rev)) {
- device_info->firmware_rev =
- msg_params[strings::device_info][firmware_rev].asString();
- }
- if (device_info_so.keyExists(os)) {
- device_info->os = device_info_so[os].asString();
- }
- if (device_info_so.keyExists(os_ver)) {
- device_info->os_ver = device_info_so[os_ver].asString();
- }
- if (device_info_so.keyExists(carrier)) {
- device_info->carrier = device_info_so[carrier].asString();
- }
- if (device_info_so.keyExists(max_number_rfcom_ports)) {
- device_info->max_number_rfcom_ports =
- device_info_so[max_number_rfcom_ports].asInt();
- }
-}
-
-bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const custom_string::CustomString mobile_app_id =
- (*message_)[strings::msg_params][strings::app_id].asCustomString();
-
- const ApplicationSet& applications =
- application_manager_.applications().GetData();
-
- ApplicationSetConstIt it = applications.begin();
- ApplicationSetConstIt it_end = applications.end();
-
- for (; it != it_end; ++it) {
- if (mobile_app_id.CompareIgnoreCase((*it)->policy_app_id().c_str())) {
- return true;
- }
- }
-
- return false;
-}
-
-bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- str = (*message_)[strings::msg_params][strings::app_name].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid app_name syntax check failed");
- return true;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::tts_name)) {
- const smart_objects::SmartArray* tn_array =
- (*message_)[strings::msg_params][strings::tts_name].asArray();
-
- smart_objects::SmartArray::const_iterator it_tn = tn_array->begin();
- smart_objects::SmartArray::const_iterator it_tn_end = tn_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(
- strings::ngn_media_screen_app_name)) {
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::vr_synonyms)) {
- const smart_objects::SmartArray* vs_array =
- (*message_)[strings::msg_params][strings::vr_synonyms].asArray();
-
- smart_objects::SmartArray::const_iterator it_vs = vs_array->begin();
- smart_objects::SmartArray::const_iterator it_vs_end = vs_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
- if ((*message_)[strings::msg_params][strings::device_info].keyExists(
- strings::hardware)) {
- str = (*message_)[strings::msg_params][strings::device_info]
- [strings::hardware].asCharArray();
- if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info hardware syntax check failed");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params][strings::device_info].keyExists(
- strings::firmware_rev)) {
- str = (*message_)[strings::msg_params][strings::device_info]
- [strings::firmware_rev].asCharArray();
- if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info firmware_rev syntax check failed");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params][strings::device_info].keyExists(
- strings::os)) {
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params][strings::device_info].keyExists(
- strings::os_version)) {
- str = (*message_)[strings::msg_params][strings::device_info]
- [strings::os_version].asCharArray();
- if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info os_version syntax check failed");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params][strings::device_info].keyExists(
- strings::carrier)) {
- str = (*message_)[strings::msg_params][strings::device_info]
- [strings::carrier].asCharArray();
- if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info carrier syntax check failed");
- return true;
- }
- }
- }
-
- 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");
- return true;
- }
- }
-
- return false;
-}
-
-void RegisterAppInterfaceRequest::CheckResponseVehicleTypeParam(
- smart_objects::SmartObject& vehicle_type,
- const std::string& param,
- const std::string& backup_value) {
- using namespace hmi_response;
- if (!vehicle_type.keyExists(param) || vehicle_type[param].empty()) {
- if (!backup_value.empty()) {
- LOG4CXX_DEBUG(logger_,
- param << " is missing."
- "Will be replaced with policy table value.");
- vehicle_type[param] = backup_value;
- } else {
- vehicle_type.erase(param);
- }
- }
-}
-
-void RegisterAppInterfaceRequest::SendSubscribeCustomButtonNotification() {
- using namespace smart_objects;
- using namespace hmi_apis;
-
- SmartObject msg_params = SmartObject(SmartType_Map);
- msg_params[strings::app_id] = connection_key();
- msg_params[strings::name] = Common_ButtonName::CUSTOM_BUTTON;
- msg_params[strings::is_suscribed] = true;
- CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
-}
-
-bool RegisterAppInterfaceRequest::IsApplicationSwitched() {
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- const std::string& policy_app_id = msg_params[strings::app_id].asString();
-
- LOG4CXX_DEBUG(logger_, "Looking for application id " << policy_app_id);
-
- auto app = application_manager_.application_by_policy_id(policy_app_id);
-
- if (!app) {
- LOG4CXX_DEBUG(logger_,
- "Application with policy id " << policy_app_id
- << " is not found.");
- return false;
- }
-
- LOG4CXX_DEBUG(logger_,
- "Application with policy id " << policy_app_id << " is found.");
- if (!application_manager_.IsAppInReconnectMode(policy_app_id)) {
- LOG4CXX_DEBUG(logger_,
- "Policy id " << policy_app_id
- << " is not found in reconnection list.");
- SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY);
- return false;
- }
-
- LOG4CXX_DEBUG(logger_, "Application is found in reconnection list.");
-
- auto app_type = ApplicationType::kSwitchedApplicationWrongHashId;
- if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) {
- const auto hash_id =
- (*message_)[strings::msg_params][strings::hash_id].asString();
-
- auto& resume_ctrl = application_manager_.resume_controller();
- if (resume_ctrl.CheckApplicationHash(app, hash_id)) {
- app_type = ApplicationType::kSwitchedApplicationHashOk;
- }
- }
-
- application_manager_.ProcessReconnection(app, connection_key());
- SendRegisterAppInterfaceResponseToMobile(app_type);
-
- application_manager_.SendHMIStatusNotification(app);
-
- application_manager_.OnApplicationSwitched(app);
-
- return true;
-}
-
-policy::PolicyHandlerInterface&
-RegisterAppInterfaceRequest::GetPolicyHandler() {
- return application_manager_.GetPolicyHandler();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
deleted file mode 100644
index 3e94e652d4..0000000000
--- a/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
+++ /dev/null
@@ -1,99 +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 "application_manager/commands/mobile/register_app_interface_response.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "connection_handler/connection_handler.h"
-#include "application_manager/policies/policy_handler_interface.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void RegisterAppInterfaceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
- bool success = (*message_)[strings::msg_params][strings::success].asBool();
- bool last_message = !success;
- // Do not close connection in case of APPLICATION_NOT_REGISTERED despite it is
- // an error
- if (!success &&
- (*message_)[strings::msg_params].keyExists(strings::result_code)) {
- result_code = static_cast<mobile_apis::Result::eType>(
- (*message_)[strings::msg_params][strings::result_code].asInt());
- if (result_code == mobile_apis::Result::APPLICATION_REGISTERED_ALREADY) {
- last_message = false;
- }
- }
-
- SendResponse(success, result_code, last_message);
-
- if (mobile_apis::Result::SUCCESS != result_code) {
- return;
- }
-
- // 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
- application_manager::ApplicationSharedPtr application =
- application_manager_.application(connection_key());
- if (!application) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key " << connection_key()
- << " is not registered.");
- return;
- }
-
- SetHeartBeatTimeout(connection_key(), application->policy_app_id());
-}
-
-void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
- uint32_t connection_key, const std::string& mobile_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- policy::PolicyHandlerInterface& policy_handler =
- application_manager_.GetPolicyHandler();
- if (policy_handler.PolicyEnabled()) {
- const uint32_t timeout = policy_handler.HeartBeatTimeout(mobile_app_id);
- if (timeout > 0) {
- application_manager_.connection_handler().SetHeartBeatTimeout(
- connection_key, timeout);
- }
- } else {
- LOG4CXX_INFO(logger_, "Policy is turn off");
- }
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc b/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
deleted file mode 100644
index a7c2db0e65..0000000000
--- a/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
+++ /dev/null
@@ -1,327 +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 "application_manager/commands/mobile/reset_global_properties_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
- , tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
-
-ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {}
-
-void ResetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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");
- 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;
- }
- }
-
- if (vr_help_title_items || menu_name || menu_icon ||
- is_key_board_properties) {
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- }
-
- if (timeout_prompt || helpt_promt) {
- 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_text] = "";
- 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) {
- // 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());
- }
-
- 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;
-}
-
-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;
- }
- app->reset_vr_help_title();
- app->reset_vr_help();
-
- return true;
-}
-
-void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "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());
- GetInfo(message, ui_response_info_);
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "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());
- GetInfo(message, tts_response_info_);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- if (IsPendingResponseExist()) {
- LOG4CXX_DEBUG(logger_, "Waiting for remaining responses");
- return;
- }
-
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- std::string response_info;
- const bool result = PrepareResponseParameters(result_code, response_info);
-
- SendResponse(result,
- static_cast<mobile_apis::Result::eType>(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
-}
-
-bool ResetGlobalPropertiesRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-bool ResetGlobalPropertiesRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& out_result_code,
- std::string& out_response_info) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- bool result = false;
- ResponseInfo ui_properties_info(
- ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
- ResponseInfo tts_properties_info(
- tts_result_, HmiInterfaces::HMI_INTERFACE_TTS, application_manager_);
-
- HmiInterfaces::InterfaceState tts_interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_TTS);
-
- if (hmi_apis::Common_Result::SUCCESS == ui_result_ &&
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_ &&
- HmiInterfaces::STATE_AVAILABLE == tts_interface_state) {
- result = true;
- out_result_code = mobile_apis::Result::WARNINGS;
- out_response_info = "Unsupported phoneme type sent in a prompt";
- } else {
- result =
- PrepareResultForMobileResponse(ui_properties_info, tts_properties_info);
- out_result_code =
- PrepareResultCodeForResponse(ui_properties_info, tts_properties_info);
- out_response_info = MergeInfos(tts_properties_info,
- tts_response_info_,
- ui_properties_info,
- ui_response_info_);
- }
-
- return result;
-}
-
-bool ResetGlobalPropertiesRequest::IsPendingResponseExist() {
- return IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS) ||
- IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_UI);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc b/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc
deleted file mode 100644
index c621977868..0000000000
--- a/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/reset_global_properties_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {}
-
-void ResetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc b/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
deleted file mode 100644
index b0b2d5f464..0000000000
--- a/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
+++ /dev/null
@@ -1,154 +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 <string.h>
-#include "application_manager/commands/mobile/scrollable_message_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ScrollableMessageRequest::ScrollableMessageRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
-}
-
-ScrollableMessageRequest::~ScrollableMessageRequest() {}
-
-bool ScrollableMessageRequest::Init() {
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- } else {
- const int32_t def_value = 30000;
- default_timeout_ = def_value;
- }
-
- return true;
-}
-
-void ScrollableMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- // ProcessSoftButtons checks strings on the contents incorrect character
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
- app,
- application_manager_.GetPolicyHandler(),
- application_manager_);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
- SendResponse(false, processing_result);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[hmi_request::message_text][hmi_request::field_name] =
- static_cast<int32_t>(
- hmi_apis::Common_TextFieldName::scrollableMessageBody);
- msg_params[hmi_request::message_text][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::scroll_message_body];
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::timeout] = default_timeout_;
-
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- msg_params[strings::soft_buttons] =
- (*message_)[strings::msg_params][strings::soft_buttons];
- MessageHelper::SubscribeApplicationToSoftButton(
- (*message_)[strings::msg_params], app, function_id());
- }
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_ScrollableMessage, &msg_params, true);
-}
-
-void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
-
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
-
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc b/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc
deleted file mode 100644
index a5b16bdb70..0000000000
--- a/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/mobile/scrollable_message_response.h"
-
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ScrollableMessageResponse::ScrollableMessageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-void ScrollableMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- (*message_)[strings::msg_params][strings::result_code].asInt());
- ApplicationSharedPtr application = application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asInt());
- if ((mobile_apis::Result::REJECTED != result_code) && application) {
- application->UnsubscribeFromSoftButtons(
- (*message_)[strings::params][strings::function_id].asInt());
- }
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc b/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc
deleted file mode 100644
index 569eba6c02..0000000000
--- a/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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/commands/mobile/send_haptic_data_request.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-SendHapticDataRequest::SendHapticDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SendHapticDataRequest::~SendHapticDataRequest() {}
-
-void SendHapticDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (app->is_navi() || app->mobile_projection_enabled()) {
- SendHMIRequest(hmi_apis::FunctionID::UI_SendHapticData, &msg_params, true);
- } else {
- SendResponse(false,
- mobile_apis::Result::DISALLOWED,
- "Application is not of type Navigation or Mobile Projection");
- }
-}
-
-void SendHapticDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SendHapticData: {
- mobile_apis::Result::eType result_code =
- GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
-
- const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/send_haptic_data_response.cc b/src/components/application_manager/src/commands/mobile/send_haptic_data_response.cc
deleted file mode 100644
index c8649d34af..0000000000
--- a/src/components/application_manager/src/commands/mobile/send_haptic_data_response.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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/commands/mobile/send_haptic_data_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SendHapticDataResponse::SendHapticDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SendHapticDataResponse::~SendHapticDataResponse() {}
-
-void SendHapticDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/send_location_request.cc b/src/components/application_manager/src/commands/mobile/send_location_request.cc
deleted file mode 100644
index 54664a8771..0000000000
--- a/src/components/application_manager/src/commands/mobile/send_location_request.cc
+++ /dev/null
@@ -1,276 +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 <algorithm>
-#include "application_manager/commands/mobile/send_location_request.h"
-#include "application_manager/message_helper.h"
-#include "utils/custom_string.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SendLocationRequest::SendLocationRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SendLocationRequest::~SendLocationRequest() {}
-
-void SendLocationRequest::Run() {
- using namespace hmi_apis;
- using smart_objects::SmartObject;
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
- if (msg_params.keyExists(strings::delivery_mode)) {
- const RPCParams& allowed_params = parameters_permissions().allowed_params;
-
- if (helpers::in_range(allowed_params, strings::delivery_mode)) {
- msg_params.erase(strings::delivery_mode);
- }
- }
-
- std::vector<Common_TextFieldName::eType> fields_to_check;
- if (msg_params.keyExists(strings::location_name)) {
- fields_to_check.push_back(Common_TextFieldName::locationName);
- }
- if (msg_params.keyExists(strings::location_description)) {
- fields_to_check.push_back(Common_TextFieldName::locationDescription);
- }
- if (msg_params.keyExists(strings::address_lines)) {
- fields_to_check.push_back(Common_TextFieldName::addressLines);
- }
- if (msg_params.keyExists(strings::phone_number)) {
- fields_to_check.push_back(Common_TextFieldName::phoneNumber);
- }
-
- if (!CheckHMICapabilities(fields_to_check)) {
- SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
- return;
- }
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "Strings contain invalid characters");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (msg_params.keyExists(strings::address)) {
- const utils::custom_string::CustomString& address =
- msg_params[strings::address].asCustomString();
- if (address.empty()) {
- msg_params.erase(strings::address);
- }
- }
-
- if (!CheckFieldsCompatibility()) {
- LOG4CXX_ERROR(logger_, "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(
- (*message_)[strings::msg_params][strings::location_image],
- app,
- application_manager_);
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
- SendResponse(false, verification_result);
- return;
- }
- }
-
- SmartObject request_msg_params = SmartObject(smart_objects::SmartType_Map);
- request_msg_params = msg_params;
- request_msg_params[strings::app_id] = app->hmi_app_id();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(
- hmi_apis::FunctionID::Navigation_SendLocation, &request_msg_params, true);
-}
-
-void SendLocationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- const Common_Result::eType result_code = static_cast<Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::params]));
- return;
- }
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
-}
-
-bool SendLocationRequest::CheckFieldsCompatibility() {
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
- MessageHelper::PrintSmartObject(msg_params);
- const bool longitude_degrees_exist =
- msg_params.keyExists(strings::longitude_degrees);
- const bool latitude_degrees_exist =
- msg_params.keyExists(strings::latitude_degrees);
- 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");
- return false;
- }
-
- if (!address_exist && !longitude_degrees_exist && !latitude_degrees_exist) {
- LOG4CXX_DEBUG(logger_,
- "address or latitude/longtitude should should be provided");
- return false;
- }
- return true;
-}
-void insert_if_contains(
- const smart_objects::SmartObject& msg_params,
- const std::string& param_key,
- std::vector<utils::custom_string::CustomString>& output_vector) {
- if (msg_params.keyExists(param_key)) {
- output_vector.push_back(msg_params[param_key].asCustomString());
- }
-}
-
-bool SendLocationRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- std::vector<utils::custom_string::CustomString> fields_to_check;
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
- insert_if_contains(msg_params, strings::location_name, fields_to_check);
- insert_if_contains(
- msg_params, strings::location_description, fields_to_check);
- insert_if_contains(msg_params, strings::phone_number, fields_to_check);
-
- if (msg_params.keyExists(strings::address_lines)) {
- const smart_objects::SmartArray* al_array =
- msg_params[strings::address_lines].asArray();
- smart_objects::SmartArray::const_iterator it_al = al_array->begin();
- smart_objects::SmartArray::const_iterator it_al_end = al_array->end();
- for (; it_al != it_al_end; ++it_al) {
- const utils::custom_string::CustomString& val = (*it_al).asCustomString();
- fields_to_check.push_back(val);
- }
- }
-
- if (msg_params.keyExists(strings::address)) {
- const smart_objects::SmartObject& address_so = msg_params[strings::address];
- insert_if_contains(address_so, strings::country_name, fields_to_check);
- insert_if_contains(address_so, strings::country_code, fields_to_check);
- insert_if_contains(address_so, strings::postal_code, fields_to_check);
- insert_if_contains(
- address_so, strings::administrative_area, fields_to_check);
- insert_if_contains(address_so, strings::locality, fields_to_check);
- insert_if_contains(address_so, strings::sub_locality, fields_to_check);
- insert_if_contains(address_so, strings::thoroughfare, fields_to_check);
- insert_if_contains(address_so, strings::sub_thoroughfare, fields_to_check);
- }
-
- std::vector<utils::custom_string::CustomString>::iterator it =
- fields_to_check.begin();
- 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");
- return true;
- }
- }
- return false;
-}
-
-bool SendLocationRequest::CheckHMICapabilities(
- std::vector<hmi_apis::Common_TextFieldName::eType>& fields_names) {
- using namespace smart_objects;
- using namespace hmi_apis;
- if (fields_names.empty()) {
- return true;
- }
-
- const HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
- if (!hmi_capabilities.is_ui_cooperating()) {
- LOG4CXX_ERROR(logger_, "UI is not supported.");
- return false;
- }
-
- if (hmi_capabilities.display_capabilities()) {
- const SmartObject disp_cap = (*hmi_capabilities.display_capabilities());
- const SmartObject& text_fields =
- disp_cap.getElement(hmi_response::text_fields);
- const size_t len = text_fields.length();
- for (size_t i = 0; i < len; ++i) {
- const SmartObject& text_field = text_fields[i];
- const Common_TextFieldName::eType filed_name =
- static_cast<Common_TextFieldName::eType>(
- text_field.getElement(strings::name).asInt());
- const std::vector<Common_TextFieldName::eType>::iterator it =
- std::find(fields_names.begin(), fields_names.end(), filed_name);
- if (it != fields_names.end()) {
- fields_names.erase(it);
- }
- }
- }
-
- if (!fields_names.empty()) {
- LOG4CXX_ERROR(logger_, "Some fields are not supported by capabilities");
- return false;
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/send_location_response.cc b/src/components/application_manager/src/commands/mobile/send_location_response.cc
deleted file mode 100644
index 167642e390..0000000000
--- a/src/components/application_manager/src/commands/mobile/send_location_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/mobile/send_location_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SendLocationResponse::SendLocationResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SendLocationResponse::~SendLocationResponse() {}
-
-void SendLocationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc b/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
deleted file mode 100644
index ee544e956a..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
+++ /dev/null
@@ -1,286 +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 <algorithm>
-#include "application_manager/commands/mobile/set_app_icon_request.h"
-
-#include "application_manager/message_helper.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/file_system.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetAppIconRequest::SetAppIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , is_icons_saving_enabled_(false) {
- const std::string path =
- application_manager_.get_settings().app_icons_folder();
- is_icons_saving_enabled_ = file_system::IsWritingAllowed(path) &&
- file_system::IsReadingAllowed(path);
-}
-
-SetAppIconRequest::~SetAppIconRequest() {}
-
-void SetAppIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const std::string& sync_file_name =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
-
- if (!file_system::IsFileNameValid(sync_file_name)) {
- const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
- SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
- return;
- }
-
- std::string full_file_path =
- application_manager_.get_settings().app_storage_folder() + "/";
- full_file_path += app->folder_name();
- full_file_path += "/";
- full_file_path += sync_file_name;
-
- if (!file_system::FileExists(full_file_path)) {
- LOG4CXX_ERROR(logger_, "No such file " << full_file_path);
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (is_icons_saving_enabled_) {
- CopyToIconStorage(full_file_path);
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::sync_file_name] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- // Panasonic requres unchanged path value without encoded special characters
- const std::string full_file_path_for_hmi =
- file_system::ConvertPathForURL(full_file_path);
-
- msg_params[strings::sync_file_name][strings::value] = full_file_path_for_hmi;
-
- // TODO(VS): research why is image_type hardcoded
- msg_params[strings::sync_file_name][strings::image_type] =
- static_cast<int32_t>(SetAppIconRequest::ImageType::DYNAMIC);
-
- // for further use in on_event function
- (*message_)[strings::msg_params][strings::sync_file_name] =
- msg_params[strings::sync_file_name];
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_SetAppIcon, &msg_params, true);
-}
-
-void SetAppIconRequest::CopyToIconStorage(
- const std::string& path_to_file) const {
- 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.");
- 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);
- return;
- }
-
- const std::string icon_storage =
- application_manager_.get_settings().app_icons_folder();
- const uint64_t storage_max_size = static_cast<uint64_t>(
- application_manager_.get_settings().app_icons_folder_max_size());
- const uint64_t file_size = file_system::FileSize(path_to_file);
-
- if (storage_max_size < file_size) {
- LOG4CXX_ERROR(logger_,
- "Icon size (" << file_size << ") is bigger, than "
- " icons storage maximum size ("
- << storage_max_size << ")."
- "Copying skipped.");
- return;
- }
-
- const uint64_t storage_size =
- static_cast<uint64_t>(file_system::DirectorySize(icon_storage));
- 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.");
- return;
- }
-
- while (!IsEnoughSpaceForIcon(file_size)) {
- RemoveOldestIcons(icon_storage, icons_amount);
- }
- }
- ApplicationConstSharedPtr app =
- application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "Can't get application for connection key: " << connection_key());
- return;
- }
-
- const std::string icon_path = icon_storage + "/" + app->policy_app_id();
- if (!file_system::CreateFile(icon_path)) {
- LOG4CXX_ERROR(logger_, "Can't create icon: " << icon_path);
- return;
- }
-
- if (!file_system::Write(icon_path, file_content)) {
- LOG4CXX_ERROR(logger_, "Can't write icon: " << icon_path);
- return;
- }
-
- LOG4CXX_DEBUG(logger_,
- "Icon was successfully copied from :" << path_to_file << " to "
- << icon_path);
-
- return;
-}
-
-void SetAppIconRequest::RemoveOldestIcons(const std::string& storage,
- const uint32_t icons_amount) const {
- const std::vector<std::string> icons_list = file_system::ListFiles(storage);
- std::map<uint64_t, std::string> icon_modification_time;
- std::vector<std::string>::const_iterator it = icons_list.begin();
- for (; it != icons_list.end(); ++it) {
- const std::string file_name = *it;
- const std::string file_path = storage + "/" + file_name;
- if (!file_system::FileExists(file_path)) {
- continue;
- }
- const uint64_t time = file_system::GetFileModificationTime(file_path);
- icon_modification_time[time] = file_name;
- }
-
- for (size_t counter = 0; counter < icons_amount; ++counter) {
- if (!icon_modification_time.size()) {
- LOG4CXX_ERROR(logger_, "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);
- }
- icon_modification_time.erase(icon_modification_time.begin());
- LOG4CXX_DEBUG(logger_,
- "Old icon " << file_path << " was deleted successfully.");
- }
-}
-
-bool SetAppIconRequest::IsEnoughSpaceForIcon(const uint64_t icon_size) const {
- const std::string icon_storage =
- application_manager_.get_settings().app_icons_folder();
- const uint64_t storage_max_size = static_cast<uint64_t>(
- application_manager_.get_settings().app_icons_folder_max_size());
- const uint64_t storage_size =
- static_cast<uint64_t>(file_system::DirectorySize(icon_storage));
- return storage_max_size >= (icon_size + storage_size);
-}
-
-void SetAppIconRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetAppIcon: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
- std::string response_info;
- GetInfo(message, response_info);
- if (result) {
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
-
- if (!message_.valid() || !app.valid()) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
- return;
- }
-
- const std::string& path =
- (*message_)[strings::msg_params][strings::sync_file_name]
- [strings::value].asString();
- app->set_app_icon_path(path);
-
- LOG4CXX_INFO(logger_,
- "Icon path was set to '" << app->app_icon_path() << "'");
- }
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_app_icon_response.cc b/src/components/application_manager/src/commands/mobile/set_app_icon_response.cc
deleted file mode 100644
index 29f3950ffc..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_app_icon_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/set_app_icon_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetAppIconResponse::SetAppIconResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SetAppIconResponse::~SetAppIconResponse() {}
-
-void SetAppIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc b/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
deleted file mode 100644
index 38b62ce731..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
+++ /dev/null
@@ -1,114 +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 "application_manager/commands/mobile/set_display_layout_request.h"
-
-#include "application_manager/message_helper.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetDisplayLayoutRequest::SetDisplayLayoutRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {}
-
-void SetDisplayLayoutRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- ApplicationConstSharedPtr app =
- application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- (*message_)[strings::msg_params][strings::app_id] = app->app_id();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_SetDisplayLayout,
- &((*message_)[strings::msg_params]),
- true);
-}
-
-void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetDisplayLayout: {
- LOG4CXX_INFO(logger_, "Received UI_SetDisplayLayout event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool response_success = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
- std::string info;
- GetInfo(message, info);
- smart_objects::SmartObject msg_params = message[strings::msg_params];
- if (response_success) {
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
-
- // in case templates_available is empty copy from hmi capabilities
- if (msg_params.keyExists(hmi_response::display_capabilities)) {
- if (0 ==
- msg_params[hmi_response::display_capabilities]
- [hmi_response::templates_available].length()) {
- msg_params[hmi_response::display_capabilities]
- [hmi_response::templates_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::templates_available);
- }
- }
- }
- SendResponse(response_success,
- MessageHelper::HMIToMobileResult(result_code),
- info.empty() ? NULL : info.c_str(),
- &msg_params);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc b/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc
deleted file mode 100644
index b5e53803c8..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/mobile/set_display_layout_response.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetDisplayLayoutResponse::SetDisplayLayoutResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {}
-
-void SetDisplayLayoutResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
deleted file mode 100644
index 75d08f9f26..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
+++ /dev/null
@@ -1,564 +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 <string.h>
-#include <algorithm>
-#include "application_manager/commands/mobile/set_global_properties_request.h"
-
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetGlobalPropertiesRequest::SetGlobalPropertiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , is_ui_send_(false)
- , is_tts_send_(false)
- , is_ui_received_(false)
- , is_tts_received_(false)
- , ui_result_(hmi_apis::Common_Result::INVALID_ENUM)
- , tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {}
-
-SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {}
-
-void SetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const 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());
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (!ValidateConditionalMandatoryParameters(msg_params)) {
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "There are no parameters present in request.");
- return;
- }
-
- mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
-
- if ((*message_)[strings::msg_params].keyExists(strings::menu_icon)) {
- verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::menu_icon],
- app,
- application_manager_);
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
- SendResponse(false, verification_result);
- return;
- }
- }
- // Check for image file(s) in vrHelpItem
- if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- if (mobile_apis::Result::SUCCESS !=
- MessageHelper::VerifyImageVrHelpItems(
- (*message_)[strings::msg_params][strings::vr_help],
- app,
- application_manager_)) {
- LOG4CXX_ERROR(logger_, "MessageHelper::VerifyImage return INVALID_DATA!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- }
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "White spaces found");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- // if application waits for sending ttsGlobalProperties need to remove this
- // application from tts_global_properties_app_list_
- application_manager_.RemoveAppFromTTSGlobalPropertiesList(connection_key());
- bool is_help_prompt_present = msg_params.keyExists(strings::help_prompt);
- bool is_timeout_prompt_present =
- msg_params.keyExists(strings::timeout_prompt);
- bool is_vr_help_title_present = msg_params.keyExists(strings::vr_help_title);
- bool is_vr_help_present = msg_params.keyExists(strings::vr_help);
-
- // 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");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- /* Need to set flags before sending request to HMI
- * for correct processing this flags in method on_event */
- if (is_help_prompt_present || is_timeout_prompt_present) {
- is_tts_send_ = true;
- }
- if (is_vr_help_title_present && is_vr_help_present) {
- LOG4CXX_DEBUG(logger_, "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");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- smart_objects::SmartObject params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- PrepareUIRequestVRHelpData(app, msg_params, params);
- PrepareUIRequestMenuAndKeyboardData(app, msg_params, params);
-
- params[strings::app_id] = app->app_id();
- SendUIRequest(params, true);
-
- auto& help_prompt_manager = app->help_prompt_manager();
- help_prompt_manager.OnSetGlobalPropertiesReceived(params, false);
- } else {
- LOG4CXX_DEBUG(logger_, "VRHelp params does not present");
- DCHECK_OR_RETURN_VOID(!is_vr_help_title_present && !is_vr_help_present);
-
- smart_objects::SmartObject params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- PrepareUIRequestMenuAndKeyboardData(app, msg_params, params);
-
- // Preparing data
- if (params.empty()) {
- LOG4CXX_DEBUG(logger_, "No UI info provided");
- } else {
- params[strings::app_id] = app->app_id();
- SendUIRequest(params, true);
- }
- }
-
- // check TTS params
- if (is_help_prompt_present || is_timeout_prompt_present) {
- LOG4CXX_DEBUG(logger_, "TTS params presents");
- smart_objects::SmartObject params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (is_help_prompt_present) {
- app->set_help_prompt(msg_params.getElement(strings::help_prompt));
- params[strings::help_prompt] = (*app->help_prompt());
- }
-
- if (is_timeout_prompt_present) {
- app->set_timeout_prompt(msg_params.getElement(strings::timeout_prompt));
- params[strings::timeout_prompt] = (*app->timeout_prompt());
- }
-
- params[strings::app_id] = app->app_id();
- SendTTSRequest(params, true);
-
- auto& help_prompt_manager = app->help_prompt_manager();
- help_prompt_manager.OnSetGlobalPropertiesReceived(params, false);
- }
-}
-
-bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
- const smart_objects::SmartObject& vr_help) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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);
-
- for (size_t j = 0; j < vr_help_length; ++j) {
- const size_t position =
- 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);
- return false;
- }
- }
- return true;
-}
-
-void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
- const smart_objects::SmartObject& message = event.smart_object();
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, ui_response_info_);
- if (application.valid()) {
- auto& help_prompt_manager = application->help_prompt_manager();
- help_prompt_manager.OnSetGlobalPropertiesReceived(message, true);
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- is_tts_received_ = true;
- tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- GetInfo(message, tts_response_info_);
- if (application.valid()) {
- auto& help_prompt_manager = application->help_prompt_manager();
- help_prompt_manager.OnSetGlobalPropertiesReceived(message, true);
- }
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- if (IsPendingResponseExist()) {
- LOG4CXX_DEBUG(logger_, "Continue waiting for response");
- return;
- }
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- std::string response_info;
- const bool result = PrepareResponseParameters(result_code, response_info);
-
- SendResponse(result,
- result_code,
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
-}
-
-bool SetGlobalPropertiesRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-bool SetGlobalPropertiesRequest::PrepareResponseParameters(
- mobile_apis::Result::eType& result_code, std::string& info) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- ResponseInfo ui_properties_info(
- ui_result_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
-
- ResponseInfo tts_properties_info(
- tts_result_, HmiInterfaces::HMI_INTERFACE_TTS, application_manager_);
- const bool result =
- PrepareResultForMobileResponse(ui_properties_info, tts_properties_info);
- if (result &&
- (HmiInterfaces::STATE_AVAILABLE == tts_properties_info.interface_state) &&
- (tts_properties_info.is_unsupported_resource)) {
- result_code = mobile_apis::Result::WARNINGS;
- tts_response_info_ = "Unsupported phoneme type sent in a prompt";
- info = MergeInfos(tts_properties_info,
- tts_response_info_,
- ui_properties_info,
- ui_response_info_);
- return result;
- }
- result_code =
- PrepareResultCodeForResponse(ui_properties_info, tts_properties_info);
- info = MergeInfos(tts_properties_info,
- tts_response_info_,
- ui_properties_info,
- ui_response_info_);
- return result;
-}
-
-bool SetGlobalPropertiesRequest::ValidateVRHelpTitle(
- const smart_objects::SmartObject* const vr_help_so_ptr) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (vr_help_so_ptr) {
- const std::string& vr_help = vr_help_so_ptr->asString();
- LOG4CXX_TRACE(logger_, "App contains vr_help_title: \"" << vr_help << '"');
- return !vr_help.empty();
- }
- return false;
-}
-
-void SetGlobalPropertiesRequest::PrepareUIRequestVRHelpData(
- const ApplicationSharedPtr app,
- const smart_objects::SmartObject& msg_params,
- smart_objects::SmartObject& out_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(app);
-
- app->set_vr_help_title(msg_params.getElement(strings::vr_help_title));
- app->set_vr_help(msg_params.getElement(strings::vr_help));
-
- out_params[strings::vr_help_title] = (*app->vr_help_title());
- out_params[strings::vr_help] = (*app->vr_help());
-}
-
-bool SetGlobalPropertiesRequest::PrepareUIRequestDefaultVRHelpData(
- const ApplicationSharedPtr app, smart_objects::SmartObject& out_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN(app, false);
-
- LOG4CXX_DEBUG(logger_, "Generate default VRHelp data");
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& cmdMap = accessor.GetData();
-
- int32_t index = 0;
- smart_objects::SmartObject vr_help_items;
- for (CommandsMap::const_iterator command_it = cmdMap.begin();
- cmdMap.end() != command_it;
- ++command_it) {
- const smart_objects::SmartObject& command = *command_it->second;
- if (!command.keyExists(strings::vr_commands)) {
- LOG4CXX_ERROR(logger_, "VR synonyms are empty");
- return false;
- }
- // use only first
- vr_help_items[index][strings::position] = (index + 1);
- vr_help_items[index++][strings::text] =
- (*command_it->second)[strings::vr_commands][0];
- }
-
- app->set_vr_help_title(smart_objects::SmartObject(app->name()));
-
- out_params[strings::vr_help_title] = (*app->vr_help_title());
- if (vr_help_items.length() > 0) {
- app->set_vr_help(vr_help_items);
- out_params[strings::vr_help] = (*app->vr_help());
- }
- return true;
-}
-
-void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
- const ApplicationSharedPtr app,
- const smart_objects::SmartObject& msg_params,
- smart_objects::SmartObject& out_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(app);
-
- const bool is_menu_title_present =
- msg_params.keyExists(hmi_request::menu_title);
- const bool is_menu_icon_present =
- msg_params.keyExists(hmi_request::menu_icon);
- const bool is_keyboard_props_present =
- msg_params.keyExists(hmi_request::keyboard_properties);
-
- if (is_menu_title_present) {
- out_params[hmi_request::menu_title] =
- msg_params[hmi_request::menu_title].asString();
- app->set_menu_title(msg_params[hmi_request::menu_title]);
- }
- if (is_menu_icon_present) {
- out_params[hmi_request::menu_icon] = msg_params[hmi_request::menu_icon];
- app->set_menu_icon(msg_params[hmi_request::menu_icon]);
- }
- if (is_keyboard_props_present) {
- out_params[hmi_request::keyboard_properties] =
- msg_params[hmi_request::keyboard_properties];
- app->set_keyboard_props(msg_params[hmi_request::keyboard_properties]);
- }
-}
-
-void SetGlobalPropertiesRequest::SendTTSRequest(
- const smart_objects::SmartObject& params, bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
- is_tts_send_ = true;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- SendHMIRequest(
- hmi_apis::FunctionID::TTS_SetGlobalProperties, &params, use_events);
-}
-
-void SetGlobalPropertiesRequest::SendUIRequest(
- const smart_objects::SmartObject& params, bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
- is_ui_send_ = true;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(
- hmi_apis::FunctionID::UI_SetGlobalProperties, &params, use_events);
-}
-
-bool SetGlobalPropertiesRequest::IsPendingResponseExist() {
- return is_ui_send_ != is_ui_received_ || is_tts_send_ != is_tts_received_;
-}
-
-bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
- const smart_objects::SmartObject& params) {
- LOG4CXX_AUTO_TRACE(logger_);
- return params.keyExists(strings::help_prompt) ||
- params.keyExists(strings::timeout_prompt) ||
- params.keyExists(strings::vr_help_title) ||
- params.keyExists(strings::vr_help) ||
- params.keyExists(strings::menu_title) ||
- params.keyExists(strings::menu_icon) ||
- params.keyExists(strings::keyboard_properties);
-}
-
-bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str;
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- if (msg_params.keyExists(strings::help_prompt)) {
- const smart_objects::SmartArray* hp_array =
- msg_params[strings::help_prompt].asArray();
-
- smart_objects::SmartArray::const_iterator it_hp = hp_array->begin();
- smart_objects::SmartArray::const_iterator it_hp_end = hp_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if (msg_params.keyExists(strings::timeout_prompt)) {
- const smart_objects::SmartArray* tp_array =
- msg_params[strings::timeout_prompt].asArray();
-
- smart_objects::SmartArray::const_iterator it_tp = tp_array->begin();
- smart_objects::SmartArray::const_iterator it_tp_end = tp_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if (msg_params.keyExists(strings::vr_help)) {
- const smart_objects::SmartArray* vh_array =
- msg_params[strings::vr_help].asArray();
-
- smart_objects::SmartArray::const_iterator it_vh = vh_array->begin();
- smart_objects::SmartArray::const_iterator it_vh_end = vh_array->end();
-
- 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");
- 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");
- return true;
- }
- } // if image exists
- } // for - vh_array iteration
- }
-
- 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");
- return true;
- }
- }
-
- 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");
- return true;
- }
- }
-
- 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");
- return true;
- }
- }
-
- if (msg_params.keyExists(strings::keyboard_properties)) {
- if (msg_params[strings::keyboard_properties].keyExists(
- strings::limited_character_list)) {
- const smart_objects::SmartArray* lcl_array =
- msg_params[strings::keyboard_properties]
- [strings::limited_character_list].asArray();
-
- smart_objects::SmartArray::const_iterator it_lcl = lcl_array->begin();
- smart_objects::SmartArray::const_iterator it_lcl_end = lcl_array->end();
-
- 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");
- return true;
- }
- }
- }
-
- if (msg_params[strings::keyboard_properties].keyExists(
- strings::auto_complete_text)) {
- str =
- msg_params[strings::keyboard_properties][strings::auto_complete_text]
- .asCharArray();
-
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid keyboard_properties "
- "auto_complete_text syntax check failed");
- return true;
- }
- }
- }
- return false;
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc b/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc
deleted file mode 100644
index 5cfbcb2d58..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/set_global_properties_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetGlobalPropertiesResponse::SetGlobalPropertiesResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {}
-
-void SetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_icon_request.cc b/src/components/application_manager/src/commands/mobile/set_icon_request.cc
deleted file mode 100644
index 037de54456..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_icon_request.cc
+++ /dev/null
@@ -1,140 +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 "application_manager/commands/mobile/set_icon_request.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/application_impl.h"
-#include "config_profile/profile.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetIconRequest::SetIconRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SetIconRequest::~SetIconRequest() {}
-
-void SetIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const std::string& sync_file_name =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
-
- std::string full_file_path =
- application_manager_.get_settings().app_storage_folder() + "/";
- full_file_path += app->folder_name();
- full_file_path += "/";
- full_file_path += sync_file_name;
-
- if (!file_system::FileExists(full_file_path)) {
- LOG4CXX_ERROR(logger_, "No such file " << full_file_path);
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::sync_file_name] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- // Panasonic requres unchanged path value without encoded special characters
- const std::string full_file_path_for_hmi =
- file_system::ConvertPathForURL(full_file_path);
-
- msg_params[strings::sync_file_name][strings::value] = full_file_path_for_hmi;
-
- // TODO(VS): research why is image_type hardcoded
- msg_params[strings::sync_file_name][strings::image_type] =
- static_cast<int32_t>(SetIconRequest::ImageType::DYNAMIC);
-
- // for further use in on_event function
- (*message_)[strings::msg_params][strings::sync_file_name] =
- msg_params[strings::sync_file_name];
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_SetAppIcon, &msg_params, true);
-}
-
-void SetIconRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetAppIcon: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- if (result) {
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
-
- const std::string path =
- (*message_)[strings::msg_params][strings::sync_file_name]
- [strings::value].asString();
- app->set_app_icon_path(path);
-
- LOG4CXX_INFO(logger_,
- "Icon path was set to '" << app->app_icon_path() << "'");
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_icon_response.cc b/src/components/application_manager/src/commands/mobile/set_icon_response.cc
deleted file mode 100644
index c140d04f51..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_icon_response.cc
+++ /dev/null
@@ -1,55 +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 "application_manager/commands/mobile/set_icon_response.h"
-#include "application_manager/application_manager.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetIconResponse::SetIconResponse(const MessageSharedPtr& message,
- ApplicationManager& app_man)
- : CommandResponseImpl(message, app_man) {}
-
-SetIconResponse::~SetIconResponse() {}
-
-void SetIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc b/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
deleted file mode 100644
index 54727abe01..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
+++ /dev/null
@@ -1,157 +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 "application_manager/commands/mobile/set_media_clock_timer_request.h"
-
-#include "application_manager/message_helper.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetMediaClockRequest::SetMediaClockRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SetMediaClockRequest::~SetMediaClockRequest() {}
-
-void SetMediaClockRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if (!app->is_media_application()) {
- LOG4CXX_ERROR(logger_, "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];
- msg_params[strings::app_id] = app->app_id();
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
-
- SendHMIRequest(
- hmi_apis::FunctionID::UI_SetMediaClockTimer, &msg_params, true);
- } else {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- }
-}
-
-void SetMediaClockRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
- std::string response_info;
- GetInfo(message, response_info);
-
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-bool SetMediaClockRequest::isDataValid() {
- smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
- mobile_apis::UpdateMode::eType update_mode =
- static_cast<mobile_apis::UpdateMode::eType>(
- msg_params[strings::update_mode].asUInt());
-
- 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");
- return false;
- }
-
- if (msg_params.keyExists(strings::end_time)) {
- unsigned int start_time_in_seconds = 0;
- start_time_in_seconds =
- (msg_params[strings::start_time][strings::hours].asUInt()) * 3600;
- start_time_in_seconds +=
- (msg_params[strings::start_time][strings::minutes].asUInt()) * 60;
- start_time_in_seconds +=
- (msg_params[strings::start_time][strings::seconds].asUInt());
-
- unsigned int end_time_in_seconds = 0;
- end_time_in_seconds =
- (msg_params[strings::end_time][strings::hours].asUInt()) * 3600;
- end_time_in_seconds +=
- (msg_params[strings::end_time][strings::minutes].asUInt()) * 60;
- end_time_in_seconds +=
- (msg_params[strings::end_time][strings::seconds].asUInt());
-
- if (((end_time_in_seconds > start_time_in_seconds) &&
- (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");
- return false;
- }
- }
- }
-
- LOG4CXX_INFO(logger_, "Data is valid");
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc b/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc
deleted file mode 100644
index 30e802a1db..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/set_media_clock_timer_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetMediaClockTimerResponse::SetMediaClockTimerResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {}
-
-void SetMediaClockTimerResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc b/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
deleted file mode 100644
index 42bfea4864..0000000000
--- a/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
+++ /dev/null
@@ -1,285 +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 <cstring>
-#include "application_manager/commands/mobile/show_constant_tbt_request.h"
-
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowConstantTBTRequest::ShowConstantTBTRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-ShowConstantTBTRequest::~ShowConstantTBTRequest() {}
-
-void ShowConstantTBTRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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");
- return;
- }
- // SDLAQ-CRS-664, VC3.1
- if ((*message_)[strings::msg_params].empty()) {
- LOG4CXX_ERROR(logger_, "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];
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming show constant TBT has contains \t\n \\t \\n");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- // ProcessSoftButtons checks strings on the contents incorrect character
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons(msg_params,
- app,
- application_manager_.GetPolicyHandler(),
- application_manager_);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, processing_result);
- return;
- }
-
- mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
- if (msg_params.keyExists(strings::turn_icon)) {
- verification_result = MessageHelper::VerifyImage(
- msg_params[strings::turn_icon], app, application_manager_);
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
- SendResponse(false, verification_result);
- return;
- }
- }
-
- if (msg_params.keyExists(strings::next_turn_icon)) {
- verification_result = MessageHelper::VerifyImage(
- msg_params[strings::next_turn_icon], app, application_manager_);
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
- SendResponse(false, verification_result);
- return;
- }
- }
-
- msg_params[strings::app_id] = app->app_id();
-
- msg_params[hmi_request::navi_texts] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- int32_t index = 0;
- if (msg_params.keyExists(strings::navigation_text_1)) {
- // erase useless parametr
- msg_params.erase(strings::navigation_text_1);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::navigationText1);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::navigation_text_1];
- }
-
- if (msg_params.keyExists(strings::navigation_text_2)) {
- // erase useless param
- msg_params.erase(strings::navigation_text_2);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::navigationText2);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::navigation_text_2];
- }
-
- if (msg_params.keyExists(strings::eta)) {
- // erase useless param
- msg_params.erase(strings::eta);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::ETA);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::eta];
- }
-
- if (msg_params.keyExists(strings::total_distance)) {
- // erase useless param
- msg_params.erase(strings::total_distance);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::totalDistance);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::total_distance];
- }
-
- if (msg_params.keyExists(strings::time_to_destination)) {
- // erase useless param
- msg_params.erase(strings::time_to_destination);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::timeToDestination);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::time_to_destination];
- }
-
- if (msg_params.keyExists(strings::soft_buttons)) {
- MessageHelper::SubscribeApplicationToSoftButton(
- msg_params, app, function_id());
- }
-
- app->set_tbt_show_command(msg_params);
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(
- hmi_apis::FunctionID::Navigation_ShowConstantTBT, &msg_params, true);
-}
-
-void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- const Common_Result::eType result_code =
- static_cast<Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::next_turn_icon)) {
- str = (*message_)[strings::msg_params][strings::next_turn_icon]
- [strings::value].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid next_turn_icon value syntax check failed");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::navigation_text_1)) {
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::navigation_text_2)) {
- 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");
- return true;
- }
- }
-
- 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");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::total_distance)) {
- str =
- (*message_)[strings::msg_params][strings::total_distance].asCharArray();
- if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid total_distance value syntax check failed");
- return true;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(
- strings::time_to_destination)) {
- 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");
- return true;
- }
- }
- return false;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc b/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc
deleted file mode 100644
index 80a36129cf..0000000000
--- a/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/mobile/show_constant_tbt_response.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowConstantTBTResponse::ShowConstantTBTResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
-
- : CommandResponseImpl(message, application_manager) {}
-
-ShowConstantTBTResponse::~ShowConstantTBTResponse() {}
-
-void ShowConstantTBTResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/show_request.cc b/src/components/application_manager/src/commands/mobile/show_request.cc
deleted file mode 100644
index ad598efc1d..0000000000
--- a/src/components/application_manager/src/commands/mobile/show_request.cc
+++ /dev/null
@@ -1,403 +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 <string.h>
-#include "application_manager/commands/mobile/show_request.h"
-
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "utils/file_system.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowRequest::ShowRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager)
- , core_result_code_(mobile_apis::Result::INVALID_ENUM) {}
-
-ShowRequest::~ShowRequest() {}
-
-void ShowRequest::HandleMetadata(const char* field_id,
- int32_t field_index,
- smart_objects::SmartObject& msg_params) {
- smart_objects::SmartObject& metadata_tags =
- (*message_)[strings::msg_params][strings::metadata_tags];
-
- if (metadata_tags.keyExists(field_id)) {
- if (field_index != -1) {
- msg_params[hmi_request::show_strings][field_index]
- [hmi_request::field_types] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- const size_t num_tags = metadata_tags[field_id].length();
- for (size_t i = 0; i < num_tags; ++i) {
- const int32_t current_tag = metadata_tags[field_id][i].asInt();
- msg_params[hmi_request::show_strings][field_index]
- [hmi_request::field_types][i] = current_tag;
- }
- } else {
- LOG4CXX_INFO(logger_,
- "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;
- core_response_info_ =
- "Metadata tag was provided for a field with no data.";
- }
- }
- } else {
- LOG4CXX_INFO(logger_,
- "No metadata tagging provided for field: " << field_id);
- }
-}
-
-void ShowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "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.");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (!CheckStringsOfShowRequest()) {
- LOG4CXX_ERROR(logger_, "Incorrect characters in string");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- // ProcessSoftButtons checks strings on the contents incorrect character
-
- mobile_apis::Result::eType processing_result = mobile_apis::Result::SUCCESS;
- if (((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
- ((*message_)[strings::msg_params][strings::soft_buttons].length() > 0)) {
- processing_result = MessageHelper::ProcessSoftButtons(
- (*message_)[strings::msg_params],
- app,
- application_manager_.GetPolicyHandler(),
- application_manager_);
- }
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "Processing of soft buttons failed.");
- SendResponse(false, processing_result);
- return;
- }
-
- mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
- if (((*message_)[strings::msg_params].keyExists(strings::graphic)) &&
- ((*message_)[strings::msg_params][strings::graphic][strings::value]
- .asString()).length()) {
- verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::graphic],
- app,
- application_manager_);
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
- SendResponse(false, verification_result);
- return;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
- verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::secondary_graphic],
- app,
- application_manager_);
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
- SendResponse(false, verification_result);
- return;
- }
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
-
- msg_params[hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- int32_t index = 0;
- int32_t main_field_1_index = -1;
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField1);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_1];
- main_field_1_index = index;
- ++index;
- }
-
- int32_t main_field_2_index = -1;
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_2)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField2);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_2];
- main_field_2_index = index;
- ++index;
- }
-
- int32_t main_field_3_index = -1;
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField3);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_3];
- main_field_3_index = index;
- ++index;
- }
-
- int32_t main_field_4_index = -1;
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::mainField4);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_4];
- main_field_4_index = index;
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::metadata_tags)) {
- HandleMetadata(strings::main_field_1, main_field_1_index, msg_params);
- HandleMetadata(strings::main_field_2, main_field_2_index, msg_params);
- HandleMetadata(strings::main_field_3, main_field_3_index, msg_params);
- HandleMetadata(strings::main_field_4, main_field_4_index, msg_params);
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::mediaClock);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::media_clock];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::media_track)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::mediaTrack);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::media_track];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::statusBar);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::status_bar];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::alignment)) {
- msg_params[strings::alignment] =
- (*message_)[strings::msg_params][strings::alignment];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::graphic)) {
- msg_params[strings::graphic] =
- (*message_)[strings::msg_params][strings::graphic];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
- msg_params[strings::secondary_graphic] =
- (*message_)[strings::msg_params][strings::secondary_graphic];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- msg_params[strings::soft_buttons] =
- (*message_)[strings::msg_params][strings::soft_buttons];
- if ((*message_)[strings::msg_params][strings::soft_buttons].length() == 0) {
- app->UnsubscribeFromSoftButtons(function_id());
- } else {
- MessageHelper::SubscribeApplicationToSoftButton(
- (*message_)[strings::msg_params], app, function_id());
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::custom_presets)) {
- msg_params[strings::custom_presets] =
- (*message_)[strings::msg_params][strings::custom_presets];
- }
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_Show, &msg_params, true);
-
- MessageSharedPtr persistentData = new smart_objects::SmartObject(msg_params);
- app->set_show_command(*persistentData);
-}
-
-void ShowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_Show: {
- LOG4CXX_DEBUG(logger_, "Received UI_Show event.");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- std::string response_info;
- hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_UI);
- GetInfo(message, response_info);
- if (hmi_apis::Common_Result::WARNINGS == result_code &&
- message[strings::params].keyExists(hmi_response::message)) {
- response_info =
- message[strings::params][hmi_response::message].asString();
- }
- mobile_apis::Result::eType converted_result_code =
- MessageHelper::HMIToMobileResult(result_code);
- if (mobile_apis::Result::SUCCESS == converted_result_code &&
- mobile_apis::Result::INVALID_ENUM != core_result_code_) {
- converted_result_code = core_result_code_;
- response_info = core_response_info_;
- }
- SendResponse(result,
- converted_result_code,
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event " << event.id());
- break;
- }
- }
-}
-
-bool ShowRequest::CheckStringsOfShowRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- return false;
- }
- }
- if ((*message_)[strings::msg_params].keyExists(strings::custom_presets)) {
- smart_objects::SmartObject& custom_presets_array =
- (*message_)[strings::msg_params][strings::custom_presets];
- 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");
- return false;
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::graphic)) {
- str = (*message_)[strings::msg_params][strings::graphic][strings::value]
- .asCharArray();
- if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid graphic value syntax check failed");
- return false;
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
- str = (*message_)[strings::msg_params][strings::secondary_graphic]
- [strings::value].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid secondary_graphic value syntax check failed");
- return false;
- }
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/show_response.cc b/src/components/application_manager/src/commands/mobile/show_response.cc
deleted file mode 100644
index 8027c908f1..0000000000
--- a/src/components/application_manager/src/commands/mobile/show_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/mobile/show_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowResponse::ShowResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-ShowResponse::~ShowResponse() {}
-
-void ShowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/slider_request.cc b/src/components/application_manager/src/commands/mobile/slider_request.cc
deleted file mode 100644
index f98869b08f..0000000000
--- a/src/components/application_manager/src/commands/mobile/slider_request.cc
+++ /dev/null
@@ -1,198 +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 "application_manager/commands/mobile/slider_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "utils/helpers.h"
-#include "config_profile/profile.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SliderRequest::SliderRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
-}
-
-SliderRequest::~SliderRequest() {}
-
-bool SliderRequest::Init() {
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- application_manager_.get_settings().default_timeout() +
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- }
-
- return true;
-}
-
-void SliderRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application = application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::slider_footer)) {
- 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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- }
- }
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "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];
- msg_params[strings::app_id] = application->app_id();
-
- if (!(*message_)[strings::msg_params].keyExists(strings::timeout)) {
- msg_params[strings::timeout] = default_timeout_;
- }
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
- SendHMIRequest(hmi_apis::FunctionID::UI_Slider, &msg_params, true);
-}
-
-void SliderRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
- using namespace smart_objects;
- using namespace hmi_apis;
-
- const SmartObject& message = event.smart_object();
-
- const event_engine::Event::EventID event_id = event.id();
- if (event_id == FunctionID::UI_OnResetTimeout) {
- LOG4CXX_INFO(logger_, "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());
- return;
- }
-
- LOG4CXX_DEBUG(logger_, "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());
-
- SmartObject response_msg_params = message[strings::msg_params];
-
- const bool is_timeout_aborted = Compare<Common_Result::eType, EQ, ONE>(
- response_code, Common_Result::TIMED_OUT, Common_Result::ABORTED);
-
- if (is_timeout_aborted) {
- if (message[strings::params][strings::data].keyExists(
- strings::slider_position)) {
- // Copy slider_position info to msg_params section
- response_msg_params[strings::slider_position] =
- message[strings::params][strings::data][strings::slider_position];
- } else {
- LOG4CXX_ERROR(logger_,
- strings::slider_position << " field is absent"
- " in response.");
- response_msg_params[strings::slider_position] = 0;
- }
- }
- std::string response_info;
- GetInfo(message, response_info);
- const bool is_response_success = PrepareResultForMobileResponse(
- response_code, HmiInterfaces::HMI_INTERFACE_UI);
-
- SendResponse(is_response_success,
- MessageHelper::HMIToMobileResult(response_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &response_msg_params);
-}
-
-bool SliderRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- str = (*message_)[strings::msg_params][strings::slider_header].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid slider_header value syntax check failed");
- return true;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::slider_footer)) {
- const smart_objects::SmartArray* sf_array =
- (*message_)[strings::msg_params][strings::slider_footer].asArray();
-
- smart_objects::SmartArray::const_iterator it_sf = sf_array->begin();
- smart_objects::SmartArray::const_iterator it_sf_end = sf_array->end();
-
- for (; it_sf != it_sf_end; ++it_sf) {
- str = (*it_sf).asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid slider_footer syntax check failed");
- return true;
- }
- }
- }
- return false;
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/slider_response.cc b/src/components/application_manager/src/commands/mobile/slider_response.cc
deleted file mode 100644
index 2cfcaf48fd..0000000000
--- a/src/components/application_manager/src/commands/mobile/slider_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/slider_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SliderResponse::SliderResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SliderResponse::~SliderResponse() {}
-
-void SliderResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/speak_request.cc b/src/components/application_manager/src/commands/mobile/speak_request.cc
deleted file mode 100644
index 1954cde181..0000000000
--- a/src/components/application_manager/src/commands/mobile/speak_request.cc
+++ /dev/null
@@ -1,160 +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 <string.h>
-#include "application_manager/commands/mobile/speak_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SpeakRequest::SpeakRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
- subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
-}
-
-SpeakRequest::~SpeakRequest() {}
-
-void SpeakRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "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");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- (*message_)[strings::msg_params][strings::app_id] = app->app_id();
- (*message_)[strings::msg_params][hmi_request::speak_type] =
- hmi_apis::Common_MethodName::SPEAK;
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak,
- &message_->getElement(strings::msg_params),
- true);
-}
-
-void SpeakRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- switch (event.id()) {
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "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");
-
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-void SpeakRequest::ProcessTTSSpeakResponse(
- const smart_objects::SmartObject& message) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- hmi_apis::Common_Result::eType hmi_result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- mobile_apis::Result::eType result_code =
- MessageHelper::HMIToMobileResult(hmi_result_code);
-
- const bool result = PrepareResultForMobileResponse(
- hmi_result_code, HmiInterfaces::HMI_INTERFACE_TTS);
-
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::SpeakID;
-
- const char* return_info = NULL;
-
- SendResponse(
- result, result_code, return_info, &(message[strings::msg_params]));
-}
-
-bool SpeakRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
- const smart_objects::SmartArray* tc_array =
- (*message_)[strings::msg_params][strings::tts_chunks].asArray();
-
- smart_objects::SmartArray::const_iterator it_tc = tc_array->begin();
- smart_objects::SmartArray::const_iterator it_tc_end = tc_array->end();
-
- 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");
- return true;
- }
- }
- }
- return false;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/speak_response.cc b/src/components/application_manager/src/commands/mobile/speak_response.cc
deleted file mode 100644
index 612d32c913..0000000000
--- a/src/components/application_manager/src/commands/mobile/speak_response.cc
+++ /dev/null
@@ -1,57 +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 "application_manager/commands/mobile/speak_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SpeakResponse::SpeakResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SpeakResponse::~SpeakResponse() {}
-
-void SpeakResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
deleted file mode 100644
index 4d11467d2d..0000000000
--- a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
+++ /dev/null
@@ -1,123 +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 "application_manager/commands/mobile/subscribe_button_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-SubscribeButtonRequest::SubscribeButtonRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SubscribeButtonRequest::~SubscribeButtonRequest() {}
-
-void SubscribeButtonRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const mobile_apis::ButtonName::eType btn_id =
- static_cast<mobile_apis::ButtonName::eType>(
- (*message_)[str::msg_params][str::button_name].asInt());
-
- if (!IsSubscriptionAllowed(app, btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Subscribe on button " << btn_id << " isn't allowed");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- if (!CheckHMICapabilities(btn_id)) {
- LOG4CXX_ERROR(logger_,
- "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);
- SendResponse(false, mobile_apis::Result::IGNORED);
- return;
- }
-
- app->SubscribeToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id));
- SendSubscribeButtonNotification();
-
- const bool is_succedeed = true;
- SendResponse(is_succedeed, mobile_apis::Result::SUCCESS);
-}
-
-bool SubscribeButtonRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-bool SubscribeButtonRequest::IsSubscriptionAllowed(
- ApplicationSharedPtr app, mobile_apis::ButtonName::eType btn_id) {
- if (!app->is_media_application() &&
- ((mobile_apis::ButtonName::SEEKLEFT == btn_id) ||
- (mobile_apis::ButtonName::SEEKRIGHT == btn_id) ||
- (mobile_apis::ButtonName::TUNEUP == btn_id) ||
- (mobile_apis::ButtonName::TUNEDOWN == btn_id))) {
- return false;
- }
- return true;
-}
-
-void SubscribeButtonRequest::SendSubscribeButtonNotification() {
- using namespace smart_objects;
- using namespace hmi_apis;
-
- // send OnButtonSubscription notification
- SmartObject msg_params = SmartObject(SmartType_Map);
- msg_params[strings::app_id] = connection_key();
- msg_params[strings::name] = static_cast<Common_ButtonName::eType>(
- (*message_)[strings::msg_params][strings::button_name].asUInt());
- msg_params[strings::is_suscribed] = true;
- CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc b/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc
deleted file mode 100644
index a92e58b19a..0000000000
--- a/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc
+++ /dev/null
@@ -1,64 +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 "application_manager/commands/mobile/subscribe_button_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SubscribeButtonResponse::SubscribeButtonResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SubscribeButtonResponse::~SubscribeButtonResponse() {}
-
-void SubscribeButtonResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // 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");
- SendResponse(false);
- return;
- }
- }
-
- // TODO(DK): Some logic
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
deleted file mode 100644
index 15ba7999bd..0000000000
--- a/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Copyright (c) 2017, Livio, Inc.
- 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/commands/mobile/subscribe_vehicle_data_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-namespace commands {
-
-SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {}
-
-#ifdef HMI_DBUS_API
-namespace {
-struct Subrequest {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
-};
-Subrequest subrequests[] = {
- {hmi_apis::FunctionID::VehicleInfo_SubscribeGps, strings::gps},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed, strings::speed},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeRpm, strings::rpm},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel, strings::fuel_level},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State,
- strings::fuel_level_state},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption,
- strings::instant_fuel_consumption},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature,
- strings::external_temp},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeVin, strings::vin},
- {hmi_apis::FunctionID::VehicleInfo_SubscribePrndl, strings::prndl},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure,
- strings::tire_pressure},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer, strings::odometer},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus,
- strings::belt_status},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation,
- strings::body_information},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus,
- strings::device_status},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking,
- strings::driver_braking},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus,
- strings::wiper_status},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus,
- strings::head_lamp_status},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque,
- strings::engine_torque},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition,
- strings::acc_pedal_pos},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle,
- strings::steering_wheel_angle},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo,
- strings::e_call_info},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus,
- strings::airbag_status},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent,
- strings::emergency_event},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus,
- strings::cluster_mode_status},
- {hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey, strings::my_key},
-};
-}
-#endif // #ifdef HMI_DBUS_API
-
-void SubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
- std::string info;
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject response_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- bool result = false;
- CheckVISubscriptions(
- app, info, result_code, response_params, msg_params, result);
-
- if (mobile_apis::Result::INVALID_ENUM != result_code) {
- SendResponse(result,
- result_code,
- info.empty() ? NULL : info.c_str(),
- response_params.empty() ? NULL : &response_params);
- return;
- }
-
-#ifdef HMI_DBUS_API
- // Generate list of subrequests
- for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
- const Subrequest& sr = subrequests[i];
- if (true == (*message_)[strings::msg_params].keyExists(sr.str) &&
- true == (*message_)[strings::msg_params][sr.str].asBool()) {
- HmiRequest hmi_request;
- hmi_request.str = sr.str;
- hmi_request.func_id = sr.func_id;
- hmi_request.complete = false;
- hmi_requests_.push_back(hmi_request);
- }
- }
- LOG4CXX_DEBUG(
- logger_, hmi_requests_.size() << " requests are going to be sent to HMI");
-
- // Send subrequests
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it)
- SendHMIRequest(it->func_id, &msg_params, true);
-#else
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
- &msg_params,
- true);
-#endif // #ifdef HMI_DBUS_API
-}
-
-void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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.");
- return;
- }
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- ApplicationSharedPtr app =
- application_manager_.application(CommandRequestImpl::connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
- return;
- }
-
-#ifdef HMI_DBUS_API
- for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- HmiRequest& hmi_request = *it;
- if (hmi_request.func_id == event.id()) {
- hmi_request.status = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
- hmi_request.value = message[strings::msg_params][hmi_request.str];
- hmi_request.complete = true;
- break;
- }
- }
- bool all_complete = true;
- bool any_arg_success = false;
- mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- if (!it->complete) {
- all_complete = false;
- break;
- }
- if (hmi_apis::Common_Result::SUCCESS != it->status) {
- if (mobile_api::Result::SUCCESS == status) {
- status = static_cast<mobile_apis::Result::eType>(it->status);
- } else if (status !=
- static_cast<mobile_apis::Result::eType>(it->status)) {
- status = mobile_api::Result::eType::GENERIC_ERROR;
- }
- LOG4CXX_TRACE(logger_,
- "Status from HMI: " << it->status
- << ", so response status become "
- << status);
- } else {
- any_arg_success = true;
- }
- }
-
- if (all_complete) {
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- if (any_arg_success) {
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- response_params[it->str] = it->value;
- }
- }
- LOG4CXX_DEBUG(logger_, "All HMI requests are complete");
- const bool result = any_arg_success;
- SendResponse(any_arg_success, status, NULL, &response_params);
- if (result) {
- app->UpdateHash();
- }
- }
-#else
-
- hmi_apis::Common_Result::eType hmi_result =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- hmi_result, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
-
- bool is_succeeded = result || !vi_already_subscribed_by_another_apps_.empty();
-
- mobile_apis::Result::eType result_code =
- MessageHelper::HMIToMobileResult(hmi_result);
-
- if (is_succeeded) {
- if (!vi_already_subscribed_by_this_app_.empty()) {
- result_code = mobile_apis::Result::IGNORED;
- response_info = "Already subscribed on some provided VehicleData.";
- }
-
- if (!vi_waiting_for_subscribe_.empty()) {
- LOG4CXX_DEBUG(logger_, "Subscribing to all pending VehicleData");
- VehicleInfoSubscriptions::const_iterator key =
- vi_waiting_for_subscribe_.begin();
- for (; key != vi_waiting_for_subscribe_.end(); ++key) {
- app->SubscribeToIVI(*key);
- }
- }
- }
-
- UnsubscribeFailedSubscriptions(app, message[strings::msg_params]);
-
- if (!vi_already_subscribed_by_another_apps_.empty() ||
- !vi_already_subscribed_by_this_app_.empty()) {
- AddAlreadySubscribedVI(
- const_cast<smart_objects::SmartObject&>(message[strings::msg_params]));
- }
-
- SendResponse(is_succeeded,
- result_code,
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
-#endif // #ifdef HMI_DBUS_API
-}
-
-bool SubscribeVehicleDataRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
- smart_objects::SmartObject& msg_params) const {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace mobile_apis;
- auto vi_to_string =
- [](const mobile_apis::VehicleDataType::eType vehicle_data) {
- for (auto& vi_str_to_int_pair : MessageHelper::vehicle_data()) {
- if (vehicle_data == vi_str_to_int_pair.second) {
- return vi_str_to_int_pair.first;
- }
- }
- return std::string();
- };
-
- VehicleInfoSubscriptions::const_iterator it_same_app =
- vi_already_subscribed_by_this_app_.begin();
- for (; vi_already_subscribed_by_this_app_.end() != it_same_app;
- ++it_same_app) {
- msg_params[vi_to_string(*it_same_app)][strings::result_code] =
- VehicleDataResultCode::VDRC_DATA_ALREADY_SUBSCRIBED;
- msg_params[vi_to_string(*it_same_app)][strings::data_type] = *it_same_app;
- }
-
- VehicleInfoSubscriptions::const_iterator it_another_app =
- vi_already_subscribed_by_another_apps_.begin();
- for (; vi_already_subscribed_by_another_apps_.end() != it_another_app;
- ++it_another_app) {
- msg_params[vi_to_string(*it_another_app)][strings::result_code] =
- VehicleDataResultCode::VDRC_SUCCESS;
- msg_params[vi_to_string(*it_another_app)][strings::data_type] =
- *it_another_app;
- }
-}
-
-void SubscribeVehicleDataRequest::UnsubscribeFailedSubscriptions(
- ApplicationSharedPtr app,
- const smart_objects::SmartObject& msg_params) const {
- LOG4CXX_AUTO_TRACE(logger_);
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (msg_params.keyExists(it->first)) {
- if (msg_params[it->first][strings::result_code].asInt() !=
- hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS) {
- LOG4CXX_DEBUG(logger_,
- "Subscription for VehicleDataType "
- << it->first
- << " is unsuccessfull. "
- "Unsubscribing app with connection key "
- << connection_key() << " from it.");
- app->UnsubscribeFromIVI(it->second);
- }
- }
- }
-}
-
-struct SubscribedToIVIPredicate {
- int32_t vehicle_info_;
- SubscribedToIVIPredicate(int32_t vehicle_info)
- : vehicle_info_(vehicle_info) {}
- bool operator()(const ApplicationSharedPtr app) const {
- return app ? app->IsSubscribedToIVI(vehicle_info_) : false;
- }
-};
-
-bool SubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
- const uint32_t param_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- SubscribedToIVIPredicate finder(param_id);
- DataAccessor<ApplicationSet> accessor = application_manager_.applications();
- ApplicationSetConstIt it = std::find_if(
- accessor.GetData().begin(), accessor.GetData().end(), finder);
- return it != accessor.GetData().end();
-}
-
-void SubscribeVehicleDataRequest::CheckVISubscribtions(
- ApplicationSharedPtr app,
- std::string& out_info,
- mobile_apis::Result::eType& out_result_code,
- smart_objects::SmartObject& out_response_params,
- smart_objects::SmartObject& out_request_params,
- bool& out_result) {
- CheckVISubscriptions(app,
- out_info,
- out_result_code,
- out_response_params,
- out_request_params,
- out_result);
-}
-
-void SubscribeVehicleDataRequest::CheckVISubscriptions(
- ApplicationSharedPtr app,
- std::string& out_info,
- mobile_apis::Result::eType& out_result_code,
- smart_objects::SmartObject& out_response_params,
- smart_objects::SmartObject& out_request_params,
- bool& out_result) {
- // counter for items to subscribe
- VehicleInfoSubscriptions::size_type items_to_subscribe = 0;
- // counter for subscribed items by application
- uint32_t subscribed_items = 0;
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- HmiInterfaces::InterfaceState interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(
- HmiInterfaces::HMI_INTERFACE_VehicleInfo);
-
- const bool is_interface_not_available =
- interface_state == HmiInterfaces::STATE_NOT_AVAILABLE;
-
- for (; vehicle_data.end() != it; ++it) {
- const std::string& key_name = it->first;
- if ((*message_)[strings::msg_params].keyExists(key_name)) {
- const bool is_key_enabled =
- (*message_)[strings::msg_params][key_name].asBool();
- if (is_key_enabled) {
- ++items_to_subscribe;
- }
- if (!is_interface_not_available && is_key_enabled) {
- mobile_apis::VehicleDataType::eType key_type = it->second;
- if (app->IsSubscribedToIVI(key_type)) {
- LOG4CXX_DEBUG(logger_,
- "App with connection key "
- << connection_key()
- << " is subscribed already for VehicleDataType: "
- << key_type);
- ++subscribed_items;
- vi_already_subscribed_by_this_app_.insert(key_type);
- out_response_params[key_name][strings::data_type] = key_type;
- out_response_params[key_name][strings::result_code] =
- mobile_apis::VehicleDataResultCode::VDRC_DATA_ALREADY_SUBSCRIBED;
- continue;
- }
-
- if (IsSomeoneSubscribedFor(key_type)) {
- LOG4CXX_DEBUG(logger_,
- "There are apps subscribed already for "
- "VehicleDataType: "
- << key_type);
- if (!app->SubscribeToIVI(static_cast<uint32_t>(key_type))) {
- LOG4CXX_ERROR(
- logger_,
- "Unable to subscribe for VehicleDataType: " << key_type);
- continue;
- }
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " have been subscribed for VehicleDataType: " << key_type);
- ++subscribed_items;
- vi_already_subscribed_by_another_apps_.insert(key_type);
- out_response_params[key_name][strings::data_type] = key_type;
- out_response_params[key_name][strings::result_code] =
- mobile_apis::VehicleDataResultCode::VDRC_SUCCESS;
- continue;
- }
-
- out_request_params[key_name] = is_key_enabled;
-
- if (is_key_enabled) {
- vi_waiting_for_subscribe_.insert(key_type);
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " will be subscribed for VehicleDataType: " << key_type);
- ++subscribed_items;
- }
- }
- }
- }
-
- const bool is_everything_already_subscribed =
- items_to_subscribe ==
- vi_already_subscribed_by_another_apps_.size() +
- vi_already_subscribed_by_this_app_.size();
-
- if (0 == items_to_subscribe) {
- if (HasDisallowedParams()) {
- out_result_code = mobile_apis::Result::DISALLOWED;
- } else {
- out_result_code = mobile_apis::Result::INVALID_DATA;
- out_info = "No data in the request";
- }
- out_result = false;
- }
-
- if (0 == subscribed_items && !is_interface_not_available) {
- out_result_code = mobile_apis::Result::IGNORED;
- out_info = "Already subscribed on provided VehicleData.";
- out_result = false;
- }
-
- if (is_everything_already_subscribed) {
- out_result_code = vi_already_subscribed_by_this_app_.size()
- ? mobile_apis::Result::IGNORED
- : mobile_apis::Result::SUCCESS;
- if (!(vi_already_subscribed_by_this_app_.empty())) {
- out_info = "Already subscribed on some provided VehicleData.";
- }
- out_result = true;
- }
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc b/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc
deleted file mode 100644
index 7ed16407a5..0000000000
--- a/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/subscribe_vehicle_data_response.h"
-
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {}
-
-void SubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
deleted file mode 100644
index 8195697dfc..0000000000
--- a/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/subscribe_way_points_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SubscribeWayPointsRequest::SubscribeWayPointsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {}
-
-void SubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (application_manager_.IsAppSubscribedForWayPoints(app)) {
- SendResponse(false, mobile_apis::Result::IGNORED);
- return;
- }
-
- if (application_manager_.IsAnyAppSubscribedForWayPoints()) {
- application_manager_.SubscribeAppForWayPoints(app);
- SendResponse(true, mobile_apis::Result::SUCCESS);
- return;
- }
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(
- hmi_apis::FunctionID::Navigation_SubscribeWayPoints, NULL, true);
-}
-
-void SubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- const hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
- if (result) {
- application_manager_.SubscribeAppForWayPoints(app);
- }
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-bool SubscribeWayPointsRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc b/src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc
deleted file mode 100644
index c2e642619a..0000000000
--- a/src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/subscribe_way_points_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SubscribeWayPointsResponse::SubscribeWayPointsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {}
-
-void SubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/system_request.cc b/src/components/application_manager/src/commands/mobile/system_request.cc
deleted file mode 100644
index fe38b93732..0000000000
--- a/src/components/application_manager/src/commands/mobile/system_request.cc
+++ /dev/null
@@ -1,659 +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 "application_manager/commands/mobile/system_request.h"
-
-#include <vector>
-#include <string>
-#include <stdio.h>
-#include <algorithm>
-#include <sstream>
-#include "application_manager/policies/policy_handler_interface.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-#include "formatters/CFormatterJsonBase.h"
-#include "json/json.h"
-#include "utils/helpers.h"
-#include "utils/custom_string.h"
-
-namespace application_manager {
-
-CREATE_LOGGERPTR_LOCAL(logger_, "ApplicationManager")
-namespace {
-
-#ifdef ENABLE_LOG
-const char* kQueryAppsValidationFailedPrefix =
- ":QUERY_APPS_VALIDATION_FAILED: ";
-#endif
-
-const unsigned int kVrSynonymLengthMax = 40U;
-const unsigned int kVrSynonymLengthMin = 1U;
-const unsigned int kTtsNameLengthMax = 500U;
-const unsigned int kVrArraySizeMax = 100U;
-const unsigned int kVrArraySizeMin = 1U;
-const unsigned int kUrlSchemaLengthMax = 255U;
-const unsigned int kPackageNameLengthMax = 255U;
-const unsigned int kAppIdLengthMax = 40U;
-const unsigned int kAppNameLengthMax = 100U;
-const unsigned int kLanguageArraySizeMax = 100U;
-
-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_);
- if (!data_.isValid()) {
- LOG4CXX_ERROR(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not valid.");
- return false;
- }
- if (!HasResponseKey()) {
- return false;
- }
- return ValidateAppDataAndOsAndLanguagesData();
- }
-
- private:
- bool HasResponseKey() const {
- if (!data_.keyExists(json::response)) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response does not contain '"
- << json::response << "' parameter.");
- return false;
- }
- return true;
- }
-
- bool ValidateAppDataAndOsAndLanguagesData() {
- smart_objects::SmartArray* objects_array = data_[json::response].asArray();
-
- if (!objects_array) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not array.");
- return false;
- }
-
- SynonymsMap synonyms_map;
- bool has_response_valid_application = false;
-
- smart_objects::SmartArray::iterator applications_iterator =
- objects_array->begin();
-
- for (; applications_iterator != objects_array->end();) {
- const smart_objects::SmartObject& app_data = *applications_iterator;
-
- if (!app_data.isValid()) {
- LOG4CXX_WARN(logger_,
- 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.");
-
- applications_iterator = objects_array->erase(applications_iterator);
- continue;
- }
-
- if (!ValidateAppIdAndAppName(app_data)) {
- return false;
- }
-
- // If we dont have any of android/ios field
- // we skip this json in CheckMandatoryParametersPresent
- const std::string os_type =
- (app_data.keyExists(json::android)) ? json::android : json::ios;
-
- // Verify os and dependent languages data
- if (json::ios == os_type) {
- if (app_data[json::ios][json::urlScheme].asString().length() >
- kUrlSchemaLengthMax) {
- LOG4CXX_WARN(
- logger_,
- kQueryAppsValidationFailedPrefix
- << "An urlscheme length exceeds maximum allowed ["
- << app_data[json::ios][json::urlScheme].asString().length()
- << "]>[" << kUrlSchemaLengthMax << "]");
- return false;
- }
- }
-
- 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.");
- return false;
- }
- }
-
- // Languages verification
- if (!app_data[os_type].keyExists(json::languages)) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages' doesn't exist");
- return false;
- }
- if (!ValidateLanguages(app_data[os_type][json::languages],
- synonyms_map)) {
- return false;
- }
- has_response_valid_application = true;
- ++applications_iterator;
- }
- return has_response_valid_application;
- }
-
- bool ValidateAppIdAndAppName(const smart_objects::SmartObject& app_data) {
- // 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 << "]");
- 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 << "]");
- return false;
- }
- applications_id_set_.insert(app_id);
-
- // Verify that app is not registered yet
- 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.");
- }
- // 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
- << "].");
- return false;
- }
- return true;
- }
-
- bool ValidateLanguages(const smart_objects::SmartObject& languages,
- SynonymsMap& synonyms_map) const {
- 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
- << "]");
- 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.");
- return false;
- }
- if (language.length() != 1) {
- LOG4CXX_WARN(logger_,
- 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");
- return false;
- }
- // Verify default language defined
- if (!(language_name).compare(json::default_)) {
- default_language_found = true;
- }
- // Add set for synonyms' duplicates validation
- if (synonyms_map.find(language_name) == synonyms_map.end()) {
- synonyms_map[language_name] = SynonymsSet();
- }
- // ttsName verification
- if (!language[language_name].keyExists(json::ttsName)) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages.ttsName' doesn't exist");
- return false;
- }
- const smart_objects::SmartObject& ttsNameObject =
- language[language_name][json::ttsName];
- // ttsName is string
- if (smart_objects::SmartType_String == ttsNameObject.getType()) {
- 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
- << "]");
- return false;
- }
- } else {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "ttsName is not the string type.");
- return false;
- }
-
- if (!ValidateSynonymsAtLanguage(language, language_name, synonyms_map)) {
- return false;
- }
- }
- 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
- << "]");
- 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;
- }
-
- smart_objects::SmartObject& data_;
- std::set<std::string> applications_id_set_;
- const ApplicationManager& manager_;
-
- DISALLOW_COPY_AND_ASSIGN(QueryAppsDataValidator);
-};
-}
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-uint32_t SystemRequest::index = 0;
-
-const std::string kSYNC = "SYNC";
-const std::string kIVSU = "IVSU";
-
-SystemRequest::SystemRequest(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-SystemRequest::~SystemRequest() {}
-
-void SystemRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!(application.valid())) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const mobile_apis::RequestType::eType request_type =
- static_cast<mobile_apis::RequestType::eType>(
- (*message_)[strings::msg_params][strings::request_type].asInt());
-
- const policy::PolicyHandlerInterface& policy_handler =
- application_manager_.GetPolicyHandler();
- if (!policy_handler.IsRequestTypeAllowed(application->policy_app_id(),
- request_type)) {
- SendResponse(false, mobile_apis::Result::DISALLOWED);
- return;
- }
-
- std::string file_name;
- if ((*message_)[strings::msg_params].keyExists(strings::file_name)) {
- file_name = (*message_)[strings::msg_params][strings::file_name].asString();
- } else {
- file_name = kSYNC;
- }
-
- if (!CheckSyntax(file_name)) {
- LOG4CXX_ERROR(logger_,
- "Incoming request contains \t\n \\t \\n or whitespace");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (!file_system::IsFileNameValid(file_name)) {
- const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
- SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
- return;
- }
-
- bool is_system_file = std::string::npos != file_name.find(kSYNC) ||
- std::string::npos != file_name.find(kIVSU);
-
- // to avoid override existing file
- if (is_system_file) {
- const uint8_t max_size = 255;
- char buf[max_size] = {'\0'};
- snprintf(buf, max_size - 1, "%d%s", index++, file_name.c_str());
- file_name = buf;
- }
-
- std::vector<uint8_t> binary_data;
- std::string binary_data_folder;
- if ((*message_)[strings::params].keyExists(strings::binary_data)) {
- binary_data = (*message_)[strings::params][strings::binary_data].asBinary();
- binary_data_folder =
- application_manager_.get_settings().system_files_path();
- } else {
- binary_data_folder =
- application_manager_.get_settings().app_storage_folder();
- binary_data_folder += "/";
- binary_data_folder += application->folder_name();
- binary_data_folder += "/";
- }
-
- std::string file_dst_path =
- application_manager_.get_settings().system_files_path();
- file_dst_path += "/";
- file_dst_path += file_name;
-
- if ((*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_DEBUG(
- logger_,
- "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.");
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
- return;
- }
- } else {
- 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);
-
- const 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.");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
- processing_file_ = file_dst_path;
- }
-
- LOG4CXX_DEBUG(logger_, "Binary data ok.");
-
- if (mobile_apis::RequestType::HTTP == request_type &&
- (*message_)[strings::msg_params].keyExists(strings::file_name)) {
- const std::string& file =
- (*message_)[strings::msg_params][strings::file_name].asString();
- application_manager_.GetPolicyHandler().ReceiveMessageFromSDK(file,
- binary_data);
- SendResponse(true, mobile_apis::Result::SUCCESS);
- return;
- } else if (mobile_apis::RequestType::QUERY_APPS == request_type) {
- using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
-
- smart_objects::SmartObject sm_object;
- Json::Reader reader;
- std::string json(binary_data.begin(), binary_data.end());
- Json::Value root;
- if (!reader.parse(json.c_str(), root)) {
- LOG4CXX_DEBUG(logger_, "Unable to parse query_app json file.");
- return;
- }
-
- CFormatterJsonBase::jsonValueToObj(root, sm_object);
- if (!ValidateQueryAppData(sm_object)) {
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
- return;
- }
-
- application_manager_.ProcessQueryApp(sm_object, connection_key());
- SendResponse(true, mobile_apis::Result::SUCCESS);
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- if (std::string::npos != file_name.find(kIVSU)) {
- msg_params[strings::file_name] = file_name;
- } else {
- msg_params[strings::file_name] = file_dst_path;
- }
-
- // expected int, mandatory=true, all Policies flow (HTTP,Proprietary,External)
- msg_params[strings::app_id] = application->hmi_app_id();
-
- msg_params[strings::request_type] =
- (*message_)[strings::msg_params][strings::request_type];
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
- SendHMIRequest(hmi_apis::FunctionID::BasicCommunication_SystemRequest,
- &msg_params,
- true);
-}
-
-void SystemRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::BasicCommunication_SystemRequest: {
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
- mobile_apis::Result::eType result_code =
- GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
-
- const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
-
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!(application.valid())) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (!processing_file_.empty()) {
- file_system::DeleteFile(processing_file_);
- processing_file_.clear();
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-bool SystemRequest::ValidateQueryAppData(
- smart_objects::SmartObject& data) const {
- if (!data.isValid()) {
- LOG4CXX_ERROR(logger_,
- 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.");
- return false;
- }
-
- QueryAppsDataValidator validator(data, application_manager_);
- return validator.Validate();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/system_response.cc b/src/components/application_manager/src/commands/mobile/system_response.cc
deleted file mode 100644
index f5bc03f4a5..0000000000
--- a/src/components/application_manager/src/commands/mobile/system_response.cc
+++ /dev/null
@@ -1,54 +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 "application_manager/commands/mobile/system_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SystemResponse::SystemResponse(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-SystemResponse::~SystemResponse() {}
-
-void SystemResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
deleted file mode 100644
index d40ad9c870..0000000000
--- a/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
+++ /dev/null
@@ -1,64 +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 "application_manager/commands/mobile/unregister_app_interface_request.h"
-
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void UnregisterAppInterfaceRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!application_manager_.application(connection_key())) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- application_manager_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key(),
- mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM),
- commands::Command::ORIGIN_SDL);
- application_manager_.EndNaviServices(connection_key());
- application_manager_.UnregisterApplication(connection_key(),
- mobile_apis::Result::SUCCESS);
- SendResponse(true, mobile_apis::Result::SUCCESS);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc b/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
deleted file mode 100644
index 49d9276d35..0000000000
--- a/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
+++ /dev/null
@@ -1,47 +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 "application_manager/commands/mobile/unregister_app_interface_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void UnregisterAppInterfaceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SendResponse((*message_)[strings::msg_params][strings::success].asBool());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc
deleted file mode 100644
index 7e798bcb4e..0000000000
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc
+++ /dev/null
@@ -1,103 +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 "application_manager/commands/mobile/unsubscribe_button_request.h"
-
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-UnsubscribeButtonRequest::UnsubscribeButtonRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {}
-
-void UnsubscribeButtonRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const mobile_apis::ButtonName::eType btn_id =
- static_cast<mobile_apis::ButtonName::eType>(
- (*message_)[str::msg_params][str::button_name].asInt());
-
- if (!CheckHMICapabilities(btn_id)) {
- LOG4CXX_ERROR(logger_,
- "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 subscibe to button " << btn_id);
- SendResponse(false, mobile_apis::Result::IGNORED);
- return;
- }
-
- SendUnsubscribeButtonNotification();
- SendResponse(true, mobile_apis::Result::SUCCESS);
-}
-
-bool UnsubscribeButtonRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-void UnsubscribeButtonRequest::SendUnsubscribeButtonNotification() {
- using namespace smart_objects;
- using namespace hmi_apis;
-
- // send OnButtonSubscription notification
- SmartObject msg_params = SmartObject(SmartType_Map);
- msg_params[strings::app_id] = connection_key();
- msg_params[strings::name] = static_cast<Common_ButtonName::eType>(
- (*message_)[strings::msg_params][strings::button_name].asInt());
- msg_params[strings::is_suscribed] = false;
- CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc
deleted file mode 100644
index 9ac98a27f7..0000000000
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc
+++ /dev/null
@@ -1,65 +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 "application_manager/commands/mobile/unsubscribe_button_response.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UnsubscribeButtonResponse::UnsubscribeButtonResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {}
-
-void UnsubscribeButtonResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // 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");
- SendResponse(false);
- return;
- }
- }
-
- // TODO(DK): Some logic
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
deleted file mode 100644
index d6ad928bf7..0000000000
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
-
- Copyright (c) 2017, 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/commands/mobile/unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/command_impl.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/smart_object_keys.h"
-#include "utils/helpers.h"
-
-namespace application_manager {
-namespace commands {
-
-UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {}
-
-#ifdef HMI_DBUS_API
-namespace {
-struct Subrequest {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
-};
-Subrequest subrequests[] = {
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps, strings::gps},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed, strings::speed},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm, strings::rpm},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel,
- strings::fuel_level},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State,
- strings::fuel_level_state},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption,
- strings::instant_fuel_consumption},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature,
- strings::external_temp},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin, strings::vin},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl, strings::prndl},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure,
- strings::tire_pressure},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer, strings::odometer},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus,
- strings::belt_status},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation,
- strings::body_information},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus,
- strings::device_status},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking,
- strings::driver_braking},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus,
- strings::wiper_status},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus,
- strings::head_lamp_status},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque,
- strings::engine_torque},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition,
- strings::acc_pedal_pos},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle,
- strings::steering_wheel_angle},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo,
- strings::e_call_info},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus,
- strings::airbag_status},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent,
- strings::emergency_event},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus,
- strings::cluster_mode_status},
- {hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey, strings::my_key},
-};
-}
-#endif // #ifdef HMI_DBUS_API
-
-void UnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- int32_t items_to_unsubscribe = 0;
- int32_t unsubscribed_items = 0;
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject response_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- for (; vehicle_data.end() != it; ++it) {
- const std::string& key_name = it->first;
- if ((*message_)[strings::msg_params].keyExists(key_name)) {
- bool is_key_enabled = (*message_)[strings::msg_params][key_name].asBool();
- if (is_key_enabled) {
- ++items_to_unsubscribe;
-
- mobile_apis::VehicleDataType::eType key_type = it->second;
- if (!app->IsSubscribedToIVI(key_type)) {
- ++unsubscribed_items;
- vi_already_unsubscribed_by_this_app_.insert(key_type);
- response_params[key_name][strings::data_type] = key_type;
- response_params[key_name][strings::result_code] =
- mobile_apis::VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
- continue;
- }
-
- if (!app->UnsubscribeFromIVI(static_cast<uint32_t>(key_type))) {
- LOG4CXX_ERROR(logger_,
- "Unable to unsubscribe from "
- "VehicleDataType: "
- << key_type);
- continue;
- }
-
- LOG4CXX_DEBUG(logger_,
- "Unsubscribed app with connection key "
- << connection_key()
- << " from VehicleDataType: " << key_type);
-
- ++unsubscribed_items;
-
- if (IsSomeoneSubscribedFor(key_type)) {
- LOG4CXX_DEBUG(logger_,
- "There are another apps still subscribed for "
- "VehicleDataType: "
- << key_type);
-
- vi_still_subscribed_by_another_apps_.insert(key_type);
- response_params[key_name][strings::data_type] = key_type;
- response_params[key_name][strings::result_code] =
- mobile_apis::VehicleDataResultCode::VDRC_SUCCESS;
- continue;
- }
-
- msg_params[key_name] = is_key_enabled;
- }
- }
- }
-
- bool is_everything_already_unsubscribed =
- static_cast<uint32_t>(items_to_unsubscribe) ==
- vi_still_subscribed_by_another_apps_.size() +
- vi_already_unsubscribed_by_this_app_.size();
-
- if (0 == items_to_unsubscribe) {
- if (HasDisallowedParams()) {
- SendResponse(false, mobile_apis::Result::DISALLOWED);
- } else {
- SendResponse(
- false, mobile_apis::Result::INVALID_DATA, "No data in the request.");
- }
- return;
- }
-
- if (0 == unsubscribed_items) {
- SendResponse(false,
- mobile_apis::Result::IGNORED,
- "Was not subscribed on any VehicleData.",
- &response_params);
- return;
- }
-
- if (is_everything_already_unsubscribed) {
- if (!vi_already_unsubscribed_by_this_app_.empty()) {
- SendResponse(false,
- mobile_apis::Result::IGNORED,
- "Some provided VehicleData was not subscribed.",
- &response_params);
- } else {
- SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
- }
- return;
- }
-
-#ifdef HMI_DBUS_API
- // Generate list of subrequests
- for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
- const Subrequest& sr = subrequests[i];
- if (true == (*message_)[strings::msg_params].keyExists(sr.str) &&
- true == (*message_)[strings::msg_params][sr.str].asBool()) {
- HmiRequest hmi_request;
- hmi_request.str = sr.str;
- hmi_request.func_id = sr.func_id;
- hmi_request.complete = false;
- hmi_requests_.push_back(hmi_request);
- }
- }
- LOG4CXX_INFO(logger_,
- hmi_requests_.size() << " requests are going to be sent to HMI");
-
- // Send subrequests
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it)
- SendHMIRequest(it->func_id, &msg_params, true);
-#else
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
- &msg_params,
- true);
-#endif // #ifdef HMI_DBUS_API
-}
-
-void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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.");
- return;
- }
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
-
- ApplicationSharedPtr app =
- application_manager_.application(CommandRequestImpl::connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
- return;
- }
-
-#ifdef HMI_DBUS_API
- for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- HmiRequest& hmi_request = *it;
- if (hmi_request.func_id == event.id()) {
- hmi_request.status = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
- hmi_request.value = message[strings::msg_params][hmi_request.str];
- hmi_request.complete = true;
- break;
- }
- }
- bool all_complete = true;
- bool any_arg_success = false;
- mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- if (!it->complete) {
- all_complete = false;
- break;
- }
- if (hmi_apis::Common_Result::SUCCESS != it->status) {
- if (mobile_api::Result::SUCCESS == status) {
- status = static_cast<mobile_apis::Result::eType>(it->status);
- } else if (status !=
- static_cast<mobile_apis::Result::eType>(it->status)) {
- status = mobile_api::Result::eType::GENERIC_ERROR;
- }
- LOG4CXX_TRACE(logger_,
- "Status from HMI: " << it->status
- << ", so response status become "
- << status);
- } else {
- any_arg_success = true;
- }
- }
- if (all_complete) {
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- if (any_arg_success) {
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end();
- ++it) {
- response_params[it->str] = it->value;
- }
- }
-
- LOG4CXX_INFO(logger_, "All HMI requests are complete");
- if (true == any_arg_success) {
- SetAllowedToTerminate(false);
- }
- SendResponse(any_arg_success, status, NULL, &response_params);
- if (true == any_arg_success) {
- app->UpdateHash();
- }
- }
-#else
- hmi_apis::Common_Result::eType hmi_result =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- hmi_result, HmiInterfaces::HMI_INTERFACE_VehicleInfo);
-
- mobile_apis::Result::eType result_code =
- MessageHelper::HMIToMobileResult(hmi_result);
-
- if (result) {
- if (vi_already_unsubscribed_by_this_app_.size()) {
- result_code = mobile_apis::Result::IGNORED;
- response_info = "Some provided VehicleData was not subscribed.";
- }
- }
-
- if (!vi_still_subscribed_by_another_apps_.empty() ||
- !vi_already_unsubscribed_by_this_app_.empty()) {
- AddAlreadyUnsubscribedVI(
- const_cast<smart_objects::SmartObject&>(message[strings::msg_params]));
- }
-
- if (result) {
- SetAllowedToTerminate(false);
- }
- SendResponse(result,
- result_code,
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- if (result) {
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
- }
-#endif // #ifdef HMI_DBUS_API
-}
-
-bool UnsubscribeVehicleDataRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-struct SubscribedToIVIPredicate {
- int32_t vehicle_info_;
- SubscribedToIVIPredicate(int32_t vehicle_info)
- : vehicle_info_(vehicle_info) {}
- bool operator()(const ApplicationSharedPtr app) const {
- return app ? app->IsSubscribedToIVI(vehicle_info_) : false;
- }
-};
-
-bool UnsubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
- const uint32_t param_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- SubscribedToIVIPredicate finder(param_id);
- DataAccessor<ApplicationSet> accessor = application_manager_.applications();
- ApplicationSetConstIt it = std::find_if(
- accessor.GetData().begin(), accessor.GetData().end(), finder);
- return it != accessor.GetData().end();
-}
-
-void UnsubscribeVehicleDataRequest::AddAlreadyUnsubscribedVI(
- smart_objects::SmartObject& response) const {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace mobile_apis;
- VehicleInfoSubscriptions::const_iterator it_same_app =
- vi_already_unsubscribed_by_this_app_.begin();
- for (; vi_already_unsubscribed_by_this_app_.end() != it_same_app;
- ++it_same_app) {
- response[*it_same_app][strings::result_code] =
- VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
- }
-
- VehicleInfoSubscriptions::const_iterator it_another_app =
- vi_still_subscribed_by_another_apps_.begin();
- for (; vi_still_subscribed_by_another_apps_.end() != it_another_app;
- ++it_another_app) {
- response[*it_another_app][strings::result_code] =
- VehicleDataResultCode::VDRC_SUCCESS;
- }
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc
deleted file mode 100644
index 986256d377..0000000000
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,63 +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 "application_manager/commands/mobile/unsubscribe_vehicle_data_response.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-namespace commands {
-
-UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {}
-
-void UnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- // 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");
- SendResponse(false);
- return;
- }
- }
-
- // TODO(DK): Some logic
- SendResponse(true);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
deleted file mode 100644
index dc3404c022..0000000000
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/unsubscribe_way_points_request.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UnSubscribeWayPointsRequest::UnSubscribeWayPointsRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-UnSubscribeWayPointsRequest::~UnSubscribeWayPointsRequest() {}
-
-void UnSubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- ApplicationSharedPtr app = application_manager_.application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (!application_manager_.IsAppSubscribedForWayPoints(app)) {
- SendResponse(false, mobile_apis::Result::IGNORED);
- return;
- }
-
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(
- hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints, NULL, true);
-}
-
-void UnSubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- 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");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- const hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
- if (result) {
- application_manager_.UnsubscribeAppFromWayPoints(app);
- }
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-bool UnSubscribeWayPointsRequest::Init() {
- hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc
deleted file mode 100644
index f6430d1f0d..0000000000
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/mobile/unsubscribe_way_points_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-UnsubscribeWayPointsResponse::~UnsubscribeWayPointsResponse() {}
-
-void UnsubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc b/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
deleted file mode 100644
index 44fe9d0d07..0000000000
--- a/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
+++ /dev/null
@@ -1,234 +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 <string>
-#include "application_manager/commands/mobile/update_turn_list_request.h"
-
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/custom_string.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace custom_str = utils::custom_string;
-
-UpdateTurnListRequest::UpdateTurnListRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {}
-
-UpdateTurnListRequest::~UpdateTurnListRequest() {}
-
-void UpdateTurnListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- 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");
- return;
- }
-
- if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming update turn list has contains \t\n \\t \\n");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- // ProcessSoftButtons checks strings on the contents incorrect character
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
- app,
- application_manager_.GetPolicyHandler(),
- application_manager_);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, processing_result);
- return;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
- smart_objects::SmartObject& turn_list_array =
- ((*message_)[strings::msg_params][strings::turn_list]);
- for (uint32_t i = 0; i < turn_list_array.length(); ++i) {
- if ((turn_list_array[i].keyExists(strings::turn_icon)) &&
- (mobile_apis::Result::SUCCESS !=
- MessageHelper::VerifyImage(turn_list_array[i][strings::turn_icon],
- app,
- application_manager_))) {
- LOG4CXX_ERROR(logger_,
- "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];
-
- if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
- if (!CheckTurnListArray()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- for (uint32_t i = 0; i < msg_params[strings::turn_list].length(); ++i) {
- if (msg_params[strings::turn_list][i].keyExists(hmi_request::navi_text)) {
- const custom_str::CustomString& navigation_text =
- msg_params[strings::turn_list][i][hmi_request::navi_text]
- .asCustomString();
- msg_params[strings::turn_list][i].erase(hmi_request::navi_text);
- msg_params[strings::turn_list][i][hmi_request::navi_text]
- [hmi_request::field_name] = static_cast<int>(
- hmi_apis::Common_TextFieldName::turnText);
- msg_params[strings::turn_list][i][hmi_request::navi_text]
- [hmi_request::field_text] = navigation_text;
- }
- }
- }
-
- msg_params[strings::app_id] = app->app_id();
-
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- MessageHelper::SubscribeApplicationToSoftButton(
- (*message_)[strings::msg_params], app, function_id());
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::turn_list) ||
- (*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- SendHMIRequest(
- hmi_apis::FunctionID::Navigation_UpdateTurnList, &msg_params, true);
- } else {
- // conditional mandatory
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- }
-}
-
-void UpdateTurnListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
- LOG4CXX_INFO(logger_, "Received Navigation_UpdateTurnList event");
- EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
- const hmi_apis::Common_Result::eType result_code =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- std::string response_info;
- GetInfo(message, response_info);
- const bool result = PrepareResultForMobileResponse(
- result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
- SendResponse(result,
- MessageHelper::HMIToMobileResult(result_code),
- response_info.empty() ? NULL : response_info.c_str(),
- &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-bool UpdateTurnListRequest::CheckTurnListArray() {
- int32_t length =
- (*message_)[strings::msg_params][strings::turn_list].length();
- if (0 == length) {
- return false;
- }
-
- for (int32_t i = 0; i < length; ++i) {
- if (!((*message_)[strings::msg_params][strings::turn_list][i].keyExists(
- hmi_request::navi_text)) &&
- !((*message_)[strings::msg_params][strings::turn_list][i].keyExists(
- strings::turn_icon))) {
- return false;
- }
- }
- return true;
-}
-
-bool UpdateTurnListRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
-
- if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
- const smart_objects::SmartArray* tl_array =
- (*message_)[strings::msg_params][strings::turn_list].asArray();
-
- smart_objects::SmartArray::const_iterator it_tl = tl_array->begin();
- smart_objects::SmartArray::const_iterator it_tl_end = tl_array->end();
-
- for (; it_tl != it_tl_end; ++it_tl) {
- if ((*it_tl).keyExists(strings::navigation_text)) {
- str = (*it_tl)[strings::navigation_text].asCharArray();
- if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_,
- "Invalid turn_list navigation_text text syntax check failed");
- return true;
- }
- }
-
- 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");
- return true;
- }
- }
- }
- }
- return false;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc b/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc
deleted file mode 100644
index d40a4546fc..0000000000
--- a/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc
+++ /dev/null
@@ -1,56 +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 "application_manager/commands/mobile/update_turn_list_response.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateTurnListResponse::UpdateTurnListResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {}
-
-UpdateTurnListResponse::~UpdateTurnListResponse() {}
-
-void UpdateTurnListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- application_manager_.SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/notification_from_hmi.cc b/src/components/application_manager/src/commands/notification_from_hmi.cc
new file mode 100644
index 0000000000..1fef383213
--- /dev/null
+++ b/src/components/application_manager/src/commands/notification_from_hmi.cc
@@ -0,0 +1,110 @@
+/*
+ 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 "application_manager/commands/notification_from_hmi.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "smart_objects/smart_object.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NotificationFromHMI::NotificationFromHMI(
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ // Replace HMI app id with Mobile connection id
+ ReplaceHMIWithMobileAppId(*message);
+}
+
+NotificationFromHMI::~NotificationFromHMI() {}
+
+bool NotificationFromHMI::Init() {
+ return true;
+}
+
+bool NotificationFromHMI::CleanUp() {
+ return true;
+}
+
+void NotificationFromHMI::Run() {}
+
+void NotificationFromHMI::SendNotificationToMobile(
+ const MessageSharedPtr& message) {
+ (*message)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+ rpc_service_.ManageMobileCommand(message, SOURCE_SDL);
+}
+
+void NotificationFromHMI::CreateHMIRequest(
+ const hmi_apis::FunctionID::eType& function_id,
+ const smart_objects::SmartObject& msg_params) const {
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
+ if (!result) {
+ LOG4CXX_ERROR(logger_, "Memory allocation failed.");
+ return;
+ }
+
+ // get hmi correlation id for chaining further request from this object
+ const uint32_t hmi_correlation_id_ =
+ application_manager_.GetNextHMICorrelationID();
+
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
+ request[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kRequest);
+ request[strings::params][strings::function_id] =
+ static_cast<int32_t>(function_id);
+ request[strings::params][strings::correlation_id] = hmi_correlation_id_;
+ request[strings::params][strings::protocol_version] =
+ CommandImpl::protocol_version_;
+ request[strings::params][strings::protocol_type] =
+ CommandImpl::hmi_protocol_type_;
+
+ request[strings::msg_params] = msg_params;
+
+ if (!rpc_service_.ManageHMICommand(result)) {
+ LOG4CXX_ERROR(logger_, "Unable to send request");
+ return;
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/notification_to_hmi.cc b/src/components/application_manager/src/commands/notification_to_hmi.cc
new file mode 100644
index 0000000000..2e5f54e950
--- /dev/null
+++ b/src/components/application_manager/src/commands/notification_to_hmi.cc
@@ -0,0 +1,74 @@
+/*
+ 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 "application_manager/commands/notification_to_hmi.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NotificationToHMI::NotificationToHMI(
+ const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+NotificationToHMI::~NotificationToHMI() {}
+
+bool NotificationToHMI::Init() {
+ // Replace Mobile connection id with HMI app id
+ return ReplaceMobileWithHMIAppId(*message_);
+}
+
+bool NotificationToHMI::CleanUp() {
+ return true;
+}
+
+void NotificationToHMI::Run() {}
+
+void NotificationToHMI::SendNotification() {
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/request_from_hmi.cc b/src/components/application_manager/src/commands/request_from_hmi.cc
new file mode 100644
index 0000000000..f77495ac31
--- /dev/null
+++ b/src/components/application_manager/src/commands/request_from_hmi.cc
@@ -0,0 +1,116 @@
+/*
+ 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 "application_manager/commands/request_from_hmi.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+#include "utils/make_shared.h"
+
+namespace application_manager {
+
+namespace commands {
+
+RequestFromHMI::RequestFromHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , EventObserver(application_manager.event_dispatcher()) {
+ // Replace HMI app id with Mobile connection id
+ ReplaceHMIWithMobileAppId(*message);
+}
+
+RequestFromHMI::~RequestFromHMI() {}
+
+bool RequestFromHMI::Init() {
+ return true;
+}
+
+bool RequestFromHMI::CleanUp() {
+ return true;
+}
+
+void RequestFromHMI::Run() {}
+
+void RequestFromHMI::on_event(const event_engine::Event& event) {}
+
+void RequestFromHMI::SendResponse(
+ const bool success,
+ const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const hmi_apis::Common_Result::eType result_code) {
+ smart_objects::SmartObjectSPtr message =
+ ::utils::MakeShared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ FillCommonParametersOfSO(*message, correlation_id, function_id);
+ (*message)[strings::params][strings::message_type] = MessageType::kResponse;
+ (*message)[strings::params][hmi_response::code] = 0;
+ (*message)[strings::msg_params][strings::success] = success;
+ (*message)[strings::msg_params][strings::result_code] = result_code;
+
+ rpc_service_.ManageHMICommand(message);
+}
+
+void RequestFromHMI::SendErrorResponse(
+ const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const hmi_apis::Common_Result::eType result_code,
+ const std::string error_message) {
+ smart_objects::SmartObjectSPtr message =
+ ::utils::MakeShared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ FillCommonParametersOfSO(*message, correlation_id, function_id);
+ (*message)[strings::params][strings::message_type] =
+ MessageType::kErrorResponse;
+ (*message)[strings::params][hmi_response::code] = result_code;
+ (*message)[strings::params][strings::error_msg] = error_message;
+
+ rpc_service_.ManageHMICommand(message);
+}
+
+void RequestFromHMI::FillCommonParametersOfSO(
+ smart_objects::SmartObject& message,
+ const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id) {
+ (message)[strings::params][strings::function_id] = function_id;
+ (message)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (message)[strings::params][strings::protocol_version] = protocol_version_;
+ (message)[strings::params][strings::correlation_id] = correlation_id;
+}
+
+} // namespace commands
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/request_to_hmi.cc b/src/components/application_manager/src/commands/request_to_hmi.cc
new file mode 100644
index 0000000000..1acbc9ace7
--- /dev/null
+++ b/src/components/application_manager/src/commands/request_to_hmi.cc
@@ -0,0 +1,97 @@
+/*
+ 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 "application_manager/commands/request_to_hmi.h"
+#include "application_manager/rpc_service.h"
+
+namespace application_manager {
+
+namespace commands {
+
+bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
+ HmiInterfaces::InterfaceID interface) {
+ const HmiInterfaces::InterfaceState state =
+ application_manager.hmi_interfaces().GetInterfaceState(interface);
+ return HmiInterfaces::STATE_NOT_AVAILABLE != state;
+}
+
+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;
+ }
+ return false;
+}
+
+RequestToHMI::RequestToHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+RequestToHMI::~RequestToHMI() {}
+
+bool RequestToHMI::Init() {
+ // Replace Mobile connection id with HMI app id
+ return ReplaceMobileWithHMIAppId(*message_);
+}
+
+bool RequestToHMI::CleanUp() {
+ return true;
+}
+
+void RequestToHMI::Run() {
+ SendRequest();
+}
+
+void RequestToHMI::SendRequest() {
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // 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
new file mode 100644
index 0000000000..123dbad828
--- /dev/null
+++ b/src/components/application_manager/src/commands/response_from_hmi.cc
@@ -0,0 +1,113 @@
+/*
+ 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 "application_manager/commands/response_from_hmi.h"
+#include "application_manager/rpc_service.h"
+#include "smart_objects/smart_object.h"
+
+namespace application_manager {
+
+namespace commands {
+
+ResponseFromHMI::ResponseFromHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {
+ // If it is error response, shift info
+ if ((*message)[strings::params].keyExists(hmi_response::message)) {
+ (*message)[strings::msg_params][strings::info] =
+ (*message)[strings::params][hmi_response::message];
+ }
+
+ // Replace HMI app id with Mobile connection id
+ ReplaceHMIWithMobileAppId(*message);
+}
+
+ResponseFromHMI::~ResponseFromHMI() {}
+
+bool ResponseFromHMI::Init() {
+ return true;
+}
+
+bool ResponseFromHMI::CleanUp() {
+ return true;
+}
+
+void ResponseFromHMI::Run() {}
+
+void ResponseFromHMI::SendResponseToMobile(
+ const MessageSharedPtr& message, ApplicationManager& application_manager) {
+ (*message)[strings::params][strings::message_type] = MessageType::kResponse;
+
+ rpc_service_.ManageMobileCommand(message, SOURCE_SDL);
+}
+
+void ResponseFromHMI::CreateHMIRequest(
+ const hmi_apis::FunctionID::eType& function_id,
+ const smart_objects::SmartObject& msg_params) const {
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
+
+ if (!result) {
+ LOG4CXX_ERROR(logger_, "Memory allocation failed.");
+ return;
+ }
+
+ // get hmi correlation id for chaining further request from this object
+ const uint32_t hmi_correlation_id_ =
+ application_manager_.GetNextHMICorrelationID();
+
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
+ request[strings::params][strings::message_type] = MessageType::kRequest;
+ request[strings::params][strings::function_id] = function_id;
+ request[strings::params][strings::correlation_id] = hmi_correlation_id_;
+ request[strings::params][strings::protocol_version] =
+ CommandImpl::protocol_version_;
+ request[strings::params][strings::protocol_type] =
+ CommandImpl::hmi_protocol_type_;
+
+ request[strings::msg_params] = msg_params;
+
+ if (!rpc_service_.ManageHMICommand(result)) {
+ LOG4CXX_ERROR(logger_, "Unable to send request");
+ return;
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/response_to_hmi.cc b/src/components/application_manager/src/commands/response_to_hmi.cc
new file mode 100644
index 0000000000..01a2ec789e
--- /dev/null
+++ b/src/components/application_manager/src/commands/response_to_hmi.cc
@@ -0,0 +1,71 @@
+/*
+ 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 "application_manager/commands/response_to_hmi.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
+
+namespace application_manager {
+
+namespace commands {
+
+ResponseToHMI::ResponseToHMI(const MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+ResponseToHMI::~ResponseToHMI() {}
+
+bool ResponseToHMI::Init() {
+ // Replace Mobile connection id with HMI app id
+ return ReplaceMobileWithHMIAppId(*message_);
+}
+
+bool ResponseToHMI::CleanUp() {
+ return true;
+}
+
+void ResponseToHMI::Run() {
+ (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+
+ rpc_service_.SendMessageToHMI(message_);
+}
+
+} // namespace commands
+} // namespace application_manager
diff --git a/src/components/application_manager/src/core_service.cc b/src/components/application_manager/src/core_service.cc
deleted file mode 100644
index 2a96502cde..0000000000
--- a/src/components/application_manager/src/core_service.cc
+++ /dev/null
@@ -1,231 +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 <vector>
-#include <algorithm>
-#include "application_manager/core_service.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/message_helper.h"
-#include "json/json.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace {
-struct AppExtensionPredicate {
- AppExtensionUID uid;
- bool operator()(const ApplicationSharedPtr app) {
- return app ? app->QueryInterface(uid).valid() : false;
- }
-};
-}
-
-CoreService::CoreService(ApplicationManager& application_manager)
- : application_manager_(application_manager) {}
-
-CoreService::~CoreService() {}
-
-mobile_apis::Result::eType CoreService::CheckPolicyPermissions(MessagePtr msg) {
- ApplicationSharedPtr app = GetApplication(msg->connection_key());
- if (!app) {
- return mobile_apis::Result::eType::APPLICATION_NOT_REGISTERED;
- }
-
-#ifdef SDL_REMOTE_CONTROL
- const RPCParams rpc_params;
- CommandParametersPermissions params;
- const mobile_apis::Result::eType ret =
- application_manager_.CheckPolicyPermissions(
- app, msg->function_name(), rpc_params, &params);
-
- if (ret != mobile_apis::Result::eType::SUCCESS) {
- return ret;
- }
-
- if (!AreParametersAllowed(msg, params)) {
- return mobile_apis::Result::eType::DISALLOWED;
- }
-
- return ret;
-#else
- return mobile_apis::Result::eType::SUCCESS;
-#endif // SDL_REMOTE_CONTROL
-}
-
-bool CoreService::CheckModule(const ApplicationId& app_id,
- const std::string& module) {
-#ifdef SDL_REMOTE_CONTROL
- ApplicationSharedPtr app = GetApplication(app_id);
- if (app) {
- return application_manager_.GetPolicyHandler().CheckModule(
- app->policy_app_id(), module);
- }
-#endif // SDL_REMOTE_CONTROL
- return false;
-}
-
-bool CoreService::IsRemoteControlApplication(ApplicationSharedPtr app) const {
-#ifdef SDL_REMOTE_CONTROL
- DCHECK_OR_RETURN(app, false);
- return application_manager_.GetPolicyHandler().CheckHMIType(
- app->policy_app_id(),
- mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
- app->app_types());
-#endif // SDL_REMOTE_CONTROL
- return false;
-}
-
-bool CoreService::IsInterfaceAvailable(
- const HmiInterfaces::InterfaceID interface) const {
-#ifdef SDL_REMOTE_CONTROL
- HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- const HmiInterfaces::InterfaceState state =
- hmi_interfaces.GetInterfaceState(interface);
- return HmiInterfaces::STATE_NOT_AVAILABLE != state;
-#endif // SDL_REMOTE_CONTROL
- return false;
-}
-
-void CoreService::RemoveHMIFakeParameters(
- application_manager::MessagePtr& message) {
- application_manager_.RemoveHMIFakeParameters(message);
-}
-
-ApplicationSharedPtr CoreService::GetApplication(ApplicationId app_id) {
- return application_manager_.application(app_id);
-}
-
-void CoreService::SendMessageToHMI(const MessagePtr& message) {
- application_manager_.SendPostMessageToHMI(message);
-}
-
-void CoreService::SendMessageToMobile(const MessagePtr& message) {
- application_manager_.SendPostMessageToMobile(message);
-}
-
-uint32_t CoreService::GetNextCorrelationID() {
- return application_manager_.GetNextHMICorrelationID();
-}
-
-std::vector<ApplicationSharedPtr> CoreService::GetApplications(
- AppExtensionUID uid) {
- ApplicationSet accessor = application_manager_.applications().GetData();
- AppExtensionPredicate predicate;
- predicate.uid = uid;
-
- std::vector<ApplicationSharedPtr> result;
- ApplicationSetConstIt it =
- std::find_if(accessor.begin(), accessor.end(), predicate);
- while (it != accessor.end()) {
- result.push_back(*it);
- it = std::find_if(++it, accessor.end(), predicate);
- }
- return result;
-}
-
-void CoreService::ChangeNotifyHMILevel(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level) {
- DCHECK_OR_RETURN_VOID(app);
- application_manager_.ChangeAppsHMILevel(app->app_id(), level);
-}
-
-const smart_objects::SmartObject* CoreService::GetRCCapabilities() const {
- return application_manager_.hmi_capabilities().rc_capability();
-}
-
-void CoreService::NotifyHMIAboutHMILevel(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level) {
- DCHECK_OR_RETURN_VOID(app);
- if (app->hmi_level() != mobile_apis::HMILevel::eType::HMI_FULL) {
- MessageHelper::SendActivateAppToHMI(
- app->app_id(),
- application_manager_,
- static_cast<hmi_apis::Common_HMILevel::eType>(level),
- true);
- }
-}
-
-bool CoreService::AreParametersAllowed(
- MessagePtr msg, const CommandParametersPermissions& params) {
- Json::Reader reader;
- Json::Value json;
- bool ret = reader.parse(msg->json_message(), json);
- if (ret) {
- return CheckParams(json.get(strings::params, Json::Value(Json::nullValue)),
- params.allowed_params);
- }
- return false;
-}
-
-bool CoreService::CheckParams(const Json::Value& object,
- const RPCParams& allowed_params) {
- if (!object.isObject()) {
- return true;
- }
- for (Json::Value::iterator i = object.begin(); i != object.end(); ++i) {
- std::string name = i.memberName();
- if (!IsAllowed(name, allowed_params)) {
- return false;
- }
- }
- return true;
-}
-
-bool CoreService::IsAllowed(const std::string& name,
- const RPCParams& allowed_params) {
- return std::find(allowed_params.begin(), allowed_params.end(), name) !=
- allowed_params.end();
-}
-
-bool CoreService::GetModuleTypes(const std::string& policy_app_id,
- std::vector<std::string>* modules) const {
-#ifdef SDL_REMOTE_CONTROL
- return application_manager_.GetPolicyHandler().GetModuleTypes(policy_app_id,
- modules);
-#endif // SDL_REMOTE_CONTROL
- return false;
-}
-
-MessageValidationResult CoreService::ValidateMessageBySchema(
- const Message& message) {
- const MessageValidationResult result =
- application_manager_.ValidateMessageBySchema(message);
- LOG4CXX_DEBUG(logger_, "Validation result : " << result);
- return result;
-}
-
-const ApplicationManagerSettings& CoreService::GetSettings() const {
- return application_manager_.get_settings();
-}
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/helpers/application_helper.cc b/src/components/application_manager/src/helpers/application_helper.cc
index 16b49faa2a..66afd6b0b6 100644
--- a/src/components/application_manager/src/helpers/application_helper.cc
+++ b/src/components/application_manager/src/helpers/application_helper.cc
@@ -87,20 +87,6 @@ void DeleteButtonSubscriptions(ApplicationSharedPtr app,
}
}
-void DeleteVISubscriptions(ApplicationSharedPtr app,
- ApplicationManager& app_manager) {
- VehicleInfoSubscriptions ivi = app->SubscribedIVI().GetData();
-
- for (auto i : ivi) {
- app->UnsubscribeFromIVI(i);
- SubscribedToIVIPredicate p(i);
- auto app = FindApp(app_manager.applications(), p);
- if (!app) {
- MessageHelper::SendUnsubscribeIVIRequest(i, app, app_manager);
- }
- }
-}
-
void CleanupAppFiles(ApplicationSharedPtr app) {
const auto icon_file = app->app_icon_path();
@@ -120,14 +106,6 @@ namespace application_manager {
CREATE_LOGGERPTR_GLOBAL(logger, "ApplicationManager")
-SubscribedToIVIPredicate::SubscribedToIVIPredicate(uint32_t vehicle_info)
- : vehicle_info_(vehicle_info) {}
-
-bool SubscribedToIVIPredicate::operator()(
- const ApplicationSharedPtr app) const {
- return app ? app->IsSubscribedToIVI(vehicle_info_) : false;
-}
-
void DeleteApplicationData(ApplicationSharedPtr app,
ApplicationManager& app_manager) {
LOG4CXX_AUTO_TRACE(logger);
@@ -139,8 +117,12 @@ void DeleteApplicationData(ApplicationSharedPtr app,
DeleteChoiceSets(app, app_manager);
DeleteGlobalProperties(app, app_manager);
DeleteButtonSubscriptions(app, app_manager);
- DeleteVISubscriptions(app, app_manager);
CleanupAppFiles(app);
+ app_manager.GetPluginManager().ForEachPlugin(
+ [&app](plugin_manager::RPCPlugin& plugin) {
+ plugin.OnApplicationEvent(
+ plugin_manager::ApplicationEvent::kDeleteApplicationData, app);
+ });
}
} // namespace application_manager
diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc
index e39b728155..d00fc2ae19 100644
--- a/src/components/application_manager/src/hmi_capabilities_impl.cc
+++ b/src/components/application_manager/src/hmi_capabilities_impl.cc
@@ -93,6 +93,8 @@ void InitCapabilities() {
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));
@@ -282,6 +284,9 @@ void InitCapabilities() {
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(
@@ -548,10 +553,15 @@ void HMICapabilitiesImpl::set_vr_supported_languages(
void HMICapabilitiesImpl::set_display_capabilities(
const smart_objects::SmartObject& display_capabilities) {
- if (display_capabilities_) {
- delete display_capabilities_;
+ if (app_mngr_.IsSOStructValid(
+ hmi_apis::StructIdentifiers::Common_DisplayCapabilities,
+ display_capabilities)) {
+ if (display_capabilities_) {
+ delete display_capabilities_;
+ }
+ display_capabilities_ =
+ new smart_objects::SmartObject(display_capabilities);
}
- display_capabilities_ = new smart_objects::SmartObject(display_capabilities);
}
void HMICapabilitiesImpl::set_hmi_zone_capabilities(
diff --git a/src/components/application_manager/src/hmi_command_factory.cc b/src/components/application_manager/src/hmi_command_factory.cc
deleted file mode 100644
index a7f3ce7e6b..0000000000
--- a/src/components/application_manager/src/hmi_command_factory.cc
+++ /dev/null
@@ -1,2317 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Copyright (c) 2017 Xevo Inc.
- 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 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 "application_manager/hmi_command_factory.h"
-
-#include "application_manager/message.h"
-#include "interfaces/HMI_API.h"
-
-#include "application_manager/commands/hmi/update_device_list_request.h"
-#include "application_manager/commands/hmi/update_device_list_response.h"
-#include "application_manager/commands/hmi/on_update_device_list.h"
-#include "application_manager/commands/hmi/on_start_device_discovery.h"
-#include "application_manager/commands/hmi/update_app_list_request.h"
-#include "application_manager/commands/hmi/update_app_list_response.h"
-#include "application_manager/commands/hmi/on_find_applications.h"
-#include "application_manager/commands/hmi/allow_all_apps_request.h"
-#include "application_manager/commands/hmi/allow_all_apps_response.h"
-#include "application_manager/commands/hmi/allow_app_request.h"
-#include "application_manager/commands/hmi/allow_app_response.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_request.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_response.h"
-#include "application_manager/commands/hmi/sdl_get_user_friendly_message_request.h"
-#include "application_manager/commands/hmi/sdl_get_user_friendly_message_response.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_request.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_response.h"
-#include "application_manager/commands/hmi/on_status_update_notification.h"
-#include "application_manager/commands/hmi/update_sdl_request.h"
-#include "application_manager/commands/hmi/update_sdl_response.h"
-#include "application_manager/commands/hmi/activate_app_request.h"
-#include "application_manager/commands/hmi/activate_app_response.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_request.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_response.h"
-#include "application_manager/commands/hmi/on_allow_sdl_functionality_notification.h"
-#include "application_manager/commands/hmi/on_app_permission_changed_notification.h"
-#include "application_manager/commands/hmi/on_app_permission_consent_notification.h"
-#include "application_manager/commands/hmi/on_app_activated_notification.h"
-#include "application_manager/commands/hmi/on_audio_data_streaming_notification.h"
-#include "application_manager/commands/hmi/on_video_data_streaming_notification.h"
-#include "application_manager/commands/hmi/on_sdl_consent_needed_notification.h"
-#include "application_manager/commands/hmi/on_exit_all_applications_notification.h"
-#include "application_manager/commands/hmi/on_exit_application_notification.h"
-#include "application_manager/commands/hmi/on_put_file_notification.h"
-#include "application_manager/commands/hmi/on_resume_audio_source_notification.h"
-#include "application_manager/commands/hmi/on_ignition_cycle_over_notification.h"
-#include "application_manager/commands/hmi/on_system_info_changed_notification.h"
-#include "application_manager/commands/hmi/get_system_info_request.h"
-#include "application_manager/commands/hmi/get_system_info_response.h"
-#include "application_manager/commands/hmi/close_popup_request.h"
-#include "application_manager/commands/hmi/close_popup_response.h"
-#include "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "application_manager/commands/hmi/button_get_capabilities_response.h"
-#include "application_manager/commands/hmi/ui_add_command_request.h"
-#include "application_manager/commands/hmi/ui_add_command_response.h"
-#include "application_manager/commands/hmi/ui_delete_command_request.h"
-#include "application_manager/commands/hmi/ui_delete_command_response.h"
-#include "application_manager/commands/hmi/ui_add_submenu_request.h"
-#include "application_manager/commands/hmi/ui_add_submenu_response.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_request.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_response.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/ui_get_language_request.h"
-#include "application_manager/commands/hmi/ui_get_language_response.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_request.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_response.h"
-#include "application_manager/commands/hmi/ui_change_registration_request.h"
-#include "application_manager/commands/hmi/ui_change_registration_response.h"
-#include "application_manager/commands/hmi/ui_show_request.h"
-#include "application_manager/commands/hmi/ui_show_response.h"
-#include "application_manager/commands/hmi/ui_alert_request.h"
-#include "application_manager/commands/hmi/ui_alert_response.h"
-#include "application_manager/commands/hmi/ui_is_ready_request.h"
-#include "application_manager/commands/hmi/ui_is_ready_response.h"
-#include "application_manager/commands/hmi/ui_slider_request.h"
-#include "application_manager/commands/hmi/ui_slider_response.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_request.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_response.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_request.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_response.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_request.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_response.h"
-#include "application_manager/commands/hmi/ui_set_app_icon_request.h"
-#include "application_manager/commands/hmi/ui_set_app_icon_response.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_response.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_request.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_response.h"
-#include "application_manager/commands/hmi/vr_is_ready_request.h"
-#include "application_manager/commands/hmi/vr_is_ready_response.h"
-#include "application_manager/commands/hmi/vr_add_command_request.h"
-#include "application_manager/commands/hmi/vr_add_command_response.h"
-#include "application_manager/commands/hmi/vr_delete_command_request.h"
-#include "application_manager/commands/hmi/vr_delete_command_response.h"
-#include "application_manager/commands/hmi/vr_change_registration_request.h"
-#include "application_manager/commands/hmi/vr_change_registration_response.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/vr_get_language_request.h"
-#include "application_manager/commands/hmi/vr_get_language_response.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_request.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_response.h"
-#include "application_manager/commands/hmi/tts_is_ready_request.h"
-#include "application_manager/commands/hmi/tts_is_ready_response.h"
-#include "application_manager/commands/hmi/tts_change_registration_request.h"
-#include "application_manager/commands/hmi/tts_change_registration_response.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/tts_get_language_request.h"
-#include "application_manager/commands/hmi/tts_get_language_response.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_request.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_response.h"
-#include "application_manager/commands/hmi/tts_speak_request.h"
-#include "application_manager/commands/hmi/tts_speak_response.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_request.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_response.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_request.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_response.h"
-#include "application_manager/commands/hmi/vr_perform_interaction_request.h"
-#include "application_manager/commands/hmi/vr_perform_interaction_response.h"
-#include "application_manager/commands/hmi/vi_is_ready_request.h"
-#include "application_manager/commands/hmi/vi_is_ready_response.h"
-#include "application_manager/commands/hmi/vi_read_did_request.h"
-#include "application_manager/commands/hmi/vi_read_did_response.h"
-#include "application_manager/commands/hmi/sdl_activate_app_request.h"
-#include "application_manager/commands/hmi/sdl_activate_app_response.h"
-#include "application_manager/commands/hmi/on_app_permission_changed_notification.h"
-#include "application_manager/commands/hmi/on_event_changed_notification.h"
-
-#ifdef EXTERNAL_PROPRIETARY_MODE
-#include "application_manager/commands/hmi/decrypt_certificate_request.h"
-#include "application_manager/commands/hmi/decrypt_certificate_response.h"
-#endif // EXTERNAL_PROPRIETARY_MODE
-
-#ifdef HMI_DBUS_API
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request_template.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_response_template.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h"
-#include "application_manager/commands/hmi/on_vi_gps_data_notification.h"
-#include "application_manager/commands/hmi/on_vi_speed_notification.h"
-#include "application_manager/commands/hmi/on_vi_rpm_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_state_notification.h"
-#include "application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
-#include "application_manager/commands/hmi/on_vi_external_temperature_notification.h"
-#include "application_manager/commands/hmi/on_vi_vin_notification.h"
-#include "application_manager/commands/hmi/on_vi_prndl_notification.h"
-#include "application_manager/commands/hmi/on_vi_tire_pressure_notification.h"
-#include "application_manager/commands/hmi/on_vi_odometer_notification.h"
-#include "application_manager/commands/hmi/on_vi_belt_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_body_information_notification.h"
-#include "application_manager/commands/hmi/on_vi_device_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_driver_braking_notification.h"
-#include "application_manager/commands/hmi/on_vi_wiper_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_head_lamp_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_engine_torque_notification.h"
-#include "application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h"
-#include "application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h"
-#include "application_manager/commands/hmi/on_vi_my_key_notification.h"
-#else
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_response.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-#endif // #ifdef HMI_DBUS_API
-
-#include "application_manager/commands/hmi/vi_get_dtcs_request.h"
-#include "application_manager/commands/hmi/vi_get_dtcs_response.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_request.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_response.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_response.h"
-#include "application_manager/commands/hmi/navi_is_ready_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_response.h"
-#include "application_manager/commands/hmi/navi_is_ready_response.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_request.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_response.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_response.h"
-#include "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_subscribe_way_points_response.h"
-#include "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_unsubscribe_way_points_response.h"
-#include "application_manager/commands/hmi/navi_get_way_points_request.h"
-#include "application_manager/commands/hmi/navi_get_way_points_response.h"
-#include "application_manager/commands/hmi/on_ready_notification.h"
-#include "application_manager/commands/hmi/on_device_chosen_notification.h"
-#include "application_manager/commands/hmi/on_file_removed_notification.h"
-#include "application_manager/commands/hmi/on_system_context_notification.h"
-#include "application_manager/commands/hmi/on_app_registered_notification.h"
-#include "application_manager/commands/hmi/on_app_unregistered_notification.h"
-#include "application_manager/commands/hmi/on_driver_distraction_notification.h"
-#include "application_manager/commands/hmi/on_tts_started_notification.h"
-#include "application_manager/commands/hmi/on_tts_stopped_notification.h"
-#include "application_manager/commands/hmi/on_vr_started_notification.h"
-#include "application_manager/commands/hmi/on_vr_stopped_notification.h"
-#include "application_manager/commands/hmi/on_vr_command_notification.h"
-#include "application_manager/commands/hmi/on_ui_command_notification.h"
-#include "application_manager/commands/hmi/on_app_deactivated_notification.h"
-#include "application_manager/commands/hmi/on_ui_language_change_notification.h"
-#include "application_manager/commands/hmi/on_vr_language_change_notification.h"
-#include "application_manager/commands/hmi/on_tts_language_change_notification.h"
-#include "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
-#include "application_manager/commands/hmi/on_navi_way_point_change_notification.h"
-#include "application_manager/commands/hmi/on_button_event_notification.h"
-#include "application_manager/commands/hmi/on_button_press_notification.h"
-#include "application_manager/commands/hmi/on_button_subscription_notification.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/on_ui_keyboard_input_notification.h"
-#include "application_manager/commands/hmi/on_ui_touch_event_notification.h"
-#include "application_manager/commands/hmi/on_ui_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/navi_set_video_config_request.h"
-#include "application_manager/commands/hmi/navi_set_video_config_response.h"
-#include "application_manager/commands/hmi/navi_start_stream_request.h"
-#include "application_manager/commands/hmi/navi_start_stream_response.h"
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_stop_stream_response.h"
-#include "application_manager/commands/hmi/navi_audio_start_stream_request.h"
-#include "application_manager/commands/hmi/navi_audio_start_stream_response.h"
-#include "application_manager/commands/hmi/navi_audio_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_audio_stop_stream_response.h"
-#include "application_manager/commands/hmi/on_system_request_notification.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_request.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_response.h"
-#include "application_manager/commands/hmi/on_sdl_close_notification.h"
-#include "application_manager/commands/hmi/on_sdl_persistence_complete_notification.h"
-#include "application_manager/commands/hmi/on_record_start_notification.h"
-#include "application_manager/commands/hmi/add_statistics_info_notification.h"
-#include "application_manager/commands/hmi/on_system_error_notification.h"
-#include "application_manager/commands/hmi/basic_communication_system_request.h"
-#include "application_manager/commands/hmi/basic_communication_system_response.h"
-#include "application_manager/commands/hmi/basic_communication_on_awake_sdl.h"
-#include "application_manager/commands/hmi/sdl_policy_update.h"
-#include "application_manager/commands/hmi/sdl_policy_update_response.h"
-#include "application_manager/commands/hmi/on_received_policy_update.h"
-#include "application_manager/commands/hmi/on_policy_update.h"
-#include "application_manager/commands/hmi/get_urls.h"
-#include "application_manager/commands/hmi/get_urls_response.h"
-#include "application_manager/commands/hmi/on_device_state_changed_notification.h"
-#include "application_manager/commands/hmi/navi_send_location_request.h"
-#include "application_manager/commands/hmi/navi_send_location_response.h"
-#include "application_manager/commands/hmi/on_tts_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/dial_number_request.h"
-#include "application_manager/commands/hmi/dial_number_response.h"
-#include "application_manager/commands/hmi/ui_send_haptic_data_request.h"
-#include "application_manager/commands/hmi/ui_send_haptic_data_response.h"
-
-#include "application_manager/commands/hmi/rc_is_ready_request.h"
-#include "application_manager/commands/hmi/rc_is_ready_response.h"
-#include "application_manager/commands/hmi/rc_get_capabilities_request.h"
-#include "application_manager/commands/hmi/rc_get_capabilities_response.h"
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
-namespace application_manager {
-
-CommandSharedPtr HMICommandFactory::CreateCommand(
- const commands::MessageSharedPtr& message,
- ApplicationManager& application_manager) {
- const int function_id =
- (*message)[strings::params][strings::function_id].asInt();
- LOG4CXX_DEBUG(
- logger_, "HMICommandFactory::CreateCommand function_id: " << function_id);
-
- CommandSharedPtr command(new application_manager::commands::CommandImpl(
- message, application_manager));
-
- bool is_response = false;
- const int msg_type =
- (*message)[strings::params][strings::message_type].asInt();
- if (msg_type ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- is_response = true;
- LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand response");
- } else if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(
- application_manager::MessageType::kErrorResponse)) {
- is_response = true;
- LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand error response");
- } else {
- LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand request");
- }
-
- switch (function_id) {
- case hmi_apis::FunctionID::BasicCommunication_OnStartDeviceDiscovery: {
- command.reset(
- new commands::OnStartDeviceDiscovery(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_UpdateDeviceList: {
- if (is_response) {
- command.reset(new commands::UpdateDeviceListResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UpdateDeviceListRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_ActivateApp: {
- if (is_response) {
- command.reset(
- new commands::ActivateAppResponse(message, application_manager));
- } else {
- command.reset(
- new commands::ActivateAppRequest(message, application_manager));
- }
- break;
- }
-#ifdef EXTERNAL_PROPRIETARY_MODE
- case hmi_apis::FunctionID::BasicCommunication_DecryptCertificate: {
- if (is_response) {
- command.reset(new commands::DecryptCertificateResponse(
- message, application_manager));
- } else {
- command.reset(new commands::DecryptCertificateRequest(
- message, application_manager));
- }
- break;
- }
-#endif // EXTERNAL_PROPRIETARY_MODE
- case hmi_apis::FunctionID::BasicCommunication_GetSystemInfo: {
- if (is_response) {
- command.reset(
- new commands::GetSystemInfoResponse(message, application_manager));
- } else {
- command.reset(
- new commands::GetSystemInfoRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_ActivateApp: {
- if (is_response) {
- command.reset(
- new commands::SDLActivateAppResponse(message, application_manager));
- } else {
- command.reset(
- new commands::SDLActivateAppRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_PolicyUpdate: {
- if (is_response) {
- command.reset(new commands::SDLPolicyUpdateResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::SDLPolicyUpdate(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_GetURLS: {
- if (is_response) {
- command.reset(
- new commands::GetUrlsResponse(message, application_manager));
- } else {
- command.reset(new commands::GetUrls(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_OnAppPermissionChanged: {
- command.reset(new commands::OnAppPermissionChangedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_GetListOfPermissions: {
- if (is_response) {
- command.reset(new commands::SDLGetListOfPermissionsResponse(
- message, application_manager));
- } else {
- command.reset(new commands::SDLGetListOfPermissionsRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_GetUserFriendlyMessage: {
- if (is_response) {
- command.reset(new commands::SDLGetUserFriendlyMessageResponse(
- message, application_manager));
- } else {
- command.reset(new commands::SDLGetUserFriendlyMessageRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_GetStatusUpdate: {
- if (is_response) {
- command.reset(new commands::SDLGetStatusUpdateResponse(
- message, application_manager));
- } else {
- command.reset(new commands::SDLGetStatusUpdateRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_OnStatusUpdate: {
- command.reset(new commands::OnStatusUpdateNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_OnAppPermissionConsent: {
- command.reset(new commands::OnAppPermissionConsentNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported: {
- if (is_response) {
- command.reset(new commands::MixingAudioSupportedResponse(
- message, application_manager));
- } else {
- command.reset(new commands::MixingAudioSupportedRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnExitAllApplications: {
- command.reset(new commands::OnExitAllApplicationsNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_AddCommand: {
- if (is_response) {
- command.reset(
- new commands::UIAddCommandResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UIAddCommandRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_DeleteCommand: {
- if (is_response) {
- command.reset(new commands::UIDeleteCommandResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::UIDeleteCommandRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_AddSubMenu: {
- if (is_response) {
- command.reset(
- new commands::UIAddSubmenuResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UIAddSubmenuRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_DeleteSubMenu: {
- if (is_response) {
- command.reset(new commands::UIDeleteSubmenuResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::UIDeleteSubmenuRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
- if (is_response) {
- command.reset(new commands::UISetMediaClockTimerResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UISetMediaClockTimerRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_PerformInteraction: {
- if (is_response) {
- command.reset(new commands::UIPerformInteractionResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIPerformInteractionRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- if (is_response) {
- command.reset(new commands::UISetGlobalPropertiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UISetGlobalPropertiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_ScrollableMessage: {
- if (is_response) {
- command.reset(new commands::UIScrollableMessageResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIScrollableMessageRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SetAppIcon: {
- if (is_response) {
- command.reset(
- new commands::UISetAppIconResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UISetAppIconRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_GetSupportedLanguages: {
- if (is_response) {
- command.reset(new commands::UIGetSupportedLanguagesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIGetSupportedLanguagesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_GetLanguage: {
- if (is_response) {
- command.reset(
- new commands::UIGetLanguageResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UIGetLanguageRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::UIGetCapabilitiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIGetCapabilitiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_ChangeRegistration: {
- if (is_response) {
- command.reset(new commands::UIChangeRegistratioResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIChangeRegistrationRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_PerformAudioPassThru: {
- if (is_response) {
- command.reset(new commands::UIPerformAudioPassThruResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIPerformAudioPassThruRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_EndAudioPassThru: {
- if (is_response) {
- command.reset(new commands::UIEndAudioPassThruResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UIEndAudioPassThruRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_Alert: {
- if (is_response) {
- command.reset(
- new commands::UIAlertResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UIAlertRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_IsReady: {
- if (is_response) {
- command.reset(
- new commands::VRIsReadyResponse(message, application_manager));
- } else {
- command.reset(
- new commands::VRIsReadyRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_AddCommand: {
- if (is_response) {
- command.reset(
- new commands::VRAddCommandResponse(message, application_manager));
- } else {
- command.reset(
- new commands::VRAddCommandRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_DeleteCommand: {
- if (is_response) {
- command.reset(new commands::VRDeleteCommandResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::VRDeleteCommandRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_ChangeRegistration: {
- if (is_response) {
- command.reset(new commands::VRChangeRegistrationResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VRChangeRegistrationRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_GetSupportedLanguages: {
- if (is_response) {
- command.reset(new commands::VRGetSupportedLanguagesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VRGetSupportedLanguagesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_GetLanguage: {
- if (is_response) {
- command.reset(
- new commands::VRGetLanguageResponse(message, application_manager));
- } else {
- command.reset(
- new commands::VRGetLanguageRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::VRGetCapabilitiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VRGetCapabilitiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_IsReady: {
- if (is_response) {
- command.reset(
- new commands::TTSIsReadyResponse(message, application_manager));
- } else {
- command.reset(
- new commands::TTSIsReadyRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_ChangeRegistration: {
- if (is_response) {
- command.reset(new commands::TTSChangeRegistratioResponse(
- message, application_manager));
- } else {
- command.reset(new commands::TTSChangeRegistrationRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_GetSupportedLanguages: {
- if (is_response) {
- command.reset(new commands::TTSGetSupportedLanguagesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::TTSGetSupportedLanguagesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_StopSpeaking: {
- if (is_response) {
- command.reset(new commands::TTSStopSpeakingResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::TTSStopSpeakingRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_GetLanguage: {
- if (is_response) {
- command.reset(
- new commands::TTSGetLanguageResponse(message, application_manager));
- } else {
- command.reset(
- new commands::TTSGetLanguageRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- if (is_response) {
- command.reset(
- new commands::TTSSpeakResponse(message, application_manager));
- } else {
- command.reset(
- new commands::TTSSpeakRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- if (is_response) {
- command.reset(new commands::TTSSetGlobalPropertiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::TTSSetGlobalPropertiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::TTSGetCapabilitiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::TTSGetCapabilitiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_Started: {
- command.reset(
- new commands::OnTTSStartedNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::TTS_Stopped: {
- command.reset(
- new commands::OnTTSStoppedNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppActivated: {
- command.reset(new commands::OnAppActivatedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAwakeSDL: {
- command.reset(
- new commands::OnAwakeSDLNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnExitApplication: {
- command.reset(new commands::OnExitApplicationNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_Show: {
- if (is_response) {
- command.reset(
- new commands::UIShowResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UIShowRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_Slider: {
- if (is_response) {
- command.reset(
- new commands::UISliderResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UISliderRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_ClosePopUp: {
- if (is_response) {
- command.reset(
- new commands::ClosePopupResponse(message, application_manager));
- } else {
- command.reset(
- new commands::ClosePopupRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_IsReady: {
- if (is_response) {
- command.reset(
- new commands::UIIsReadyResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UIIsReadyRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_IsReady: {
- if (is_response) {
- command.reset(
- new commands::VIIsReadyResponse(message, application_manager));
- } else {
- command.reset(
- new commands::VIIsReadyRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_ReadDID: {
- if (is_response) {
- command.reset(
- new commands::VIReadDIDResponse(message, application_manager));
- } else {
- command.reset(
- new commands::VIReadDIDRequest(message, application_manager));
- }
- break;
- }
-#ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::VehicleInfo_GetGpsData: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetGpsData>(message,
- application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetGpsData>(message,
- application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetSpeed: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSpeed>(message,
- application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSpeed>(message,
- application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetRpm: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetRpm>(message,
- application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetRpm>(message,
- application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetFuelLevel: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetPrndl: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetPrndl>(message,
- application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetPrndl>(message,
- application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetVin: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetVin>(message,
- application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetVin>(message,
- application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetTirePressure: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetOdometer: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetOdometer>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetOdometer>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetBeltStatus: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetBodyInformation: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetDriverBraking: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetWiperStatus: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetEngineTorque: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetECallInfo: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetMyKey: {
- if (is_response)
- command.reset(new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetMyKey>(message,
- application_manager));
- else
- command.reset(new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetMyKey>(message,
- application_manager));
- break;
- }
-#else
- case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
- if (is_response) {
- command.reset(new commands::VIGetVehicleDataResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VIGetVehicleDataRequest(
- message, application_manager));
- }
- break;
- }
-#endif // #ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::VehicleInfo_GetDTCs: {
- if (is_response) {
- command.reset(
- new commands::VIGetDTCsResponse(message, application_manager));
- } else {
- command.reset(
- new commands::VIGetDTCsRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage: {
- if (is_response) {
- command.reset(new commands::VIDiagnosticMessageResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VIDiagnosticMessageRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetVehicleType: {
- if (is_response) {
- command.reset(new commands::VIGetVehicleTypeResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VIGetVehicleTypeRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_IsReady: {
- if (is_response) {
- command.reset(
- new commands::NaviIsReadyResponse(message, application_manager));
- } else {
- command.reset(
- new commands::NaviIsReadyRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_AlertManeuver: {
- if (is_response) {
- command.reset(new commands::NaviAlertManeuverResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviAlertManeuverRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_GetWayPoints: {
- if (is_response) {
- command.reset(new commands::NaviGetWayPointsResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviGetWayPointsRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
- if (is_response) {
- command.reset(new commands::NaviUpdateTurnListResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviUpdateTurnListRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_ShowConstantTBT: {
- if (is_response) {
- command.reset(new commands::NaviShowConstantTBTResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviShowConstantTBTRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_SubscribeWayPoints: {
- if (is_response) {
- command.reset(new commands::NaviSubscribeWayPointsResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviSubscribeWayPointsRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: {
- if (is_response) {
- command.reset(new commands::NaviUnsubscribeWayPointsResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviUnSubscribeWayPointsRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Buttons_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::ButtonGetCapabilitiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::ButtonGetCapabilitiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_OnAllowSDLFunctionality: {
- command.reset(new commands::OnAllowSDLFunctionalityNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_OnSDLConsentNeeded: {
- command.reset(new commands::OnSDLConsentNeededNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_UpdateSDL: {
- if (is_response) {
- command.reset(
- new commands::UpdateSDLResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UpdateSDLRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnIgnitionCycleOver: {
- command.reset(new commands::OnIgnitionCycleOverNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnSystemInfoChanged: {
- command.reset(new commands::OnSystemInfoChangedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnReady: {
- command.reset(
- new commands::OnReadyNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnDeviceChosen: {
- command.reset(new commands::OnDeviceChosenNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnSystemContext: {
- command.reset(new commands::OnSystemContextNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnDriverDistraction: {
- command.reset(new commands::hmi::OnDriverDistractionNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnUpdateDeviceList: {
- command.reset(
- new commands::OnUpdateDeviceList(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppRegistered: {
- command.reset(new commands::OnAppRegisteredNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered: {
- command.reset(new commands::OnAppUnregisteredNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnFindApplications: {
- command.reset(
- new commands::OnFindApplications(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_UpdateAppList: {
- if (is_response) {
- command.reset(
- new commands::UpdateAppListResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UpdateAppListRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_Started: {
- command.reset(
- new commands::OnVRStartedNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VR_Stopped: {
- command.reset(
- new commands::OnVRStoppedNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VR_OnCommand: {
- command.reset(
- new commands::OnVRCommandNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnCommand: {
- command.reset(
- new commands::OnUICommandNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated: {
- command.reset(new commands::OnAppDeactivatedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnLanguageChange: {
- command.reset(new commands::OnUILanguageChangeNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VR_OnLanguageChange: {
- command.reset(new commands::OnVRLanguageChangeNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::TTS_OnLanguageChange: {
- command.reset(new commands::OnTTSLanguageChangeNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::Buttons_OnButtonEvent: {
- command.reset(new commands::hmi::OnButtonEventNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::Buttons_OnButtonPress: {
- command.reset(new commands::hmi::OnButtonPressNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::Buttons_OnButtonSubscription: {
- command.reset(new commands::hmi::OnButtonSubscriptionNotification(
- message, application_manager));
- break;
- }
-#ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::VehicleInfo_SubscribeGps: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeGps>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeGps>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeRpm: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeRpm>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeRpm>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribePrndl: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribePrndl>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribePrndl>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeVin: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeVin>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeVin>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey: {
- if (is_response)
- command.reset(new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey>(
- message, application_manager));
- else
- command.reset(new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey>(
- message, application_manager));
- break;
- }
-#else
- case hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData: {
- if (is_response) {
- command.reset(new commands::VISubscribeVehicleDataResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VISubscribeVehicleDataRequest(
- message, application_manager));
- }
- break;
- }
-#endif // #ifdef HMI_DBUS_API
-#ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::
- VehicleInfo_UnsubscribeInstantFuelConsumption>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::
- VehicleInfo_UnsubscribeInstantFuelConsumption>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus>(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey: {
- if (is_response)
- command.reset(new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey>(
- message, application_manager));
- else
- command.reset(new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey>(
- message, application_manager));
- break;
- }
-#else
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData: {
- if (is_response) {
- command.reset(new commands::VIUnsubscribeVehicleDataResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VIUnsubscribeVehicleDataRequest(
- message, application_manager));
- }
- break;
- }
-#endif // #ifdef HMI_DBUS_API
-#ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::VehicleInfo_OnGpsData: {
- command.reset(
- new commands::OnVIGpsDataNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnSpeed: {
- command.reset(
- new commands::OnVISpeedNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnRpm: {
- command.reset(
- new commands::OnVIRpmNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnFuelLevel: {
- command.reset(new commands::OnVIFuelLevelNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnFuelLevelState: {
- command.reset(new commands::OnVIFuelLevelStateNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnInstantFuelConsumption: {
- command.reset(new commands::OnVIInstantFuelConsumptionNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnExternalTemperature: {
- command.reset(new commands::OnVIExternalTemperatureNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnVin: {
- command.reset(
- new commands::OnVIVinNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnPrndl: {
- command.reset(
- new commands::OnVIPrndlNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnTirePressure: {
- command.reset(new commands::OnVITirePressureNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnOdometer: {
- command.reset(
- new commands::OnVIOdometerNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnBeltStatus: {
- command.reset(new commands::OnVIBeltStatusNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnBodyInformation: {
- command.reset(new commands::OnVIBodyInformationNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnDeviceStatus: {
- command.reset(new commands::OnVIDeviceStatusNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnDriverBraking: {
- command.reset(new commands::OnVIDriverBrakingNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnWiperStatus: {
- command.reset(new commands::OnVIWiperStatusNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnHeadLampStatus: {
- command.reset(new commands::OnVIHeadLampStatusNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnEngineTorque: {
- command.reset(new commands::OnVIEngineTorqueNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnAccPedalPosition: {
- command.reset(new commands::OnVIAccPedalPositionNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnSteeringWheelAngle: {
- command.reset(new commands::OnVISteeringWheelAngleNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnMyKey: {
- command.reset(
- new commands::OnVIMyKeyNotification(message, application_manager));
- break;
- }
-#else
- case hmi_apis::FunctionID::VehicleInfo_OnVehicleData: {
- command.reset(new commands::OnVIVehicleDataNotification(
- message, application_manager));
- break;
- }
-#endif // #ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::Navigation_OnTBTClientState: {
- command.reset(new commands::OnNaviTBTClientStateNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnKeyboardInput: {
- command.reset(new commands::hmi::OnUIKeyBoardInputNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnTouchEvent: {
- command.reset(new commands::hmi::OnUITouchEventNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- command.reset(new commands::hmi::OnUIResetTimeoutNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::Navigation_SetVideoConfig: {
- if (is_response) {
- command.reset(new commands::NaviSetVideoConfigResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviSetVideoConfigRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StartStream: {
- if (is_response) {
- command.reset(new commands::NaviStartStreamResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::NaviStartStreamRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StopStream: {
- if (is_response) {
- command.reset(
- new commands::NaviStopStreamResponse(message, application_manager));
- } else {
- command.reset(
- new commands::NaviStopStreamRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StartAudioStream: {
- if (is_response) {
- command.reset(new commands::AudioStartStreamResponse(
- message, application_manager));
- } else {
- command.reset(new commands::AudioStartStreamRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StopAudioStream: {
- if (is_response) {
- command.reset(new commands::AudioStopStreamResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::AudioStopStreamRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_OnAudioDataStreaming: {
- command.reset(new commands::OnAudioDataStreamingNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::Navigation_OnVideoDataStreaming: {
- command.reset(new commands::OnVideoDataStreamingNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::VR_PerformInteraction: {
- if (is_response) {
- command.reset(new commands::VRPerformInteractionResponse(
- message, application_manager));
- } else {
- command.reset(new commands::VRPerformInteractionRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnSystemRequest: {
- command.reset(new commands::OnSystemRequestNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnPutFile: {
- command.reset(
- new commands::OnPutFileNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnResumeAudioSource: {
- command.reset(new commands::OnResumeAudioSourceNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_SetDisplayLayout: {
- if (is_response) {
- command.reset(new commands::UiSetDisplayLayoutResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UiSetDisplayLayoutRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnSDLClose: {
- command.reset(
- new commands::OnSDLCloseNotification(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete: {
- command.reset(new commands::OnSDLPersistenceCompleteNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnFileRemoved: {
- command.reset(new commands::OnFileRemovedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::UI_OnRecordStart: {
- command.reset(new commands::OnRecordStartdNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_SystemRequest: {
- if (is_response) {
- command.reset(new commands::BasicCommunicationSystemResponse(
- message, application_manager));
- } else {
- command.reset(new commands::BasicCommunicationSystemRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_SendLocation: {
- if (is_response) {
- command.reset(new commands::NaviSendLocationResponse(
- message, application_manager));
- } else {
- command.reset(new commands::NaviSendLocationRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::SDL_AddStatisticsInfo: {
- command.reset(new commands::AddStatisticsInfoNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_OnSystemError: {
- command.reset(new commands::OnSystemErrorNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_OnReceivedPolicyUpdate: {
- command.reset(
- new commands::OnReceivedPolicyUpdate(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_OnPolicyUpdate: {
- command.reset(new commands::OnPolicyUpdate(message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::SDL_OnDeviceStateChanged: {
- command.reset(new commands::OnDeviceStateChangedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- command.reset(new commands::hmi::OnTTSResetTimeoutNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnEventChanged: {
- command.reset(new commands::OnEventChangedNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_DialNumber: {
- if (is_response) {
- command.reset(new commands::hmi::DialNumberResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::hmi::DialNumberRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_OnWayPointChange: {
- command.reset(new commands::OnNaviWayPointChangeNotification(
- message, application_manager));
- break;
- }
- case hmi_apis::FunctionID::RC_IsReady: {
- if (is_response) {
- command.reset(
- new commands::RCIsReadyResponse(message, application_manager));
- } else {
- command.reset(
- new commands::RCIsReadyRequest(message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::RC_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::RCGetCapabilitiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::RCGetCapabilitiesRequest(
- message, application_manager));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SendHapticData: {
- if (is_response) {
- command.reset(new commands::UISendHapticDataResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UISendHapticDataRequest(
- message, application_manager));
- }
- break;
- }
- }
- return command;
-}
-
-} // namespace application_manager
diff --git a/src/components/application_manager/src/hmi_interfaces_impl.cc b/src/components/application_manager/src/hmi_interfaces_impl.cc
index 4479665f64..e6636ed38f 100644
--- a/src/components/application_manager/src/hmi_interfaces_impl.cc
+++ b/src/components/application_manager/src/hmi_interfaces_impl.cc
@@ -222,6 +222,13 @@ generate_function_to_interface_convert_map() {
convert_map[SDL_GetURLS] = HmiInterfaces::HMI_INTERFACE_SDL;
convert_map[RC_IsReady] = HmiInterfaces::HMI_INTERFACE_RC;
convert_map[RC_GetCapabilities] = HmiInterfaces::HMI_INTERFACE_RC;
+ convert_map[Buttons_ButtonPress] = HmiInterfaces::HMI_INTERFACE_RC;
+ convert_map[RC_SetInteriorVehicleData] = HmiInterfaces::HMI_INTERFACE_RC;
+ convert_map[RC_GetInteriorVehicleData] = HmiInterfaces::HMI_INTERFACE_RC;
+ convert_map[RC_GetInteriorVehicleDataConsent] =
+ HmiInterfaces::HMI_INTERFACE_RC;
+ convert_map[RC_OnInteriorVehicleData] = HmiInterfaces::HMI_INTERFACE_RC;
+ convert_map[RC_OnRemoteControlSettings] = HmiInterfaces::HMI_INTERFACE_RC;
return convert_map;
}
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index 4e5390a1b4..ce8514010f 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -33,6 +33,7 @@
#include "application_manager/hmi_language_handler.h"
#include "application_manager/application_manager.h"
#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
#include "application_manager/hmi_capabilities.h"
#include "utils/helpers.h"
#include "resumption/last_state.h"
@@ -236,8 +237,8 @@ void HMILanguageHandler::SendOnLanguageChangeToMobile(
hmi_capabilities.active_ui_language();
message[strings::msg_params][strings::language] =
hmi_capabilities.active_vr_language();
- if (application_manager_.ManageMobileCommand(notification,
- commands::Command::ORIGIN_SDL)) {
+ if (application_manager_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL)) {
LOG4CXX_INFO(logger_, "Mobile command sent");
} else {
LOG4CXX_WARN(logger_, "Cannot send mobile command");
@@ -306,11 +307,11 @@ void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
}
}
SendOnLanguageChangeToMobile(app.first);
- application_manager_.ManageMobileCommand(
+ application_manager_.GetRPCService().ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app.first,
mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
application_manager_.UnregisterApplication(
app.first, mobile_apis::Result::SUCCESS, false);
LOG4CXX_INFO(logger_,
diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc
index bc1ccd8f42..e1bc2b5125 100644
--- a/src/components/application_manager/src/hmi_state.cc
+++ b/src/components/application_manager/src/hmi_state.cc
@@ -32,11 +32,16 @@
*/
#include "application_manager/hmi_state.h"
+#include <ostream>
+#include <boost/assign.hpp>
+#include <boost/bimap.hpp>
#include "application_manager/application_manager.h"
#include "utils/helpers.h"
namespace application_manager {
+CREATE_LOGGERPTR_GLOBAL(logger_, "HmiState")
+
HmiState::HmiState(utils::SharedPtr<Application> app,
const ApplicationManager& app_mngr,
StateID state_id)
@@ -45,7 +50,10 @@ HmiState::HmiState(utils::SharedPtr<Application> app,
, app_mngr_(app_mngr)
, hmi_level_(mobile_apis::HMILevel::INVALID_ENUM)
, audio_streaming_state_(mobile_apis::AudioStreamingState::INVALID_ENUM)
- , system_context_(mobile_apis::SystemContext::INVALID_ENUM) {}
+ , video_streaming_state_(mobile_apis::VideoStreamingState::INVALID_ENUM)
+ , system_context_(mobile_apis::SystemContext::INVALID_ENUM) {
+ LOG4CXX_DEBUG(logger_, *this);
+}
HmiState::HmiState(utils::SharedPtr<Application> app,
const ApplicationManager& app_mngr)
@@ -54,7 +62,10 @@ HmiState::HmiState(utils::SharedPtr<Application> app,
, app_mngr_(app_mngr)
, hmi_level_(mobile_apis::HMILevel::INVALID_ENUM)
, audio_streaming_state_(mobile_apis::AudioStreamingState::INVALID_ENUM)
- , system_context_(mobile_apis::SystemContext::INVALID_ENUM) {}
+ , video_streaming_state_(mobile_apis::VideoStreamingState::INVALID_ENUM)
+ , system_context_(mobile_apis::SystemContext::INVALID_ENUM) {
+ LOG4CXX_DEBUG(logger_, *this);
+}
DEPRECATED HmiState::HmiState(uint32_t app_id,
const ApplicationManager& app_mngr,
@@ -135,13 +146,24 @@ mobile_apis::AudioStreamingState::eType TTSHmiState::audio_streaming_state()
return expected_state;
}
+VideoStreamingHmiState::VideoStreamingHmiState(
+ utils::SharedPtr<Application> app, const ApplicationManager& app_mngr)
+ : HmiState(app, app_mngr, STATE_ID_VIDEO_STREAMING) {}
+
+mobile_apis::VideoStreamingState::eType
+VideoStreamingHmiState::video_streaming_state() const {
+ if (app_->IsVideoApplication()) {
+ return parent()->video_streaming_state();
+ }
+
+ return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+}
+
NaviStreamingHmiState::NaviStreamingHmiState(utils::SharedPtr<Application> app,
const ApplicationManager& app_mngr)
- : HmiState(app, app_mngr, STATE_ID_NAVI_STREAMING) {}
-
-DEPRECATED NaviStreamingHmiState::NaviStreamingHmiState(
- uint32_t app_id, const ApplicationManager& app_mngr)
- : HmiState(app_id, app_mngr, STATE_ID_NAVI_STREAMING) {}
+ : VideoStreamingHmiState(app, app_mngr) {
+ set_state_id(STATE_ID_NAVI_STREAMING);
+}
mobile_apis::AudioStreamingState::eType
NaviStreamingHmiState::audio_streaming_state() const {
@@ -149,13 +171,17 @@ NaviStreamingHmiState::audio_streaming_state() const {
using namespace mobile_apis;
AudioStreamingState::eType expected_state = parent()->audio_streaming_state();
- if (!is_navi_app() && AudioStreamingState::AUDIBLE == expected_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;
}
}
+
return expected_state;
}
@@ -208,6 +234,7 @@ mobile_apis::HMILevel::eType DeactivateHMI::hmi_level() const {
HMILevel::HMI_NONE)) {
return parent()->hmi_level();
}
+
return HMILevel::HMI_BACKGROUND;
}
@@ -220,20 +247,13 @@ DEPRECATED AudioSource::AudioSource(uint32_t app_id,
: HmiState(app_id, app_mngr, STATE_ID_AUDIO_SOURCE) {}
mobile_apis::HMILevel::eType AudioSource::hmi_level() const {
- using namespace mobile_apis;
- using namespace helpers;
- // TODO(AOleynik): That NONE check is necessary to avoid issue during
+ // Checking for NONE is necessary to avoid issue during
// calculation of HMI level during setting default HMI level
- // Should be investigated (used in multiple places here), since looks weird
- if (Compare<HMILevel::eType, EQ, ONE>(parent()->hmi_level(),
- HMILevel::HMI_BACKGROUND,
- HMILevel::HMI_NONE)) {
- return parent()->hmi_level();
+ if (mobile_apis::HMILevel::HMI_NONE == parent()->hmi_level()) {
+ return mobile_apis::HMILevel::HMI_NONE;
}
- if (is_navi_app() || is_voice_communication_app()) {
- return HMILevel::HMI_LIMITED;
- }
- return HMILevel::HMI_BACKGROUND;
+
+ return mobile_apis::HMILevel::HMI_BACKGROUND;
}
EmbeddedNavi::EmbeddedNavi(utils::SharedPtr<Application> app,
@@ -252,9 +272,46 @@ mobile_apis::HMILevel::eType EmbeddedNavi::hmi_level() const {
HMILevel::HMI_NONE)) {
return parent()->hmi_level();
}
- if (is_media_app()) {
- return HMILevel::HMI_LIMITED;
- }
return HMILevel::HMI_BACKGROUND;
}
+
+namespace {
+typedef boost::bimap<HmiState::StateID, std::string> StateID2StrMap;
+const StateID2StrMap kStateID2StrMap =
+ boost::assign::list_of<StateID2StrMap::relation>(
+ HmiState::StateID::STATE_ID_CURRENT, "CURRENT")(
+ HmiState::StateID::STATE_ID_REGULAR, "REGULAR")(
+ HmiState::StateID::STATE_ID_POSTPONED, "POSTPONED")(
+ HmiState::StateID::STATE_ID_PHONE_CALL, "PHONE_CALL")(
+ HmiState::StateID::STATE_ID_SAFETY_MODE, "SAFETY_MODE")(
+ HmiState::StateID::STATE_ID_VR_SESSION, "VR_SESSION")(
+ HmiState::StateID::STATE_ID_TTS_SESSION, "TTS_SESSION")(
+ HmiState::StateID::STATE_ID_VIDEO_STREAMING, "VIDEO_STREAMING")(
+ HmiState::StateID::STATE_ID_NAVI_STREAMING, "NAVI_STREAMING")(
+ HmiState::StateID::STATE_ID_DEACTIVATE_HMI, "DEACTIVATE_HMI")(
+ HmiState::StateID::STATE_ID_AUDIO_SOURCE, "AUDIO_SOURCE")(
+ HmiState::StateID::STATE_ID_EMBEDDED_NAVI, "EMBEDDED_NAVI");
+} // anonymous namespace
+
+std::ostream& operator<<(std::ostream& os, const HmiState::StateID src) {
+ try {
+ os << kStateID2StrMap.left.at(src);
+ } catch (const std::exception&) {
+ // specified element have NOT been found
+ os << "UNRECOGNIZED(" << static_cast<int>(src) << ")";
+ }
+
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const HmiState& src) {
+ os << "HMIState(app id:" << src.app_->app_id() << ", state:" << src.state_id()
+ << ", hmi_level:" << src.hmi_level()
+ << ", audio:" << src.audio_streaming_state()
+ << ", video:" << src.video_streaming_state()
+ << ", context:" << src.system_context() << ')';
+
+ return os;
}
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/message.cc b/src/components/application_manager/src/message.cc
index 7bc686aef1..b005af0fb5 100644
--- a/src/components/application_manager/src/message.cc
+++ b/src/components/application_manager/src/message.cc
@@ -130,11 +130,9 @@ int32_t Message::function_id() const {
return function_id_;
}
-#ifdef SDL_REMOTE_CONTROL
std::string Message::function_name() const {
return function_name_;
}
-#endif // SDL_REMOTE_CONTROL
int32_t Message::correlation_id() const {
return correlation_id_;
@@ -176,11 +174,9 @@ void Message::set_function_id(int32_t id) {
function_id_ = id;
}
-#ifdef SDL_REMOTE_CONTROL
void Message::set_function_name(const std::string& name) {
function_name_ = name;
}
-#endif // SDL_REMOTE_CONTROL
void Message::set_correlation_id(int32_t id) {
correlation_id_ = id;
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 6a908c4ebc..1f1ff4ddf0 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -53,6 +53,7 @@
#include "application_manager/message_helper.h"
#include "application_manager/policies/policy_handler_interface.h"
#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/rpc_service.h"
#include "connection_handler/connection_handler_impl.h"
#include "transport_manager/common.h"
#include "interfaces/MOBILE_API.h"
@@ -175,8 +176,12 @@ std::pair<std::string,
mobile_apis::VehicleDataType::VEHICLEDATA_FUELLEVEL_STATE),
std::make_pair(strings::instant_fuel_consumption,
mobile_apis::VehicleDataType::VEHICLEDATA_FUELCONSUMPTION),
+ std::make_pair(strings::fuel_range,
+ mobile_apis::VehicleDataType::VEHICLEDATA_FUELRANGE),
std::make_pair(strings::external_temp,
mobile_apis::VehicleDataType::VEHICLEDATA_EXTERNTEMP),
+ std::make_pair(strings::turn_signal,
+ mobile_apis::VehicleDataType::VEHICLEDATA_TURNSIGNAL),
std::make_pair(strings::vin, mobile_apis::VehicleDataType::VEHICLEDATA_VIN),
std::make_pair(strings::prndl,
mobile_apis::VehicleDataType::VEHICLEDATA_PRNDL),
@@ -217,7 +222,8 @@ std::pair<std::string,
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)};
const VehicleData MessageHelper::vehicle_data_(
kVehicleDataInitializer,
@@ -362,7 +368,21 @@ void MessageHelper::SendDecryptCertificateToHMI(const std::string& file_name,
msg_params[hmi_request::file_name] = file_name;
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
+}
+
+void MessageHelper::SendGetSystemTimeRequest(const uint32_t correlation_id,
+ ApplicationManager& app_mngr) {
+ using namespace smart_objects;
+ SmartObjectSPtr message =
+ CreateMessageForHMI(hmi_apis::messageType::request, correlation_id);
+
+ DCHECK(message);
+
+ (*message)[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_GetSystemTime;
+
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendHashUpdateNotification(const uint32_t app_id,
@@ -375,7 +395,8 @@ void MessageHelper::SendHashUpdateNotification(const uint32_t app_id,
}
smart_objects::SmartObjectSPtr so = CreateHashUpdateNotification(app_id);
PrintSmartObject(*so);
- if (!app_mngr.ManageMobileCommand(so, commands::Command::ORIGIN_SDL)) {
+ if (!app_mngr.GetRPCService().ManageMobileCommand(
+ so, commands::Command::SOURCE_SDL)) {
LOG4CXX_ERROR(logger_, "Failed to send HashUpdate notification.");
return;
}
@@ -427,7 +448,7 @@ void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
if ((*cmd).keyExists(strings::vr_commands)) {
@@ -444,7 +465,7 @@ void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
@@ -470,7 +491,7 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
const DataAccessor<CommandsMap> accessor = application->commands_map();
const CommandsMap& commands = accessor.GetData();
@@ -499,7 +520,7 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
}
@@ -532,7 +553,7 @@ void MessageHelper::SendDeleteChoiceSetRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
@@ -569,7 +590,7 @@ void MessageHelper::SendResetPropertiesRequest(ApplicationSharedPtr application,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
{
@@ -589,7 +610,7 @@ void MessageHelper::SendResetPropertiesRequest(ApplicationSharedPtr application,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
@@ -615,41 +636,7 @@ void MessageHelper::SendUnsubscribeButtonNotification(
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
-}
-
-void MessageHelper::SendUnsubscribeIVIRequest(int32_t ivi_id,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr) {
- using namespace smart_objects;
-
- std::string key_name;
- for (auto item : vehicle_data_) {
- if (ivi_id == item.second) {
- key_name = item.first;
- break;
- }
- }
-
- if (key_name.empty()) {
- return;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[key_name] = true;
-
- SmartObjectSPtr message = CreateMessageForHMI(
- hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
- DCHECK(message);
-
- SmartObject& object = *message;
- object[strings::params][strings::function_id] =
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData;
-
- object[strings::msg_params] = msg_params;
-
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
const VehicleData& MessageHelper::vehicle_data() {
@@ -718,7 +705,6 @@ hmi_apis::Common_Result::eType MessageHelper::MobileToHMIResult(
return HMIResultFromString(result);
}
-#ifdef SDL_REMOTE_CONTROL
void MessageHelper::SendHMIStatusNotification(
const Application& application_impl,
ApplicationManager& application_manager) {
@@ -748,8 +734,8 @@ void MessageHelper::SendHMIStatusNotification(
message[strings::msg_params][strings::system_context] =
static_cast<int32_t>(application_impl.system_context());
- application_manager.ManageMobileCommand(notification,
- commands::Command::ORIGIN_SDL);
+ application_manager.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL);
}
void MessageHelper::SendActivateAppToHMI(
@@ -803,9 +789,8 @@ void MessageHelper::SendActivateAppToHMI(
(*message)[strings::msg_params][strings::activate_app_hmi_level] = level;
}
- application_manager.ManageHMICommand(message);
+ application_manager.GetRPCService().ManageHMICommand(message);
}
-#endif // SDL_REMOTE_CONTROL
mobile_apis::HMILevel::eType MessageHelper::StringToHMILevel(
const std::string& hmi_level) {
@@ -936,7 +921,7 @@ void MessageHelper::CreateGetVehicleDataRequest(
commands::CommandImpl::hmi_protocol_type_;
(*request)[strings::params][strings::function_id] =
static_cast<int>(vehicle_data_args[*it]);
- app_mngr.ManageHMICommand(request);
+ app_mngr.GetRPCService().ManageHMICommand(request);
}
#else
@@ -959,7 +944,7 @@ void MessageHelper::CreateGetVehicleDataRequest(
it++) {
(*request)[strings::msg_params][*it] = true;
}
- app_mngr.ManageHMICommand(request);
+ app_mngr.GetRPCService().ManageHMICommand(request);
#endif
}
@@ -1061,84 +1046,6 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateSetAppIcon(
return set_icon;
}
-bool MessageHelper::SendIVISubscribtions(const uint32_t app_id,
- ApplicationManager& app_mngr) {
- return SendIVISubscriptions(app_id, app_mngr);
-}
-
-bool MessageHelper::SendIVISubscriptions(const uint32_t app_id,
- ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- bool result = true;
- ApplicationSharedPtr app = app_mngr.application(app_id);
-
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application " << app_id);
- return result;
- }
-
- smart_objects::SmartObjectList requests =
- GetIVISubscriptionRequests(app, app_mngr);
- for (smart_objects::SmartObjectList::const_iterator it = requests.begin();
- it != requests.end();
- ++it) {
- if (!app_mngr.ManageHMICommand(*it)) {
- result = false;
- }
- }
- return result;
-}
-
-smart_objects::SmartObjectList MessageHelper::GetIVISubscriptionRequests(
- ApplicationSharedPtr app, ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- smart_objects::SmartObjectList hmi_requests;
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer ");
- return hmi_requests;
- }
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- const VehicleData& vehicle_data = MessageHelper::vehicle_data_;
- VehicleData::const_iterator ivi_it = vehicle_data.begin();
- DataAccessor<VehicleInfoSubscriptions> vi_accessor = app->SubscribedIVI();
- const VehicleInfoSubscriptions& subscriptions = vi_accessor.GetData();
-
- for (; vehicle_data.end() != ivi_it; ++ivi_it) {
- mobile_apis::VehicleDataType::eType type_id = ivi_it->second;
- if (subscriptions.end() != subscriptions.find(type_id)) {
- std::string key_name = ivi_it->first;
- msg_params[key_name] = true;
- }
- }
-
-#ifdef HMI_JSON_API
- smart_objects::SmartObjectSPtr request = MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData, app_mngr);
- (*request)[strings::msg_params] = msg_params;
- hmi_requests.push_back(request);
-#endif // #ifdef HMI_JSON_API
-#ifdef HMI_DBUS_API
- // Generate list of ivi_subrequests
- for (size_t i = 0; i < sizeof(ivi_subrequests) / sizeof(ivi_subrequests[0]);
- ++i) {
- const VehicleInfo_Requests& sr = ivi_subrequests[i];
- if (true == msg_params.keyExists(sr.str) &&
- true == msg_params[sr.str].asBool()) {
- smart_objects::SmartObjectSPtr request =
- MessageHelper::CreateModuleInfoSO(sr.func_id, app_mngr);
- (*request)[strings::msg_params] = msg_params;
- hmi_requests.push_back(request);
- }
- }
-#endif // #ifdef HMI_DBUS_API
- return hmi_requests;
-}
-
void MessageHelper::SendOnButtonSubscriptionNotification(
uint32_t app_id,
hmi_apis::Common_ButtonName::eType button,
@@ -1171,7 +1078,7 @@ void MessageHelper::SendOnButtonSubscriptionNotification(
hmi_apis::FunctionID::Buttons_OnButtonSubscription;
notification[strings::msg_params] = msg_params;
- if (!app_mngr.ManageHMICommand(notification_ptr)) {
+ if (!app_mngr.GetRPCService().ManageHMICommand(notification_ptr)) {
LOG4CXX_ERROR(logger_, "Unable to send HMI notification");
}
}
@@ -1223,7 +1130,7 @@ void MessageHelper::SendSetAppIcon(
if (msg_params) {
so_to_send[strings::msg_params] = *msg_params;
}
- application_manager.ManageHMICommand(set_app_icon);
+ application_manager.GetRPCService().ManageHMICommand(set_app_icon);
}
}
@@ -1249,7 +1156,7 @@ void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
for (smart_objects::SmartObjectList::const_iterator it = requests.begin();
it != requests.end();
++it) {
- DCHECK(app_mngr.ManageHMICommand(*it));
+ DCHECK(app_mngr.GetRPCService().ManageHMICommand(*it));
}
}
@@ -1368,7 +1275,7 @@ void MessageHelper::SendTTSGlobalProperties(ApplicationSharedPtr app,
app->set_help_prompt(msg_params[strings::help_prompt]);
msg_params[strings::app_id] = app->app_id();
so_to_send[strings::msg_params] = msg_params;
- app_man.ManageHMICommand(tts_global_properties);
+ app_man.GetRPCService().ManageHMICommand(tts_global_properties);
}
}
@@ -1436,7 +1343,7 @@ void MessageHelper::SendShowRequestToHMI(ApplicationConstSharedPtr app,
for (smart_objects::SmartObjectList::const_iterator it = shows.begin();
it != shows.end();
++it) {
- DCHECK(app_mngr.ManageHMICommand(*it));
+ DCHECK(app_mngr.GetRPCService().ManageHMICommand(*it));
}
}
@@ -1456,7 +1363,7 @@ void MessageHelper::SendShowConstantTBTRequestToHMI(
static_cast<int>(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
(*navi_show_tbt)[strings::msg_params] = (*app->tbt_show_command());
- DCHECK(app_man.ManageHMICommand(navi_show_tbt));
+ DCHECK(app_man.GetRPCService().ManageHMICommand(navi_show_tbt));
}
}
@@ -1470,7 +1377,7 @@ void MessageHelper::SendAddCommandRequestToHMI(ApplicationConstSharedPtr app,
for (smart_objects::SmartObjectList::iterator it = requests.begin();
it != requests.end();
++it) {
- DCHECK(app_man.ManageHMICommand(*it));
+ DCHECK(app_man.GetRPCService().ManageHMICommand(*it));
}
}
@@ -1612,7 +1519,7 @@ void MessageHelper::SendUIChangeRegistrationRequestToHMI(
app_mngr);
if (ui_command) {
- app_mngr.ManageHMICommand(ui_command);
+ app_mngr.GetRPCService().ManageHMICommand(ui_command);
}
}
}
@@ -1624,7 +1531,7 @@ void MessageHelper::SendAddVRCommandToHMI(
ApplicationManager& app_mngr) {
smart_objects::SmartObjectSPtr request =
CreateAddVRCommandToHMI(cmd_id, vr_commands, app_id, app_mngr);
- DCHECK(app_mngr.ManageHMICommand(request));
+ DCHECK(app_mngr.GetRPCService().ManageHMICommand(request));
}
smart_objects::SmartObjectSPtr MessageHelper::CreateAddVRCommandToHMI(
@@ -1677,6 +1584,9 @@ bool MessageHelper::CreateHMIApplicationStruct(
const smart_objects::SmartObject* app_types = app->app_types();
const smart_objects::SmartObject* ngn_media_screen_name =
app->ngn_media_screen_name();
+ const smart_objects::SmartObject* day_color_scheme = app->day_color_scheme();
+ const smart_objects::SmartObject* night_color_scheme =
+ app->night_color_scheme();
std::string device_name;
std::string mac_address;
std::string transport_type;
@@ -1714,6 +1624,14 @@ bool MessageHelper::CreateHMIApplicationStruct(
message[strings::app_type] = *app_types;
}
+ if (day_color_scheme) {
+ message[strings::day_color_scheme] = *day_color_scheme;
+ }
+
+ if (night_color_scheme) {
+ message[strings::night_color_scheme] = *night_color_scheme;
+ }
+
message[strings::device_info] =
smart_objects::SmartObject(smart_objects::SmartType_Map);
message[strings::device_info][strings::name] = device_name;
@@ -1740,7 +1658,7 @@ void MessageHelper::SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app,
for (smart_objects::SmartObjectList::iterator it = requests.begin();
it != requests.end();
++it) {
- DCHECK(app_mngr.ManageHMICommand(*it));
+ DCHECK(app_mngr.GetRPCService().ManageHMICommand(*it));
}
}
@@ -1770,6 +1688,12 @@ smart_objects::SmartObjectList MessageHelper::CreateAddSubMenuRequestToHMI(
(*i->second)[strings::menu_name];
msg_params[strings::app_id] = app->app_id();
(*ui_sub_menu)[strings::msg_params] = msg_params;
+ if (((*i->second).keyExists(strings::menu_icon)) &&
+ (0 < (*i->second)[strings::menu_icon][strings::value].length())) {
+ msg_params[strings::menu_icon] = (*i->second)[strings::menu_icon];
+ msg_params[strings::menu_icon][strings::value] =
+ (*i->second)[strings::menu_icon][strings::value].asString();
+ }
requsets.push_back(ui_sub_menu);
}
return requsets;
@@ -1796,7 +1720,7 @@ void MessageHelper::SendOnAppUnregNotificationToHMI(
message[strings::msg_params][strings::app_id] = app->hmi_app_id();
message[strings::msg_params][strings::unexpected_disconnect] =
is_unexpected_disconnect;
- app_mngr.ManageHMICommand(notification);
+ app_mngr.GetRPCService().ManageHMICommand(notification);
}
smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
@@ -1865,7 +1789,7 @@ void MessageHelper::SendOnResumeAudioSourceToHMI(const uint32_t app_id,
app_mngr.GetNextHMICorrelationID();
(*message)[strings::msg_params][strings::app_id] = app_id;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendSDLActivateAppResponse(
@@ -1916,7 +1840,7 @@ void MessageHelper::SendSDLActivateAppResponse(
hmi_apis::Common_Result::REJECTED;
}
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendOnSDLConsentNeeded(
@@ -1934,7 +1858,7 @@ void MessageHelper::SendOnSDLConsentNeeded(
device_info.device_mac_address;
(*message)[strings::msg_params]["device"]["name"] = device_info.device_name;
- app_man.ManageHMICommand(message);
+ app_man.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendPolicyUpdate(const std::string& file_path,
@@ -1954,7 +1878,7 @@ void MessageHelper::SendPolicyUpdate(const std::string& file_path,
for (size_t i = 0; i < retries.size(); ++i) {
object[strings::msg_params][hmi_request::retry][i] = retries[i];
}
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendGetUserFriendlyMessageResponse(
const std::vector<policy::UserFriendlyMessage>& msg,
@@ -1975,7 +1899,7 @@ void MessageHelper::SendGetUserFriendlyMessageResponse(
// If no any messages found - skip sending of "messages" param
if (msg.empty()) {
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
return;
}
@@ -2020,7 +1944,7 @@ void MessageHelper::SendGetUserFriendlyMessageResponse(
#endif // EXTERNAL_PROPRIETARY_MODE
}
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
#ifdef EXTERNAL_PROPRIETARY_MODE
@@ -2064,7 +1988,7 @@ void MessageHelper::SendGetListOfPermissionsResponse(
external_consent_status.end(),
external_consent_status_appender);
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
#else
void MessageHelper::SendGetListOfPermissionsResponse(
@@ -2093,7 +2017,7 @@ void MessageHelper::SendGetListOfPermissionsResponse(
GroupsAppender groups_appender(allowed_functions_array);
std::for_each(permissions.begin(), permissions.end(), groups_appender);
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
#endif // EXTERNAL_PROPRIETARY_MODE
@@ -2135,7 +2059,7 @@ void MessageHelper::SendNaviSetVideoConfig(
(*request)[strings::msg_params][strings::app_id] = app_id;
(*request)[strings::msg_params][strings::config] = video_params;
- app_mngr.ManageHMICommand(request);
+ app_mngr.GetRPCService().ManageHMICommand(request);
}
void MessageHelper::SendNaviStartStream(const int32_t app_id,
@@ -2174,7 +2098,7 @@ void MessageHelper::SendNaviStartStream(const int32_t app_id,
(*start_stream)[strings::msg_params][strings::app_id] = app_id;
(*start_stream)[strings::msg_params][strings::url] = url;
- app_mngr.ManageHMICommand(start_stream);
+ app_mngr.GetRPCService().ManageHMICommand(start_stream);
}
void MessageHelper::SendNaviStopStream(const int32_t app_id,
@@ -2191,7 +2115,7 @@ void MessageHelper::SendNaviStopStream(const int32_t app_id,
(*stop_stream)[strings::msg_params][strings::app_id] = app_id;
- app_mngr.ManageHMICommand(stop_stream);
+ app_mngr.GetRPCService().ManageHMICommand(stop_stream);
}
void MessageHelper::SendAudioStartStream(const int32_t app_id,
@@ -2231,7 +2155,7 @@ void MessageHelper::SendAudioStartStream(const int32_t app_id,
(*start_stream)[strings::msg_params][strings::app_id] = app_id;
(*start_stream)[strings::msg_params][strings::url] = url;
- DCHECK(app_mngr.ManageHMICommand(start_stream));
+ DCHECK(app_mngr.GetRPCService().ManageHMICommand(start_stream));
}
void MessageHelper::SendAudioStopStream(const int32_t app_id,
@@ -2249,7 +2173,7 @@ void MessageHelper::SendAudioStopStream(const int32_t app_id,
(*stop_stream)[strings::msg_params][strings::app_id] = app_id;
- app_mngr.ManageHMICommand(stop_stream);
+ app_mngr.GetRPCService().ManageHMICommand(stop_stream);
}
void MessageHelper::SendOnDataStreaming(
@@ -2281,7 +2205,7 @@ void MessageHelper::SendOnDataStreaming(
(*notification)[strings::msg_params]["available"] = available;
- app_mngr.ManageHMICommand(notification);
+ app_mngr.GetRPCService().ManageHMICommand(notification);
}
bool MessageHelper::SendStopAudioPathThru(ApplicationManager& app_mngr) {
@@ -2293,7 +2217,7 @@ bool MessageHelper::SendStopAudioPathThru(ApplicationManager& app_mngr) {
(*result)[strings::params][strings::function_id] =
hmi_apis::FunctionID::UI_EndAudioPassThru;
- return app_mngr.ManageHMICommand(result);
+ return app_mngr.GetRPCService().ManageHMICommand(result);
}
bool MessageHelper::SendUnsubscribedWayPoints(ApplicationManager& app_mngr) {
@@ -2305,7 +2229,7 @@ bool MessageHelper::SendUnsubscribedWayPoints(ApplicationManager& app_mngr) {
(*result)[strings::params][strings::function_id] =
hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints;
- return app_mngr.ManageHMICommand(result);
+ return app_mngr.GetRPCService().ManageHMICommand(result);
}
void MessageHelper::SendPolicySnapshotNotification(
@@ -2354,9 +2278,9 @@ void MessageHelper::SendSystemRequestNotification(
PrintSmartObject(content);
#endif
- DCHECK(app_mngr.ManageMobileCommand(
+ DCHECK(app_mngr.GetRPCService().ManageMobileCommand(
utils::MakeShared<smart_objects::SmartObject>(content),
- commands::Command::ORIGIN_SDL));
+ commands::Command::SOURCE_SDL));
}
void MessageHelper::SendLaunchApp(const uint32_t connection_key,
@@ -2522,9 +2446,9 @@ void MessageHelper::SendOnPermissionsChangeNotification(
}
}
- app_mngr.ManageMobileCommand(
+ app_mngr.GetRPCService().ManageMobileCommand(
utils::MakeShared<smart_objects::SmartObject>(content),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
}
void MessageHelper::FillAppRevokedPermissions(
@@ -2589,14 +2513,25 @@ void MessageHelper::SendOnAppPermissionsChangedNotification(
if (permissions.requestTypeChanged) {
smart_objects::SmartObject request_types_array(
smart_objects::SmartType_Array);
- ;
+
for (uint16_t index = 0; index < permissions.requestType.size(); ++index) {
request_types_array[index] = permissions.requestType[index];
}
message[strings::msg_params][strings::request_type] = request_types_array;
}
+ if (permissions.requestSubTypeChanged) {
+ smart_objects::SmartObject request_subtypes_array(
+ smart_objects::SmartType_Array);
+
+ for (uint16_t index = 0; index < permissions.requestSubType.size();
+ ++index) {
+ request_subtypes_array[index] = permissions.requestSubType[index];
+ }
+ message[strings::msg_params][strings::request_subtype] =
+ request_subtypes_array;
+ }
- app_mngr.ManageHMICommand(
+ app_mngr.GetRPCService().ManageHMICommand(
utils::MakeShared<smart_objects::SmartObject>(message));
}
@@ -2618,7 +2553,7 @@ void MessageHelper::SendGetStatusUpdateResponse(const std::string& status,
(*message)[strings::msg_params]["status"] = status;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendUpdateSDLResponse(const std::string& result,
@@ -2637,7 +2572,7 @@ void MessageHelper::SendUpdateSDLResponse(const std::string& result,
(*message)[strings::msg_params]["result"] = result;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendOnStatusUpdate(const std::string& status,
@@ -2656,7 +2591,7 @@ void MessageHelper::SendOnStatusUpdate(const std::string& status,
(*message)[strings::msg_params]["status"] = status;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendGetSystemInfoRequest(ApplicationManager& app_mngr) {
@@ -2669,7 +2604,7 @@ void MessageHelper::SendGetSystemInfoRequest(ApplicationManager& app_mngr) {
(*message)[strings::params][strings::function_id] =
hmi_apis::FunctionID::BasicCommunication_GetSystemInfo;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
@@ -2731,11 +2666,23 @@ mobile_apis::Result::eType MessageHelper::VerifyImageApplyPath(
}
const std::string& file_name = image[strings::value].asString();
+ const std::string& full_file_path = GetAppFilePath(file_name, app, app_mngr);
+
+ image[strings::value] = full_file_path;
+ if (file_system::FileExists(full_file_path)) {
+ return mobile_apis::Result::SUCCESS;
+ }
+ return mobile_apis::Result::INVALID_DATA;
+}
+std::string MessageHelper::GetAppFilePath(std::string file_name,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
std::string str = file_name;
+ // Verify that file name is not only space characters
str.erase(remove(str.begin(), str.end(), ' '), str.end());
if (0 == str.size()) {
- return mobile_apis::Result::INVALID_DATA;
+ return "";
}
std::string full_file_path;
@@ -2761,12 +2708,25 @@ mobile_apis::Result::eType MessageHelper::VerifyImageApplyPath(
full_file_path += file_name;
}
- image[strings::value] = full_file_path;
- if (!file_system::FileExists(full_file_path)) {
- return mobile_apis::Result::INVALID_DATA;
- }
+ return full_file_path;
+}
- return mobile_apis::Result::SUCCESS;
+mobile_apis::Result::eType MessageHelper::VerifyTtsFiles(
+ smart_objects::SmartObject& tts_chunks,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
+ mobile_apis::Result::eType result = mobile_apis::Result::SUCCESS;
+ for (auto& tts_chunk : *(tts_chunks.asArray())) {
+ if (tts_chunk[strings::type] == mobile_apis::SpeechCapabilities::FILE) {
+ const std::string full_file_path =
+ GetAppFilePath(tts_chunk[strings::text].asString(), app, app_mngr);
+ tts_chunk[strings::text] = full_file_path;
+ if (!file_system::FileExists(full_file_path)) {
+ result = mobile_apis::Result::FILE_NOT_FOUND;
+ }
+ }
+ }
+ return result;
}
mobile_apis::Result::eType MessageHelper::VerifyImage(
diff --git a/src/components/application_manager/src/mobile_command_factory.cc b/src/components/application_manager/src/mobile_command_factory.cc
deleted file mode 100644
index f6f9cab7f5..0000000000
--- a/src/components/application_manager/src/mobile_command_factory.cc
+++ /dev/null
@@ -1,731 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Copyright (c) 2017 Xevo Inc.
- 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 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 "application_manager/mobile_command_factory.h"
-#include "application_manager/commands/mobile/add_command_request.h"
-#include "application_manager/commands/mobile/add_command_response.h"
-#include "application_manager/commands/mobile/delete_command_request.h"
-#include "application_manager/commands/mobile/delete_command_response.h"
-#include "application_manager/commands/mobile/add_sub_menu_request.h"
-#include "application_manager/commands/mobile/add_sub_menu_response.h"
-#include "application_manager/commands/mobile/alert_request.h"
-#include "application_manager/commands/mobile/alert_response.h"
-#include "application_manager/commands/mobile/alert_maneuver_request.h"
-#include "application_manager/commands/mobile/alert_maneuver_response.h"
-#include "application_manager/commands/mobile/change_registration_request.h"
-#include "application_manager/commands/mobile/change_registration_response.h"
-#include "application_manager/commands/mobile/create_interaction_choice_set_request.h"
-#include "application_manager/commands/mobile/create_interaction_choice_set_response.h"
-#include "application_manager/commands/mobile/delete_file_request.h"
-#include "application_manager/commands/mobile/delete_file_response.h"
-#include "application_manager/commands/mobile/delete_interaction_choice_set_request.h"
-#include "application_manager/commands/mobile/delete_interaction_choice_set_response.h"
-#include "application_manager/commands/mobile/delete_sub_menu_request.h"
-#include "application_manager/commands/mobile/delete_sub_menu_response.h"
-#include "application_manager/commands/mobile/end_audio_pass_thru_request.h"
-#include "application_manager/commands/mobile/end_audio_pass_thru_response.h"
-#include "application_manager/commands/mobile/generic_response.h"
-#include "application_manager/commands/mobile/get_dtcs_request.h"
-#include "application_manager/commands/mobile/get_dtcs_response.h"
-#include "application_manager/commands/mobile/get_system_capability_request.h"
-#include "application_manager/commands/mobile/get_system_capability_response.h"
-#include "application_manager/commands/mobile/get_vehicle_data_request.h"
-#include "application_manager/commands/mobile/get_vehicle_data_response.h"
-#include "application_manager/commands/mobile/get_way_points_request.h"
-#include "application_manager/commands/mobile/get_way_points_response.h"
-#include "application_manager/commands/mobile/list_files_request.h"
-#include "application_manager/commands/mobile/list_files_response.h"
-#include "application_manager/commands/mobile/on_app_interface_unregistered_notification.h"
-#include "application_manager/commands/mobile/on_audio_pass_thru_notification.h"
-#include "application_manager/commands/mobile/on_button_event_notification.h"
-#include "application_manager/commands/mobile/on_button_press_notification.h"
-#include "application_manager/commands/mobile/on_driver_distraction_notification.h"
-#include "application_manager/commands/mobile/on_hmi_status_notification.h"
-#include "application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h"
-#include "application_manager/commands/mobile/on_language_change_notification.h"
-#include "application_manager/commands/mobile/on_command_notification.h"
-#include "application_manager/commands/mobile/on_permissions_change_notification.h"
-#include "application_manager/commands/mobile/on_tbt_client_state_notification.h"
-#include "application_manager/commands/mobile/on_vehicle_data_notification.h"
-#include "application_manager/commands/mobile/on_hash_change_notification.h"
-#include "application_manager/commands/mobile/on_way_point_change_notification.h"
-#include "application_manager/commands/mobile/perform_audio_pass_thru_request.h"
-#include "application_manager/commands/mobile/perform_audio_pass_thru_response.h"
-#include "application_manager/commands/mobile/perform_interaction_request.h"
-#include "application_manager/commands/mobile/perform_interaction_response.h"
-#include "application_manager/commands/mobile/put_file_request.h"
-#include "application_manager/commands/mobile/put_file_response.h"
-#include "application_manager/commands/mobile/read_did_request.h"
-#include "application_manager/commands/mobile/read_did_response.h"
-#include "application_manager/commands/mobile/register_app_interface_request.h"
-#include "application_manager/commands/mobile/register_app_interface_response.h"
-#include "application_manager/commands/mobile/reset_global_properties_request.h"
-#include "application_manager/commands/mobile/reset_global_properties_response.h"
-#include "application_manager/commands/mobile/scrollable_message_request.h"
-#include "application_manager/commands/mobile/scrollable_message_response.h"
-#include "application_manager/commands/mobile/set_display_layout_request.h"
-#include "application_manager/commands/mobile/set_display_layout_response.h"
-#include "application_manager/commands/mobile/set_global_properties_request.h"
-#include "application_manager/commands/mobile/set_global_properties_response.h"
-#include "application_manager/commands/mobile/set_app_icon_request.h"
-#include "application_manager/commands/mobile/set_app_icon_response.h"
-#include "application_manager/commands/mobile/set_media_clock_timer_request.h"
-#include "application_manager/commands/mobile/set_media_clock_timer_response.h"
-#include "application_manager/commands/mobile/show_constant_tbt_request.h"
-#include "application_manager/commands/mobile/show_constant_tbt_response.h"
-#include "application_manager/commands/mobile/show_request.h"
-#include "application_manager/commands/mobile/show_response.h"
-#include "application_manager/commands/mobile/slider_request.h"
-#include "application_manager/commands/mobile/slider_response.h"
-#include "application_manager/commands/mobile/speak_request.h"
-#include "application_manager/commands/mobile/speak_response.h"
-#include "application_manager/commands/mobile/subscribe_button_request.h"
-#include "application_manager/commands/mobile/subscribe_button_response.h"
-#include "application_manager/commands/mobile/subscribe_vehicle_data_request.h"
-#include "application_manager/commands/mobile/subscribe_vehicle_data_response.h"
-#include "application_manager/commands/mobile/subscribe_way_points_request.h"
-#include "application_manager/commands/mobile/subscribe_way_points_response.h"
-#include "application_manager/commands/mobile/unsubscribe_way_points_request.h"
-#include "application_manager/commands/mobile/unsubscribe_way_points_response.h"
-#include "application_manager/commands/mobile/unregister_app_interface_request.h"
-#include "application_manager/commands/mobile/unregister_app_interface_response.h"
-#include "application_manager/commands/mobile/unsubscribe_button_request.h"
-#include "application_manager/commands/mobile/unsubscribe_button_response.h"
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_response.h"
-#include "application_manager/commands/mobile/update_turn_list_request.h"
-#include "application_manager/commands/mobile/update_turn_list_response.h"
-#include "application_manager/commands/mobile/system_request.h"
-#include "application_manager/commands/mobile/system_response.h"
-#include "application_manager/commands/mobile/on_keyboard_input_notification.h"
-#include "application_manager/commands/mobile/on_touch_event_notification.h"
-#include "application_manager/commands/mobile/on_system_request_notification.h"
-#include "application_manager/commands/mobile/diagnostic_message_request.h"
-#include "application_manager/commands/mobile/diagnostic_message_response.h"
-#include "application_manager/commands/mobile/send_location_request.h"
-#include "application_manager/commands/mobile/send_location_response.h"
-#include "application_manager/commands/mobile/dial_number_request.h"
-#include "application_manager/commands/mobile/dial_number_response.h"
-#include "application_manager/commands/mobile/send_haptic_data_request.h"
-#include "application_manager/commands/mobile/send_haptic_data_response.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/make_shared.h"
-
-namespace application_manager {
-
-CommandSharedPtr MobileCommandFactory::CreateCommand(
- const commands::MessageSharedPtr& message,
- commands::Command::CommandOrigin origin,
- ApplicationManager& application_manager) {
- CommandSharedPtr command;
-
- switch ((*message)[strings::params][strings::function_id].asInt()) {
- case mobile_apis::FunctionID::RegisterAppInterfaceID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kRequest)) {
- command.reset(new commands::RegisterAppInterfaceRequest(
- message, application_manager));
-
- } else {
- command.reset(new commands::RegisterAppInterfaceResponse(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::UnregisterAppInterfaceID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kRequest)) {
- command.reset(new commands::UnregisterAppInterfaceRequest(
- message, application_manager));
- } else {
- command.reset(new commands::UnregisterAppInterfaceResponse(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SetGlobalPropertiesID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetGlobalPropertiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::SetGlobalPropertiesRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ResetGlobalPropertiesID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ResetGlobalPropertiesResponse(
- message, application_manager));
- } else {
- command.reset(new commands::ResetGlobalPropertiesRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::AddCommandID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::AddCommandResponse(message, application_manager));
- } else {
- command.reset(
- new commands::AddCommandRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteCommandID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::DeleteCommandResponse(message, application_manager));
- } else {
- command.reset(
- new commands::DeleteCommandRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::AddSubMenuID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::AddSubMenuResponse(message, application_manager));
- } else {
- command.reset(
- new commands::AddSubMenuRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteSubMenuID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::DeleteSubMenuResponse(message, application_manager));
- } else {
- command.reset(
- new commands::DeleteSubMenuRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteInteractionChoiceSetID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::DeleteInteractionChoiceSetResponse(
- message, application_manager));
- } else {
- command.reset(new commands::DeleteInteractionChoiceSetRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::AlertID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::AlertResponse(message, application_manager));
- } else {
- command.reset(new commands::AlertRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SpeakID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::SpeakResponse(message, application_manager));
- } else {
- command.reset(new commands::SpeakRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SliderID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::SliderResponse(message, application_manager));
- } else {
- command.reset(
- new commands::SliderRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::PerformAudioPassThruID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::PerformAudioPassThruResponse(
- message, application_manager));
- } else {
- command.reset(new commands::PerformAudioPassThruRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::CreateInteractionChoiceSetID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::CreateInteractionChoiceSetResponse(
- message, application_manager));
- } else {
- command.reset(new commands::CreateInteractionChoiceSetRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::PerformInteractionID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::PerformInteractionResponse(
- message, application_manager));
- } else {
- command.reset(new commands::PerformInteractionRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::EndAudioPassThruID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::EndAudioPassThruResponse(
- message, application_manager));
- } else {
- command.reset(new commands::EndAudioPassThruRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::PutFileID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::PutFileResponse(message, application_manager));
- } else {
- command.reset(
- new commands::PutFileRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteFileID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::DeleteFileResponse(message, application_manager));
- } else {
- command.reset(
- new commands::DeleteFileRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ListFilesID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::ListFilesResponse(message, application_manager));
- } else {
- command.reset(
- new commands::ListFilesRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SubscribeButtonID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SubscribeButtonResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::SubscribeButtonRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::UnsubscribeButtonID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::UnsubscribeButtonResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UnsubscribeButtonRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ShowConstantTBTID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ShowConstantTBTResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::ShowConstantTBTRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ShowID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ShowResponse(message, application_manager));
- } else {
- command.reset(new commands::ShowRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::GetWayPointsID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command = utils::MakeShared<commands::GetWayPointsResponse>(
- message, application_manager);
- } else {
- command = utils::MakeShared<commands::GetWayPointsRequest>(
- message, application_manager);
- }
- break;
- }
- case mobile_apis::FunctionID::SubscribeVehicleDataID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SubscribeVehicleDataResponse(
- message, application_manager));
- } else {
- command.reset(new commands::SubscribeVehicleDataRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::UnsubscribeVehicleDataID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::UnsubscribeVehicleDataResponse(
- message, application_manager));
- } else {
- command.reset(new commands::UnsubscribeVehicleDataRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SubscribeWayPointsID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command = utils::MakeShared<commands::SubscribeWayPointsResponse>(
- message, application_manager);
- } else {
- command = utils::MakeShared<commands::SubscribeWayPointsRequest>(
- message, application_manager);
- }
- break;
- }
- case mobile_apis::FunctionID::UnsubscribeWayPointsID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command = utils::MakeShared<commands::UnsubscribeWayPointsResponse>(
- message, application_manager);
- } else {
- command = utils::MakeShared<commands::UnSubscribeWayPointsRequest>(
- message, application_manager);
- }
- break;
- }
- case mobile_apis::FunctionID::GetSystemCapabilityID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::GetSystemCapabilityResponse(
- message, application_manager));
- } else {
- command.reset(new commands::GetSystemCapabilityRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ReadDIDID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::ReadDIDResponse(message, application_manager));
- } else {
- command.reset(
- new commands::ReadDIDRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::GetVehicleDataID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::GetVehicleDataResponse(message, application_manager));
- } else {
- command.reset(
- new commands::GetVehicleDataRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ScrollableMessageID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ScrollableMessageResponse(
- message, application_manager));
- } else {
- command.reset(new commands::ScrollableMessageRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::AlertManeuverID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::AlertManeuverResponse(message, application_manager));
- } else {
- command.reset(
- new commands::AlertManeuverRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SetAppIconID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::SetAppIconResponse(message, application_manager));
- } else {
- command.reset(
- new commands::SetAppIconRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SetDisplayLayoutID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetDisplayLayoutResponse(
- message, application_manager));
- } else {
- command.reset(new commands::SetDisplayLayoutRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::UpdateTurnListID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::UpdateTurnListResponse(message, application_manager));
- } else {
- command.reset(
- new commands::UpdateTurnListRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::ChangeRegistrationID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ChangeRegistrationResponse(
- message, application_manager));
- } else {
- command.reset(new commands::ChangeRegistrationRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::GetDTCsID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::GetDTCsResponse(message, application_manager));
- } else {
- command.reset(
- new commands::GetDTCsRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::DiagnosticMessageID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::DiagnosticMessageResponse(
- message, application_manager));
- } else {
- command.reset(new commands::DiagnosticMessageRequest(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SetMediaClockTimerID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetMediaClockTimerResponse(
- message, application_manager));
- } else {
- command.reset(
- new commands::SetMediaClockRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SystemRequestID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::SystemResponse(message, application_manager));
- } else {
- command.reset(
- new commands::SystemRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SendLocationID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::SendLocationResponse(message, application_manager));
- } else {
- command.reset(
- new commands::SendLocationRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::DialNumberID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::DialNumberResponse(message, application_manager));
- } else {
- command.reset(
- new commands::DialNumberRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::SendHapticDataID: {
- if ((*message)[strings::params][strings::message_type] ==
- static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::SendHapticDataResponse(message, application_manager));
- } else {
- command.reset(
- new commands::SendHapticDataRequest(message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::OnButtonEventID: {
- command.reset(new commands::mobile::OnButtonEventNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnButtonPressID: {
- command.reset(new commands::mobile::OnButtonPressNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnAudioPassThruID: {
- command.reset(new commands::OnAudioPassThruNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnVehicleDataID: {
- command.reset(new commands::OnVehicleDataNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnAppInterfaceUnregisteredID: {
- command.reset(new commands::OnAppInterfaceUnregisteredNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnCommandID: {
- command.reset(
- new commands::OnCommandNotification(message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnTBTClientStateID: {
- command.reset(new commands::OnTBTClientStateNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnDriverDistractionID: {
- command.reset(new commands::mobile::OnDriverDistractionNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnLanguageChangeID: {
- command.reset(new commands::OnLanguageChangeNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnPermissionsChangeID: {
- command.reset(new commands::OnPermissionsChangeNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnHMIStatusID: {
- if (commands::Command::ORIGIN_SDL == origin) {
- command.reset(new commands::OnHMIStatusNotification(
- message, application_manager));
- } else {
- command.reset(new commands::OnHMIStatusNotificationFromMobile(
- message, application_manager));
- }
- break;
- }
- case mobile_apis::FunctionID::OnKeyboardInputID: {
- command.reset(new commands::mobile::OnKeyBoardInputNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnTouchEventID: {
- command.reset(new commands::mobile::OnTouchEventNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnSystemRequestID: {
- command.reset(new commands::mobile::OnSystemRequestNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnHashChangeID: {
- command.reset(new commands::mobile::OnHashChangeNotification(
- message, application_manager));
- break;
- }
- case mobile_apis::FunctionID::OnWayPointChangeID: {
- command = utils::MakeShared<commands::OnWayPointChangeNotification>(
- message, application_manager);
- break;
- }
- default: {
- (*message)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::GenericResponseID);
- command.reset(
- new commands::GenericResponse(message, application_manager));
- }
- }
- return command;
-}
-
-} // namespace application_manager
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
new file mode 100644
index 0000000000..bbd0011298
--- /dev/null
+++ b/src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc
@@ -0,0 +1,110 @@
+#include "application_manager/plugin_manager/rpc_plugin_manager_impl.h"
+#include <dlfcn.h>
+
+#include "utils/file_system.h"
+
+namespace application_manager {
+namespace plugin_manager {
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "PluginManager")
+
+RPCPluginManagerImpl::RPCPluginManagerImpl(
+ ApplicationManager& app_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : app_manager_(app_manager)
+ , rpc_service_(rpc_service)
+ , hmi_capabilities_(hmi_capabilities)
+ , policy_handler_(policy_handler) {}
+
+bool IsLibraryFile(const std::string& file_path) {
+ size_t pos = file_path.find_last_of(".");
+ if (std::string::npos == pos) {
+ return false;
+ }
+ if (file_path.substr(pos + 1).compare("so") != 0) {
+ return false;
+ }
+ return true;
+}
+
+RPCPluginPtr LoadPlugin(const std::string& full_plugin_path) {
+ if (!IsLibraryFile(full_plugin_path)) {
+ LOG4CXX_DEBUG(logger_, "Skip loading " << full_plugin_path);
+ return RPCPluginPtr();
+ }
+
+ 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());
+ return RPCPluginPtr();
+ }
+
+ typedef RPCPlugin* (*Create)();
+ Create create_plugin = reinterpret_cast<Create>(dlsym(plugin_dll, "Create"));
+ char* error_string = dlerror();
+ if (nullptr != error_string) {
+ LOG4CXX_ERROR(logger_,
+ "Failed to export dll's " << full_plugin_path
+ << " symbols : " << error_string);
+ dlclose(plugin_dll);
+ return RPCPluginPtr();
+ }
+ RPCPlugin* plugin = create_plugin();
+ return RPCPluginPtr(plugin);
+}
+
+uint32_t RPCPluginManagerImpl::LoadPlugins(const std::string& plugins_path) {
+ LOG4CXX_INFO(logger_, "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;
+ auto plugin = LoadPlugin(full_name);
+ if (!plugin) {
+ continue;
+ }
+ LOG4CXX_DEBUG(logger_,
+ "Loaded " << plugin->PluginName() << " plugin from "
+ << full_name);
+ if (plugin->Init(
+ app_manager_, rpc_service_, hmi_capabilities_, policy_handler_)) {
+ loaded_plugins_.push_back(std::move(plugin));
+ } else {
+ LOG4CXX_ERROR(logger_,
+ "Initialisation of " << plugin->PluginName()
+ << " plugin from " << full_name
+ << " failed");
+ }
+ }
+ return loaded_plugins_.size();
+}
+
+std::vector<RPCPluginPtr>& RPCPluginManagerImpl::GetPlugins() {
+ return loaded_plugins_;
+}
+
+utils::Optional<RPCPlugin> RPCPluginManagerImpl::FindPluginToProcess(
+ const int32_t function_id,
+ const commands::Command::CommandSource message_source) {
+ typedef utils::Optional<RPCPlugin> PluginOptional;
+ for (auto& plugin : loaded_plugins_) {
+ if (plugin->IsAbleToProcess(function_id, message_source)) {
+ return PluginOptional(*plugin);
+ }
+ }
+ return PluginOptional(PluginOptional::EMPTY,
+ std::string("Plugin for processing RPC not found"));
+}
+
+void RPCPluginManagerImpl::ForEachPlugin(
+ std::function<void(RPCPlugin&)> functor) {
+ for (auto& plugin : loaded_plugins_) {
+ functor(*plugin);
+ }
+}
+
+} // namespace plugin_manager
+} // namespace application_manager
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 559b9c0035..1cff7b7c96 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -42,6 +42,7 @@
#include "application_manager/application_manager.h"
#include "application_manager/state_controller.h"
#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
#include "policy/policy_manager_impl.h"
#include "connection_handler/connection_handler.h"
#include "utils/macro.h"
@@ -54,10 +55,8 @@
#include "utils/file_system.h"
#include "utils/scope_guard.h"
#include "utils/make_shared.h"
+#include "utils/helpers.h"
#include "policy/policy_manager.h"
-#ifdef SDL_REMOTE_CONTROL
-#include "functional_module/plugin_manager.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy {
@@ -90,7 +89,8 @@ RequestTypeMap TypeToString = {
{mobile_apis::RequestType::VEHICLE_DIAGNOSTICS, "VEHICLE_DIAGNOSTICS"},
{mobile_apis::RequestType::EMERGENCY, "EMERGENCY"},
{mobile_apis::RequestType::MEDIA, "MEDIA"},
- {mobile_apis::RequestType::FOTA, "FOTA"}};
+ {mobile_apis::RequestType::FOTA, "FOTA"},
+ {mobile_apis::RequestType::OEM_SPECIFIC, "OEM_SPECIFIC"}};
const std::string RequestTypeToString(mobile_apis::RequestType::eType type) {
RequestTypeMap::const_iterator it = TypeToString.find(type);
@@ -162,10 +162,12 @@ struct DeactivateApplication {
void operator()(const ApplicationSharedPtr& app) {
if (device_id_ == app->device()) {
- state_ctrl_.SetRegularState(app,
- mobile_apis::HMILevel::HMI_NONE,
- mobile_apis::AudioStreamingState::NOT_AUDIBLE,
- true);
+ state_ctrl_.SetRegularState(
+ app,
+ mobile_apis::HMILevel::HMI_NONE,
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
+ true);
}
}
@@ -974,6 +976,7 @@ void PolicyHandler::OnPendingPermissionChange(
app,
mobile_apis::HMILevel::HMI_NONE,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
true);
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
return;
@@ -1013,18 +1016,18 @@ void PolicyHandler::OnPendingPermissionChange(
MessageHelper::SendOnAppPermissionsChangedNotification(
app->app_id(), permissions, application_manager_);
}
- application_manager_.ManageMobileCommand(
+ application_manager_.GetRPCService().ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app->app_id(),
mobile_api::AppInterfaceUnregisteredReason::APP_UNAUTHORIZED),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
application_manager_.OnAppUnauthorized(app->app_id());
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
}
- if (permissions.requestTypeChanged) {
+ if (permissions.requestTypeChanged || permissions.requestSubTypeChanged) {
MessageHelper::SendOnAppPermissionsChangedNotification(
app->app_id(), permissions, application_manager_);
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
@@ -1193,10 +1196,6 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
accessor.GetData().end(),
DeactivateApplication(device_handle,
application_manager_.state_controller()));
-#ifdef SDL_REMOTE_CONTROL
- application_manager_.GetPluginManager().OnPolicyEvent(
- functional_modules::PolicyEvent::kApplicationsDisabled);
-#endif // SDL_REMOTE_CONTROL
} else {
std::for_each(
accessor.GetData().begin(),
@@ -1245,12 +1244,15 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
if (is_allowed) {
// Send HMI status notification to mobile
// Put application in full
- AudioStreamingState::eType state = app->is_audio()
- ? AudioStreamingState::AUDIBLE
- : AudioStreamingState::NOT_AUDIBLE;
+ AudioStreamingState::eType audio_state =
+ app->IsAudioApplication() ? AudioStreamingState::AUDIBLE
+ : AudioStreamingState::NOT_AUDIBLE;
+ VideoStreamingState::eType video_state =
+ app->IsVideoApplication() ? VideoStreamingState::STREAMABLE
+ : VideoStreamingState::NOT_STREAMABLE;
application_manager_.state_controller().SetRegularState(
- app, mobile_apis::HMILevel::HMI_FULL, state, true);
+ app, mobile_apis::HMILevel::HMI_FULL, audio_state, video_state, true);
last_activated_app_id_ = 0;
} else {
DeactivateApplication deactivate_notification(
@@ -1519,6 +1521,13 @@ void PolicyHandler::CheckPermissions(
POLICY_LIB_CHECK_VOID();
const std::string hmi_level =
MessageHelper::StringifiedHMILevel(app->hmi_level());
+ if (hmi_level.empty()) {
+ LOG4CXX_WARN(logger_,
+ "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_,
@@ -1879,6 +1888,18 @@ void PolicyHandler::OnAppRegisteredOnMobile(const std::string& application_id) {
policy_manager_->OnAppRegisteredOnMobile(application_id);
}
+RequestType::State PolicyHandler::GetAppRequestTypeState(
+ const std::string& policy_app_id) const {
+ POLICY_LIB_CHECK(RequestType::State::UNAVAILABLE);
+ return policy_manager_->GetAppRequestTypesState(policy_app_id);
+}
+
+RequestSubType::State PolicyHandler::GetAppRequestSubTypeState(
+ const std::string& policy_app_id) const {
+ POLICY_LIB_CHECK(RequestSubType::State::UNAVAILABLE);
+ return policy_manager_->GetAppRequestSubTypesState(policy_app_id);
+}
+
bool PolicyHandler::IsRequestTypeAllowed(
const std::string& policy_app_id,
mobile_apis::RequestType::eType type) const {
@@ -1891,17 +1912,66 @@ bool PolicyHandler::IsRequestTypeAllowed(
return false;
}
- std::vector<std::string> request_types =
- policy_manager_->GetAppRequestTypes(policy_app_id);
+ const RequestType::State request_type_state =
+ policy_manager_->GetAppRequestTypesState(policy_app_id);
- // If no request types are assigned to app - any is allowed
- if (request_types.empty()) {
- return true;
+ 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.");
+ 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.");
+ return false;
+ }
+ case RequestType::State::AVAILABLE: {
+ // If any of request types is available for current application - get them
+ const auto request_types =
+ policy_manager_->GetAppRequestTypes(policy_app_id);
+ return helpers::in_range(request_types, stringified_type);
+ }
+ default:
+ return false;
}
+}
- std::vector<std::string>::const_iterator it =
- std::find(request_types.begin(), request_types.end(), stringified_type);
- return request_types.end() != it;
+bool PolicyHandler::IsRequestSubTypeAllowed(
+ const std::string& policy_app_id,
+ const std::string& request_subtype) const {
+ POLICY_LIB_CHECK(false);
+ using namespace mobile_apis;
+
+ if (request_subtype.empty()) {
+ LOG4CXX_ERROR(logger_, "Request subtype to check is empty.");
+ return false;
+ }
+
+ const RequestSubType::State request_subtype_state =
+ 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.");
+ 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.");
+ 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);
+ return helpers::in_range(request_subtypes, request_subtype);
+ }
+ default:
+ return false;
+ }
}
const std::vector<std::string> PolicyHandler::GetAppRequestTypes(
@@ -1910,6 +1980,12 @@ const std::vector<std::string> PolicyHandler::GetAppRequestTypes(
return policy_manager_->GetAppRequestTypes(policy_app_id);
}
+const std::vector<std::string> PolicyHandler::GetAppRequestSubTypes(
+ const std::string& policy_app_id) const {
+ POLICY_LIB_CHECK(std::vector<std::string>());
+ return policy_manager_->GetAppRequestSubTypes(policy_app_id);
+}
+
const VehicleInfo policy::PolicyHandler::GetVehicleInfo() const {
POLICY_LIB_CHECK(VehicleInfo());
return policy_manager_->GetVehicleInfo();
@@ -1961,8 +2037,6 @@ bool PolicyHandler::IsUrlAppIdValid(const uint32_t app_idx,
return ((is_registered && !is_empty_urls) || is_default);
}
-#ifdef SDL_REMOTE_CONTROL
-
std::vector<std::string> PolicyHandler::GetDevicesIds(
const std::string& policy_app_id) {
return application_manager_.devices(policy_app_id);
@@ -2096,5 +2170,4 @@ void PolicyHandler::OnUpdateHMILevel(const std::string& device_id,
}
UpdateHMILevel(app, level);
}
-#endif // SDL_REMOTE_CONTROL
} // namespace policy
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index f341967842..e052e347f0 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -34,7 +34,7 @@
#include "application_manager/request_controller.h"
#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
+#include "application_manager/commands/request_to_hmi.h"
#include "utils/make_shared.h"
#include "utils/timer_task_impl.h"
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 bfb82a8eeb..d75237e0be 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
@@ -35,6 +35,7 @@
#include <algorithm>
#include "application_manager/application_manager.h"
+#include "application_manager/rpc_service.h"
#include "utils/file_system.h"
#include "connection_handler/connection_handler_impl.h"
@@ -633,17 +634,8 @@ void ResumeCtrlImpl::AddSubscriptions(
MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(
application, application_manager_);
- if (subscriptions.keyExists(strings::application_vehicle_info)) {
- const smart_objects::SmartObject& subscriptions_ivi =
- subscriptions[strings::application_vehicle_info];
- mobile_apis::VehicleDataType::eType ivi;
- for (size_t i = 0; i < subscriptions_ivi.length(); ++i) {
- ivi = static_cast<mobile_apis::VehicleDataType::eType>(
- (subscriptions_ivi[i]).asInt());
- application->SubscribeToIVI(ivi);
- }
- ProcessHMIRequests(MessageHelper::GetIVISubscriptionRequests(
- application, application_manager_));
+ for (auto& extension : application->Extensions()) {
+ extension->ProcessResumption(subscriptions);
}
}
}
@@ -753,7 +745,7 @@ bool ResumeCtrlImpl::ProcessHMIRequest(smart_objects::SmartObjectSPtr request,
(*request)[strings::correlation_id].asInt();
subscribe_on_event(function_id, hmi_correlation_id);
}
- if (!application_manager_.ManageHMICommand(request)) {
+ if (!application_manager_.GetRPCService().ManageHMICommand(request)) {
LOG4CXX_ERROR(logger_, "Unable to send request");
return false;
}
diff --git a/src/components/application_manager/src/resumption/resumption_data.cc b/src/components/application_manager/src/resumption/resumption_data.cc
index bd5bdbddab..72215dcf97 100644
--- a/src/components/application_manager/src/resumption/resumption_data.cc
+++ b/src/components/application_manager/src/resumption/resumption_data.cc
@@ -159,16 +159,9 @@ smart_objects::SmartObject ResumptionData::GetApplicationSubscriptions(
strings::application_buttons,
subscriptions);
- DataAccessor<VehicleInfoSubscriptions> vi_accessor =
- application->SubscribedIVI();
-
- const VehicleInfoSubscriptions& vi_subscription = vi_accessor.GetData();
-
- LOG4CXX_DEBUG(logger_, "SubscribedIVI:" << vi_subscription.size());
- Append(vi_subscription.begin(),
- vi_subscription.end(),
- strings::application_vehicle_info,
- subscriptions);
+ for (auto extension : application->Extensions()) {
+ extension->SaveResumptionData(subscriptions);
+ }
return subscriptions;
}
diff --git a/src/components/application_manager/src/rpc_handler_impl.cc b/src/components/application_manager/src/rpc_handler_impl.cc
new file mode 100644
index 0000000000..5cf5500709
--- /dev/null
+++ b/src/components/application_manager/src/rpc_handler_impl.cc
@@ -0,0 +1,369 @@
+/*
+ * 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 "application_manager/rpc_handler_impl.h"
+
+namespace application_manager {
+namespace rpc_handler {
+
+CREATE_LOGGERPTR_LOCAL(logger_, "RPCHandlerImpl")
+namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+namespace jhs = NsSmartDeviceLink::NsJSONHandler::strings;
+
+RPCHandlerImpl::RPCHandlerImpl(ApplicationManager& app_manager)
+ : app_manager_(app_manager)
+ , messages_from_mobile_("AM FromMobile", this)
+ , messages_from_hmi_("AM FromHMI", this)
+ , hmi_so_factory_(hmi_apis::HMI_API())
+ , mobile_so_factory_(mobile_apis::MOBILE_API())
+#ifdef TELEMETRY_MONITOR
+ , metric_observer_(NULL)
+#endif // TELEMETRY_MONITOR
+{
+}
+
+RPCHandlerImpl::~RPCHandlerImpl() {}
+
+void RPCHandlerImpl::ProcessMessageFromMobile(
+ const utils::SharedPtr<Message> message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+#ifdef TELEMETRY_MONITOR
+ AMTelemetryObserver::MessageMetricSharedPtr metric(
+ new AMTelemetryObserver::MessageMetric());
+ metric->begin = date_time::DateTime::getCurrentTime();
+#endif // TELEMETRY_MONITOR
+ smart_objects::SmartObjectSPtr so_from_mobile =
+ utils::MakeShared<smart_objects::SmartObject>();
+
+ DCHECK_OR_RETURN_VOID(so_from_mobile);
+ if (!so_from_mobile) {
+ LOG4CXX_ERROR(logger_, "Null pointer");
+ return;
+ }
+
+ if (!ConvertMessageToSO(*message, *so_from_mobile)) {
+ LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
+ return;
+ }
+#ifdef TELEMETRY_MONITOR
+ metric->message = so_from_mobile;
+#endif // TELEMETRY_MONITOR
+
+ if (!app_manager_.GetRPCService().ManageMobileCommand(
+ so_from_mobile, commands::Command::SOURCE_MOBILE)) {
+ LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
+ }
+#ifdef TELEMETRY_MONITOR
+ metric->end = date_time::DateTime::getCurrentTime();
+ if (metric_observer_) {
+ metric_observer_->OnMessage(metric);
+ }
+#endif // TELEMETRY_MONITOR
+}
+
+void RPCHandlerImpl::ProcessMessageFromHMI(
+ const utils::SharedPtr<Message> message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObjectSPtr smart_object(new smart_objects::SmartObject);
+
+ if (!smart_object) {
+ LOG4CXX_ERROR(logger_, "Null pointer");
+ return;
+ }
+
+#ifdef HMI_DBUS_API
+ *smart_object = message->smart_object();
+#else
+ if (!ConvertMessageToSO(*message, *smart_object)) {
+ if (application_manager::MessageType::kResponse ==
+ (*smart_object)[strings::params][strings::message_type].asInt()) {
+ (*smart_object).erase(strings::msg_params);
+ (*smart_object)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::GENERIC_ERROR;
+ (*smart_object)[strings::msg_params][strings::info] =
+ std::string("Invalid message received from vehicle");
+ } else {
+ LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
+ return;
+ }
+ }
+#endif // HMI_DBUS_API
+
+ 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");
+ }
+}
+void RPCHandlerImpl::Handle(const impl::MessageFromMobile message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ return;
+ }
+ if (app_manager_.is_stopping()) {
+ LOG4CXX_INFO(logger_, "Application manager is stopping");
+ return;
+ }
+
+ ProcessMessageFromMobile(message);
+}
+
+void RPCHandlerImpl::Handle(const impl::MessageFromHmi message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ return;
+ }
+ ProcessMessageFromHMI(message);
+}
+
+void RPCHandlerImpl::OnMessageReceived(
+ const protocol_handler::RawMessagePtr message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ NOTREACHED();
+ return;
+ }
+
+ utils::SharedPtr<Message> outgoing_message = ConvertRawMsgToMessage(message);
+
+ if (outgoing_message) {
+ LOG4CXX_DEBUG(logger_, "Posting new Message");
+ messages_from_mobile_.PostMessage(
+ impl::MessageFromMobile(outgoing_message));
+ }
+}
+
+void RPCHandlerImpl::OnMobileMessageSent(
+ const protocol_handler::RawMessagePtr message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+void RPCHandlerImpl::OnMessageReceived(
+ hmi_message_handler::MessageSharedPointer message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ NOTREACHED();
+ return;
+ }
+
+ messages_from_hmi_.PostMessage(impl::MessageFromHmi(message));
+}
+
+void RPCHandlerImpl::OnErrorSending(
+ hmi_message_handler::MessageSharedPointer message) {
+ return;
+}
+
+#ifdef TELEMETRY_MONITOR
+void RPCHandlerImpl::SetTelemetryObserver(AMTelemetryObserver* observer) {
+ metric_observer_ = observer;
+}
+
+#endif // TELEMETRY_MONITOR
+
+bool RPCHandlerImpl::ConvertMessageToSO(
+ const Message& message,
+ NsSmartDeviceLink::NsSmartObjects::SmartObject& output) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_DEBUG(logger_,
+ "\t\t\tMessage to convert: protocol "
+ << message.protocol_version() << "; json "
+ << message.json_message());
+
+ switch (message.protocol_version()) {
+ case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5:
+ case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4:
+ case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3:
+ case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2: {
+ const bool conversion_result =
+ formatters::CFormatterJsonSDLRPCv2::fromString(
+ message.json_message(),
+ output,
+ message.function_id(),
+ message.type(),
+ message.correlation_id());
+ if (!conversion_result ||
+ !mobile_so_factory().attachSchema(output, true) ||
+ ((output.validate() != smart_objects::Errors::OK))) {
+ LOG4CXX_WARN(logger_,
+ "Failed to parse string to smart object :"
+ << message.json_message());
+ utils::SharedPtr<smart_objects::SmartObject> response(
+ MessageHelper::CreateNegativeResponse(
+ message.connection_key(),
+ message.function_id(),
+ message.correlation_id(),
+ mobile_apis::Result::INVALID_DATA));
+ app_manager_.GetRPCService().ManageMobileCommand(
+ response, commands::Command::SOURCE_SDL);
+ return false;
+ }
+ LOG4CXX_DEBUG(logger_,
+ "Convertion result for sdl object is true function_id "
+ << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+
+ output[strings::params][strings::connection_key] =
+ message.connection_key();
+ output[strings::params][strings::protocol_version] =
+ 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());
+ utils::SharedPtr<smart_objects::SmartObject> response(
+ MessageHelper::CreateNegativeResponse(
+ message.connection_key(),
+ message.function_id(),
+ message.correlation_id(),
+ mobile_apis::Result::INVALID_DATA));
+ app_manager_.GetRPCService().ManageMobileCommand(
+ response, commands::Command::SOURCE_SDL);
+ return false;
+ }
+ output[strings::params][strings::binary_data] =
+ *(message.binary_data());
+ }
+ break;
+ }
+ case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI: {
+#ifdef ENABLE_LOG
+ int32_t result =
+#endif
+ 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());
+ if (!hmi_so_factory().attachSchema(output, false)) {
+ LOG4CXX_WARN(logger_, "Failed to attach schema to object.");
+ return false;
+ }
+ if (output.validate() != smart_objects::Errors::OK) {
+ LOG4CXX_ERROR(logger_, "Incorrect parameter from HMI");
+ return false;
+ }
+ break;
+ }
+ case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1: {
+ static NsSmartDeviceLinkRPC::V1::v4_protocol_v1_2_no_extra v1_shema;
+
+ if (message.function_id() == 0 || message.type() == kUnknownType) {
+ LOG4CXX_ERROR(logger_, "Message received: UNSUPPORTED_VERSION");
+
+ int32_t conversation_result =
+ formatters::CFormatterJsonSDLRPCv1::fromString<
+ NsSmartDeviceLinkRPC::V1::FunctionID::eType,
+ NsSmartDeviceLinkRPC::V1::messageType::eType>(
+ message.json_message(), output);
+
+ if (formatters::CFormatterJsonSDLRPCv1::kSuccess ==
+ conversation_result) {
+ smart_objects::SmartObject params = smart_objects::SmartObject(
+ smart_objects::SmartType::SmartType_Map);
+
+ output[strings::params][strings::message_type] =
+ NsSmartDeviceLinkRPC::V1::messageType::response;
+ output[strings::params][strings::connection_key] =
+ message.connection_key();
+
+ output[strings::msg_params] = smart_objects::SmartObject(
+ smart_objects::SmartType::SmartType_Map);
+ output[strings::msg_params][strings::success] = false;
+ output[strings::msg_params][strings::result_code] =
+ NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION;
+
+ smart_objects::SmartObjectSPtr msg_to_send =
+ new smart_objects::SmartObject(output);
+ v1_shema.attachSchema(*msg_to_send, false);
+ app_manager_.GetRPCService().SendMessageToMobile(msg_to_send);
+ return false;
+ }
+ }
+ break;
+ }
+ default:
+ LOG4CXX_WARN(logger_,
+ "Application used unsupported protocol :"
+ << message.protocol_version() << ".");
+ return false;
+ }
+
+ LOG4CXX_DEBUG(logger_, "Successfully parsed message into smart object");
+ return true;
+}
+
+utils::SharedPtr<Message> RPCHandlerImpl::ConvertRawMsgToMessage(
+ const protocol_handler::RawMessagePtr message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ DCHECK(message);
+ utils::SharedPtr<Message> outgoing_message;
+
+ LOG4CXX_DEBUG(logger_, "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.");
+ return outgoing_message;
+ }
+
+ Message* convertion_result =
+ MobileMessageHandler::HandleIncomingMessageProtocol(message);
+
+ if (convertion_result) {
+ outgoing_message = convertion_result;
+ } else {
+ LOG4CXX_ERROR(logger_, "Received invalid message");
+ }
+ return outgoing_message;
+}
+
+hmi_apis::HMI_API& RPCHandlerImpl::hmi_so_factory() {
+ return hmi_so_factory_;
+}
+
+mobile_apis::MOBILE_API& RPCHandlerImpl::mobile_so_factory() {
+ return mobile_so_factory_;
+}
+}
+}
diff --git a/src/components/application_manager/src/rpc_service_impl.cc b/src/components/application_manager/src/rpc_service_impl.cc
new file mode 100644
index 0000000000..7d930d1432
--- /dev/null
+++ b/src/components/application_manager/src/rpc_service_impl.cc
@@ -0,0 +1,634 @@
+/*
+ * 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 "application_manager/rpc_service_impl.h"
+
+namespace application_manager {
+namespace rpc_service {
+
+CREATE_LOGGERPTR_LOCAL(logger_, "RPCServiceImpl")
+namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+namespace jhs = NsSmartDeviceLink::NsJSONHandler::strings;
+
+RPCServiceImpl::RPCServiceImpl(
+ ApplicationManager& app_manager,
+ request_controller::RequestController& request_ctrl,
+ protocol_handler::ProtocolHandler* protocol_handler,
+ hmi_message_handler::HMIMessageHandler* hmi_handler,
+ CommandHolder& commands_holder)
+ : app_manager_(app_manager)
+ , request_ctrl_(request_ctrl)
+ , protocol_handler_(protocol_handler)
+ , hmi_handler_(hmi_handler)
+ , commands_holder_(commands_holder)
+ , messages_to_mobile_("AM ToMobile", this)
+ , messages_to_hmi_("AM ToHMI", this)
+ , hmi_so_factory_(hmi_apis::HMI_API())
+ , mobile_so_factory_(mobile_apis::MOBILE_API()) {}
+
+RPCServiceImpl::~RPCServiceImpl() {}
+
+bool RPCServiceImpl::ManageMobileCommand(
+ const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ return false;
+ }
+
+ if (app_manager_.IsLowVoltage()) {
+ LOG4CXX_WARN(logger_, "Low Voltage is active");
+ return false;
+ }
+#ifdef DEBUG
+ MessageHelper::PrintSmartObject(*message);
+#endif
+
+ const uint32_t connection_key = static_cast<uint32_t>(
+ (*message)[strings::params][strings::connection_key].asUInt());
+
+ auto app_ptr = app_manager_.application(connection_key);
+ if (app_ptr && app_manager_.IsAppInReconnectMode(app_ptr->policy_app_id())) {
+ commands_holder_.Suspend(
+ app_ptr, CommandHolder::CommandType::kMobileCommand, message);
+ return true;
+ }
+ mobile_apis::FunctionID::eType function_id =
+ static_cast<mobile_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ // Notifications from HMI have no such parameter
+ uint32_t correlation_id =
+ (*message)[strings::params].keyExists(strings::correlation_id)
+ ? (*message)[strings::params][strings::correlation_id].asUInt()
+ : 0;
+
+ int32_t protocol_type =
+ (*message)[strings::params][strings::protocol_type].asInt();
+
+ ApplicationSharedPtr app;
+ if (((mobile_apis::FunctionID::RegisterAppInterfaceID != function_id) &&
+ (protocol_type == commands::CommandImpl::mobile_protocol_type_)) &&
+ (mobile_apis::FunctionID::UnregisterAppInterfaceID != function_id)) {
+ app = app_manager_.application(connection_key);
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "RET APPLICATION_NOT_REGISTERED");
+ smart_objects::SmartObjectSPtr response =
+ MessageHelper::CreateNegativeResponse(
+ connection_key,
+ static_cast<int32_t>(function_id),
+ correlation_id,
+ static_cast<int32_t>(
+ mobile_apis::Result::APPLICATION_NOT_REGISTERED));
+
+ SendMessageToMobile(response);
+ return false;
+ }
+
+ // Message for "CheckPermission" must be with attached schema
+ mobile_so_factory().attachSchema(*message, false);
+ }
+
+ auto plugin =
+ app_manager_.GetPluginManager().FindPluginToProcess(function_id, source);
+ if (!plugin) {
+ LOG4CXX_WARN(logger_, "Filed to find plugin : " << plugin.error());
+ return false;
+ }
+ application_manager::CommandFactory& factory = (*plugin).GetCommandFactory();
+ auto command = factory.CreateCommand(message, source);
+
+ if (!command) {
+ LOG4CXX_WARN(logger_, "Failed to create mobile command from smart object");
+ return false;
+ }
+
+ int32_t message_type =
+ (*message)[strings::params][strings::message_type].asInt();
+ if (message_type == mobile_apis::messageType::response) {
+ if (command->Init()) {
+ command->Run();
+ command->CleanUp();
+ }
+ return true;
+ }
+ if (message_type == mobile_apis::messageType::notification) {
+ request_ctrl_.addNotification(command);
+ if (command->Init()) {
+ command->Run();
+ if (command->CleanUp()) {
+ request_ctrl_.removeNotification(command.get());
+ }
+ // If CleanUp returned false notification should remove it self.
+ }
+ return true;
+ }
+
+ if (message_type == mobile_apis::messageType::request) {
+ // commands will be launched from requesr_ctrl
+ mobile_apis::HMILevel::eType app_hmi_level =
+ mobile_apis::HMILevel::INVALID_ENUM;
+ if (app) {
+ app_hmi_level = app->hmi_level();
+ }
+
+ // 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");
+ } else if (result == request_controller::RequestController::
+ TOO_MANY_PENDING_REQUESTS) {
+ LOG4CXX_ERROR(logger_,
+ "RET Unable top perform request: "
+ << "TOO_MANY_PENDING_REQUESTS");
+
+ smart_objects::SmartObjectSPtr response =
+ MessageHelper::CreateNegativeResponse(
+ connection_key,
+ static_cast<int32_t>(function_id),
+ correlation_id,
+ static_cast<int32_t>(
+ mobile_apis::Result::TOO_MANY_PENDING_REQUESTS));
+ ApplicationSharedPtr app_ptr = app_manager_.application(connection_key);
+ if (app_ptr) {
+ app_ptr->usage_report().RecordRemovalsForBadBehavior();
+ }
+
+ SendMessageToMobile(response);
+ return false;
+ } else if (result ==
+ request_controller::RequestController::TOO_MANY_REQUESTS) {
+ LOG4CXX_ERROR(logger_,
+ "RET Unable to perform request: "
+ << "TOO_MANY_REQUESTS");
+
+ ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ connection_key,
+ mobile_api::AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS),
+ commands::Command::SOURCE_SDL);
+
+ app_manager_.UnregisterApplication(
+ connection_key,
+ mobile_apis::Result::TOO_MANY_PENDING_REQUESTS,
+ false);
+ ApplicationSharedPtr app_ptr = app_manager_.application(connection_key);
+ if (app_ptr) {
+ app_ptr->usage_report().RecordRemovalsForBadBehavior();
+ }
+ 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");
+
+ ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ connection_key,
+ mobile_api::AppInterfaceUnregisteredReason::
+ REQUEST_WHILE_IN_NONE_HMI_LEVEL),
+ commands::Command::SOURCE_SDL);
+
+ ApplicationSharedPtr app_ptr = app_manager_.application(connection_key);
+ if (app_ptr) {
+ app_ptr->usage_report().RecordRemovalsForBadBehavior();
+ }
+ app_manager_.UnregisterApplication(
+ connection_key, mobile_apis::Result::INVALID_ENUM, false);
+ return false;
+ } else {
+ LOG4CXX_ERROR(logger_, "RET Unable to perform request: Unknown case");
+ return false;
+ }
+ return true;
+ }
+
+ LOG4CXX_ERROR(logger_, "RET UNKNOWN MESSAGE TYPE " << message_type);
+ return false;
+}
+
+bool RPCServiceImpl::ManageHMICommand(
+ const commands::MessageSharedPtr message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ return false;
+ }
+
+ if (app_manager_.IsLowVoltage()) {
+ LOG4CXX_WARN(logger_, "Low Voltage is active");
+ return false;
+ }
+
+ MessageHelper::PrintSmartObject(*message);
+ const int32_t function_id =
+ (*(message.get()))[strings::params][strings::function_id].asInt();
+ auto plugin = app_manager_.GetPluginManager().FindPluginToProcess(
+ function_id, commands::Command::SOURCE_HMI);
+ if (!plugin) {
+ LOG4CXX_WARN(logger_, "Filed to find plugin : " << plugin.error());
+ return false;
+ }
+
+ application_manager::CommandFactory& factory = (*plugin).GetCommandFactory();
+ auto command = factory.CreateCommand(message, commands::Command::SOURCE_HMI);
+
+ if (!command) {
+ LOG4CXX_WARN(logger_, "Failed to create command from smart object");
+ return false;
+ }
+
+ if ((*message).keyExists(strings::msg_params) &&
+ (*message)[strings::msg_params].keyExists(strings::app_id)) {
+ const auto connection_key =
+ (*message)[strings::msg_params][strings::app_id].asUInt();
+
+ auto app = app_manager_.application(static_cast<uint32_t>(connection_key));
+ if (app && app_manager_.IsAppInReconnectMode(app->policy_app_id())) {
+ commands_holder_.Suspend(
+ app, CommandHolder::CommandType::kHmiCommand, message);
+ return true;
+ }
+ }
+
+ int32_t message_type =
+ (*(message.get()))[strings::params][strings::message_type].asInt();
+
+ if (kRequest == message_type) {
+ LOG4CXX_DEBUG(logger_, "ManageHMICommand");
+ request_ctrl_.addHMIRequest(command);
+ }
+
+ if (command->Init()) {
+ command->Run();
+ if (kResponse == message_type) {
+ const uint32_t correlation_id =
+ (*(message.get()))[strings::params][strings::correlation_id].asUInt();
+ const int32_t function_id =
+ (*(message.get()))[strings::params][strings::function_id].asInt();
+ request_ctrl_.OnHMIResponse(correlation_id, function_id);
+ }
+ return true;
+ }
+ return false;
+}
+
+void RPCServiceImpl::Handle(const impl::MessageToHmi message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!hmi_handler_) {
+ LOG4CXX_ERROR(logger_, "Observer is not set for HMIMessageHandler");
+ return;
+ }
+
+ hmi_handler_->SendMessageToHMI(message);
+ LOG4CXX_INFO(logger_, "Message for HMI given away");
+}
+
+void RPCServiceImpl::Handle(const impl::MessageToMobile message) {
+ if (!protocol_handler_) {
+ LOG4CXX_WARN(logger_,
+ "Protocol Handler is not set; cannot send message to mobile.");
+ return;
+ }
+
+ utils::SharedPtr<protocol_handler::RawMessage> rawMessage =
+ MobileMessageHandler::HandleOutgoingMessageProtocol(message);
+
+ if (!rawMessage) {
+ LOG4CXX_ERROR(logger_, "Failed to create raw message.");
+ return;
+ }
+
+ bool is_final = message.is_final;
+ bool close_session = false;
+ if (is_final) {
+ if (1 < app_manager_.connection_handler().GetConnectionSessionsCount(
+ message->connection_key())) {
+ is_final = false;
+ close_session = true;
+ }
+ }
+
+ protocol_handler_->SendMessageToMobileApp(rawMessage, is_final);
+ LOG4CXX_INFO(logger_, "Message for mobile given away");
+
+ if (close_session) {
+ app_manager_.connection_handler().CloseSession(message->connection_key(),
+ connection_handler::kCommon);
+ }
+}
+
+void RPCServiceImpl::SendMessageToMobile(
+ const application_manager::commands::MessageSharedPtr message,
+ bool final_message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ NOTREACHED();
+ return;
+ }
+
+ if (!protocol_handler_) {
+ LOG4CXX_WARN(logger_, "No Protocol Handler set");
+ return;
+ }
+
+ ApplicationSharedPtr app = app_manager_.application(
+ (*message)[strings::params][strings::connection_key].asUInt());
+
+ const bool is_result_code_exists =
+ (*message)[strings::msg_params].keyExists(strings::result_code);
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "No application associated with connection key");
+ if (is_result_code_exists &&
+ ((*message)[strings::msg_params][strings::result_code] ==
+ NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION)) {
+ (*message)[strings::params][strings::protocol_version] =
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1;
+ } else {
+ (*message)[strings::params][strings::protocol_version] =
+ app_manager_.SupportedSDLVersion();
+ }
+ } else {
+ (*message)[strings::params][strings::protocol_version] =
+ app->protocol_version();
+ }
+
+ if (app && is_result_code_exists &&
+ (*message)[strings::msg_params][strings::result_code] ==
+ mobile_apis::Result::OUT_OF_MEMORY) {
+ app->usage_report().RecordRejectionsSyncOutOfMemory();
+ }
+
+ mobile_so_factory().attachSchema(*message, false);
+ LOG4CXX_DEBUG(
+ logger_,
+ "Attached schema to message, result if valid: " << message->isValid());
+
+ // Messages to mobile are not yet prioritized so use default priority value
+ utils::SharedPtr<Message> message_to_send(
+ new Message(protocol_handler::MessagePriority::kDefault));
+ if (!ConvertSOtoMessage((*message), (*message_to_send))) {
+ LOG4CXX_WARN(logger_, "Can't send msg to Mobile: failed to create string");
+ return;
+ }
+
+ smart_objects::SmartObject& msg_to_mobile = *message;
+ // If correlation_id is not present, it is from-HMI message which should be
+ // checked against policy permissions
+ if (msg_to_mobile[strings::params].keyExists(strings::correlation_id)) {
+ request_ctrl_.OnMobileResponse(
+ msg_to_mobile[strings::params][strings::correlation_id].asUInt(),
+ msg_to_mobile[strings::params][strings::connection_key].asUInt(),
+ msg_to_mobile[strings::params][strings::function_id].asInt());
+ } else if (app) {
+ mobile_apis::FunctionID::eType function_id =
+ static_cast<mobile_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asUInt());
+ RPCParams params;
+
+ const smart_objects::SmartObject& s_map = (*message)[strings::msg_params];
+ if (smart_objects::SmartType_Map == s_map.getType()) {
+ smart_objects::SmartMap::iterator iter = s_map.map_begin();
+ smart_objects::SmartMap::iterator iter_end = s_map.map_end();
+
+ for (; iter != iter_end; ++iter) {
+ if (true == iter->second.asBool()) {
+ LOG4CXX_INFO(logger_, "Request's param: " << iter->first);
+ params.insert(iter->first);
+ }
+ }
+ }
+ const std::string string_functionID =
+ MessageHelper::StringifiedFunctionID(function_id);
+ const mobile_apis::Result::eType check_result =
+ app_manager_.CheckPolicyPermissions(app, string_functionID, params);
+ if (mobile_apis::Result::SUCCESS != check_result) {
+ LOG4CXX_WARN(logger_,
+ "Function \"" << string_functionID << "\" (#" << function_id
+ << ") not allowed by policy");
+ return;
+ }
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ if (function_id == mobile_apis::FunctionID::OnSystemRequestID) {
+ mobile_apis::RequestType::eType request_type =
+ static_cast<mobile_apis::RequestType::eType>(
+ (*message)[strings::msg_params][strings::request_type].asUInt());
+ if (mobile_apis::RequestType::PROPRIETARY == request_type ||
+ mobile_apis::RequestType::HTTP == request_type) {
+ app_manager_.GetPolicyHandler().OnUpdateRequestSentToMobile();
+ }
+ }
+#endif // EXTERNAL_PROPRIETARY_MODE
+ }
+
+ if (message_to_send->binary_data()) {
+ LOG4CXX_DEBUG(
+ logger_,
+ "Binary data size: " << message_to_send->binary_data()->size());
+ }
+ messages_to_mobile_.PostMessage(
+ impl::MessageToMobile(message_to_send, final_message));
+}
+
+void RPCServiceImpl::SendMessageToHMI(
+ const commands::MessageSharedPtr message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!message) {
+ LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ NOTREACHED();
+ return;
+ }
+
+ if (!hmi_handler_) {
+ LOG4CXX_WARN(logger_, "No HMI Handler set");
+ return;
+ }
+
+ // SmartObject |message| has no way to declare priority for now
+ utils::SharedPtr<Message> message_to_send(
+ new Message(protocol_handler::MessagePriority::kDefault));
+ if (!message_to_send) {
+ LOG4CXX_ERROR(logger_, "Null pointer");
+ return;
+ }
+
+ hmi_so_factory().attachSchema(*message, false);
+ LOG4CXX_INFO(
+ logger_,
+ "Attached schema to message, result if valid: " << message->isValid());
+
+#ifdef HMI_DBUS_API
+ message_to_send->set_smart_object(*message);
+#else
+ if (!ConvertSOtoMessage(*message, *message_to_send)) {
+ LOG4CXX_WARN(logger_,
+ "Cannot send message to HMI: failed to create string");
+ return;
+ }
+#endif // HMI_DBUS_API
+
+ messages_to_hmi_.PostMessage(impl::MessageToHmi(message_to_send));
+}
+
+void RPCServiceImpl::set_protocol_handler(
+ protocol_handler::ProtocolHandler* handler) {
+ protocol_handler_ = handler;
+}
+
+void RPCServiceImpl::set_hmi_message_handler(
+ hmi_message_handler::HMIMessageHandler* handler) {
+ hmi_handler_ = handler;
+}
+
+bool RPCServiceImpl::ConvertSOtoMessage(
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& message,
+ Message& output) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (smart_objects::SmartType_Null == message.getType() ||
+ smart_objects::SmartType_Invalid == message.getType()) {
+ LOG4CXX_WARN(logger_, "Invalid smart object received.");
+ return false;
+ }
+
+ LOG4CXX_DEBUG(
+ logger_,
+ "Message with protocol: " << message.getElement(jhs::S_PARAMS)
+ .getElement(jhs::S_PROTOCOL_TYPE)
+ .asInt());
+
+ std::string output_string;
+ const int64_t protocol_type = message.getElement(jhs::S_PARAMS)
+ .getElement(jhs::S_PROTOCOL_TYPE)
+ .asInt();
+ const int64_t protocol_version = message.getElement(jhs::S_PARAMS)
+ .getElement(jhs::S_PROTOCOL_VERSION)
+ .asInt();
+ switch (protocol_type) {
+ case 0: {
+ if (protocol_version == 1) {
+ if (!formatters::CFormatterJsonSDLRPCv1::toString(message,
+ output_string)) {
+ LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ return false;
+ }
+ output.set_protocol_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1);
+ } else {
+ if (!formatters::CFormatterJsonSDLRPCv2::toString(message,
+ output_string)) {
+ LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ return false;
+ }
+ output.set_protocol_version(
+ static_cast<protocol_handler::MajorProtocolVersion>(
+ protocol_version));
+ }
+
+ break;
+ }
+ case 1: {
+ if (!formatters::FormatterJsonRpc::ToString(message, output_string)) {
+ LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ return false;
+ }
+ output.set_protocol_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI);
+ break;
+ }
+ default:
+ NOTREACHED();
+ return false;
+ }
+
+ LOG4CXX_DEBUG(logger_, "Convertion result: " << output_string);
+
+ output.set_connection_key(message.getElement(jhs::S_PARAMS)
+ .getElement(strings::connection_key)
+ .asInt());
+
+ output.set_function_id(
+ message.getElement(jhs::S_PARAMS).getElement(jhs::S_FUNCTION_ID).asInt());
+
+ output.set_correlation_id(message.getElement(jhs::S_PARAMS)
+ .getElement(jhs::S_CORRELATION_ID)
+ .asInt());
+ output.set_message_type(
+ static_cast<MessageType>(message.getElement(jhs::S_PARAMS)
+ .getElement(jhs::S_MESSAGE_TYPE)
+ .asInt()));
+
+ // Currently formatter creates JSON = 3 bytes for empty SmartObject.
+ // workaround for notification. JSON must be empty
+ if (mobile_apis::FunctionID::OnAudioPassThruID !=
+ message.getElement(jhs::S_PARAMS)
+ .getElement(strings::function_id)
+ .asInt()) {
+ output.set_json_message(output_string);
+ }
+
+ if (message.getElement(jhs::S_PARAMS).keyExists(strings::binary_data)) {
+ const application_manager::BinaryData binaryData(
+ message.getElement(jhs::S_PARAMS)
+ .getElement(strings::binary_data)
+ .asBinary());
+
+ output.set_binary_data(&binaryData);
+ }
+
+ LOG4CXX_DEBUG(logger_, "Successfully parsed smart object into message");
+ return true;
+}
+
+hmi_apis::HMI_API& RPCServiceImpl::hmi_so_factory() {
+ return hmi_so_factory_;
+}
+
+mobile_apis::MOBILE_API& RPCServiceImpl::mobile_so_factory() {
+ return mobile_so_factory_;
+}
+
+} // namespace rpc_service
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index c3aba90dd5..5514ad688a 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -128,6 +128,7 @@ const char* trigger_source = "triggerSource";
const char* hmi_level = "hmiLevel";
const char* activate_app_hmi_level = "level";
const char* audio_streaming_state = "audioStreamingState";
+const char* video_streaming_state = "videoStreamingState";
const char* system_context = "systemContext";
const char* speech_capabilities = "speechCapabilities";
const char* vr_capabilities = "vrCapabilities";
@@ -142,17 +143,30 @@ const char* navigation_capability = "navigationCapability";
const char* phone_capability = "phoneCapability";
const char* video_streaming_capability = "videoStreamingCapability";
const char* rc_capability = "remoteControlCapability";
+const char* day_color_scheme = "dayColorScheme";
+const char* night_color_scheme = "nightColorScheme";
+const char* primary_color = "primaryColor";
+const char* secondary_color = "secondaryColor";
+const char* background_color = "backgroundColor";
+const char* red = "red";
+const char* green = "green";
+const char* blue = "blue";
+const char* display_layout = "displayLayout";
+const char* icon_resumed = "iconResumed";
// PutFile
const char* sync_file_name = "syncFileName";
const char* file_name = "fileName";
const char* file_type = "fileType";
const char* file_size = "fileSize";
+const char* crc32_check_sum = "crc";
const char* request_type = "requestType";
+const char* request_subtype = "requestSubType";
const char* persistent_file = "persistentFile";
const char* file_data = "fileData";
const char* space_available = "spaceAvailable";
const char* image_type = "imageType";
+const char* is_template = "isTemplate";
const char* image = "image";
const char* type = "type";
const char* system_file = "systemFile";
@@ -202,7 +216,9 @@ const char* rpm = "rpm";
const char* fuel_level = "fuelLevel";
const char* fuel_level_state = "fuelLevel_State";
const char* instant_fuel_consumption = "instantFuelConsumption";
+const char* fuel_range = "fuelRange";
const char* external_temp = "externalTemperature";
+const char* turn_signal = "turnSignal";
const char* vin = "vin";
const char* prndl = "prndl";
const char* tire_pressure = "tirePressure";
@@ -238,6 +254,7 @@ const char* remote_control = "remoteControl";
const char* sdl_version = "sdlVersion";
const char* system_software_version = "systemSoftwareVersion";
const char* priority = "priority";
+const char* engine_oil_life = "engineOilLife";
// resuming
const char* application_commands = "applicationCommands";
@@ -351,7 +368,7 @@ const char* instance_follow_redirect = "InstanceFollowRedirect";
const char* charset = "charset";
const char* content_lenght = "Content_Lenght";
const char* GET = "GET";
-} // http_request
+} // namespace http_request
namespace mobile_notification {
const char* state = "state";
@@ -364,7 +381,17 @@ const char* kFull = "FULL";
const char* kLimited = "LIMITED";
const char* kBackground = "BACKGROUND";
const char* kNone = "NONE";
-}
+} // namespace hmi_levels
+
+namespace time_keys {
+const char* millisecond = "millisecond";
+const char* second = "second";
+const char* minute = "minute";
+const char* hour = "hour";
+const char* day = "day";
+const char* month = "month";
+const char* year = "year";
+} // namespace time_keys
namespace hmi_request {
const char* parent_id = "parentID";
@@ -426,6 +453,7 @@ const char* dtc = "dtc";
const char* ecu_header = "ecuHeader";
const char* image_capabilities = "imageCapabilities";
const char* display_type = "displayType";
+const char* display_name = "displayName";
const char* text_fields = "textFields";
const char* media_clock_formats = "mediaClockFormats";
const char* graphic_supported = "graphicSupported";
@@ -436,7 +464,7 @@ const char* num_custom_presets_available = "numCustomPresetsAvailable";
const char* urls = "urls";
const char* policy_app_id = "policyAppID";
const char* enabled = "enabled";
-
+const char* system_time = "systemTime";
} // namespace hmi_response
namespace hmi_notification {
@@ -451,7 +479,6 @@ const char* policyfile = "policyfile";
const char* is_active = "isActive";
const char* is_deactivated = "isDeactivated";
const char* event_name = "eventName";
-
} // namespace hmi_notification
} // namespace application_manager
diff --git a/src/components/application_manager/src/state_controller_impl.cc b/src/components/application_manager/src/state_controller_impl.cc
index 84081a3830..1a1e5543df 100644
--- a/src/components/application_manager/src/state_controller_impl.cc
+++ b/src/components/application_manager/src/state_controller_impl.cc
@@ -31,7 +31,9 @@
*/
#include "application_manager/state_controller_impl.h"
+#include <tuple>
#include "application_manager/usage_statistics.h"
+#include "application_manager/rpc_service.h"
#include "utils/helpers.h"
#include "utils/make_shared.h"
#include "connection_handler/connection_handler.h"
@@ -40,15 +42,18 @@ namespace application_manager {
CREATE_LOGGERPTR_GLOBAL(logger_, "StateControllerImpl")
-bool IsStatusChanged(HmiStatePtr old_state, HmiStatePtr new_state) {
- if (old_state->hmi_level() != new_state->hmi_level() ||
- old_state->audio_streaming_state() !=
- new_state->audio_streaming_state() ||
- old_state->system_context() != new_state->system_context()) {
- return true;
- }
- return false;
+namespace {
+bool IsStateChanged(const HmiState& old_state, const HmiState& new_state) {
+ return std::make_tuple(old_state.hmi_level(),
+ old_state.audio_streaming_state(),
+ old_state.video_streaming_state(),
+ old_state.system_context()) !=
+ std::make_tuple(new_state.hmi_level(),
+ new_state.audio_streaming_state(),
+ new_state.video_streaming_state(),
+ new_state.system_context());
}
+} // unnamed namespace
StateControllerImpl::StateControllerImpl(ApplicationManager& app_mngr)
: EventObserver(app_mngr.event_dispatcher()), app_mngr_(app_mngr) {
@@ -64,20 +69,20 @@ StateControllerImpl::StateControllerImpl(ApplicationManager& app_mngr)
void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
HmiStatePtr state,
const bool send_activate_app) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(state);
- DCHECK_OR_RETURN_VOID(state->state_id() == HmiState::STATE_ID_REGULAR);
+ DCHECK_OR_RETURN_VOID(HmiState::STATE_ID_REGULAR == state->state_id());
+
+ LOG4CXX_DEBUG(logger_, "Set regular state " << *state);
if (state->hmi_level() == mobile_apis::HMILevel::INVALID_ENUM ||
state->audio_streaming_state() ==
mobile_apis::AudioStreamingState::INVALID_ENUM ||
+ state->video_streaming_state() ==
+ mobile_apis::VideoStreamingState::INVALID_ENUM ||
state->system_context() == mobile_apis::SystemContext::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "Get invalid state");
+ LOG4CXX_ERROR(logger_, "Got invalid state");
return;
}
@@ -91,7 +96,8 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
app->SetPostponedState(state);
return;
}
- hmi_apis::Common_HMILevel::eType hmi_level =
+ LOG4CXX_DEBUG(logger_, "Resolved state: " << *resolved_state);
+ const hmi_apis::Common_HMILevel::eType hmi_level =
static_cast<hmi_apis::Common_HMILevel::eType>(
resolved_state->hmi_level());
@@ -100,7 +106,7 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
if (-1 != corr_id) {
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_ActivateApp,
corr_id);
- waiting_for_activate[app->app_id()] = resolved_state;
+ waiting_for_activate_[app->app_id()] = resolved_state;
return;
}
LOG4CXX_ERROR(logger_, "Unable to send BC.ActivateApp");
@@ -113,13 +119,10 @@ void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const bool send_activate_app) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_regular = app->RegularHmiState();
DCHECK_OR_RETURN_VOID(prev_regular);
HmiStatePtr hmi_state =
@@ -127,6 +130,7 @@ void StateControllerImpl::SetRegularState(
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(hmi_level);
hmi_state->set_audio_streaming_state(audio_state);
+ hmi_state->set_video_streaming_state(video_state);
hmi_state->set_system_context(prev_regular->system_context());
SetRegularState(app, hmi_state, send_activate_app);
}
@@ -136,19 +140,15 @@ void StateControllerImpl::SetRegularState(
const mobile_apis::HMILevel::eType hmi_level,
const bool send_activate_app) {
using namespace mobile_apis;
- using namespace helpers;
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
const HmiStatePtr hmi_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(hmi_level);
hmi_state->set_audio_streaming_state(CalcAudioState(app, hmi_level));
+ hmi_state->set_video_streaming_state(CalcVideoState(app, hmi_level));
hmi_state->set_system_context(SystemContext::SYSCTXT_MAIN);
SetRegularState(app, hmi_state, send_activate_app);
}
@@ -157,37 +157,32 @@ void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const mobile_apis::SystemContext::eType system_context,
const bool send_activate_app) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
HmiStatePtr hmi_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(hmi_level);
hmi_state->set_audio_streaming_state(audio_state);
+ hmi_state->set_video_streaming_state(video_state);
hmi_state->set_system_context(system_context);
SetRegularState(app, hmi_state, send_activate_app);
}
void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app, const mobile_apis::HMILevel::eType hmi_level) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_state = app->RegularHmiState();
HmiStatePtr hmi_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(hmi_level);
hmi_state->set_audio_streaming_state(CalcAudioState(app, hmi_level));
+ hmi_state->set_video_streaming_state(CalcVideoState(app, hmi_level));
hmi_state->set_system_context(prev_state
? prev_state->system_context()
: mobile_apis::SystemContext::SYSCTXT_MAIN);
@@ -197,12 +192,8 @@ void StateControllerImpl::SetRegularState(
void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app,
const mobile_apis::SystemContext::eType system_context) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_regular = app->RegularHmiState();
DCHECK_OR_RETURN_VOID(prev_regular);
HmiStatePtr hmi_state =
@@ -211,19 +202,18 @@ void StateControllerImpl::SetRegularState(
hmi_state->set_hmi_level(prev_regular->hmi_level());
hmi_state->set_audio_streaming_state(
CalcAudioState(app, prev_regular->hmi_level()));
+ hmi_state->set_video_streaming_state(
+ CalcVideoState(app, prev_regular->hmi_level()));
hmi_state->set_system_context(system_context);
SetRegularState(app, hmi_state, false);
}
void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app,
- const mobile_apis::AudioStreamingState::eType audio_state) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state) {
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_state = app->RegularHmiState();
DCHECK_OR_RETURN_VOID(prev_state);
HmiStatePtr hmi_state =
@@ -231,18 +221,15 @@ void StateControllerImpl::SetRegularState(
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(prev_state->hmi_level());
hmi_state->set_audio_streaming_state(audio_state);
+ hmi_state->set_video_streaming_state(video_state);
hmi_state->set_system_context(prev_state->system_context());
SetRegularState(app, hmi_state, false);
}
void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
HmiStatePtr state) {
- CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer");
- return;
- }
+ DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(state);
if (mobile_apis::HMILevel::HMI_FULL == state->hmi_level()) {
SetRegularState(app, state, true);
@@ -251,84 +238,178 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
}
}
-void StateControllerImpl::HmiLevelConflictResolver::operator()(
- ApplicationSharedPtr to_resolve) {
- using namespace mobile_apis;
+namespace {
+
+/**
+ * @brief IsStreamableHMILevel checks whether the HMI level
+ * supports audio/video streaming.
+ * @param val HMI level
+ * @return true if streamable, false otherwise
+ */
+bool IsStreamableHMILevel(mobile_apis::HMILevel::eType val) {
using namespace helpers;
+ return Compare<mobile_apis::HMILevel::eType, EQ, ONE>(
+ val, mobile_apis::HMILevel::HMI_FULL, mobile_apis::HMILevel::HMI_LIMITED);
+}
+
+/**
+ * @brief IsSameAudioAppType checks whether the both applications:
+ * 1) belongs to exact HMI type that may stream audio without
+ * 'isMediaApplication' parameter set to true ('NAVIGATION', 'COMMUNICATION')
+ * 2) belongs to other HMI types with parameter 'isMediaApplication'
+ * is set to true.
+ * 3) are not media.
+ * @param app1 1st application
+ * @param app2 2nd application
+ * @return true if audio applications have same application HMI type
+ */
+bool IsSameAudioAppType(const Application& app1, const Application& app2) {
+ const auto is_only_media_app_type = [](const Application& app) {
+ return app.is_media_application() && !app.is_navi() &&
+ !app.is_voice_communication_supported();
+ };
+
+ const bool both_navi = app1.is_navi() && app2.is_navi();
+ const bool both_vc = app1.is_voice_communication_supported() &&
+ app2.is_voice_communication_supported();
+ const bool both_media =
+ is_only_media_app_type(app1) && is_only_media_app_type(app2);
+ const bool both_other =
+ !app1.IsAudioApplication() && !app2.IsAudioApplication();
+ const bool same_app_audio_type =
+ both_navi || both_vc || both_media || both_other;
+
+ return same_app_audio_type;
+}
+} // unnamed namespace
+
+void StateControllerImpl::HmiLevelConflictResolver::operator()(
+ ApplicationSharedPtr app_to_resolve) {
+ DCHECK_OR_RETURN_VOID(app_to_resolve);
DCHECK_OR_RETURN_VOID(state_ctrl_);
- if (to_resolve == applied_)
+ DCHECK_OR_RETURN_VOID(applied_);
+ DCHECK_OR_RETURN_VOID(state_);
+
+ if (applied_ == app_to_resolve) {
+ // Same app. Nothing to resolve
return;
- HmiStatePtr cur_state = to_resolve->RegularHmiState();
-
- const bool applied_grabs_audio =
- Compare<HMILevel::eType, EQ, ONE>(
- state_->hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED) &&
- applied_->IsAudioApplication();
- const bool applied_grabs_full = state_->hmi_level() == HMILevel::HMI_FULL;
- const bool to_resolve_handles_full =
- cur_state->hmi_level() == HMILevel::HMI_FULL;
- const bool to_resolve_handles_audio =
- Compare<HMILevel::eType, EQ, ONE>(
- cur_state->hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED) &&
- to_resolve->IsAudioApplication();
- const bool same_app_type = state_ctrl_->IsSameAppType(applied_, to_resolve);
-
- // If applied Hmi state is FULL:
- // all not audio applications will get BACKGROUND
- // all applications with same HMI type will get BACKGROUND
- // all audio applications with other HMI type(navi, vc, media) in FULL will
- // get LIMMITED HMI level
-
- // If applied Hmi state is LIMITED:
- // all applications with other HMI types will save HMI states
- // all not audio applications will save HMI states
- // all applications with same HMI type will get BACKGROUND
-
- // If applied Hmi state is BACKGROUND:
- // all applications will save HMI states
-
- HMILevel::eType result_hmi_level = cur_state->hmi_level();
- if (applied_grabs_full && to_resolve_handles_audio && !same_app_type)
- result_hmi_level = HMILevel::HMI_LIMITED;
-
- if ((applied_grabs_full && to_resolve_handles_full &&
- !to_resolve->IsAudioApplication()) ||
- (applied_grabs_audio && to_resolve_handles_audio && same_app_type))
- result_hmi_level = HMILevel::HMI_BACKGROUND;
-
- if (cur_state->hmi_level() != result_hmi_level) {
+ }
+
+ const HmiStatePtr state_to_resolve = app_to_resolve->RegularHmiState();
+ DCHECK_OR_RETURN_VOID(state_to_resolve);
+
+ // If applied HMI state is FULL:
+ // - all NOT audio/video applications becomes 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
+ //
+ // 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
+
+ if (!IsStreamableHMILevel(state_->hmi_level())) {
+ LOG4CXX_DEBUG(logger_,
+ "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 "
+ << state_to_resolve->hmi_level()
+ << " is NOT streamable. Exit.");
+ return;
+ }
+
+ // Applied app constants
+ const auto applied_hmi_level = state_->hmi_level();
+
+ const bool applied_grabs_video =
+ IsStreamableHMILevel(applied_hmi_level) && applied_->IsVideoApplication();
+
+ // App to resolve constants
+ const auto to_resolve_hmi_level = state_to_resolve->hmi_level();
+
+ const bool to_resolve_grabs_audio =
+ IsStreamableHMILevel(to_resolve_hmi_level) &&
+ app_to_resolve->IsAudioApplication();
+
+ const bool to_resolve_grabs_video =
+ IsStreamableHMILevel(to_resolve_hmi_level) &&
+ app_to_resolve->IsVideoApplication();
+
+ // Compatibility constants
+ const bool same_app_audio_type =
+ IsSameAudioAppType(*applied_, *app_to_resolve);
+
+ // Result variables
+ mobile_apis::VideoStreamingState::eType result_video_state =
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+ mobile_apis::AudioStreamingState::eType result_audio_state =
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE;
+
+ if (to_resolve_grabs_audio && !same_app_audio_type) {
+ result_audio_state = mobile_apis::AudioStreamingState::AUDIBLE;
+ }
+
+ if (to_resolve_grabs_video && !applied_grabs_video) {
+ result_video_state = mobile_apis::VideoStreamingState::STREAMABLE;
+ }
+
+ mobile_apis::HMILevel::eType result_hmi_level = state_to_resolve->hmi_level();
+
+ using namespace helpers;
+ if (mobile_apis::VideoStreamingState::STREAMABLE == result_video_state ||
+ Compare<mobile_apis::AudioStreamingState::eType, EQ, ONE>(
+ result_audio_state,
+ mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::AudioStreamingState::ATTENUATED)) {
+ result_hmi_level = mobile_apis::HMILevel::HMI_LIMITED;
+ } else {
+ result_hmi_level = mobile_apis::HMILevel::HMI_BACKGROUND;
+ }
+
+ if (std::make_tuple(to_resolve_hmi_level,
+ state_to_resolve->audio_streaming_state(),
+ state_to_resolve->video_streaming_state()) !=
+ std::make_tuple(
+ result_hmi_level, result_audio_state, result_video_state)) {
LOG4CXX_DEBUG(logger_,
- "Application " << to_resolve->app_id()
- << " will change HMI level to "
- << result_hmi_level);
- state_ctrl_->SetupRegularHmiState(to_resolve,
+ "Application "
+ << app_to_resolve->app_id() << " will change state to: "
+ << "HMI level " << to_resolve_hmi_level << " --> "
+ << result_hmi_level << ", audio "
+ << state_to_resolve->audio_streaming_state() << " --> "
+ << result_audio_state << ", video "
+ << state_to_resolve->video_streaming_state() << " --> "
+ << result_video_state);
+ state_ctrl_->SetupRegularHmiState(app_to_resolve,
result_hmi_level,
- result_hmi_level == HMILevel::HMI_LIMITED
- ? AudioStreamingState::AUDIBLE
- : AudioStreamingState::NOT_AUDIBLE);
+ result_audio_state,
+ result_video_state);
} else {
LOG4CXX_DEBUG(logger_,
- "Application " << to_resolve->app_id()
- << " will not change HMI level");
+ "Application " << app_to_resolve->app_id()
+ << " will NOT change HMI level");
}
}
HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
HmiStatePtr state) const {
using namespace mobile_apis;
- using namespace helpers;
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "State to resolve: hmi_level "
- << state->hmi_level() << ", audio_state "
- << state->audio_streaming_state() << ", system_context "
- << state->system_context());
+ LOG4CXX_DEBUG(logger_, "State to resolve: " << *state);
HmiStatePtr available_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
DCHECK_OR_RETURN(available_state, HmiStatePtr());
available_state->set_hmi_level(state->hmi_level());
available_state->set_audio_streaming_state(state->audio_streaming_state());
+ available_state->set_video_streaming_state(state->video_streaming_state());
available_state->set_system_context(state->system_context());
if (app->is_resuming()) {
@@ -337,6 +418,8 @@ HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
available_state->set_hmi_level(available_level);
available_state->set_audio_streaming_state(
CalcAudioState(app, available_level));
+ available_state->set_video_streaming_state(
+ CalcVideoState(app, available_level));
}
return IsStateAvailable(app, available_state) ? available_state
: HmiStatePtr();
@@ -345,11 +428,8 @@ HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app,
HmiStatePtr state) const {
LOG4CXX_AUTO_TRACE(logger_);
- using namespace helpers;
using namespace mobile_apis;
- if (!app->is_resuming() ||
- !Compare<HMILevel::eType, EQ, ONE>(
- state->hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
+ if (!app->is_resuming() || !IsStreamableHMILevel(state->hmi_level())) {
LOG4CXX_DEBUG(logger_, "Application is not in resuming mode.");
return true;
}
@@ -375,20 +455,17 @@ bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
ApplicationSharedPtr app, mobile_apis::HMILevel::eType hmi_level) const {
- using namespace mobile_apis;
- using namespace helpers;
LOG4CXX_AUTO_TRACE(logger_);
mobile_apis::HMILevel::eType result = hmi_level;
- if (!Compare<HMILevel::eType, EQ, ONE>(
- hmi_level, HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
+ if (!IsStreamableHMILevel(hmi_level)) {
return result;
}
const bool is_audio_app = app->IsAudioApplication();
const bool does_audio_app_with_same_type_exist =
app_mngr_.IsAppTypeExistsInFullOrLimited(app);
- if (HMILevel::HMI_LIMITED == hmi_level) {
+ if (mobile_apis::HMILevel::HMI_LIMITED == hmi_level) {
if (!is_audio_app || does_audio_app_with_same_type_exist) {
result = app_mngr_.GetDefaultHmiLevel(app);
}
@@ -424,13 +501,8 @@ mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
bool StateControllerImpl::IsStateAvailable(ApplicationSharedPtr app,
HmiStatePtr state) const {
using namespace mobile_apis;
- using namespace helpers;
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Checking state: hmi_level "
- << state->hmi_level() << ", audio_state "
- << state->audio_streaming_state() << ", system_context "
- << state->system_context());
+ LOG4CXX_DEBUG(logger_, "Checking state: " << *state);
if (app->is_resuming()) {
return IsStateAvailableForResumption(app, state);
@@ -454,11 +526,8 @@ bool StateControllerImpl::IsStateAvailableForResumption(
ApplicationSharedPtr app, HmiStatePtr state) const {
LOG4CXX_AUTO_TRACE(logger_);
using namespace mobile_apis;
- using namespace helpers;
- if (!app->is_resuming() ||
- !Compare<HMILevel::eType, EQ, ONE>(
- state->hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
+ if (!app->is_resuming() || !IsStreamableHMILevel(state->hmi_level())) {
LOG4CXX_DEBUG(logger_,
"Application is not in resuming mode."
<< " Requested state is available");
@@ -492,20 +561,17 @@ bool StateControllerImpl::IsStateAvailableForResumption(
void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
HmiStatePtr state) {
- namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ using namespace mobile_apis;
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(state);
- LOG4CXX_DEBUG(logger_,
- "hmi_level " << state->hmi_level() << ", audio_state "
- << state->audio_streaming_state()
- << ", system_context " << state->system_context());
+ LOG4CXX_DEBUG(logger_, "Setup regular state: " << *state);
HmiStatePtr curr_state = app->CurrentHmiState();
HmiStatePtr old_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
DCHECK_OR_RETURN_VOID(old_state);
old_state->set_hmi_level(curr_state->hmi_level());
old_state->set_audio_streaming_state(curr_state->audio_streaming_state());
+ old_state->set_video_streaming_state(curr_state->video_streaming_state());
old_state->set_system_context(curr_state->system_context());
app->SetRegularState(state);
@@ -524,10 +590,8 @@ void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
void StateControllerImpl::SetupRegularHmiState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
- const mobile_apis::AudioStreamingState::eType audio_state) {
- namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
- using helpers::Compare;
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_state = app->RegularHmiState();
@@ -537,6 +601,7 @@ void StateControllerImpl::SetupRegularHmiState(
DCHECK_OR_RETURN_VOID(new_state);
new_state->set_hmi_level(hmi_level);
new_state->set_audio_streaming_state(audio_state);
+ new_state->set_video_streaming_state(video_state);
new_state->set_system_context(prev_state->system_context());
SetupRegularHmiState(app, new_state);
}
@@ -547,28 +612,12 @@ void StateControllerImpl::ApplyRegularState(ApplicationSharedPtr app,
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() << " state " << *state);
SetupRegularHmiState(app, state);
- ForEachApplication<HmiLevelConflictResolver>(
- HmiLevelConflictResolver(app, state, this));
-}
-
-bool StateControllerImpl::IsSameAppType(ApplicationConstSharedPtr app1,
- ApplicationConstSharedPtr app2) {
- const bool both_media =
- app1->is_media_application() && app2->is_media_application();
-
- const bool both_navi = app1->is_navi() && app2->is_navi();
-
- const bool both_vc = app1->is_voice_communication_supported() &&
- app2->is_voice_communication_supported();
-
- const bool both_simple =
- !app1->IsAudioApplication() && !app2->IsAudioApplication();
-
- const bool both_projection =
- app1->mobile_projection_enabled() && app2->mobile_projection_enabled();
-
- return both_simple || both_media || both_navi || both_vc || both_projection;
+ LOG4CXX_DEBUG(logger_,
+ "Resolving HMI level conflicts for app " << app->app_id());
+ ForEachApplication(HmiLevelConflictResolver(app, state, this));
}
void StateControllerImpl::on_event(const event_engine::Event& event) {
@@ -615,7 +664,7 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
const uint32_t id =
message[strings::msg_params][hmi_notification::event_name].asUInt();
// TODO(AOleynik): Add verification/conversion check here
- Common_EventTypes::eType state_id =
+ const Common_EventTypes::eType state_id =
static_cast<Common_EventTypes::eType>(id);
if (is_active) {
if (Common_EventTypes::AUDIO_SOURCE == state_id) {
@@ -660,6 +709,9 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
break;
}
}
+
+ LOG4CXX_WARN(logger_,
+ "Couldn't recognize state id (val='" << state_id << "')");
break;
}
default:
@@ -674,17 +726,9 @@ void StateControllerImpl::OnStateChanged(ApplicationSharedPtr app,
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(old_state);
DCHECK_OR_RETURN_VOID(new_state);
- LOG4CXX_DEBUG(logger_,
- "old: hmi_level " << old_state->hmi_level() << ", audio_state "
- << old_state->audio_streaming_state()
- << ", system_context "
- << old_state->system_context());
- LOG4CXX_DEBUG(logger_,
- "new: hmi_level " << new_state->hmi_level() << ", audio_state "
- << new_state->audio_streaming_state()
- << ", system_context "
- << new_state->system_context());
- if (IsStatusChanged(old_state, new_state)) {
+ LOG4CXX_DEBUG(logger_, "Old state: " << *old_state);
+ LOG4CXX_DEBUG(logger_, "New state: " << *new_state);
+ if (IsStateChanged(*old_state, *new_state)) {
app_mngr_.SendHMIStatusNotification(app);
if (new_state->hmi_level() == mobile_apis::HMILevel::HMI_NONE) {
app->ResetDataInNone();
@@ -693,15 +737,13 @@ void StateControllerImpl::OnStateChanged(ApplicationSharedPtr app,
app->app_id(), old_state->hmi_level(), new_state->hmi_level());
app->usage_report().RecordHmiStateChanged(new_state->hmi_level());
} else {
- LOG4CXX_ERROR(logger_, "Status not changed");
+ LOG4CXX_ERROR(logger_, "State has NOT been changed.");
}
}
-bool StateControllerImpl::IsTempStateActive(HmiState::StateID ID) const {
+bool StateControllerImpl::IsTempStateActive(HmiState::StateID id) const {
sync_primitives::AutoLock autolock(active_states_lock_);
- StateIDList::const_iterator itr =
- std::find(active_states_.begin(), active_states_.end(), ID);
- return active_states_.end() != itr;
+ return helpers::in_range(active_states_, id);
}
void StateControllerImpl::OnApplicationRegistered(
@@ -713,23 +755,25 @@ void StateControllerImpl::OnApplicationRegistered(
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
- active_states_lock_.Acquire();
- StateIDList::iterator it = active_states_.begin();
- for (; it != active_states_.end(); ++it) {
- HmiStatePtr new_state = CreateHmiState(app, *it);
- DCHECK_OR_RETURN_VOID(new_state);
- DCHECK_OR_RETURN_VOID(new_state->state_id() != HmiState::STATE_ID_REGULAR);
- HmiStatePtr old_hmi_state = app->CurrentHmiState();
- new_state->set_parent(old_hmi_state);
- app->AddHMIState(new_state);
+ {
+ sync_primitives::AutoLock lck(active_states_lock_);
+ for (const auto state_id : active_states_) {
+ HmiStatePtr new_state = CreateHmiState(app, state_id);
+ DCHECK_OR_RETURN_VOID(new_state);
+ DCHECK_OR_RETURN_VOID(new_state->state_id() !=
+ HmiState::STATE_ID_REGULAR);
+ HmiStatePtr old_hmi_state = app->CurrentHmiState();
+ new_state->set_parent(old_hmi_state);
+ app->AddHMIState(new_state);
+ }
}
- active_states_lock_.Release();
HmiStatePtr default_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
DCHECK_OR_RETURN_VOID(default_state);
default_state->set_hmi_level(default_level);
default_state->set_audio_streaming_state(CalcAudioState(app, default_level));
+ default_state->set_video_streaming_state(CalcVideoState(app, default_level));
default_state->set_system_context(SystemContext::SYSCTXT_MAIN);
HmiStatePtr initial_state = app->RegularHmiState();
@@ -758,7 +802,7 @@ int64_t StateControllerImpl::SendBCActivateApp(
LOG4CXX_ERROR(logger_, "Unable to create BC.ActivateAppRequest");
return -1;
}
- if (!app_mngr_.ManageHMICommand(bc_activate_app_request)) {
+ if (!app_mngr_.GetRPCService().ManageHMICommand(bc_activate_app_request)) {
LOG4CXX_ERROR(logger_, "Unable to send BC.ActivateAppRequest");
return -1;
}
@@ -778,16 +822,18 @@ void StateControllerImpl::ApplyPostponedStateForApp(ApplicationSharedPtr app) {
}
}
-void StateControllerImpl::TempStateStarted(HmiState::StateID ID) {
+void StateControllerImpl::TempStateStarted(HmiState::StateID id) {
LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock autolock(active_states_lock_);
- StateIDList::iterator it =
- std::find(active_states_.begin(), active_states_.end(), ID);
- if (it == active_states_.end()) {
- active_states_.push_back(ID);
- } else {
- LOG4CXX_ERROR(logger_, "StateID " << ID << " is already active");
+
+ {
+ sync_primitives::AutoLock autolock(active_states_lock_);
+ if (!helpers::in_range(active_states_, id)) {
+ active_states_.push_back(id);
+ return;
+ }
}
+
+ LOG4CXX_ERROR(logger_, "StateID '" << id << "' is already active");
}
void StateControllerImpl::TempStateStopped(HmiState::StateID ID) {
@@ -805,16 +851,34 @@ void StateControllerImpl::DeactivateApp(ApplicationSharedPtr app) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
- HmiStatePtr regular = app->RegularHmiState();
+ const HmiStatePtr regular = app->RegularHmiState();
DCHECK_OR_RETURN_VOID(regular);
HmiStatePtr new_regular = utils::MakeShared<HmiState>(*regular);
- if (app->IsAudioApplication()) {
+ LOG4CXX_DEBUG(logger_, "Current HMI level: '" << app->hmi_level() << "'");
+ const bool is_audio_app = app->IsAudioApplication();
+ const bool is_video_app = app->IsVideoApplication();
+
+ if (is_audio_app || is_video_app) {
+ // audio or video app move to HMI level limited
new_regular->set_hmi_level(HMILevel::HMI_LIMITED);
- new_regular->set_audio_streaming_state(AudioStreamingState::AUDIBLE);
+
+ if (is_audio_app) {
+ new_regular->set_audio_streaming_state(AudioStreamingState::AUDIBLE);
+ } else {
+ new_regular->set_audio_streaming_state(AudioStreamingState::NOT_AUDIBLE);
+ }
+
+ if (is_video_app) {
+ new_regular->set_video_streaming_state(VideoStreamingState::STREAMABLE);
+ } else {
+ new_regular->set_video_streaming_state(
+ VideoStreamingState::NOT_STREAMABLE);
+ }
} else {
new_regular->set_hmi_level(HMILevel::HMI_BACKGROUND);
new_regular->set_audio_streaming_state(AudioStreamingState::NOT_AUDIBLE);
+ new_regular->set_video_streaming_state(VideoStreamingState::NOT_STREAMABLE);
}
SetRegularState(app, new_regular, false);
@@ -831,7 +895,7 @@ void StateControllerImpl::OnActivateAppResponse(
ApplicationSharedPtr application =
app_mngr_.application_by_hmi_app(hmi_app_id);
if (application && hmi_apis::Common_Result::SUCCESS == code) {
- HmiStatePtr pending_state = waiting_for_activate[application->app_id()];
+ HmiStatePtr pending_state = waiting_for_activate_[application->app_id()];
DCHECK_OR_RETURN_VOID(pending_state);
ApplyRegularState(application, pending_state);
}
@@ -854,9 +918,7 @@ void StateControllerImpl::OnAppActivated(
void StateControllerImpl::OnAppDeactivated(
const smart_objects::SmartObject& message) {
- using namespace hmi_apis;
using namespace mobile_apis;
- using namespace helpers;
LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = message[strings::msg_params][strings::app_id].asUInt();
@@ -875,12 +937,22 @@ void StateControllerImpl::OnAppDeactivated(
DeactivateApp(app);
}
-void StateControllerImpl::OnNaviStreamingStarted() {
- ApplyTempState<HmiState::STATE_ID_NAVI_STREAMING>();
+void StateControllerImpl::OnVideoStreamingStarted(
+ ApplicationConstSharedPtr app) {
+ if (app->is_navi()) {
+ ApplyTempState<HmiState::STATE_ID_NAVI_STREAMING>();
+ } else {
+ ApplyTempState<HmiState::STATE_ID_VIDEO_STREAMING>();
+ }
}
-void StateControllerImpl::OnNaviStreamingStopped() {
- CancelTempState<HmiState::STATE_ID_NAVI_STREAMING>();
+void StateControllerImpl::OnVideoStreamingStopped(
+ ApplicationConstSharedPtr app) {
+ if (app->is_navi()) {
+ CancelTempState<HmiState::STATE_ID_NAVI_STREAMING>();
+ } else {
+ CancelTempState<HmiState::STATE_ID_VIDEO_STREAMING>();
+ }
}
bool StateControllerImpl::IsStateActive(HmiState::StateID state_id) const {
@@ -917,6 +989,10 @@ HmiStatePtr StateControllerImpl::CreateHmiState(
new_state = MakeShared<TTSHmiState>(app, app_mngr_);
break;
}
+ case HmiState::STATE_ID_VIDEO_STREAMING: {
+ new_state = MakeShared<VideoStreamingHmiState>(app, app_mngr_);
+ break;
+ }
case HmiState::STATE_ID_NAVI_STREAMING: {
new_state = MakeShared<NaviStreamingHmiState>(app, app_mngr_);
break;
@@ -952,20 +1028,31 @@ HmiStatePtr StateControllerImpl::CreateHmiState(
mobile_apis::AudioStreamingState::eType StateControllerImpl::CalcAudioState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level) const {
- namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
- using helpers::Compare;
- using helpers::EQ;
- using helpers::ONE;
-
- AudioStreamingState::eType audio_state = AudioStreamingState::NOT_AUDIBLE;
- if (Compare<HMILevel::eType, EQ, ONE>(
- hmi_level, HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
- if (app->IsAudioApplication()) {
- audio_state = AudioStreamingState::AUDIBLE;
- }
+ auto state = mobile_apis::AudioStreamingState::NOT_AUDIBLE;
+ if (IsStreamableHMILevel(hmi_level) && app->IsAudioApplication()) {
+ state = mobile_apis::AudioStreamingState::AUDIBLE;
}
- return audio_state;
+
+ LOG4CXX_DEBUG(logger_,
+ "Calculated audio state of app "
+ << app->app_id() << " for " << hmi_level << " HMI level is "
+ << state);
+ return state;
+}
+
+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()) {
+ state = mobile_apis::VideoStreamingState::STREAMABLE;
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Calculated video state of app "
+ << app->app_id() << " for " << hmi_level << " HMI level is "
+ << state);
+ return state;
}
} // 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
new file mode 100644
index 0000000000..6ae6d3e901
--- /dev/null
+++ b/src/components/application_manager/src/system_time/system_time_handler_impl.cc
@@ -0,0 +1,173 @@
+/*
+ * 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 "application_manager/system_time/system_time_handler_impl.h"
+
+#include <algorithm>
+
+#include "application_manager/message_helper.h"
+#include "application_manager/smart_object_keys.h"
+#include "interfaces/HMI_API.h"
+#include "utils/logger.h"
+
+namespace application_manager {
+
+SystemTimeHandlerImpl::SystemTimeHandlerImpl(
+ ApplicationManager& application_manager)
+ : event_engine::EventObserver(application_manager.event_dispatcher())
+ , utc_time_can_be_received_(false)
+ , awaiting_get_system_time_(false)
+ , system_time_listener_(NULL)
+ , app_manager_(application_manager) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ subscribe_on_event(
+ hmi_apis::FunctionID::BasicCommunication_OnSystemTimeReady);
+}
+
+SystemTimeHandlerImpl::~SystemTimeHandlerImpl() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ unsubscribe_from_all_events();
+}
+
+void SystemTimeHandlerImpl::DoSystemTimeQuery() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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.");
+ return;
+ }
+ SendTimeRequest();
+}
+
+void SystemTimeHandlerImpl::DoSubscribe(utils::SystemTimeListener* listener) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ DCHECK(listener);
+ sync_primitives::AutoLock lock(system_time_listener_lock_);
+ system_time_listener_ = listener;
+}
+
+void SystemTimeHandlerImpl::DoUnsubscribe(utils::SystemTimeListener* listener) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(system_time_listener_lock_);
+ system_time_listener_ = NULL;
+}
+
+time_t SystemTimeHandlerImpl::FetchSystemTime() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return last_time_;
+}
+
+bool SystemTimeHandlerImpl::utc_time_can_be_received() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(state_lock_);
+ return utc_time_can_be_received_;
+}
+
+void SystemTimeHandlerImpl::SendTimeRequest() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (awaiting_get_system_time_) {
+ LOG4CXX_WARN(logger_, "Another GetSystemTime request in progress. Skipped");
+ return;
+ }
+
+ using namespace application_manager;
+ uint32_t correlation_id = app_manager_.GetNextHMICorrelationID();
+ subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_GetSystemTime,
+ correlation_id);
+ MessageHelper::SendGetSystemTimeRequest(correlation_id, app_manager_);
+ awaiting_get_system_time_ = true;
+}
+
+void SystemTimeHandlerImpl::on_event(
+ const application_manager::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace application_manager;
+ using namespace hmi_apis::FunctionID;
+ switch (event.id()) {
+ case BasicCommunication_OnSystemTimeReady:
+ ProcessSystemTimeReadyNotification();
+ break;
+ case BasicCommunication_GetSystemTime:
+ ProcessSystemTimeResponse(event);
+ break;
+ default:
+ LOG4CXX_ERROR(logger_, "Unknown Event received");
+ break;
+ }
+}
+
+void SystemTimeHandlerImpl::ProcessSystemTimeReadyNotification() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(state_lock_);
+ utc_time_can_be_received_ = true;
+ unsubscribe_from_event(
+ hmi_apis::FunctionID::BasicCommunication_OnSystemTimeReady);
+}
+
+void SystemTimeHandlerImpl::ProcessSystemTimeResponse(
+ const application_manager::event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+ const smart_objects::SmartObject& system_time_so =
+ message[strings::msg_params][hmi_response::system_time];
+
+ struct tm system_time;
+ memset(&system_time, 0, sizeof(struct tm));
+
+ system_time.tm_sec = system_time_so[time_keys::second].asInt();
+ system_time.tm_min = system_time_so[time_keys::minute].asInt();
+ // According to tm specification of tm type hour should be decreased by 1
+ system_time.tm_hour = system_time_so[time_keys::hour].asInt() - 1;
+ system_time.tm_mday = system_time_so[time_keys::day].asInt();
+ // According to tm specification of tm type mon should be decreased by 1
+ system_time.tm_mon = system_time_so[time_keys::month].asInt() - 1;
+ // According to tm specification of tm type
+ // tm_year - number of years since 1900
+ system_time.tm_year = system_time_so[time_keys::year].asInt() - 1900;
+
+ // Normalize and convert time from 'tm' format to 'time_t'
+ last_time_ = mktime(&system_time);
+
+ sync_primitives::AutoLock lock(system_time_listener_lock_);
+ if (system_time_listener_) {
+ system_time_listener_->OnSystemTimeArrived(last_time_);
+ }
+ sync_primitives::AutoLock state_lock(state_lock_);
+ awaiting_get_system_time_ = false;
+}
+
+} // namespace application_manager
diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt
index a6a42aee66..33fc4a4ebd 100755
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -70,18 +70,12 @@ set(testSources
set(testSourcesMockHmi
${AM_SOURCE_DIR}/src/message_helper/message_helper.cc
${AM_TEST_DIR}/application_manager_impl_mock_hmi_test.cc
- ${AM_TEST_DIR}/mock_hmi_command_factory.cc
)
-set(testSourcesHelpPromptManager
-${AM_TEST_DIR}/help_prompt_manager_test.cc
-${AM_TEST_DIR}/mock_message_helper.cc
+set(testSourcesHelpPromptManager
+ ${AM_TEST_DIR}/help_prompt_manager_test.cc
+ ${AM_TEST_DIR}/mock_message_helper.cc
)
-
-if(REMOTE_CONTROL)
- list(APPEND testSources ${AM_TEST_DIR}/rc_policy_handler_test.cc)
-endif(REMOTE_CONTROL)
-
set (RequestController_SOURCES
${AM_TEST_DIR}/request_controller/request_controller_test.cc
${AM_TEST_DIR}/mock_message_helper.cc
@@ -139,11 +133,11 @@ set(CMAKE_EXE_LINKER_FLAGS
)
create_test("application_manager_test" "${testSources}" "${LIBRARIES}")
create_test("application_manager_mock_hmi_test" "${testSourcesMockHmi}" "${LIBRARIES}")
-add_dependencies("application_manager_test" libbson)
+#add_dependencies("application_manager_test" libbson)
create_test("help_prompt_manager_test" "${testSourcesHelpPromptManager}" "${LIBRARIES}")
-create_test("request_controller_test" "${testSourcesHelpPromptManager}" "${LIBRARIES}")
+create_test("request_controller_test" "${RequestController_SOURCES}" "${LIBRARIES}")
set(ResumptionData_SOURCES
${AM_TEST_DIR}/resumption/resumption_data_test.cc
diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc
index a0b6fd6aa2..c9a8fd2da4 100644
--- a/src/components/application_manager/test/application_helper_test.cc
+++ b/src/components/application_manager/test/application_helper_test.cc
@@ -52,6 +52,8 @@
#include "utils/macro.h"
#include "utils/shared_ptr.h"
#include "utils/make_shared.h"
+#include "test/resumption/mock_last_state.h"
+#include "media_manager/mock_media_manager.h"
namespace {
const uint8_t expected_tread_pool_size = 2u;
@@ -69,6 +71,8 @@ using ::testing::Mock;
using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
+using resumption_test::MockLastState;
+using test::components::media_manager_test::MockMediaManager;
using namespace application_manager;
using namespace policy_handler_test;
@@ -112,6 +116,11 @@ class ApplicationHelperTest : public testing::Test {
const connection_handler::DeviceHandle device_id = 1;
const custom_str::CustomString app_name("");
+ const std::string path_to_plagin = "";
+ EXPECT_CALL(mock_application_manager_settings_, plugins_folder())
+ .WillOnce(ReturnRef(path_to_plagin));
+ app_manager_impl_.Init(mock_last_state_, &mock_media_manager_);
+
app_impl_ = new ApplicationImpl(
application_id,
policy_app_id,
@@ -127,6 +136,8 @@ class ApplicationHelperTest : public testing::Test {
NiceMock<MockPolicySettings> mock_policy_settings_;
ApplicationManagerImpl app_manager_impl_;
+ MockMediaManager mock_media_manager_;
+ MockLastState mock_last_state_;
ApplicationSharedPtr app_impl_;
};
@@ -134,8 +145,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
const uint32_t cmd_id = 1;
const uint32_t menu_id = 2;
const uint32_t choice_set_id = 3;
- const mobile_apis::VehicleDataType::eType vi =
- mobile_apis::VehicleDataType::VEHICLEDATA_ACCPEDAL;
const mobile_apis::ButtonName::eType button = mobile_apis::ButtonName::AC;
smart_objects::SmartObject cmd;
@@ -147,7 +156,7 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
app_impl_->AddCommand(cmd_id, cmd[strings::msg_params]);
app_impl_->AddSubMenu(menu_id, cmd[strings::menu_params]);
app_impl_->AddChoiceSet(choice_set_id, cmd[strings::msg_params]);
- EXPECT_TRUE(app_impl_->SubscribeToIVI(static_cast<uint32_t>(vi)));
+
EXPECT_TRUE(app_impl_->SubscribeToButton(button));
const std::string some_string = "some_string";
@@ -173,7 +182,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
EXPECT_TRUE(NULL != app_impl_->FindSubMenu(menu_id));
EXPECT_TRUE(NULL != app_impl_->FindChoiceSet(choice_set_id));
EXPECT_TRUE(app_impl_->IsSubscribedToButton(button));
- EXPECT_TRUE(app_impl_->IsSubscribedToIVI(static_cast<uint32_t>(vi)));
auto help_prompt = app_impl_->help_prompt();
EXPECT_TRUE(help_prompt->asString() == some_string);
auto timeout_prompt = app_impl_->timeout_prompt();
@@ -198,7 +206,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
EXPECT_FALSE(NULL != app_impl_->FindSubMenu(menu_id));
EXPECT_FALSE(NULL != app_impl_->FindChoiceSet(choice_set_id));
EXPECT_FALSE(app_impl_->IsSubscribedToButton(button));
- EXPECT_FALSE(app_impl_->IsSubscribedToIVI(static_cast<uint32_t>(vi)));
help_prompt = app_impl_->help_prompt();
EXPECT_FALSE(help_prompt->asString() == some_string);
timeout_prompt = app_impl_->timeout_prompt();
@@ -230,8 +237,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectHMICleanupRequests) {
app_impl_->AddCommand(cmd_id, cmd[strings::msg_params]);
app_impl_->AddSubMenu(menu_id, cmd[strings::menu_params]);
app_impl_->AddChoiceSet(choice_set_id, cmd[strings::msg_params]);
- app_impl_->SubscribeToIVI(static_cast<uint32_t>(
- mobile_apis::VehicleDataType::VEHICLEDATA_ACCPEDAL));
app_impl_->SubscribeToButton(mobile_apis::ButtonName::AC);
EXPECT_CALL(*mock_message_helper_, SendUnsubscribedWayPoints(_));
@@ -247,8 +252,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectHMICleanupRequests) {
EXPECT_CALL(*mock_message_helper_,
SendUnsubscribeButtonNotification(_, _, _));
- EXPECT_CALL(*mock_message_helper_, SendUnsubscribeIVIRequest(_, _, _));
-
// Act
application_manager::DeleteApplicationData(app_impl_, app_manager_impl_);
}
diff --git a/src/components/application_manager/test/application_impl_test.cc b/src/components/application_manager/test/application_impl_test.cc
index 6b7f78b8f7..be2986e719 100644
--- a/src/components/application_manager/test/application_impl_test.cc
+++ b/src/components/application_manager/test/application_impl_test.cc
@@ -179,7 +179,7 @@ TEST_F(ApplicationImplTest, AddStateAddRegularState_GetCurrentState) {
HmiState::STATE_ID_REGULAR,
&ApplicationImpl::SetRegularState);
TestAddHmiState(HMILevel::HMI_LIMITED,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
CheckCurrentHMIState();
@@ -191,7 +191,7 @@ TEST_F(ApplicationImplTest, AddStateAddRegularState_GetRegularState) {
HmiState::STATE_ID_REGULAR,
&ApplicationImpl::SetRegularState);
TestAddHmiState(HMILevel::HMI_LIMITED,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
HmiStatePtr current_state = app_impl->RegularHmiState();
@@ -206,7 +206,7 @@ TEST_F(ApplicationImplTest, AddStates_RemoveLastState) {
HmiState::STATE_ID_PHONE_CALL,
&ApplicationImpl::AddHMIState);
HmiStatePtr state2 = TestAddHmiState(HMILevel::HMI_NONE,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
HmiStatePtr state3 = TestAddHmiState(HMILevel::HMI_LIMITED,
HmiState::STATE_ID_TTS_SESSION,
@@ -219,7 +219,7 @@ TEST_F(ApplicationImplTest, AddStates_RemoveLastState) {
HmiStatePtr current_state = app_impl->CurrentHmiState();
EXPECT_EQ(state2, current_state);
EXPECT_EQ(HMILevel::HMI_NONE, current_state->hmi_level());
- EXPECT_EQ(HmiState::STATE_ID_NAVI_STREAMING, current_state->state_id());
+ EXPECT_EQ(HmiState::STATE_ID_VIDEO_STREAMING, current_state->state_id());
}
TEST_F(ApplicationImplTest, AddStates_RemoveNotLastNotFirstState) {
@@ -227,7 +227,7 @@ TEST_F(ApplicationImplTest, AddStates_RemoveNotLastNotFirstState) {
HmiState::STATE_ID_PHONE_CALL,
&ApplicationImpl::AddHMIState);
HmiStatePtr state2 = TestAddHmiState(HMILevel::HMI_NONE,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
HmiStatePtr state3 = TestAddHmiState(HMILevel::HMI_LIMITED,
HmiState::STATE_ID_TTS_SESSION,
@@ -251,7 +251,7 @@ TEST_F(ApplicationImplTest, AddStates_RemoveFirstState) {
&ApplicationImpl::AddHMIState);
// Second state
TestAddHmiState(HMILevel::HMI_NONE,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
HmiStatePtr state3 = TestAddHmiState(HMILevel::HMI_LIMITED,
HmiState::STATE_ID_TTS_SESSION,
@@ -270,7 +270,7 @@ TEST_F(ApplicationImplTest, AddStates_RemoveFirstState) {
TEST_F(ApplicationImplTest, SetRegularState_RemoveFirstState) {
HmiStatePtr state1 = TestAddHmiState(HMILevel::HMI_NONE,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
// Set regular state
HmiStatePtr state2 = TestAddHmiState(HMILevel::HMI_FULL,
@@ -321,7 +321,7 @@ TEST_F(ApplicationImplTest, AddStateAddRegularState_GetHmiLvlAudioSystemState) {
audiostate = AudioStreamingState::AUDIBLE;
syst_context = SystemContext::SYSCTXT_MENU;
TestAddHmiState(HMILevel::HMI_LIMITED,
- HmiState::STATE_ID_NAVI_STREAMING,
+ HmiState::STATE_ID_VIDEO_STREAMING,
&ApplicationImpl::AddHMIState);
EXPECT_EQ(test_lvl, app_impl->hmi_level());
diff --git a/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc b/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc
index b9437d55e0..9ae388c809 100644
--- a/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc
@@ -43,12 +43,16 @@
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_resumption_data.h"
-#include "application_manager/mock_hmi_command_factory.h"
+#include "application_manager/mock_command_factory.h"
#include "application_manager/mock_request.h"
#include "connection_handler/mock_connection_handler.h"
#include "policy/mock_policy_settings.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
#include "protocol_handler/mock_session_observer.h"
+#include "protocol_handler/mock_protocol_handler.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
+#include "application_manager/mock_rpc_plugin.h"
+#include "utils/optional.h"
namespace test {
namespace components {
@@ -113,6 +117,7 @@ class ApplicationManagerImplMockHmiTest : public ::testing::Test {
app_manager_impl_->set_connection_handler(&mock_connection_handler_);
app_manager_impl_->resume_controller().set_resumption_storage(
mock_storage_);
+ app_manager_impl_->set_protocol_handler(&mock_protocol_handler_);
}
void SetCommonExpectationOnAppReconnection(
@@ -149,6 +154,7 @@ class ApplicationManagerImplMockHmiTest : public ::testing::Test {
mock_connection_handler_;
NiceMock<protocol_handler_test::MockSessionObserver> mock_session_observer_;
NiceMock<MockApplicationManagerSettings> mock_application_manager_settings_;
+ NiceMock<protocol_handler_test::MockProtocolHandler> mock_protocol_handler_;
std::unique_ptr<am::ApplicationManagerImpl> app_manager_impl_;
};
@@ -159,6 +165,8 @@ TEST_F(ApplicationManagerImplMockHmiTest,
const std::string mac_address = "MA:CA:DD:RE:SS";
const connection_handler::DeviceHandle device_id = 1u;
const custom_str::CustomString app_name("");
+ plugin_manager::MockRPCPluginManager* mock_rpc_plugin_manager =
+ new plugin_manager::MockRPCPluginManager;
utils::SharedPtr<ApplicationImpl> app_impl = new ApplicationImpl(
application_id,
@@ -169,6 +177,10 @@ TEST_F(ApplicationManagerImplMockHmiTest,
utils::SharedPtr<usage_statistics::StatisticsManager>(
new usage_statistics_test::MockStatisticsManager()),
*app_manager_impl_);
+ std::unique_ptr<plugin_manager::RPCPluginManager> mock_rpc_plugin_manager_ptr(
+ mock_rpc_plugin_manager);
+
+ app_manager_impl_->SetPluginManager(mock_rpc_plugin_manager_ptr);
app_manager_impl_->AddMockApplication(app_impl);
@@ -178,13 +190,22 @@ TEST_F(ApplicationManagerImplMockHmiTest,
const connection_handler::Device usb(
device_id + 1, "USB_device", "USB_serial", "USB_IOS");
- MockHMICommandFactory* mock_hmi_factory =
- MockHMICommandFactory::mock_hmi_command_factory();
+ MockCommandFactory mock_command_factory;
- // Skip sending notification on device switching as it is not the goal here
- EXPECT_CALL(*mock_hmi_factory, CreateCommand(_, _))
+ // // Skip sending notification on device switching as it is not the goal
+ // here
+ EXPECT_CALL(mock_command_factory, CreateCommand(_, _))
.WillOnce(Return(utils::SharedPtr<commands::Command>()));
+ plugin_manager::MockRPCPlugin mock_rpc_plugin;
+ utils::Optional<plugin_manager::RPCPlugin> mock_rpc_plugin_opt =
+ mock_rpc_plugin;
+
+ EXPECT_CALL(*mock_rpc_plugin_manager, FindPluginToProcess(_, _))
+ .WillRepeatedly(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory));
+
app_manager_impl_->OnDeviceSwitchingStart(bt, usb);
const uint32_t connection_key = 1u;
@@ -201,7 +222,7 @@ TEST_F(ApplicationManagerImplMockHmiTest,
utils::MakeShared<NiceMock<MockRequest> >(connection_key,
correlation_id_3);
- EXPECT_CALL(*mock_hmi_factory, CreateCommand(_, _))
+ EXPECT_CALL(mock_command_factory, CreateCommand(_, _))
.WillOnce(Return(cmd_1))
.WillOnce(Return(cmd_2))
.WillOnce(Return(cmd_3));
@@ -222,11 +243,11 @@ TEST_F(ApplicationManagerImplMockHmiTest,
EXPECT_CALL(*cmd_3, Init()).Times(0);
// Act
- app_manager_impl_->ManageHMICommand(hmi_msg_1);
- app_manager_impl_->ManageHMICommand(hmi_msg_2);
- app_manager_impl_->ManageHMICommand(hmi_msg_3);
+ app_manager_impl_->GetRPCService().ManageHMICommand(hmi_msg_1);
+ app_manager_impl_->GetRPCService().ManageHMICommand(hmi_msg_2);
+ app_manager_impl_->GetRPCService().ManageHMICommand(hmi_msg_3);
- EXPECT_CALL(*mock_hmi_factory, CreateCommand(_, _))
+ EXPECT_CALL(mock_command_factory, CreateCommand(_, _))
.WillOnce(Return(cmd_1))
.WillOnce(Return(cmd_2))
.WillOnce(Return(cmd_3));
@@ -246,7 +267,7 @@ TEST_F(ApplicationManagerImplMockHmiTest,
app_manager_impl_->ProcessReconnection(app_impl, new_application_id);
app_manager_impl_->OnApplicationSwitched(app_impl);
- Mock::VerifyAndClearExpectations(&mock_hmi_factory);
+ Mock::VerifyAndClearExpectations(&mock_command_factory);
}
} // application_manager_test
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 128d8e87a7..276c6bb0d5 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -44,6 +44,8 @@
#include "application_manager/mock_help_prompt_manager.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_resumption_data.h"
+#include "application_manager/mock_rpc_service.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
#include "application_manager/resumption/resume_ctrl_impl.h"
#include "application_manager/test/include/application_manager/mock_message_helper.h"
#include "connection_handler/mock_connection_handler.h"
@@ -53,6 +55,7 @@
#include "policy/usage_statistics/mock_statistics_manager.h"
#include "protocol/bson_object_keys.h"
#include "protocol_handler/mock_session_observer.h"
+#include "protocol_handler/mock_protocol_handler.h"
#include "utils/custom_string.h"
#include "utils/file_system.h"
#include "utils/lock.h"
@@ -90,17 +93,23 @@ namespace {
const std::string kDirectoryName = "./test_storage";
const uint32_t kTimeout = 10000u;
connection_handler::DeviceHandle kDeviceId = 12345u;
+const std::string kAppId = "someID";
+const uint32_t kConnectionKey = 1232u;
+const std::string kAppName = "appName";
} // namespace
class ApplicationManagerImplTest : public ::testing::Test {
public:
ApplicationManagerImplTest()
- : mock_storage_(
+ : app_id_(0u)
+ , mock_storage_(
::utils::MakeShared<NiceMock<resumption_test::MockResumptionData> >(
mock_app_mngr_))
+ , mock_rpc_service_(new MockRPCService)
, mock_message_helper_(
application_manager::MockMessageHelper::message_helper_mock())
- , app_id_(0u) {
+
+ {
logger::create_log_message_loop_thread();
Mock::VerifyAndClearExpectations(&mock_message_helper_);
}
@@ -115,7 +124,7 @@ class ApplicationManagerImplTest : public ::testing::Test {
.WillByDefault(DoAll(SetArgPointee<3u>(app_id_), Return(0)));
ON_CALL(mock_connection_handler_, get_session_observer())
.WillByDefault(ReturnRef(mock_session_observer_));
-
+ app_manager_impl_->SetRPCService(mock_rpc_service_);
app_manager_impl_->resume_controller().set_resumption_storage(
mock_storage_);
app_manager_impl_->set_connection_handler(&mock_connection_handler_);
@@ -137,13 +146,15 @@ class ApplicationManagerImplTest : public ::testing::Test {
.WillByDefault(Return(stop_streaming_timeout));
ON_CALL(mock_application_manager_settings_, default_timeout())
.WillByDefault(ReturnRef(kTimeout));
+ ON_CALL(mock_application_manager_settings_,
+ application_list_update_timeout()).WillByDefault(Return(kTimeout));
app_manager_impl_.reset(new am::ApplicationManagerImpl(
mock_application_manager_settings_, mock_policy_settings_));
mock_app_ptr_ = utils::SharedPtr<MockApplication>(new MockApplication());
mock_help_prompt_manager_ =
utils::SharedPtr<MockHelpPromptManager>(new MockHelpPromptManager());
-
+ app_manager_impl_->set_protocol_handler(&mock_protocol_handler_);
ASSERT_TRUE(app_manager_impl_.get());
ASSERT_TRUE(mock_app_ptr_.get());
}
@@ -177,26 +188,28 @@ class ApplicationManagerImplTest : public ::testing::Test {
SetArgPointee<4u>(connection_type),
Return(0)));
}
-
+ uint32_t app_id_;
NiceMock<policy_test::MockPolicySettings> mock_policy_settings_;
utils::SharedPtr<NiceMock<resumption_test::MockResumptionData> >
mock_storage_;
+
+ std::unique_ptr<rpc_service::RPCService> mock_rpc_service_;
NiceMock<con_test::MockConnectionHandler> mock_connection_handler_;
NiceMock<protocol_handler_test::MockSessionObserver> mock_session_observer_;
NiceMock<MockApplicationManagerSettings> mock_application_manager_settings_;
application_manager_test::MockApplicationManager mock_app_mngr_;
std::auto_ptr<am::ApplicationManagerImpl> app_manager_impl_;
application_manager::MockMessageHelper* mock_message_helper_;
- uint32_t app_id_;
+
utils::SharedPtr<MockApplication> mock_app_ptr_;
utils::SharedPtr<MockHelpPromptManager> mock_help_prompt_manager_;
+ NiceMock<protocol_handler_test::MockProtocolHandler> mock_protocol_handler_;
};
TEST_F(ApplicationManagerImplTest, ProcessQueryApp_ExpectSuccess) {
using namespace NsSmartDeviceLink::NsSmartObjects;
SmartObject app_data;
const uint32_t connection_key = 65537u;
-
app_data[am::json::name] = "application_manager_test";
app_data[am::json::appId] = app_id_;
app_data[am::json::android] = "bucket";
@@ -741,6 +754,12 @@ TEST_F(ApplicationManagerImplTest,
utils::SharedPtr<MockApplication> switching_app_ptr =
utils::MakeShared<MockApplication>();
+ plugin_manager::MockRPCPluginManager* mock_rpc_plugin_manager =
+ new plugin_manager::MockRPCPluginManager;
+ std::unique_ptr<plugin_manager::RPCPluginManager> mock_rpc_plugin_manager_ptr(
+ mock_rpc_plugin_manager);
+ app_manager_impl_->SetPluginManager(mock_rpc_plugin_manager_ptr);
+
const std::string switching_device_id = "switching";
const std::string switching_device_id_hash =
encryption::MakeHash(switching_device_id);
@@ -787,7 +806,6 @@ TEST_F(ApplicationManagerImplTest,
EXPECT_CALL(*mock_message_helper_, CreateDeviceListSO(_, _, _))
.WillOnce(Return(smart_objects::SmartObjectSPtr()));
-
app_manager_impl_->OnDeviceSwitchingStart(switching_device,
non_switching_device);
@@ -878,6 +896,10 @@ TEST_F(ApplicationManagerImplTest, UnregisterAnotherAppDuringAudioPassThru) {
ON_CALL(mock_application_manager_settings_, recording_file_name())
.WillByDefault(ReturnRef(dummy_file_name));
+ std::unique_ptr<plugin_manager::RPCPluginManager> mock_rpc_plugin_manager_ptr(
+ new plugin_manager::MockRPCPluginManager);
+ app_manager_impl_->SetPluginManager(mock_rpc_plugin_manager_ptr);
+
const uint32_t app_id_1 = 65537;
const uint32_t app_id_2 = 65538;
@@ -951,6 +973,49 @@ TEST_F(ApplicationManagerImplTest, UnregisterAnotherAppDuringAudioPassThru) {
}
}
+TEST_F(ApplicationManagerImplTest,
+ RegisterApplication_PathToTheIconExists_IconWasSet) {
+ file_system::CreateDirectory(kDirectoryName);
+ const std::string full_icon_path = kDirectoryName + "/" + kAppId;
+ ASSERT_TRUE(file_system::CreateFile(full_icon_path));
+
+ smart_objects::SmartObject request_for_registration(
+ smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject& params =
+ request_for_registration[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;
+
+ request_for_registration[strings::params][strings::connection_key] =
+ kConnectionKey;
+ request_for_registration[strings::msg_params][strings::app_name] = kAppName;
+ request_for_registration[strings::msg_params][strings::sync_msg_version]
+ [strings::minor_version] = APIVersion::kAPIV2;
+ request_for_registration[strings::msg_params][strings::sync_msg_version]
+ [strings::major_version] = APIVersion::kAPIV3;
+
+ request_for_registration[strings::params][strings::protocol_version] =
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2;
+
+ smart_objects::SmartObjectSPtr request_for_registration_ptr =
+ MakeShared<smart_objects::SmartObject>(request_for_registration);
+
+ ApplicationSharedPtr application =
+ app_manager_impl_->RegisterApplication(request_for_registration_ptr);
+ EXPECT_STREQ(kAppName.c_str(), application->name().c_str());
+ EXPECT_STREQ(full_icon_path.c_str(), application->app_icon_path().c_str());
+ EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2,
+ application->protocol_version());
+ EXPECT_EQ(APIVersion::kAPIV2,
+ application->version().min_supported_api_version);
+ EXPECT_EQ(APIVersion::kAPIV3,
+ application->version().max_supported_api_version);
+
+ EXPECT_TRUE(file_system::RemoveDirectory(kDirectoryName, true));
+}
+
} // 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 33f23022f0..6f732b6adc 100644
--- a/src/components/application_manager/test/application_state_test.cc
+++ b/src/components/application_manager/test/application_state_test.cc
@@ -58,7 +58,7 @@ std::vector<StateID> GenerateCurrentStates() {
states.push_back(StateID::STATE_ID_SAFETY_MODE);
states.push_back(StateID::STATE_ID_VR_SESSION);
states.push_back(StateID::STATE_ID_TTS_SESSION);
- states.push_back(StateID::STATE_ID_NAVI_STREAMING);
+ states.push_back(StateID::STATE_ID_VIDEO_STREAMING);
states.push_back(StateID::STATE_ID_DEACTIVATE_HMI);
return states;
}
diff --git a/src/components/application_manager/test/command_holder_test.cc b/src/components/application_manager/test/command_holder_test.cc
index e10cd5d008..9227fd8fcb 100644
--- a/src/components/application_manager/test/command_holder_test.cc
+++ b/src/components/application_manager/test/command_holder_test.cc
@@ -40,6 +40,7 @@
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application.h"
+#include "application_manager/mock_rpc_service.h"
namespace test {
namespace components {
@@ -47,6 +48,7 @@ namespace application_manager_test {
using testing::_;
using testing::Return;
+using ::testing::ReturnRef;
namespace am = application_manager;
@@ -65,6 +67,8 @@ class CommandHolderImplTest : public testing::Test {
.WillByDefault(Return(kHmiApplicationId_));
ON_CALL(*mock_app_ptr_, policy_app_id())
.WillByDefault(Return(kPolicyAppId_));
+ ON_CALL(mock_app_manager_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
}
MockApplicationManager mock_app_manager_;
@@ -73,6 +77,7 @@ class CommandHolderImplTest : public testing::Test {
const uint32_t kConnectionKey_;
utils::SharedPtr<smart_objects::SmartObject> cmd_ptr_;
utils::SharedPtr<MockApplication> mock_app_ptr_;
+ application_manager_test::MockRPCService mock_rpc_service_;
};
TEST_F(CommandHolderImplTest, HoldOne_ExpectReleaseOne) {
@@ -81,7 +86,7 @@ TEST_F(CommandHolderImplTest, HoldOne_ExpectReleaseOne) {
mock_app_ptr_, am::CommandHolder::CommandType::kHmiCommand, cmd_ptr_);
// Act
- EXPECT_CALL(mock_app_manager_, ManageHMICommand(cmd_ptr_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(cmd_ptr_));
cmd_holder.Resume(mock_app_ptr_, am::CommandHolder::CommandType::kHmiCommand);
}
@@ -96,7 +101,7 @@ TEST_F(CommandHolderImplTest, HoldMany_ExpectReleaseSame) {
} while (iterations < 5);
// Act
- EXPECT_CALL(mock_app_manager_, ManageHMICommand(cmd_ptr_)).Times(iterations);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(cmd_ptr_)).Times(iterations);
cmd_holder.Resume(mock_app_ptr_, am::CommandHolder::CommandType::kHmiCommand);
}
@@ -109,7 +114,7 @@ TEST_F(CommandHolderImplTest, Hold_Drop_ExpectNoReleased) {
// Act
cmd_holder.Clear(mock_app_ptr_);
- EXPECT_CALL(mock_app_manager_, ManageHMICommand(cmd_ptr_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(cmd_ptr_)).Times(0);
cmd_holder.Resume(mock_app_ptr_, am::CommandHolder::CommandType::kHmiCommand);
}
@@ -124,7 +129,7 @@ TEST_F(CommandHolderImplTest, Hold_ReleaseAnotherId_ExpectNoReleased) {
utils::SharedPtr<MockApplication> another_app =
utils::MakeShared<MockApplication>();
- EXPECT_CALL(mock_app_manager_, ManageHMICommand(cmd_ptr_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(cmd_ptr_)).Times(0);
cmd_holder.Resume(another_app, am::CommandHolder::CommandType::kHmiCommand);
}
@@ -143,7 +148,7 @@ TEST_F(CommandHolderImplTest, Hold_DropAnotherId_ExpectReleased) {
utils::MakeShared<MockApplication>();
cmd_holder.Clear(another_app);
- EXPECT_CALL(mock_app_manager_, ManageHMICommand(cmd_ptr_)).Times(iterations);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(cmd_ptr_)).Times(iterations);
cmd_holder.Resume(mock_app_ptr_, am::CommandHolder::CommandType::kHmiCommand);
}
@@ -157,13 +162,13 @@ TEST_F(CommandHolderImplTest, Hold_Mobile_and_HMI_commands_ExpectReleased) {
mock_app_ptr_, am::CommandHolder::CommandType::kMobileCommand, cmd_ptr_);
// Act
- EXPECT_CALL(mock_app_manager_, ManageHMICommand(cmd_ptr_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(cmd_ptr_));
cmd_holder.Resume(mock_app_ptr_, am::CommandHolder::CommandType::kHmiCommand);
EXPECT_CALL(
- mock_app_manager_,
+ mock_rpc_service_,
ManageMobileCommand(cmd_ptr_,
- am::commands::Command::CommandOrigin::ORIGIN_MOBILE));
+ am::commands::Command::CommandSource::SOURCE_MOBILE));
cmd_holder.Resume(mock_app_ptr_,
am::CommandHolder::CommandType::kMobileCommand);
}
diff --git a/src/components/application_manager/test/commands/CMakeLists.txt b/src/components/application_manager/test/commands/CMakeLists.txt
index 8dafc16471..ab412c7e4e 100644
--- a/src/components/application_manager/test/commands/CMakeLists.txt
+++ b/src/components/application_manager/test/commands/CMakeLists.txt
@@ -35,11 +35,10 @@ include_directories(
${COMPONENTS_DIR}/application_manager/include/
${COMPONENTS_DIR}/application_manager/include/application_manager/
${COMPONENTS_DIR}/application_manager/include/application_manager/commands/
- ${COMPONENTS_DIR}/application_manager/include/application_manager/commands/hmi/
- ${COMPONENTS_DIR}/application_manager/include/application_manager/commands/mobile/
- ${COMPONENTS_DIR}/application_manager/test/include/
- ${COMPONENTS_DIR}/application_manager/test/include/application_manager/
)
+#${COMPONENTS_DIR}/application_manager/test/include/
+#${COMPONENTS_DIR}/application_manager/test/include/application_manager/
+#${COMPONENTS_DIR}/application_manager/src/commands/
set(COMMANDS_TEST_DIR ${AM_TEST_DIR}/commands)
@@ -47,24 +46,29 @@ file(GLOB SOURCES
${COMMANDS_TEST_DIR}/*
${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
${COMPONENTS_DIR}/application_manager/test/mock_application_helper.cc
- ${COMPONENTS_DIR}/application_manager/src/smart_object_keys.cc
- ${COMPONENTS_DIR}/application_manager/src/message.cc
- ${COMMANDS_TEST_DIR}/hmi/*
- ${COMMANDS_TEST_DIR}/hmi/hmi_notifications/*
- ${COMMANDS_TEST_DIR}/mobile/*
+ ${COMPONENTS_DIR}/application_manager/test/commands/command_imp_test.cc
+ ${COMPONENTS_DIR}/application_manager/test/commands/command_request_impl_test.cc
+ ${COMPONENTS_DIR}/application_manager/test/commands/command_response_impl_test.cc
)
+#${COMPONENTS_DIR}/application_manager/src/smart_object_keys.cc
+#${COMPONENTS_DIR}/application_manager/src/message.cc
set(LIBRARIES
gmock
Utils
SmartObjects
HMI_API
MOBILE_API
- ApplicationManager
- AMHMICommandsLibrary
- AMMobileCommandsLibrary
connectionHandler
+ ApplicationManager
jsoncpp
+ Policy
)
-create_cotired_test("commands_test" "${SOURCES}" "${LIBRARIES}" )
+create_test("commands_test" "${SOURCES}" "${LIBRARIES}")
+#${COMMANDS_TEST_DIR}/hmi/*
+#${COMMANDS_TEST_DIR}/hmi/hmi_notifications/*
+#${COMMANDS_TEST_DIR}/mobile/*
+#ApplicationManager
+#AMHMICommandsLibrary
+#AMMobileCommandsLibrary
diff --git a/src/components/application_manager/test/commands/command_impl_test.cc b/src/components/application_manager/test/commands/command_impl_test.cc
index ff9634cbb1..b50d94f824 100644
--- a/src/components/application_manager/test/commands/command_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_impl_test.cc
@@ -87,8 +87,15 @@ class CommandImplTest : public CommandsTest<CommandsTestMocks::kIsNice> {
using CommandImpl::ReplaceHMIWithMobileAppId;
UnwrappedCommandImpl(const MessageSharedPtr& message,
- ApplicationManager& application_manager)
- : CommandImpl(message, application_manager) {}
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
};
// Create `SmartObject` which handle array of `SmartObjects`
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 4493c54d3c..c5a3459673 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
@@ -96,6 +96,9 @@ const std::string kMissedParam = "missed_param";
class CommandRequestImplTest
: public CommandRequestTest<CommandsTestMocks::kIsNice> {
public:
+ CommandRequestImplTest()
+ : app_set_lock_ptr_(std::make_shared<sync_primitives::Lock>()) {}
+
class UnwrappedCommandRequestImpl : public CommandRequestImpl {
public:
using CommandRequestImpl::CheckAllowedParameters;
@@ -104,8 +107,12 @@ class CommandRequestImplTest
using CommandRequestImpl::HasDisallowedParams;
UnwrappedCommandRequestImpl(const MessageSharedPtr& message,
- ApplicationManager& am)
- : CommandRequestImpl(message, am) {}
+ ApplicationManager& am,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandRequestImpl(
+ message, am, rpc_service, hmi_capabilities, policy_handler) {}
const RequestState current_state() const {
return current_state_;
@@ -133,11 +140,11 @@ class CommandRequestImplTest
app_set->insert(app);
EXPECT_CALL(app_mngr_, applications())
.WillOnce(
- Return(DataAccessor<ApplicationSet>(*app_set, app_set_lock_)));
+ Return(DataAccessor<ApplicationSet>(*app_set, app_set_lock_ptr_)));
return app;
}
- sync_primitives::Lock app_set_lock_;
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_ptr_;
};
typedef CommandRequestImplTest::UnwrappedCommandRequestImpl UCommandRequestImpl;
@@ -150,7 +157,8 @@ TEST_F(CommandRequestImplTest, OnTimeOut_StateCompleted_UNSUCCESS) {
// First -- on `onTimeOut` method call
// Second -- on destruction;
EXPECT_CALL(event_dispatcher_, remove_observer(_)).Times(2);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
// If `command` already done, then state should change to `kCompleted`.
command->set_current_state(RequestState::kCompleted);
@@ -171,9 +179,10 @@ TEST_F(CommandRequestImplTest, OnTimeOut_StateAwaitingHMIResponse_SUCCESS) {
MessageSharedPtr dummy_msg(CreateMessage());
EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
.WillOnce(Return(dummy_msg));
+
EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(dummy_msg, Command::CommandOrigin::ORIGIN_SDL));
+ mock_rpc_service_,
+ ManageMobileCommand(dummy_msg, Command::CommandSource::SOURCE_SDL));
command->onTimeOut();
@@ -250,7 +259,7 @@ TEST_F(CommandRequestImplTest, CreateHMINotification_SUCCESS) {
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
command->CreateHMINotification(kInvalidFunctionId, *msg_params);
@@ -271,7 +280,8 @@ TEST_F(CommandRequestImplTest, SendHMIRequest_NoUseEvent_SUCCESS) {
EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
.WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
// Return `true` prevents call of `SendResponse` method;
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
EXPECT_EQ(kCorrelationId,
command->SendHMIRequest(kInvalidFunctionId, NULL, false));
@@ -288,8 +298,8 @@ TEST_F(CommandRequestImplTest, SendHMIRequest_UseEvent_SUCCESS) {
EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
.WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
// Return `true` prevents call of `SendResponse` method;
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_)).WillOnce(Return(true));
EXPECT_CALL(event_dispatcher_, add_observer(_, _, _));
EXPECT_EQ(kCorrelationId,
@@ -386,7 +396,7 @@ TEST_F(CommandRequestImplTest,
EXPECT_CALL(mock_message_helper_, CreateBlockedByPoliciesResponse(_, _, _, _))
.WillOnce(Return(smart_objects::SmartObjectSPtr()));
- EXPECT_CALL(app_mngr_, SendMessageToMobile(_, _));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, _));
EXPECT_FALSE(command->CheckPermissions());
}
@@ -438,7 +448,7 @@ TEST_F(CommandRequestImplTest, SendResponse_TimedOut_UNSUCCESS) {
command->set_current_state(RequestState::kTimedOut);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
// Args do not affect on anything in this case;
command->SendResponse(true, kMobResultSuccess, NULL, NULL);
@@ -453,7 +463,8 @@ TEST_F(CommandRequestImplTest, SendResponse_SUCCESS) {
EXPECT_TRUE(smart_objects::SmartType_Null == (*msg).getType());
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _))
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
// Args do not affect on anything in this case;
@@ -483,7 +494,8 @@ TEST_F(CommandRequestImplTest,
kDisallowedParam1);
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _))
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
command->SendResponse(true, kMobResultSuccess, NULL, NULL);
@@ -501,7 +513,8 @@ TEST_F(CommandRequestImplTest, HashUpdateAllowed_UpdateExpected) {
command->SetHashUpdateMode(CommandRequestImpl::HashUpdateMode::kDoHashUpdate);
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _))
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
const bool is_succedeed = true;
@@ -521,7 +534,8 @@ TEST_F(CommandRequestImplTest, HashUpdateDisallowed_HashUpdateNotExpected) {
CommandRequestImpl::HashUpdateMode::kSkipHashUpdate);
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _))
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
const bool is_succedeed = true;
@@ -539,7 +553,8 @@ TEST_F(CommandRequestImplTest, RequestFailed_HashUpdateNotExpected) {
command->SetHashUpdateMode(CommandRequestImpl::HashUpdateMode::kDoHashUpdate);
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _))
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
const bool is_succedeed = false;
@@ -557,7 +572,8 @@ TEST_F(CommandRequestImplTest, AppNotFound_HashUpdateNotExpected) {
command->SetHashUpdateMode(CommandRequestImpl::HashUpdateMode::kDoHashUpdate);
MessageSharedPtr result;
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _))
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
const bool is_succedeed = true;
diff --git a/src/components/application_manager/test/commands/command_response_impl_test.cc b/src/components/application_manager/test/commands/command_response_impl_test.cc
index f95b9a49b2..bd7499ce8f 100644
--- a/src/components/application_manager/test/commands/command_response_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_response_impl_test.cc
@@ -78,7 +78,7 @@ TEST_F(CommandResponseImplTest, SendResponse_MessageWithResultCode_SUCCESS) {
// then send message to mobile.
(*msg)[strings::msg_params][strings::result_code] = kResultCode;
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
}
@@ -94,7 +94,7 @@ TEST_F(CommandResponseImplTest,
mobile_apis::Result::eType::SUCCESS;
const bool kFinalResponse = true;
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, kFinalResponse));
// If `msg_params->result_code` does not exist in message
// and arg `result_code` not equals `INVALID_ENUM`,
@@ -122,7 +122,7 @@ TEST_F(CommandResponseImplTest,
// then set it to `msg_params->result_code` and send message to mobile.
(*msg)[strings::params][hmi_response::code] = mobile_apis::Result::SUCCESS;
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
@@ -147,7 +147,7 @@ TEST_F(CommandResponseImplTest,
// then `msg_params->result_code` will be `SUCCESS`
const bool kSuccess = true;
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
@@ -172,7 +172,7 @@ TEST_F(CommandResponseImplTest,
// then `msg_params->result_code` will be `INVALID_ENUM`
const bool kSuccess = false;
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
diff --git a/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc b/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc
deleted file mode 100644
index 7f7911a01d..0000000000
--- a/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc
+++ /dev/null
@@ -1,125 +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 "application_manager/commands/hmi/activate_app_request.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/commands/command_impl.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_application.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace activate_app_request {
-
-using ::testing::_;
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::MessageSharedPtr;
-using am::commands::ActivateAppRequest;
-using am::commands::CommandImpl;
-
-using ::test::components::application_manager_test::MockApplication;
-
-typedef SharedPtr<MockApplication> MockAppPtr;
-typedef ::utils::SharedPtr<ActivateAppRequest> ActivateAppRequestPtr;
-
-MATCHER_P(CheckMessage, level, "") {
- return level ==
- static_cast<mobile_apis::HMILevel::eType>(
- (*arg)[strings::msg_params][strings::activate_app_hmi_level]
- .asInt());
-}
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kCorrelationId = 2u;
-} // namespace
-
-class ActivateAppRequestTest : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateMsgParams() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = kAppId;
- msg_params[strings::correlation_id] = kCorrelationId;
- (*msg)[strings::msg_params] = msg_params;
- (*msg)[strings::params][strings::app_id] = kAppId;
- (*msg)[strings::params][strings::correlation_id] = kCorrelationId;
- (*msg)[strings::app_id] = kAppId;
- return msg;
- }
-};
-
-TEST_F(ActivateAppRequestTest, Run_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- MockAppPtr app = CreateMockApp();
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
-
- ON_CALL(*app, hmi_app_id()).WillByDefault(Return(kAppId));
-
-// TODO(OKozlov) Investigate and fix issue with using log
-#ifdef ENABLE_LOG
- (*msg)[strings::msg_params][strings::activate_app_hmi_level] =
- mobile_apis::HMILevel::HMI_FULL;
-#endif
- ActivateAppRequestPtr command(CreateCommand<ActivateAppRequest>(msg));
-
- EXPECT_CALL(app_mngr_, set_application_id(kCorrelationId, kAppId));
-#ifdef ENABLE_LOG
- EXPECT_CALL(app_mngr_,
- SendMessageToHMI(CheckMessage(mobile_apis::HMILevel::HMI_FULL)));
-#else
- EXPECT_CALL(app_mngr_,
- SendMessageToHMI(msg)));
-#endif
- command->Run();
-
-#ifndef ENABLE_LOG
- EXPECT_EQ(CommandImpl::hmi_protocol_type_,
- (*msg)[strings::params][strings::protocol_type].asInt());
- EXPECT_EQ(CommandImpl::protocol_version_,
- (*msg)[strings::params][strings::protocol_version].asInt());
-#endif
-}
-
-} // namespace activate_app_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/add_statistics_info_notification_test.cc b/src/components/application_manager/test/commands/hmi/add_statistics_info_notification_test.cc
deleted file mode 100644
index 88efc61816..0000000000
--- a/src/components/application_manager/test/commands/hmi/add_statistics_info_notification_test.cc
+++ /dev/null
@@ -1,90 +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 "application_manager/commands/hmi/add_statistics_info_notification.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace add_statistics_info_notification {
-
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_notification = ::application_manager::hmi_notification;
-using am::commands::MessageSharedPtr;
-using am::commands::AddStatisticsInfoNotification;
-using am::commands::CommandImpl;
-using policy::PolicyHandler;
-using policy_test::MockPolicyHandlerInterface;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-typedef ::utils::SharedPtr<AddStatisticsInfoNotification> NotificationPtr;
-
-namespace {
-const uint32_t kStatisticType = 1u;
-} // namespace
-
-class AddStatisticsInfoNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- protected:
- MockPolicyHandlerInterface policy_handler_;
-};
-
-TEST_F(AddStatisticsInfoNotificationTest, Run_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::msg_params][am::hmi_notification::statistic_type] =
- kStatisticType;
- NotificationPtr command(CreateCommand<AddStatisticsInfoNotification>(msg));
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler_));
- EXPECT_CALL(policy_handler_, AddStatisticsInfo(kStatisticType));
-
- command->Run();
-}
-
-} // namespace add_statistics_info_notification
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/allow_all_apps_response_test.cc b/src/components/application_manager/test/commands/hmi/allow_all_apps_response_test.cc
deleted file mode 100644
index 60eced4830..0000000000
--- a/src/components/application_manager/test/commands/hmi/allow_all_apps_response_test.cc
+++ /dev/null
@@ -1,77 +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 "application_manager/commands/hmi/allow_all_apps_response.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/commands/command_impl.h"
-#include "commands/commands_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace allow_all_apps_response {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::AllowAllAppsResponse;
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-typedef ::utils::SharedPtr<AllowAllAppsResponse> ResponsePtr;
-
-namespace {
-const bool kResponseIsAllowed = true;
-} //
-
-class AllowAllAppsResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(AllowAllAppsResponseTest, Run_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::allowed] = kResponseIsAllowed;
-
- ResponsePtr command(CreateCommand<AllowAllAppsResponse>(msg));
-
- EXPECT_CALL(app_mngr_, SetAllAppsAllowed(kResponseIsAllowed));
-
- command->Run();
-}
-
-} // namespace allow_all_apps_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/allow_app_response_test.cc b/src/components/application_manager/test/commands/hmi/allow_app_response_test.cc
deleted file mode 100644
index 69b4abe39d..0000000000
--- a/src/components/application_manager/test/commands/hmi/allow_app_response_test.cc
+++ /dev/null
@@ -1,95 +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 "application_manager/commands/hmi/allow_app_response.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/mock_application.h"
-#include "commands/commands_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace allow_app_response {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::AllowAppResponse;
-using ::testing::_;
-using ::testing::Return;
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const bool kIsResponseAllowed = true;
-}
-
-typedef ::utils::SharedPtr<AllowAppResponse> ResponsePtr;
-
-class AllowAppResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(AllowAppResponseTest, Run_AppCreated_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][hmi_response::allowed] = kIsResponseAllowed;
-
- ResponsePtr command(CreateCommand<AllowAppResponse>(msg));
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_app_allowed(kIsResponseAllowed));
-
- command->Run();
-}
-
-TEST_F(AllowAppResponseTest, Run_AppNotCreated_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][hmi_response::allowed] = kIsResponseAllowed;
-
- ResponsePtr command(CreateCommand<AllowAppResponse>(msg));
-
- MockAppPtr mock_app;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
-
- command->Run();
-}
-
-} // namespace allow_app_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/button_get_capabilities_response_test.cc b/src/components/application_manager/test/commands/hmi/button_get_capabilities_response_test.cc
deleted file mode 100644
index b2a8f0858a..0000000000
--- a/src/components/application_manager/test/commands/hmi/button_get_capabilities_response_test.cc
+++ /dev/null
@@ -1,116 +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 "application_manager/commands/hmi/button_get_capabilities_response.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "commands/commands_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace button_get_capabilities_response {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::ButtonGetCapabilitiesResponse;
-using ::testing::ReturnRef;
-using ::testing::NiceMock;
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-typedef ::utils::SharedPtr<ButtonGetCapabilitiesResponse> ResponsePtr;
-
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-class ButtonGetCapabilitiesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateMsgParams() {
- capabilities_[strings::name] = hmi_apis::Common_ButtonName::OK;
- preset_bank_capabilities_ = true;
-
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::capabilities] = (capabilities_);
- (*msg)[strings::msg_params][hmi_response::preset_bank_capabilities] =
- (preset_bank_capabilities_);
-
- return msg;
- }
-
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
- SmartObject preset_bank_capabilities_;
-};
-
-TEST_F(ButtonGetCapabilitiesResponseTest, Run_CodeSuccess_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
-
- ResponsePtr command(CreateCommand<ButtonGetCapabilitiesResponse>(msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_, set_button_capabilities(capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_,
- set_preset_bank_capabilities(preset_bank_capabilities_));
-
- command->Run();
-}
-
-TEST_F(ButtonGetCapabilitiesResponseTest, Run_CodeAborted_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::ABORTED;
-
- ResponsePtr command(CreateCommand<ButtonGetCapabilitiesResponse>(msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities()).Times(0);
- EXPECT_CALL(mock_hmi_capabilities_, set_button_capabilities(capabilities_))
- .Times(0);
- EXPECT_CALL(mock_hmi_capabilities_,
- set_preset_bank_capabilities(preset_bank_capabilities_)).Times(0);
-
- command->Run();
-}
-
-} // namespace button_get_capabilities_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/close_popup_response_test.cc b/src/components/application_manager/test/commands/hmi/close_popup_response_test.cc
deleted file mode 100644
index b4a6ea272a..0000000000
--- a/src/components/application_manager/test/commands/hmi/close_popup_response_test.cc
+++ /dev/null
@@ -1,73 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command.h"
-#include "commands/commands_test.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/commands/hmi/close_popup_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace close_popup_response {
-
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-using am::commands::ResponseFromHMI;
-using am::commands::ClosePopupResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-
-class ClosePopupResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
-};
-
-TEST_F(ClosePopupResponseTest, RUN_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- ResponseFromHMIPtr command(CreateCommand<ClosePopupResponse>(command_msg));
-
- command->Run();
-}
-
-} // namespace close_popup_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/test/commands/hmi/dummy_hmi_commands_test.cc
deleted file mode 100644
index 7c95a4ca2f..0000000000
--- a/src/components/application_manager/test/commands/hmi/dummy_hmi_commands_test.cc
+++ /dev/null
@@ -1,617 +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 "application_manager/commands/command_request_test.h"
-
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include "gtest/gtest.h"
-
-#include "application_manager/commands/hmi/allow_all_apps_request.h"
-#include "application_manager/commands/hmi/allow_all_apps_response.h"
-#include "application_manager/commands/hmi/allow_app_request.h"
-#include "application_manager/commands/hmi/allow_app_response.h"
-#include "application_manager/commands/hmi/navi_audio_start_stream_request.h"
-#include "application_manager/commands/hmi/navi_audio_start_stream_response.h"
-#include "application_manager/commands/hmi/navi_audio_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_audio_stop_stream_response.h"
-#include "application_manager/commands/hmi/update_device_list_request.h"
-#include "application_manager/commands/hmi/update_device_list_response.h"
-#include "application_manager/commands/hmi/on_update_device_list.h"
-#include "application_manager/commands/hmi/on_start_device_discovery.h"
-#include "application_manager/commands/hmi/update_app_list_request.h"
-#include "application_manager/commands/hmi/update_app_list_response.h"
-#include "application_manager/commands/hmi/on_find_applications.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_request.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_response.h"
-#include "application_manager/commands/hmi/sdl_get_user_friendly_message_request.h"
-#include "application_manager/commands/hmi/sdl_get_user_friendly_message_response.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_request.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_response.h"
-#include "application_manager/commands/hmi/on_status_update_notification.h"
-#include "application_manager/commands/hmi/update_sdl_request.h"
-#include "application_manager/commands/hmi/update_sdl_response.h"
-#include "application_manager/commands/hmi/activate_app_request.h"
-#include "application_manager/commands/hmi/activate_app_response.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_request.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_response.h"
-#include "application_manager/commands/hmi/on_allow_sdl_functionality_notification.h"
-#include "application_manager/commands/hmi/on_app_permission_changed_notification.h"
-#include "application_manager/commands/hmi/on_app_permission_consent_notification.h"
-#include "application_manager/commands/hmi/on_app_activated_notification.h"
-#include "application_manager/commands/hmi/on_audio_data_streaming_notification.h"
-#include "application_manager/commands/hmi/on_video_data_streaming_notification.h"
-#include "application_manager/commands/hmi/on_sdl_consent_needed_notification.h"
-#include "application_manager/commands/hmi/on_exit_all_applications_notification.h"
-#include "application_manager/commands/hmi/on_exit_application_notification.h"
-#include "application_manager/commands/hmi/on_put_file_notification.h"
-#include "application_manager/commands/hmi/on_resume_audio_source_notification.h"
-#include "application_manager/commands/hmi/on_ignition_cycle_over_notification.h"
-#include "application_manager/commands/hmi/on_system_info_changed_notification.h"
-#include "application_manager/commands/hmi/get_system_info_request.h"
-#include "application_manager/commands/hmi/get_system_info_response.h"
-#include "application_manager/commands/hmi/close_popup_request.h"
-#include "application_manager/commands/hmi/close_popup_response.h"
-#include "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "application_manager/commands/hmi/button_get_capabilities_response.h"
-#include "application_manager/commands/hmi/ui_add_command_request.h"
-#include "application_manager/commands/hmi/ui_add_command_response.h"
-#include "application_manager/commands/hmi/ui_delete_command_request.h"
-#include "application_manager/commands/hmi/ui_delete_command_response.h"
-#include "application_manager/commands/hmi/ui_add_submenu_request.h"
-#include "application_manager/commands/hmi/ui_add_submenu_response.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_request.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_response.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/ui_get_language_request.h"
-#include "application_manager/commands/hmi/ui_get_language_response.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_request.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_response.h"
-#include "application_manager/commands/hmi/ui_change_registration_request.h"
-#include "application_manager/commands/hmi/ui_change_registration_response.h"
-#include "application_manager/commands/hmi/ui_show_request.h"
-#include "application_manager/commands/hmi/ui_show_response.h"
-#include "application_manager/commands/hmi/ui_alert_request.h"
-#include "application_manager/commands/hmi/ui_alert_response.h"
-#include "application_manager/commands/hmi/ui_is_ready_request.h"
-#include "application_manager/commands/hmi/ui_is_ready_response.h"
-#include "application_manager/commands/hmi/ui_slider_request.h"
-#include "application_manager/commands/hmi/ui_slider_response.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_request.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_response.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_request.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_response.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_request.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_response.h"
-#include "application_manager/commands/hmi/ui_set_app_icon_request.h"
-#include "application_manager/commands/hmi/ui_set_app_icon_response.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_response.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_request.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_response.h"
-#include "application_manager/commands/hmi/vr_is_ready_request.h"
-#include "application_manager/commands/hmi/vr_is_ready_response.h"
-#include "application_manager/commands/hmi/vr_add_command_request.h"
-#include "application_manager/commands/hmi/vr_add_command_response.h"
-#include "application_manager/commands/hmi/vr_delete_command_request.h"
-#include "application_manager/commands/hmi/vr_delete_command_response.h"
-#include "application_manager/commands/hmi/vr_change_registration_request.h"
-#include "application_manager/commands/hmi/vr_change_registration_response.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/vr_get_language_request.h"
-#include "application_manager/commands/hmi/vr_get_language_response.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_request.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_response.h"
-#include "application_manager/commands/hmi/tts_is_ready_request.h"
-#include "application_manager/commands/hmi/tts_is_ready_response.h"
-#include "application_manager/commands/hmi/tts_change_registration_request.h"
-#include "application_manager/commands/hmi/tts_change_registration_response.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/tts_get_language_request.h"
-#include "application_manager/commands/hmi/tts_get_language_response.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_request.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_response.h"
-#include "application_manager/commands/hmi/tts_speak_request.h"
-#include "application_manager/commands/hmi/tts_speak_response.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_request.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_response.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_request.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_response.h"
-#include "application_manager/commands/hmi/vr_perform_interaction_request.h"
-#include "application_manager/commands/hmi/vr_perform_interaction_response.h"
-#include "application_manager/commands/hmi/vi_is_ready_request.h"
-#include "application_manager/commands/hmi/vi_is_ready_response.h"
-#include "application_manager/commands/hmi/vi_read_did_request.h"
-#include "application_manager/commands/hmi/vi_read_did_response.h"
-#include "application_manager/commands/hmi/sdl_activate_app_request.h"
-#include "application_manager/commands/hmi/sdl_activate_app_response.h"
-#include "application_manager/commands/hmi/on_app_permission_changed_notification.h"
-#include "application_manager/commands/hmi/on_event_changed_notification.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_response.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-#include "application_manager/commands/hmi/vi_get_dtcs_request.h"
-#include "application_manager/commands/hmi/vi_get_dtcs_response.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_request.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_response.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_response.h"
-#include "application_manager/commands/hmi/navi_is_ready_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_response.h"
-#include "application_manager/commands/hmi/navi_is_ready_response.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_request.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_response.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_response.h"
-#include "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_subscribe_way_points_response.h"
-#include "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_unsubscribe_way_points_response.h"
-#include "application_manager/commands/hmi/navi_get_way_points_request.h"
-#include "application_manager/commands/hmi/navi_get_way_points_response.h"
-#include "application_manager/commands/hmi/on_ready_notification.h"
-#include "application_manager/commands/hmi/on_device_chosen_notification.h"
-#include "application_manager/commands/hmi/on_file_removed_notification.h"
-#include "application_manager/commands/hmi/on_system_context_notification.h"
-#include "application_manager/commands/hmi/on_app_registered_notification.h"
-#include "application_manager/commands/hmi/on_app_unregistered_notification.h"
-#include "application_manager/commands/hmi/on_driver_distraction_notification.h"
-#include "application_manager/commands/hmi/on_tts_started_notification.h"
-#include "application_manager/commands/hmi/on_tts_stopped_notification.h"
-#include "application_manager/commands/hmi/on_vr_started_notification.h"
-#include "application_manager/commands/hmi/on_vr_stopped_notification.h"
-#include "application_manager/commands/hmi/on_vr_command_notification.h"
-#include "application_manager/commands/hmi/on_ui_command_notification.h"
-#include "application_manager/commands/hmi/on_app_deactivated_notification.h"
-#include "application_manager/commands/hmi/on_ui_language_change_notification.h"
-#include "application_manager/commands/hmi/on_vr_language_change_notification.h"
-#include "application_manager/commands/hmi/on_tts_language_change_notification.h"
-#include "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
-#include "application_manager/commands/hmi/on_navi_way_point_change_notification.h"
-#include "application_manager/commands/hmi/on_button_event_notification.h"
-#include "application_manager/commands/hmi/on_button_press_notification.h"
-#include "application_manager/commands/hmi/on_button_subscription_notification.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/on_ui_keyboard_input_notification.h"
-#include "application_manager/commands/hmi/on_ui_touch_event_notification.h"
-#include "application_manager/commands/hmi/on_ui_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/navi_start_stream_request.h"
-#include "application_manager/commands/hmi/navi_start_stream_response.h"
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_stop_stream_response.h"
-#include "application_manager/commands/hmi/on_system_request_notification.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_request.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_response.h"
-#include "application_manager/commands/hmi/on_sdl_close_notification.h"
-#include "application_manager/commands/hmi/on_sdl_persistence_complete_notification.h"
-#include "application_manager/commands/hmi/on_record_start_notification.h"
-#include "application_manager/commands/hmi/add_statistics_info_notification.h"
-#include "application_manager/commands/hmi/on_system_error_notification.h"
-#include "application_manager/commands/hmi/basic_communication_system_request.h"
-#include "application_manager/commands/hmi/basic_communication_system_response.h"
-#include "application_manager/commands/hmi/sdl_policy_update.h"
-#include "application_manager/commands/hmi/sdl_policy_update_response.h"
-#include "application_manager/commands/hmi/on_received_policy_update.h"
-#include "application_manager/commands/hmi/on_policy_update.h"
-#include "application_manager/commands/hmi/get_urls.h"
-#include "application_manager/commands/hmi/get_urls_response.h"
-#include "application_manager/commands/hmi/on_device_state_changed_notification.h"
-#include "application_manager/commands/hmi/navi_send_location_request.h"
-#include "application_manager/commands/hmi/navi_send_location_response.h"
-#include "application_manager/commands/hmi/on_tts_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/dial_number_request.h"
-#include "application_manager/commands/hmi/dial_number_response.h"
-#include "application_manager/commands/hmi/on_vi_gps_data_notification.h"
-#include "application_manager/commands/hmi/on_vi_speed_notification.h"
-#include "application_manager/commands/hmi/on_vi_rpm_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_state_notification.h"
-#include "application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
-#include "application_manager/commands/hmi/on_vi_external_temperature_notification.h"
-#include "application_manager/commands/hmi/on_vi_vin_notification.h"
-#include "application_manager/commands/hmi/on_vi_prndl_notification.h"
-#include "application_manager/commands/hmi/on_vi_tire_pressure_notification.h"
-#include "application_manager/commands/hmi/on_vi_odometer_notification.h"
-#include "application_manager/commands/hmi/on_vi_belt_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_body_information_notification.h"
-#include "application_manager/commands/hmi/on_vi_device_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_driver_braking_notification.h"
-#include "application_manager/commands/hmi/on_vi_wiper_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_head_lamp_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_engine_torque_notification.h"
-#include "application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h"
-#include "application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h"
-#include "application_manager/commands/hmi/on_vi_my_key_notification.h"
-#include "application_manager/commands/hmi/ui_set_icon_request.h"
-
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "test/application_manager/mock_application_manager_settings.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace am = application_manager;
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace dummy_hmi_commands_test {
-
-namespace commands = ::application_manager::commands;
-
-using ::testing::_;
-using ::testing::NotNull;
-using ::testing::Types;
-using commands::MessageSharedPtr;
-using ::test::components::event_engine_test::MockEventDispatcher;
-using ::test::components::application_manager_test::MockApplicationManager;
-using ::test::components::application_manager_test::
- MockApplicationManagerSettings;
-using ::application_manager::ApplicationSharedPtr;
-using ::test::components::application_manager_test::MockApplication;
-
-template <class Command>
-class HMICommandsTest : public components::commands_test::CommandRequestTest<
- CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-
- void InitCommand(const uint32_t& timeout) OVERRIDE {
- stream_retry_.first = 0;
- stream_retry_.second = 0;
- EXPECT_CALL(app_mngr_settings_, default_timeout())
- .WillOnce(ReturnRef(timeout));
- ON_CALL(app_mngr_, event_dispatcher())
- .WillByDefault(ReturnRef(event_dispatcher_));
- ON_CALL(app_mngr_, get_settings())
- .WillByDefault(ReturnRef(app_mngr_settings_));
- ON_CALL(app_mngr_settings_, start_stream_retry_amount())
- .WillByDefault(ReturnRef(stream_retry_));
- }
-
- protected:
- std::pair<uint32_t, int32_t> stream_retry_;
-};
-
-template <class Command>
-class HMICommandsTestFirst : public HMICommandsTest<Command> {
- public:
- using typename HMICommandsTest<Command>::CommandType;
-};
-
-template <class Command>
-class HMICommandsTestSecond : public HMICommandsTest<Command> {
- public:
- using typename HMICommandsTest<Command>::CommandType;
-};
-
-template <class Command>
-class HMICommandsTestThird : public HMICommandsTest<Command> {
- public:
- using typename HMICommandsTest<Command>::CommandType;
-};
-
-template <class Command>
-class HMICommandsTestFourth : public HMICommandsTest<Command> {
- public:
- using typename HMICommandsTest<Command>::CommandType;
-};
-
-template <class Command>
-class HMICommandsTestFifth : public HMICommandsTest<Command> {
- public:
- using typename HMICommandsTest<Command>::CommandType;
-};
-
-/* macro TYPED_TEST_CASE takes max 50 args. That is why there are few
- * TYPED_TEST_CASE for HMI and mobile commands
- */
-
-typedef Types<commands::OnStartDeviceDiscovery,
- commands::UpdateDeviceListResponse,
- commands::UpdateDeviceListRequest,
- commands::ActivateAppResponse,
- commands::ActivateAppRequest,
- commands::GetSystemInfoResponse,
- commands::GetSystemInfoRequest,
- commands::SDLActivateAppResponse,
- commands::SDLActivateAppRequest,
- commands::SDLPolicyUpdateResponse,
- commands::SDLPolicyUpdate,
- commands::GetUrlsResponse,
- commands::GetUrls,
- commands::OnAppPermissionChangedNotification,
- commands::SDLGetListOfPermissionsResponse,
- commands::SDLGetListOfPermissionsRequest,
- commands::SDLGetUserFriendlyMessageResponse,
- commands::SDLGetUserFriendlyMessageRequest,
- commands::SDLGetStatusUpdateResponse,
- commands::SDLGetStatusUpdateRequest,
- commands::OnStatusUpdateNotification,
- commands::OnAppPermissionConsentNotification,
- commands::MixingAudioSupportedResponse,
- commands::MixingAudioSupportedRequest,
- commands::OnExitAllApplicationsNotification,
- commands::UIAddCommandResponse,
- commands::UIAddCommandRequest,
- commands::UIDeleteCommandResponse,
- commands::UIDeleteCommandRequest,
- commands::UIAddSubmenuResponse,
- commands::UIAddSubmenuRequest,
- commands::UIDeleteSubmenuResponse,
- commands::UIDeleteSubmenuRequest,
- commands::UISetMediaClockTimerResponse,
- commands::UISetMediaClockTimerRequest,
- commands::UIPerformInteractionResponse,
- commands::UIPerformInteractionRequest,
- commands::UISetGlobalPropertiesResponse,
- commands::UISetGlobalPropertiesRequest,
- commands::UIScrollableMessageResponse,
- commands::UIScrollableMessageRequest,
- commands::UISetAppIconResponse,
- commands::UISetAppIconRequest,
- commands::UIGetSupportedLanguagesResponse,
- commands::UIGetSupportedLanguagesRequest,
- commands::UIGetLanguageResponse,
- commands::UIGetLanguageRequest,
- commands::UIGetCapabilitiesResponse,
- commands::UIGetCapabilitiesRequest,
- commands::UIChangeRegistratioResponse> HMICommandsListFirst;
-
-typedef Types<commands::UIChangeRegistrationRequest,
- commands::UIPerformAudioPassThruResponse,
- commands::UIPerformAudioPassThruRequest,
- commands::UIEndAudioPassThruResponse,
- commands::UIEndAudioPassThruRequest,
- commands::UIAlertResponse,
- commands::UIAlertRequest,
- commands::VRIsReadyResponse,
- commands::VRIsReadyRequest,
- commands::VRAddCommandResponse,
- commands::VRAddCommandRequest,
- commands::VRDeleteCommandResponse,
- commands::VRDeleteCommandRequest,
- commands::VRChangeRegistrationResponse,
- commands::VRChangeRegistrationRequest,
- commands::VRGetSupportedLanguagesResponse,
- commands::VRGetSupportedLanguagesRequest,
- commands::VRGetLanguageResponse,
- commands::VRGetLanguageRequest,
- commands::VRGetCapabilitiesResponse,
- commands::VRGetCapabilitiesRequest,
- commands::TTSIsReadyResponse,
- commands::TTSIsReadyRequest,
- commands::TTSChangeRegistratioResponse,
- commands::TTSChangeRegistrationRequest,
- commands::TTSGetSupportedLanguagesResponse,
- commands::TTSGetSupportedLanguagesRequest,
- commands::TTSStopSpeakingResponse,
- commands::TTSStopSpeakingRequest,
- commands::TTSGetLanguageResponse,
- commands::TTSGetLanguageRequest,
- commands::TTSSpeakResponse,
- commands::TTSSpeakRequest,
- commands::TTSSetGlobalPropertiesResponse,
- commands::TTSSetGlobalPropertiesRequest,
- commands::TTSGetCapabilitiesResponse,
- commands::TTSGetCapabilitiesRequest,
- commands::OnTTSStartedNotification,
- commands::OnTTSStoppedNotification,
- commands::OnAppActivatedNotification,
- commands::OnExitApplicationNotification,
- commands::UIShowResponse,
- commands::UIShowRequest,
- commands::UISliderResponse,
- commands::UISliderRequest,
- commands::ClosePopupResponse,
- commands::ClosePopupRequest,
- commands::UIIsReadyResponse,
- commands::UIIsReadyRequest,
- commands::VIIsReadyResponse> HMICommandsListSecond;
-
-typedef Types<commands::VIIsReadyRequest,
- commands::VIReadDIDResponse,
- commands::VIReadDIDRequest,
- commands::VIGetVehicleDataResponse,
- commands::VIGetVehicleDataRequest,
- commands::VIGetDTCsResponse,
- commands::VIGetDTCsRequest,
- commands::VIDiagnosticMessageResponse,
- commands::VIDiagnosticMessageRequest,
- commands::VIGetVehicleTypeResponse,
- commands::VIGetVehicleTypeRequest,
- commands::NaviIsReadyResponse,
- commands::NaviIsReadyRequest,
- commands::NaviAlertManeuverResponse,
- commands::NaviAlertManeuverRequest,
- commands::NaviGetWayPointsResponse,
- commands::NaviGetWayPointsRequest,
- commands::NaviUpdateTurnListResponse,
- commands::NaviUpdateTurnListRequest,
- commands::NaviShowConstantTBTResponse,
- commands::NaviShowConstantTBTRequest,
- commands::NaviSubscribeWayPointsResponse,
- commands::NaviSubscribeWayPointsRequest,
- commands::NaviUnsubscribeWayPointsResponse,
- commands::NaviUnSubscribeWayPointsRequest,
- commands::ButtonGetCapabilitiesResponse,
- commands::ButtonGetCapabilitiesRequest,
- commands::OnAllowSDLFunctionalityNotification,
- commands::OnSDLConsentNeededNotification,
- commands::UpdateSDLResponse,
- commands::UpdateSDLRequest,
- commands::OnIgnitionCycleOverNotification,
- commands::OnSystemInfoChangedNotification,
- commands::OnReadyNotification,
- commands::OnDeviceChosenNotification,
- commands::OnSystemContextNotification,
- commands::hmi::OnDriverDistractionNotification,
- commands::OnUpdateDeviceList,
- commands::OnAppRegisteredNotification,
- commands::OnAppUnregisteredNotification,
- commands::OnFindApplications,
- commands::UpdateAppListResponse,
- commands::UpdateAppListRequest,
- commands::OnVRStartedNotification,
- commands::OnVRStoppedNotification,
- commands::OnVRCommandNotification,
- commands::OnUICommandNotification,
- commands::OnAppDeactivatedNotification> HMICommandsListThird;
-
-typedef Types<commands::hmi::OnButtonEventNotification,
- commands::hmi::OnButtonPressNotification,
- commands::hmi::OnButtonSubscriptionNotification,
- commands::VISubscribeVehicleDataResponse,
- commands::VISubscribeVehicleDataRequest,
- commands::VIUnsubscribeVehicleDataResponse,
- commands::VIUnsubscribeVehicleDataRequest,
- commands::OnVIVehicleDataNotification,
- commands::OnNaviTBTClientStateNotification,
- commands::hmi::OnUIKeyBoardInputNotification,
- commands::hmi::OnUITouchEventNotification,
- commands::hmi::OnUIResetTimeoutNotification,
- commands::NaviStartStreamResponse,
- commands::NaviStartStreamRequest,
- commands::NaviStopStreamResponse,
- commands::NaviStopStreamRequest,
- commands::AudioStartStreamResponse,
- commands::AudioStartStreamRequest,
- commands::AudioStopStreamResponse,
- commands::AudioStopStreamRequest,
- commands::OnAudioDataStreamingNotification,
- commands::OnVideoDataStreamingNotification,
- commands::VRPerformInteractionResponse,
- commands::VRPerformInteractionRequest,
- commands::OnSystemRequestNotification,
- commands::OnPutFileNotification,
- commands::OnResumeAudioSourceNotification,
- commands::UiSetDisplayLayoutResponse,
- commands::UiSetDisplayLayoutRequest,
- commands::OnSDLCloseNotification,
- commands::OnSDLPersistenceCompleteNotification,
- commands::OnFileRemovedNotification,
- commands::OnRecordStartdNotification,
- commands::BasicCommunicationSystemResponse,
- commands::BasicCommunicationSystemRequest,
- commands::NaviSendLocationResponse,
- commands::NaviSendLocationRequest,
- commands::AddStatisticsInfoNotification,
- commands::OnSystemErrorNotification,
- commands::OnReceivedPolicyUpdate,
- commands::OnPolicyUpdate,
- commands::OnDeviceStateChangedNotification,
- commands::hmi::OnTTSResetTimeoutNotification,
- commands::hmi::DialNumberResponse,
- commands::hmi::DialNumberRequest,
- commands::OnEventChangedNotification,
- commands::OnNaviWayPointChangeNotification,
- commands::OnUILanguageChangeNotification,
- commands::OnVRLanguageChangeNotification,
- commands::OnTTSLanguageChangeNotification> HMICommandsListFourth;
-
-typedef Types<commands::OnVIGpsDataNotification,
- commands::OnVISpeedNotification,
- commands::OnVIRpmNotification,
- commands::OnVIFuelLevelNotification,
- commands::OnVIFuelLevelStateNotification,
- commands::OnVIInstantFuelConsumptionNotification,
- commands::OnVIExternalTemperatureNotification,
- commands::OnVIVinNotification,
- commands::OnVIPrndlNotification,
- commands::OnVITirePressureNotification,
- commands::OnVIOdometerNotification,
- commands::OnVIBeltStatusNotification,
- commands::OnVIBodyInformationNotification,
- commands::OnVIDeviceStatusNotification,
- commands::OnVIDriverBrakingNotification,
- commands::OnVIWiperStatusNotification,
- commands::OnVIHeadLampStatusNotification,
- commands::OnVIEngineTorqueNotification,
- commands::OnVIAccPedalPositionNotification,
- commands::OnVISteeringWheelAngleNotification,
- commands::OnVIMyKeyNotification,
- commands::AllowAllAppsRequest,
- commands::AllowAllAppsResponse,
- commands::AllowAppRequest,
- commands::AllowAppResponse> HMICommandsListFifth;
-
-TYPED_TEST_CASE(HMICommandsTestFirst, HMICommandsListFirst);
-TYPED_TEST_CASE(HMICommandsTestSecond, HMICommandsListSecond);
-TYPED_TEST_CASE(HMICommandsTestThird, HMICommandsListThird);
-TYPED_TEST_CASE(HMICommandsTestFourth, HMICommandsListFourth);
-TYPED_TEST_CASE(HMICommandsTestFifth, HMICommandsListFifth);
-
-TYPED_TEST(HMICommandsTestFirst, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-
-TYPED_TEST(HMICommandsTestSecond, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-TYPED_TEST(HMICommandsTestThird, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-
-TYPED_TEST(HMICommandsTestFourth, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-
-TYPED_TEST(HMICommandsTestFifth, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-
-} // namespace dummy_hmi_commands_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/get_system_info_request_test.cc b/src/components/application_manager/test/commands/hmi/get_system_info_request_test.cc
deleted file mode 100644
index e8c88256c3..0000000000
--- a/src/components/application_manager/test/commands/hmi/get_system_info_request_test.cc
+++ /dev/null
@@ -1,100 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/commands/hmi/get_system_info_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace get_system_info_request {
-
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::RequestToHMI;
-using am::commands::GetSystemInfoRequest;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<RequestToHMI> RequestToHMIPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 1u;
-} // namespace
-
-class GetSystemInfoRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(GetSystemInfoRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][strings::correlation_id] = kCorrelationId;
-
- RequestToHMIPtr command(CreateCommand<GetSystemInfoRequest>(command_msg));
-
- const uint32_t kAppId = command->application_id();
-
- EXPECT_CALL(app_mngr_, set_application_id(kCorrelationId, kAppId));
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::msg_params][strings::app_id].asUInt(),
- kAppId);
- EXPECT_EQ((*command_msg)[strings::params][strings::correlation_id].asUInt(),
- kCorrelationId);
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-} // namespace get_system_info_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/get_system_info_response_test.cc b/src/components/application_manager/test/commands/hmi/get_system_info_response_test.cc
deleted file mode 100644
index 980b6e0e9d..0000000000
--- a/src/components/application_manager/test/commands/hmi/get_system_info_response_test.cc
+++ /dev/null
@@ -1,153 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/commands/hmi/get_system_info_response.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace get_system_info_response {
-
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::ResponseFromHMI;
-using am::commands::GetSystemInfoResponse;
-using am::commands::CommandImpl;
-using am::commands::SystemInfo;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-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 = "";
-} // namespace
-
-class GetSystemInfoResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateCommandMsg() {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::msg_params]["ccpu_version"] = ccpu_version;
- (*command_msg)[strings::msg_params]["wersCountryCode"] = wers_country_code;
- (*command_msg)[strings::msg_params]["language"] = lang_code;
-
- return command_msg;
- }
-
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(GetSystemInfoResponseTest, GetSystemInfo_SUCCESS) {
- 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));
- policy_test::MockPolicyHandlerInterface policy_handler;
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- 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(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler));
- EXPECT_CALL(policy_handler,
- OnGetSystemInfo(ccpu_version, wers_country_code, kLanguage));
-
- command->Run();
-}
-
-TEST_F(GetSystemInfoResponseTest, GetSystemInfo_UNSUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::WRONG_LANGUAGE;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
-
- ResponseFromHMIPtr command(CreateCommand<GetSystemInfoResponse>(command_msg));
- policy_test::MockPolicyHandlerInterface policy_handler;
-
- EXPECT_CALL(app_mngr_, hmi_capabilities()).Times(0);
-
- EXPECT_CALL(mock_message_helper_,
- CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code)))
- .Times(0);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler));
- EXPECT_CALL(policy_handler, OnGetSystemInfo("", "", ""));
-
- command->Run();
-}
-
-} // namespace get_system_info_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/get_urls_response_test.cc b/src/components/application_manager/test/commands/hmi/get_urls_response_test.cc
deleted file mode 100644
index 5a41cae7ce..0000000000
--- a/src/components/application_manager/test/commands/hmi/get_urls_response_test.cc
+++ /dev/null
@@ -1,91 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/response_to_hmi.h"
-#include "application_manager/commands/hmi/get_urls_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace get_urls_response {
-
-using ::testing::_;
-using ::testing::Return;
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::ResponseToHMI;
-using am::commands::GetUrlsResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<ResponseToHMI> ResponseToHMIPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class GetUrlResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(GetUrlResponseTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
-
- ResponseToHMIPtr command(CreateCommand<GetUrlsResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-} // namespace get_urls_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/get_urls_test.cc b/src/components/application_manager/test/commands/hmi/get_urls_test.cc
deleted file mode 100644
index 9430dc045c..0000000000
--- a/src/components/application_manager/test/commands/hmi/get_urls_test.cc
+++ /dev/null
@@ -1,331 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/message.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command.h"
-#include "application_manager/commands/hmi/get_urls.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-#include "hmi/request_from_hmi.h"
-#include "policy/mock_policy_manager.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace get_urls {
-
-using namespace hmi_apis;
-using namespace policy;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-using ::testing::SetArgReferee;
-using ::test::components::application_manager_test::MockApplication;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::RequestFromHMI;
-using am::commands::GetUrls;
-using am::commands::CommandImpl;
-using policy::PolicyHandler;
-using policy_test::MockPolicyHandlerInterface;
-
-typedef SharedPtr<RequestFromHMI> RequestFromHMIPtr;
-
-namespace {
-const uint32_t kInvalidAppId_ = 0u;
-const uint32_t kAppIdForSending = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kServiceType = 0u;
-const std::string kInitialService = "0x0";
-const std::string kPolicyService = "7";
-const std::string kDefaultUrl = "URL is not found";
-const std::string kDefaultId = "default";
-const std::string kPolicyAppId = "policy_app_id";
-} // namespace
-
-class GetUrlsTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- policy_test::MockPolicyHandlerInterface mock_policy_handler_;
- MessageSharedPtr command_msg_;
- RequestFromHMIPtr request_command_;
-
- GetUrlsTest() {
- command_msg_ =
- CreateMessage(NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
- (*command_msg_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
- kInitialService;
-
- request_command_ = CreateCommand<GetUrls>(command_msg_);
-
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
- }
-};
-
-TEST_F(GetUrlsTest, RUN_SUCCESS) {
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
-
- request_command_->Run();
-}
-
-TEST_F(GetUrlsTest, RUN_PolicyNotEnabled_UNSUCCESS) {
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(false));
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(command_msg_)).WillOnce(Return(true));
-
- request_command_->Run();
-
- EXPECT_EQ(am::MessageType::kResponse,
- (*command_msg_)[strings::params][strings::message_type].asInt());
- EXPECT_EQ(Common_Result::DATA_NOT_AVAILABLE,
- (*command_msg_)[strings::params][am::hmi_response::code].asInt());
-}
-
-TEST_F(GetUrlsTest, RUN_EmptyEndpoints_UNSUCCESS) {
- EndpointUrls endpoints_;
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kServiceType, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
- EXPECT_CALL(app_mngr_, ManageHMICommand(command_msg_)).WillOnce(Return(true));
-
- request_command_->Run();
-
- EXPECT_EQ(am::MessageType::kResponse,
- (*command_msg_)[strings::params][strings::message_type].asInt());
- EXPECT_EQ(Common_Result::DATA_NOT_AVAILABLE,
- (*command_msg_)[strings::params][am::hmi_response::code].asInt());
-}
-
-#ifdef EXTENDED_POLICY
-TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_SUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
- kPolicyService;
-
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
-
- EndpointUrls endpoints_;
- EndpointData data(kDefaultUrl);
- endpoints_.push_back(data);
-
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
-
- MockAppPtr mock_app = CreateMockApp();
-
- EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
- .WillOnce(Return(kAppIdForSending));
-
- EXPECT_CALL(app_mngr_, application(kAppIdForSending))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppIdForSending));
- EXPECT_CALL(app_mngr_, ManageHMICommand(command_msg_)).WillOnce(Return(true));
-
- request_command_->Run();
-
- EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
- am::hmi_request::service));
-
- EXPECT_EQ(am::MessageType::kResponse,
- (*command_msg_)[strings::params][strings::message_type].asInt());
- EXPECT_EQ(Common_Result::SUCCESS,
- (*command_msg_)[strings::params][am::hmi_response::code].asInt());
-
- EXPECT_EQ(kAppIdForSending,
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- [strings::app_id].asInt());
- EXPECT_EQ(kDefaultUrl,
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- [strings::url].asString());
-}
-
-TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_IncorrectIdForSending_UNSUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
- kPolicyService;
-
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
-
- EndpointUrls endpoints_;
- EndpointData data(kDefaultUrl);
- endpoints_.push_back(data);
-
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
-
- EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
- .WillOnce(Return(kInvalidAppId_));
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(command_msg_)).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, application(kInvalidAppId_)).Times(0);
-
- request_command_->Run();
-}
-
-TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_ApplicationIsNotValid_UNSUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
- kPolicyService;
-
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
-
- EndpointUrls endpoints_;
- EndpointData data(kDefaultUrl);
- endpoints_.push_back(data);
-
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
-
- MockAppPtr invalid_mock_app;
-
- EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
- .WillOnce(Return(kAppIdForSending));
-
- EXPECT_CALL(app_mngr_, application(kAppIdForSending))
- .WillOnce(Return(invalid_mock_app));
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(command_msg_)).WillOnce(Return(true));
-
- request_command_->Run();
-
- EXPECT_EQ(am::MessageType::kResponse,
- (*command_msg_)[strings::params][strings::message_type].asInt());
- EXPECT_EQ(Common_Result::DATA_NOT_AVAILABLE,
- (*command_msg_)[strings::params][am::hmi_response::code].asInt());
-}
-
-TEST_F(GetUrlsTest, ProcessPolicyServiceURLs_FoundURLForApplication_SUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
- kPolicyService;
-
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
-
- EndpointUrls endpoints_;
- EndpointData data(kDefaultUrl);
- data.app_id = kPolicyAppId;
- endpoints_.push_back(data);
-
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kPolicyService, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
-
- MockAppPtr mock_app = CreateMockApp();
-
- EXPECT_CALL(mock_policy_handler_, GetAppIdForSending())
- .WillOnce(Return(kAppIdForSending));
-
- EXPECT_CALL(app_mngr_, application(kAppIdForSending))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(*mock_app, policy_app_id()).WillOnce(Return(kPolicyAppId));
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(command_msg_)).WillOnce(Return(true));
-
- request_command_->Run();
-
- EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
- am::hmi_request::service));
-
- EXPECT_EQ(am::MessageType::kResponse,
- (*command_msg_)[strings::params][strings::message_type].asInt());
- EXPECT_EQ(Common_Result::SUCCESS,
- (*command_msg_)[strings::params][am::hmi_response::code].asInt());
-}
-#endif
-
-TEST_F(GetUrlsTest, DISABLED_ProcessServiceURLs_SUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0] =
- kDefaultUrl;
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- [am::hmi_response::policy_app_id] = "1";
-
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
-
- EndpointUrls endpoints_;
- EndpointData data(kDefaultUrl);
- data.app_id = "1";
- endpoints_.push_back(data);
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kServiceType, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
-
- request_command_->Run();
-
- EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
- am::hmi_request::service));
- EXPECT_EQ(kDefaultUrl,
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- [am::strings::url].asString());
- EXPECT_EQ(endpoints_[0].app_id,
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- [am::hmi_response::policy_app_id].asString());
-}
-
-TEST_F(GetUrlsTest, ProcessServiceURLs_PolicyDefaultId_SUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0] =
- kDefaultUrl;
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- [am::hmi_response::policy_app_id] = kDefaultId;
-
- EXPECT_CALL(mock_policy_handler_, PolicyEnabled()).WillOnce(Return(true));
- EndpointUrls endpoints_;
- EndpointData data(kDefaultUrl);
- endpoints_.push_back(data);
- EXPECT_CALL(mock_policy_handler_, GetUpdateUrls(kServiceType, _))
- .WillOnce(SetArgReferee<1>(endpoints_));
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application_by_policy_id(_))
- .WillOnce(Return(mock_app));
- request_command_->Run();
-
- EXPECT_FALSE((*command_msg_)[am::strings::msg_params].keyExists(
- am::hmi_request::service));
- EXPECT_TRUE(
- (*command_msg_)[am::strings::msg_params][am::hmi_response::urls][0]
- .keyExists(am::hmi_response::policy_app_id));
-}
-
-} // namespace get_urls
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/hmi_notifications/hmi_notifications_test.cc b/src/components/application_manager/test/commands/hmi/hmi_notifications/hmi_notifications_test.cc
deleted file mode 100644
index ffedf1b4f6..0000000000
--- a/src/components/application_manager/test/commands/hmi/hmi_notifications/hmi_notifications_test.cc
+++ /dev/null
@@ -1,1980 +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 <string>
-#include <vector>
-#include "gtest/gtest.h"
-#include "application_manager/commands/commands_test.h"
-
-#include "application_manager/commands/hmi/on_button_event_notification.h"
-#include "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
-#include "application_manager/commands/hmi/on_navi_way_point_change_notification.h"
-#include "application_manager/commands/hmi/on_ui_command_notification.h"
-#include "application_manager/commands/hmi/on_ui_keyboard_input_notification.h"
-#include "application_manager/commands/hmi/on_ui_touch_event_notification.h"
-#include "application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h"
-#include "application_manager/commands/hmi/on_vi_belt_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_body_information_notification.h"
-#include "application_manager/commands/hmi/on_vi_device_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_driver_braking_notification.h"
-#include "application_manager/commands/hmi/on_vi_engine_torque_notification.h"
-#include "application_manager/commands/hmi/on_vi_external_temperature_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_state_notification.h"
-#include "application_manager/commands/hmi/on_vi_gps_data_notification.h"
-#include "application_manager/commands/hmi/on_vi_head_lamp_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
-#include "application_manager/commands/hmi/on_vi_my_key_notification.h"
-#include "application_manager/commands/hmi/on_vi_odometer_notification.h"
-#include "application_manager/commands/hmi/on_vi_prndl_notification.h"
-#include "application_manager/commands/hmi/on_vi_rpm_notification.h"
-#include "application_manager/commands/hmi/on_vi_speed_notification.h"
-#include "application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h"
-#include "application_manager/commands/hmi/on_vi_tire_pressure_notification.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/on_vi_vin_notification.h"
-#include "application_manager/commands/hmi/on_vi_wiper_status_notification.h"
-#include "application_manager/commands/hmi/on_app_permission_changed_notification.h"
-#include "application_manager/commands/hmi/on_app_registered_notification.h"
-#include "application_manager/commands/hmi/on_audio_data_streaming_notification.h"
-#include "application_manager/commands/hmi/on_button_subscription_notification.h"
-#include "application_manager/commands/hmi/on_file_removed_notification.h"
-#include "application_manager/commands/hmi/on_put_file_notification.h"
-#include "application_manager/commands/hmi/on_resume_audio_source_notification.h"
-#include "application_manager/commands/hmi/on_sdl_close_notification.h"
-#include "application_manager/commands/hmi/on_sdl_consent_needed_notification.h"
-#include "application_manager/commands/hmi/on_sdl_persistence_complete_notification.h"
-#include "application_manager/commands/hmi/on_status_update_notification.h"
-#include "application_manager/commands/hmi/on_video_data_streaming_notification.h"
-#include "application_manager/commands/hmi/on_record_start_notification.h"
-#include "application_manager/commands/hmi/on_app_activated_notification.h"
-#include "application_manager/commands/hmi/on_app_deactivated_notification.h"
-#include "application_manager/commands/hmi/on_app_unregistered_notification.h"
-#include "application_manager/commands/hmi/on_button_press_notification.h"
-#include "application_manager/commands/hmi/on_event_changed_notification.h"
-#include "application_manager/commands/hmi/on_ready_notification.h"
-#include "application_manager/commands/hmi/on_tts_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/on_tts_started_notification.h"
-#include "application_manager/commands/hmi/on_tts_stopped_notification.h"
-#include "application_manager/commands/hmi/on_ui_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/on_vr_started_notification.h"
-#include "application_manager/commands/hmi/on_vr_stopped_notification.h"
-#include "application_manager/commands/hmi/on_app_permission_consent_notification.h"
-#include "application_manager/commands/hmi/on_ignition_cycle_over_notification.h"
-#include "application_manager/commands/hmi/on_policy_update.h"
-#include "application_manager/commands/hmi/on_received_policy_update.h"
-#include "application_manager/commands/hmi/on_system_error_notification.h"
-#include "application_manager/commands/hmi/on_system_info_changed_notification.h"
-#include "application_manager/commands/hmi/on_allow_sdl_functionality_notification.h"
-#include "application_manager/commands/hmi/on_device_state_changed_notification.h"
-#include "application_manager/commands/hmi/on_exit_all_applications_notification.h"
-#include "application_manager/commands/hmi/on_exit_application_notification.h"
-#include "application_manager/commands/hmi/on_vr_command_notification.h"
-#include "application_manager/commands/hmi/on_vr_language_change_notification.h"
-#include "application_manager/commands/hmi/on_start_device_discovery.h"
-#include "application_manager/commands/hmi/on_device_chosen_notification.h"
-#include "application_manager/commands/hmi/on_system_context_notification.h"
-#include "application_manager/commands/hmi/on_system_request_notification.h"
-#include "application_manager/commands/hmi/on_tts_language_change_notification.h"
-#include "application_manager/commands/hmi/on_ui_language_change_notification.h"
-#include "application_manager/commands/hmi/on_driver_distraction_notification.h"
-
-#include "utils/lock.h"
-#include "utils/data_accessor.h"
-#include "utils/signals.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-#include "utils/file_system.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_state_controller.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/hmi_capabilities_impl.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "transport_manager/mock_transport_manager.h"
-#include "connection_handler/mock_connection_handler.h"
-#include "connection_handler/mock_connection_handler_settings.h"
-#include "test/application_manager/mock_application_manager_settings.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_message_helper.h"
-#include "protocol_handler/mock_session_observer.h"
-#include "application_manager/mock_resume_ctrl.h"
-
-#ifdef SDL_REMOTE_CONTROL
-#include "functional_module/plugin_manager.h"
-#endif // SDL_REMOTE_CONTROL
-
-namespace am = application_manager;
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace hmi_notifications_test {
-
-using ::testing::_;
-using ::testing::Test;
-using ::testing::Types;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::NiceMock;
-using ::testing::InSequence;
-using ::utils::SharedPtr;
-using ::smart_objects::SmartObject;
-using ::application_manager::commands::MessageSharedPtr;
-using ::test::components::application_manager_test::MockApplicationManager;
-using ::test::components::application_manager_test::
- MockApplicationManagerSettings;
-using ::application_manager::ApplicationSharedPtr;
-using ::test::components::application_manager_test::MockApplication;
-using ::test::components::event_engine_test::MockEventDispatcher;
-using ::application_manager::MockMessageHelper;
-
-using namespace am::commands;
-
-typedef SharedPtr<MockApplication> MockAppPtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-#define MEDIA true
-#define NOT_MEDIA false
-#define VC true
-#define NOT_VC false
-#define NAVI true
-#define NOT_NAVI false
-
-ACTION_P(GetEventId, event_id) {
- *event_id = arg0.id();
-}
-ACTION_P(GetArg, arg) {
- *arg = arg0;
-}
-
-ACTION_P(GetArg3, result) {
- arg3 = *result;
-}
-
-ACTION_P2(GetConnectIdPermissionConsent, connect_id, consent) {
- *connect_id = arg0;
- std::vector<policy::FunctionalGroupPermission>::const_iterator it =
- arg1.group_permissions.begin();
- for (; it != arg1.group_permissions.end(); ++it) {
- consent->group_permissions.push_back(*it);
- }
- consent->consent_source = arg1.consent_source;
-}
-ACTION_P2(GetBoolValueAndString, value, str) {
- *value = arg0;
- *str = arg1;
-}
-ACTION_P(GetMessage, message) {
- (*message)[am::strings::params][am::strings::function_id] =
- (*arg0)[am::strings::params][am::strings::function_id].asInt();
- (*message)[am::strings::params][am::strings::message_type] =
- (*arg0)[am::strings::params][am::strings::message_type].asInt();
- (*message)[am::strings::params][am::strings::correlation_id] =
- (*arg0)[am::strings::params][am::strings::correlation_id].asInt();
- (*message)[am::strings::params][am::strings::connection_key] =
- (*arg0)[am::strings::params][am::strings::connection_key].asInt();
- return (*message)[am::strings::params][am::strings::correlation_id].asInt();
-}
-
-namespace {
-const uint32_t kCountCommandsManageMobile_ = 22u;
-const uint32_t kCountCommandsToHmi_ = 12u;
-const int32_t kHmiProtocolType_ = 1;
-const int32_t kMobileProtocolType_ = 0;
-const int32_t kProtocolVersion_ = 3;
-const uint32_t kCorrelationId_ = 1939u;
-const uint32_t kAppId_ = 2014u;
-} // namespace
-
-class HMICommandsNotificationsTest
- : public components::commands_test::CommandsTest<
- CommandsTestMocks::kIsNice> {
- public:
- HMICommandsNotificationsTest()
- : applications_(application_set_, applications_lock_), app_ptr_(NULL) {}
-
- ~HMICommandsNotificationsTest() {
- // Fix DataAccessor release and WinQt crash
- Mock::VerifyAndClearExpectations(&app_mngr_);
- }
- typedef Command CommandType;
-
- protected:
- am::ApplicationSet application_set_;
- sync_primitives::Lock applications_lock_;
- DataAccessor<am::ApplicationSet> applications_;
- MockHMICapabilities mock_hmi_capabilities_;
-
- NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
- NiceMock<policy_test::MockPolicyHandlerInterface> policy_interface_;
-
- application_manager_test::MockStateController mock_state_controller_;
-
- am::ApplicationSharedPtr app_;
- NiceMock<MockApplication>* app_ptr_;
-
- typedef IsNiceMock<connection_handler_test::MockConnectionHandler,
- kMocksAreNice>::Result MockConnectionHandler;
-
- typedef IsNiceMock<protocol_handler_test::MockSessionObserver,
- kMocksAreNice>::Result MockSessionObserver;
-
- MockConnectionHandler mock_connection_handler_;
- MockSessionObserver mock_session_observer_;
-
- void InitCommand(const uint32_t& default_timeout) OVERRIDE {
- app_ = ConfigureApp(&app_ptr_, kAppId_, NOT_MEDIA, NOT_NAVI, NOT_VC);
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- EXPECT_CALL(app_mngr_settings_, default_timeout())
- .WillOnce(ReturnRef(default_timeout));
- ON_CALL(app_mngr_, event_dispatcher())
- .WillByDefault(ReturnRef(mock_event_dispatcher_));
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(policy_interface_));
- ON_CALL(app_mngr_, application_by_hmi_app(_)).WillByDefault(Return(app_));
- ON_CALL(*app_ptr_, app_id()).WillByDefault(Return(kAppId_));
- }
-
- am::ApplicationSharedPtr ConfigureApp(NiceMock<MockApplication>** app_mock,
- uint32_t app_id,
- bool media,
- bool navi,
- bool vc) {
- *app_mock = new NiceMock<MockApplication>;
-
- Mock::AllowLeak(*app_mock); // WorkAround for gogletest bug
- am::ApplicationSharedPtr app(*app_mock);
-
- ON_CALL(**app_mock, app_id()).WillByDefault(Return(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, is_voice_communication_supported())
- .WillByDefault(Return(vc));
- ON_CALL(**app_mock, IsAudioApplication())
- .WillByDefault(Return(media || navi || vc));
- return app;
- }
-#if defined(OS_POSIX)
- void SubscribeForSignal() {
- sigset_t signal_set;
- sigemptyset(&signal_set);
- sigaddset(&signal_set, SIGINT);
- sigaddset(&signal_set, SIGTERM);
- pthread_sigmask(SIG_BLOCK, &signal_set, NULL);
- }
-#endif
-};
-
-namespace {
-void sig_handler(int sig) {
- switch (sig) {
- case SIGINT:
- break;
- case SIGTERM:
- break;
- case SIGSEGV:
- abort();
- default:
- exit(EXIT_FAILURE);
- }
-}
-} // namespace
-
-template <class Command>
-class HMIOnViNotifications : public commands_test::CommandsTest<kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-template <class Command>
-class HMIOnNotificationsListToHMI
- : public commands_test::CommandsTest<kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-template <class CommandT, hmi_apis::FunctionID::eType kCommandId>
-struct CommandPair {
- typedef CommandT CommandType;
- enum { kHMICommandId = kCommandId };
-};
-
-template <class Command>
-class HMIOnNotificationsEventDispatcher
- : public commands_test::CommandsTest<kIsNice> {
- public:
- typedef Command CommandType;
- NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
-};
-
-typedef Types<OnVIAccPedalPositionNotification,
- OnVIBeltStatusNotification,
- OnVIBodyInformationNotification,
- OnVIDeviceStatusNotification,
- OnVIDriverBrakingNotification,
- OnVIEngineTorqueNotification,
- OnVIExternalTemperatureNotification,
- OnVIFuelLevelNotification,
- OnVIFuelLevelStateNotification,
- OnVIGpsDataNotification,
- OnVIHeadLampStatusNotification,
- OnVIInstantFuelConsumptionNotification,
- OnVIMyKeyNotification,
- OnVIOdometerNotification,
- OnVIPrndlNotification,
- OnVIRpmNotification,
- OnVISpeedNotification,
- OnVISteeringWheelAngleNotification,
- OnVITirePressureNotification,
- OnVIVehicleDataNotification,
- OnVIVinNotification,
- OnVIWiperStatusNotification> HMIOnViNotificationsTypes;
-
-typedef Types<OnAppPermissionChangedNotification,
- OnAudioDataStreamingNotification,
- hmi::OnButtonSubscriptionNotification,
- OnFileRemovedNotification,
- OnPutFileNotification,
- OnResumeAudioSourceNotification,
- OnSDLCloseNotification,
- OnSDLConsentNeededNotification,
- OnSDLPersistenceCompleteNotification,
- OnStatusUpdateNotification,
- OnVideoDataStreamingNotification,
- OnRecordStartdNotification> HMIOnNotificationsListToHMITypes;
-
-typedef Types<
- CommandPair<OnAppActivatedNotification,
- hmi_apis::FunctionID::BasicCommunication_OnAppActivated>,
- CommandPair<OnAppDeactivatedNotification,
- hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated>,
- CommandPair<OnEventChangedNotification,
- hmi_apis::FunctionID::BasicCommunication_OnEventChanged>,
- CommandPair<hmi::OnTTSResetTimeoutNotification,
- hmi_apis::FunctionID::TTS_OnResetTimeout>,
- CommandPair<OnTTSStartedNotification, hmi_apis::FunctionID::TTS_Started>,
- CommandPair<OnTTSStoppedNotification, hmi_apis::FunctionID::TTS_Stopped>,
- CommandPair<hmi::OnUIResetTimeoutNotification,
- hmi_apis::FunctionID::UI_OnResetTimeout>,
- CommandPair<OnVRStartedNotification, hmi_apis::FunctionID::VR_Started>,
- CommandPair<OnVRStoppedNotification, hmi_apis::FunctionID::VR_Stopped> >
- HMIOnNotificationsEventDispatcherTypes;
-
-TYPED_TEST_CASE(HMIOnViNotifications, HMIOnViNotificationsTypes);
-TYPED_TEST_CASE(HMIOnNotificationsListToHMI, HMIOnNotificationsListToHMITypes);
-TYPED_TEST_CASE(HMIOnNotificationsEventDispatcher,
- HMIOnNotificationsEventDispatcherTypes);
-
-TYPED_TEST(HMIOnViNotifications, CommandsSendNotificationToMobile) {
- MessageSharedPtr message =
- commands_test::CommandsTest<kIsNice>::CreateMessage();
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>(message);
- EXPECT_CALL(commands_test::CommandsTest<kIsNice>::app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID),
- (*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());
-}
-
-TYPED_TEST(HMIOnNotificationsListToHMI, CommandsSendNotificationToHmi) {
- MessageSharedPtr message =
- commands_test::CommandsTest<kIsNice>::CreateMessage();
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>(message);
- EXPECT_CALL(commands_test::CommandsTest<kIsNice>::app_mngr_,
- SendMessageToHMI(_));
- command->Run();
- EXPECT_EQ(
- static_cast<int32_t>(kHmiProtocolType_),
- (*message)[am::strings::params][am::strings::protocol_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kProtocolVersion_),
- (*message)[am::strings::params][am::strings::protocol_version].asInt());
-}
-
-TYPED_TEST(HMIOnNotificationsEventDispatcher,
- CommandsNotificationEventDispatcher) {
- int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr message =
- commands_test::CommandsTest<kIsNice>::CreateMessage();
- utils::SharedPtr<typename TestFixture::CommandType::CommandType> command =
- this->template CreateCommand<
- typename TestFixture::CommandType::CommandType>(message);
- EXPECT_CALL(commands_test::CommandsTest<kIsNice>::app_mngr_,
- event_dispatcher())
- .WillOnce(ReturnRef(this->mock_event_dispatcher_));
- EXPECT_CALL(this->mock_event_dispatcher_, raise_event(_))
- .WillOnce(GetEventId(&event_id));
- command->Run();
- EXPECT_EQ(TestFixture::CommandType::kHMICommandId, event_id);
-}
-
-// notifications(SendNotificationToMobile)
-TEST_F(HMICommandsNotificationsTest, OnButtonEventSendNotificationToMobile) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnButtonEventNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID),
- (*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, OnNaviTBTClientSendNotificationToMobile) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnNaviTBTClientStateNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnTBTClientStateID),
- (*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,
- OnNaviWayPointChangeSendNotificationToMobile) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnNaviWayPointChangeNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnWayPointChangeID),
- (*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, OnUICommandSendNotificationToMobile) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnUICommandNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_MENU),
- (*message)[am::strings::msg_params][am::strings::trigger_source].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnUIKeyBoardInputSendNotificationToMobile) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnUIKeyBoardInputNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnKeyboardInputID),
- (*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, OnUITouchEventSendNotificationToMobile) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnUITouchEventNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnTouchEventID),
- (*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();
- utils::SharedPtr<Command> command =
- CreateCommand<OnAppRegisteredNotification>(message);
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(_));
- EXPECT_CALL(app_mngr_, event_dispatcher());
- EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
- .WillOnce(GetEventId(&event_id));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered),
- event_id);
- EXPECT_EQ(
- kHmiProtocolType_,
- (*message)[am::strings::params][am::strings::protocol_type].asInt());
- EXPECT_EQ(
- kProtocolVersion_,
- (*message)[am::strings::params][am::strings::protocol_version].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAppUnregisteredNotificationEventDispatcher) {
- int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnAppUnregisteredNotification>(message);
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(_));
- EXPECT_CALL(app_mngr_, event_dispatcher());
- EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
- .WillOnce(GetEventId(&event_id));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(
- hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered),
- event_id);
- EXPECT_EQ(
- kHmiProtocolType_,
- (*message)[am::strings::params][am::strings::protocol_type].asInt());
- EXPECT_EQ(
- kProtocolVersion_,
- (*message)[am::strings::params][am::strings::protocol_version].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest, OnButtonPressNotificationEventDispatcher) {
- int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnButtonPressNotification>(message);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_, event_dispatcher());
- EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
- .WillOnce(GetEventId(&event_id));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(hmi_apis::FunctionID::Buttons_OnButtonPress),
- event_id);
- EXPECT_EQ(static_cast<int>(mobile_apis::FunctionID::eType::OnButtonPressID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest, OnReadyNotificationEventDispatcher) {
- int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnReadyNotification>(message);
-
- EXPECT_CALL(app_mngr_, OnHMIStartedCooperation());
- EXPECT_CALL(app_mngr_, event_dispatcher());
- EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
- .WillOnce(GetEventId(&event_id));
- command->Run();
- EXPECT_EQ(hmi_apis::FunctionID::BasicCommunication_OnReady, event_id);
-}
-
-// policy handler
-TEST_F(HMICommandsNotificationsTest,
- OnIgnitionCycleOverNotificationPolicyHandler) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnIgnitionCycleOverNotification>(message);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, OnIgnitionCycleOver());
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest, OnPolicyUpdateNotificationPolicyHandler) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command = CreateCommand<OnPolicyUpdate>(message);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, OnPTExchangeNeeded());
- command->Run();
-}
-
-#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
-TEST_F(HMICommandsNotificationsTest,
- OnReceivePolicyUpdateNotification_SUCCESS) {
- const std::string kFile = "./test_file.txt";
- EXPECT_TRUE(file_system::CreateFile(kFile));
- uint8_t tmp[] = {1u, 2u, 3u, 4u};
- std::vector<uint8_t> data(tmp, tmp + 4);
- EXPECT_TRUE(file_system::WriteBinaryFile(kFile, data));
-
- MessageSharedPtr message = CreateMessage(smart_objects::SmartType_String);
- (*message)[am::strings::msg_params][am::hmi_notification::policyfile] = kFile;
- utils::SharedPtr<Command> command =
- CreateCommand<OnReceivedPolicyUpdate>(message);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, ReceiveMessageFromSDK(kFile, data));
- command->Run();
- EXPECT_TRUE(file_system::DeleteFile(kFile));
-}
-#endif
-
-TEST_F(HMICommandsNotificationsTest,
- OnReceivePolicyUpdateNotification_UNSUCCESS) {
- MessageSharedPtr message = CreateMessage(smart_objects::SmartType_String);
- utils::SharedPtr<Command> command =
- CreateCommand<OnReceivedPolicyUpdate>(message);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler()).Times(0);
- EXPECT_CALL(policy_interface_, ReceiveMessageFromSDK(_, _)).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAppPermissionConsentNotificationPolicyHandlerNoAppId) {
- MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
- (*message)[am::strings::msg_params]["consentedFunctions"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- SmartObject& applications =
- (*message)[am::strings::msg_params]["consentedFunctions"];
-
- smart_objects::SmartObject hmi_application_temp(smart_objects::SmartType_Map);
- applications[0] = hmi_application_temp;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnAppPermissionConsentNotification>(message);
-
- int32_t connection_id = -1;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
-#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _, _))
-#else
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _))
-#endif
- .WillOnce(GetArg(&connection_id));
- command->Run();
- EXPECT_EQ(0, connection_id);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAppPermissionConsentNotificationPolicyHandlerWithAppId) {
- MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- (*message)[am::strings::msg_params]["consentedFunctions"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- smart_objects::SmartObjectSPtr consented_function =
- utils::MakeShared<smart_objects::SmartObject>();
- (*message)[am::strings::msg_params]["consentedFunctions"][0] =
- *consented_function;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnAppPermissionConsentNotification>(message);
-
- int32_t connection_id = -1;
- policy::PermissionConsent permission_consent;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
-#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _, _))
-#else
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _))
-#endif
- .WillOnce(
- GetConnectIdPermissionConsent(&connection_id, &permission_consent));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(kAppId_), connection_id);
- std::vector<policy::FunctionalGroupPermission>::const_iterator it =
- permission_consent.group_permissions.begin();
- for (; it != permission_consent.group_permissions.end(); ++it) {
- EXPECT_EQ(policy::kGroupUndefined, (*it).state);
- }
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAppPermissionConsentNotificationPolicyHandlerAppIdAllowTrue) {
- MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
- (*message)[am::strings::msg_params]["consentedFunctions"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- (*message)[am::strings::msg_params]["source"] = "test_content_source";
-
- smart_objects::SmartObjectSPtr consented_function =
- utils::MakeShared<smart_objects::SmartObject>();
- (*consented_function)["allowed"] = true;
- (*consented_function)[am::strings::id] = 999;
- (*consented_function)[am::strings::name] = "test_group_alias";
- (*message)[am::strings::msg_params]["consentedFunctions"][0] =
- *consented_function;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnAppPermissionConsentNotification>(message);
-
- int32_t connection_id = -1;
- policy::PermissionConsent permission_consent;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
-#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _, _))
-#else
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _))
-#endif
- .WillOnce(
- GetConnectIdPermissionConsent(&connection_id, &permission_consent));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(kAppId_), connection_id);
-
- std::vector<policy::FunctionalGroupPermission>::const_iterator it =
- permission_consent.group_permissions.begin();
- for (; it != permission_consent.group_permissions.end(); ++it) {
- EXPECT_EQ(999, (*it).group_id);
- EXPECT_EQ("test_group_alias", (*it).group_alias);
- EXPECT_EQ(policy::kGroupAllowed, (*it).state);
- }
- EXPECT_EQ("test_content_source", permission_consent.consent_source);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAppPermissionConsentNotificationPolicyHandlerAppIdAllowFalse) {
- MessageSharedPtr message = CreateMessage(smart_objects::SmartType_Map);
- (*message)[am::strings::msg_params]["consentedFunctions"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- (*message)[am::strings::msg_params]["source"] = "test_content_source";
-
- smart_objects::SmartObjectSPtr consented_function =
- utils::MakeShared<smart_objects::SmartObject>();
- (*consented_function)["allowed"] = false;
- (*consented_function)[am::strings::id] = 999;
- (*consented_function)[am::strings::name] = "test_group_alias";
- (*message)[am::strings::msg_params]["consentedFunctions"][0] =
- *consented_function;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnAppPermissionConsentNotification>(message);
-
- int32_t connection_id = -1;
- policy::PermissionConsent permission_consent;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
-#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _, _))
-#else
- EXPECT_CALL(policy_interface_, OnAppPermissionConsent(_, _))
-#endif
- .WillOnce(
- GetConnectIdPermissionConsent(&connection_id, &permission_consent));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(kAppId_), connection_id);
-
- std::vector<policy::FunctionalGroupPermission>::const_iterator it =
- permission_consent.group_permissions.begin();
- for (; it != permission_consent.group_permissions.end(); ++it) {
- EXPECT_EQ(999, (*it).group_id);
- EXPECT_EQ("test_group_alias", (*it).group_alias);
- EXPECT_EQ(policy::kGroupDisallowed, (*it).state);
- }
- EXPECT_EQ("test_content_source", permission_consent.consent_source);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemErrorNotificationOnSystemErrorCode) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_notification::error] =
- hmi_apis::Common_SystemError::SYNC_REBOOTED;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemErrorNotification>(message);
-
- int32_t code = hmi_apis::Common_SystemError::INVALID_ENUM;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, OnSystemError(_)).WillOnce(GetArg(&code));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(hmi_apis::Common_SystemError::SYNC_REBOOTED),
- code);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemInfoChangedNotificationCheckLanguage) {
- const uint32_t kLangCode = 5u;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLangCode;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemInfoChangedNotification>(message);
-
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(_));
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, OnSystemInfoChanged(_));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAllowSDLFunctionalityNotificationDeviceKeyNotExist) {
- const std::string kDeviceId = "";
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_response::allowed] = true;
- utils::SharedPtr<Command> command =
- CreateCommand<OnAllowSDLFunctionalityNotification>(message);
-
- bool value = false;
- std::string str;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, OnAllowSDLFunctionalityNotification(_, _))
- .WillOnce(GetBoolValueAndString(&value, &str));
- command->Run();
- EXPECT_EQ(true, value);
- EXPECT_EQ(kDeviceId, str);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnAllowSDLFunctionalityNotificationDeviceKeyExist) {
- const std::string kDeviceId = "device_id";
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_response::allowed] = true;
- (*message)[am::strings::msg_params]["device"]["id"] = kDeviceId;
- utils::SharedPtr<Command> command =
- CreateCommand<OnAllowSDLFunctionalityNotification>(message);
-
- bool value;
- std::string str;
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, OnAllowSDLFunctionalityNotification(_, _))
- .WillOnce(GetBoolValueAndString(&value, &str));
- command->Run();
- EXPECT_EQ(true, value);
- EXPECT_EQ(kDeviceId, str);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDeviceStateChangedNotificationDeviceStateNotUnpaired) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params]["deviceState"] =
- hmi_apis::Common_DeviceState::INVALID_ENUM;
- utils::SharedPtr<Command> command =
- CreateCommand<OnDeviceStateChangedNotification>(message);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler()).Times(0);
- EXPECT_CALL(policy_interface_, RemoveDevice(_)).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDeviceStateChangedNotificationDeviceStateUnpaired) {
- // Random MAC adress for test. It must contain 12 symbols.
- const std::string device_id = "AA15F2204D6B";
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params]["deviceState"] =
- hmi_apis::Common_DeviceState::UNPAIRED;
- (*message)[am::strings::msg_params]["deviceInternalId"] = device_id;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnDeviceStateChangedNotification>(message);
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, RemoveDevice(_));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDeviceStateChangedNotificationDeviceStateEmptyDeviceId) {
- const std::string empty_device_id = "";
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params]["deviceState"] =
- hmi_apis::Common_DeviceState::UNPAIRED;
- (*message)[am::strings::msg_params]["deviceInternalId"] = empty_device_id;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnDeviceStateChangedNotification>(message);
-
- std::string device_id = "default_id";
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, RemoveDevice(_)).WillOnce(GetArg(&device_id));
- command->Run();
- EXPECT_EQ(empty_device_id, device_id);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDeviceStateChangedNotificationDeviceStateDeviceIdFromId) {
- const std::string empty_device_id = "";
- const std::string id = "id_string";
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params]["deviceState"] =
- hmi_apis::Common_DeviceState::UNPAIRED;
- (*message)[am::strings::msg_params]["deviceInternalId"] = empty_device_id;
- (*message)[am::strings::msg_params]["deviceId"]["id"] = id;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnDeviceStateChangedNotification>(message);
-
- std::string device_id = "default_id";
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, RemoveDevice(_)).WillOnce(GetArg(&device_id));
- command->Run();
- EXPECT_EQ(id, device_id);
-}
-
-//~policy_handler
-TEST_F(HMICommandsNotificationsTest,
- OnExitAllApplicationsNotificationReasonIgnitionOff) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_request::reason] =
- hmi_apis::Common_ApplicationsCloseReason::IGNITION_OFF;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitAllApplicationsNotification>(message);
-#if defined(OS_POSIX)
- am::mobile_api::AppInterfaceUnregisteredReason::eType mob_reason;
-
- EXPECT_CALL(app_mngr_, SetUnregisterAllApplicationsReason(_))
- .WillOnce(GetArg(&mob_reason));
- EXPECT_CALL(app_mngr_, HeadUnitReset(_)).Times(0);
-
- SubscribeForSignal();
- command->Run();
- utils::WaitTerminationSignals(sig_handler);
-
- EXPECT_EQ(am::mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF,
- mob_reason);
-#endif
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnExitAllApplicationsNotificationReasonMasterResetAndFactoryDefaults) {
- MessageSharedPtr message = CreateMessage();
-
- std::vector<hmi_apis::Common_ApplicationsCloseReason::eType> reason_list;
- reason_list.push_back(hmi_apis::Common_ApplicationsCloseReason::MASTER_RESET);
- reason_list.push_back(
- hmi_apis::Common_ApplicationsCloseReason::FACTORY_DEFAULTS);
-
- std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>
- mob_reason_list;
- mob_reason_list.push_back(
- mobile_apis::AppInterfaceUnregisteredReason::MASTER_RESET);
- mob_reason_list.push_back(
- mobile_apis::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS);
-
- std::vector<hmi_apis::Common_ApplicationsCloseReason::eType>::iterator
- it_reason = reason_list.begin();
- std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>::iterator
- it_mob_reason = mob_reason_list.begin();
-
- for (; it_reason != reason_list.end(); ++it_reason, ++it_mob_reason) {
- (*message)[am::strings::msg_params][am::hmi_request::reason] = *it_reason;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitAllApplicationsNotification>(message);
-#if defined(OS_POSIX)
- am::mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
- *it_mob_reason;
-
- EXPECT_CALL(app_mngr_, SetUnregisterAllApplicationsReason(mob_reason));
- EXPECT_CALL(app_mngr_, HeadUnitReset(mob_reason));
-
- SubscribeForSignal();
- command->Run();
- utils::WaitTerminationSignals(sig_handler);
-#endif
- }
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnExitAllApplicationsNotificationReasonSuspend) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_request::reason] =
- hmi_apis::Common_ApplicationsCloseReason::SUSPEND;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitAllApplicationsNotification>(message);
-
- MessageSharedPtr ethalon_message =
- CreateMessage(smart_objects::SmartType_Map);
- (*ethalon_message)[am::strings::params][am::strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete;
- (*ethalon_message)[am::strings::params][am::strings::message_type] =
- am::MessageType::kNotification;
- (*ethalon_message)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId_;
- MessageSharedPtr temp_message = CreateMessage();
-
- resumprion_test::MockResumeCtrl mock_resume_ctrl;
- EXPECT_CALL(app_mngr_, resume_controller())
- .WillOnce(ReturnRef(mock_resume_ctrl));
- EXPECT_CALL(mock_resume_ctrl, OnSuspend());
-
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(kCorrelationId_));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(GetMessage(temp_message));
-
- command->Run();
- EXPECT_EQ(
- static_cast<uint32_t>(
- hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete),
- (*temp_message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<uint32_t>(am::MessageType::kNotification),
- (*temp_message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(static_cast<uint32_t>(kCorrelationId_),
- (*temp_message)[am::strings::params][am::strings::correlation_id]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnExitAllApplicationsNotificationReasonInvalidEnum) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_request::reason] =
- hmi_apis::Common_ApplicationsCloseReason::INVALID_ENUM;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitAllApplicationsNotification>(message);
-
- EXPECT_CALL(app_mngr_, SetUnregisterAllApplicationsReason(_)).Times(0);
- EXPECT_CALL(app_mngr_, HeadUnitReset(_)).Times(0);
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID()).Times(0);
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnExitApplicationNotificationManageMobileCommand) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- smart_objects::SmartObjectSPtr notification =
- utils::MakeShared<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_;
-
- 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);
-
- 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);
-
- std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>::iterator
- it_mobile_reason = mobile_reason_list.begin();
- std::vector<hmi_apis::Common_ApplicationExitReason::eType>::iterator
- it_reason = reason_list.begin();
-
- for (; it_reason != reason_list.end(); ++it_reason, ++it_mobile_reason) {
- (*message)[am::strings::msg_params][am::strings::reason] = *it_reason;
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitApplicationNotification>(message);
-
- (*notification)[am::strings::msg_params][am::strings::reason] =
- static_cast<int32_t>(*it_mobile_reason);
-
-#ifdef SDL_REMOTE_CONTROL
- functional_modules::PluginManager plugin_mng;
- EXPECT_CALL(app_mngr_, GetPluginManager())
- .WillRepeatedly(ReturnRef(plugin_mng));
-#endif // SDL_REMOTE_CONTROL
-
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillRepeatedly(Return(app_));
- EXPECT_CALL(mock_message_helper_,
- GetOnAppInterfaceUnregisteredNotificationToMobile(
- kAppId_, *it_mobile_reason)).WillOnce(Return(notification));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(notification, Command::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_,
- UnregisterApplication(
- kAppId_, mobile_apis::Result::SUCCESS, false, false));
- command->Run();
- }
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnExitApplicationNotificationUnhandledReason) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
-
- (*message)[am::strings::msg_params][am::strings::reason] =
- hmi_apis::Common_ApplicationExitReason::INVALID_ENUM;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitApplicationNotification>(message);
-
-#ifdef SDL_REMOTE_CONTROL
- functional_modules::PluginManager plugin_mng;
- EXPECT_CALL(app_mngr_, GetPluginManager())
- .WillRepeatedly(ReturnRef(plugin_mng));
-#endif // SDL_REMOTE_CONTROL
-
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(app_));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest, OnExitApplicationNotificationInvalidApp) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
-
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitApplicationNotification>(message);
-
- am::ApplicationSharedPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(invalid_app));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- DISABLED_OnExitApplicationNotificationDriverDistractionValidApp) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- (*message)[am::strings::msg_params][am::strings::reason] =
- hmi_apis::Common_ApplicationExitReason::DRIVER_DISTRACTION_VIOLATION;
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitApplicationNotification>(message);
-
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillRepeatedly(Return(app_));
-
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- SetRegularState(app_,
- mobile_apis::HMILevel::HMI_NONE,
- mobile_apis::AudioStreamingState::NOT_AUDIBLE,
- false));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnExitApplicationNotificationrUserExitValidApp) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- (*message)[am::strings::msg_params][am::strings::reason] =
- hmi_apis::Common_ApplicationExitReason::USER_EXIT;
- utils::SharedPtr<Command> command =
- CreateCommand<OnExitApplicationNotification>(message);
-
-#ifdef SDL_REMOTE_CONTROL
- functional_modules::PluginManager plugin_mng;
- EXPECT_CALL(app_mngr_, GetPluginManager())
- .WillRepeatedly(ReturnRef(plugin_mng));
-#endif // SDL_REMOTE_CONTROL
-
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillRepeatedly(Return(app_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- SetRegularState(app_,
- mobile_apis::HMILevel::HMI_NONE,
- mobile_apis::AudioStreamingState::NOT_AUDIBLE,
- false));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRCommandNotificationSwitchedAndValidApp) {
- const uint32_t cmd_id = 12u;
- const uint32_t max_cmd_id = 10u;
-
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::cmd_id] = cmd_id;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRCommandNotification>(message);
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- SetRegularState(_, mobile_apis::HMILevel::HMI_FULL, true));
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(max_cmd_id));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRCommandNotificationSwitchedAndInvalidApp) {
- const uint32_t kCmdId = 12u;
- const uint32_t kMaxCmdId = 10u;
-
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRCommandNotification>(message);
-
- am::ApplicationSharedPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(invalid_app));
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRCommandNotificationCmdIdEqualToMaxCmdId) {
- const uint32_t kCmdId = 11u;
- const uint32_t kMaxCmdId = 10u;
-
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRCommandNotification>(message);
-
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRCommandNotificationCmdIdLessMaxCmdIsInvalidApp) {
- const uint32_t kCmdId = 8u;
- const uint32_t kMaxCmdId = 10u;
-
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRCommandNotification>(message);
-
- am::ApplicationSharedPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- EXPECT_CALL(app_mngr_, event_dispatcher()).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRCommandNotificationActivePerformIteraction) {
- const uint32_t kCmdId = 8u;
- const uint32_t kMaxCmdId = 10u;
- const uint32_t kIsPerformInteractionActive = 1u;
- int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRCommandNotification>(message);
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
- EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- EXPECT_CALL(*app_ptr_, is_perform_interaction_active())
- .WillOnce(Return(kIsPerformInteractionActive));
- EXPECT_CALL(app_mngr_, event_dispatcher());
- EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
- .WillOnce(GetEventId(&event_id));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->Run();
- EXPECT_EQ(hmi_apis::FunctionID::VR_OnCommand, event_id);
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRCommandNotificationNotActivePerformIteraction) {
- const uint32_t kCmdId = 8u;
- const uint32_t kMaxCmdId = 10u;
- const uint32_t kIsPerformInteractionActive = 0u;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- (*message)[am::strings::msg_params][am::strings::function_id] =
- mobile_apis::FunctionID::eType::OnCommandID;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRCommandNotification>(message);
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
- EXPECT_CALL(app_mngr_settings_, max_cmd_id()).WillOnce(ReturnRef(kMaxCmdId));
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- EXPECT_CALL(*app_ptr_, is_perform_interaction_active())
- .WillOnce(Return(kIsPerformInteractionActive));
-
- EXPECT_CALL(app_mngr_, event_dispatcher()).Times(0);
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR),
- (*message)[am::strings::msg_params][am::strings::trigger_source].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest, OnVRLanguageChangeNotificationEmptyData) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLang;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRLanguageChangeNotification>(message);
-
- EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(*app_ptr_, app_id()).Times(0);
- EXPECT_CALL(*app_ptr_, language()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRLanguageChangeNotificationAppLangEqualMessageLang) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLang;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRLanguageChangeNotification>(message);
-
- application_set_.insert(app_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_ptr_, app_id()).WillOnce(Return(kAppId_));
- EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
-
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
- (*message)[am::strings::msg_params][am::strings::hmi_display_language]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnVRLanguageChangeNotificationAppLangNotEqualMessageLang) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] =
- mobile_apis::Language::EN_US;
- utils::SharedPtr<Command> command =
- CreateCommand<OnVRLanguageChangeNotification>(message);
-
- application_set_.insert(app_);
- smart_objects::SmartObjectSPtr notification =
- utils::MakeShared<smart_objects::SmartObject>();
- (*notification)[am::strings::params][am::strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- (*notification)[am::strings::params][am::strings::message_type] =
- static_cast<int32_t>(am::MessageType::kNotification);
- (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
- (*notification)[am::strings::msg_params][am::strings::reason] =
- static_cast<int32_t>(
- mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
-
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
- EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- SetRegularState(app_, mobile_apis::HMILevel::HMI_NONE, false));
- EXPECT_CALL(mock_message_helper_,
- GetOnAppInterfaceUnregisteredNotificationToMobile(
- kAppId_,
- mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE))
- .WillOnce(Return(notification));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(notification, Command::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_,
- UnregisterApplication(
- kAppId_, mobile_apis::Result::SUCCESS, false, false));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
- (*message)[am::strings::msg_params][am::strings::hmi_display_language]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest, OnStartDeviceDiscoveryRun) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnStartDeviceDiscovery>(message);
- EXPECT_CALL(app_mngr_, StartDevicesDiscovery());
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDeviceChosenNotificationDeviceInfoExists) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::device_info]
- [am::strings::id] = "2014";
- utils::SharedPtr<Command> command =
- CreateCommand<OnDeviceChosenNotification>(message);
- EXPECT_CALL(app_mngr_,
- ConnectToDevice(
- (*message)[am::strings::msg_params][am::strings::device_info]
- [am::strings::id].asString()));
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDeviceChosenNotificationDeviceInfoNotExists) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnDeviceChosenNotification>(message);
- EXPECT_CALL(app_mngr_, ConnectToDevice(_)).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemContextNotificationValidActiveApplication) {
- MessageSharedPtr message = CreateMessage();
- std::vector<am::mobile_api::SystemContext::eType> system_context_list;
- system_context_list.push_back(
- am::mobile_api::SystemContext::SYSCTXT_VRSESSION);
- system_context_list.push_back(am::mobile_api::SystemContext::SYSCTXT_MENU);
- system_context_list.push_back(
- am::mobile_api::SystemContext::SYSCTXT_HMI_OBSCURED);
-
- std::vector<am::mobile_api::SystemContext::eType>::iterator it =
- system_context_list.begin();
- for (; it != system_context_list.end(); ++it) {
- (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
- *it;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemContextNotification>(message);
- EXPECT_CALL(app_mngr_, active_application()).WillOnce(Return(app_));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_, SetRegularState(app_, *it));
- command->Run();
- }
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemContextNotificationInvalidActiveApplication) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
- am::mobile_api::SystemContext::SYSCTXT_VRSESSION;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemContextNotification>(message);
- ApplicationSharedPtr invalid_app;
- EXPECT_CALL(app_mngr_, active_application()).WillOnce(Return(invalid_app));
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemContextNotificationInvalidSystemContext) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
- am::mobile_api::SystemContext::INVALID_ENUM;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemContextNotification>(message);
- EXPECT_CALL(app_mngr_, active_application()).Times(0);
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemContextNotificationValidApplication) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- std::vector<am::mobile_api::SystemContext::eType> system_context_list;
- system_context_list.push_back(am::mobile_api::SystemContext::SYSCTXT_ALERT);
- system_context_list.push_back(am::mobile_api::SystemContext::SYSCTXT_MAIN);
-
- std::vector<am::mobile_api::SystemContext::eType>::iterator it =
- system_context_list.begin();
- for (; it != system_context_list.end(); ++it) {
- (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
- *it;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemContextNotification>(message);
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_, SetRegularState(app_, *it));
- command->Run();
- }
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemContextNotificationAppIdDoesntExists) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_notification::system_context] =
- am::mobile_api::SystemContext::SYSCTXT_ALERT;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemContextNotification>(message);
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemRequestNotificationAppIdExistsAndValidApp) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemRequestNotification>(message);
-
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(app_));
- ON_CALL(app_mngr_, connection_handler())
- .WillByDefault(ReturnRef(mock_connection_handler_));
- ON_CALL(mock_connection_handler_, get_session_observer())
- .WillByDefault(ReturnRef(mock_session_observer_));
- const int32_t device_id = 1;
- ON_CALL(
- mock_session_observer_,
- GetDataOnDeviceID(
- testing::An<transport_manager::DeviceHandle>(), NULL, NULL, _, NULL))
- .WillByDefault(Return(device_id));
-
- EXPECT_CALL(policy_interface_, GetUserConsentForDevice(_))
- .WillOnce(Return(policy::kDeviceAllowed));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemRequestNotificationAppIdExistsAndInvalidApp) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemRequestNotification>(message);
- ApplicationSharedPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(kAppId_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(*app_ptr_, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->Run();
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemRequestNotificationAppIdDoesntExistsAndValidApp) {
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemRequestNotification>(message);
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(policy_interface_));
- EXPECT_CALL(policy_interface_, GetAppIdForSending())
- .WillOnce(Return(kAppId_));
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app_));
- ON_CALL(app_mngr_, connection_handler())
- .WillByDefault(ReturnRef(mock_connection_handler_));
- ON_CALL(mock_connection_handler_, get_session_observer())
- .WillByDefault(ReturnRef(mock_session_observer_));
- const int32_t device_id = 1;
- ON_CALL(
- mock_session_observer_,
- GetDataOnDeviceID(
- testing::An<transport_manager::DeviceHandle>(), NULL, NULL, _, NULL))
- .WillByDefault(Return(device_id));
-
- EXPECT_CALL(policy_interface_, GetUserConsentForDevice(_))
- .WillOnce(Return(policy::kDeviceAllowed));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnSystemRequestNotificationAppIdDoesntExistsAndNullAppId) {
- const uint32_t kNullApppId = 0u;
- MessageSharedPtr message = CreateMessage();
- utils::SharedPtr<Command> command =
- CreateCommand<OnSystemRequestNotification>(message);
- EXPECT_CALL(app_mngr_, GetPolicyHandler());
- EXPECT_CALL(policy_interface_, GetAppIdForSending())
- .WillOnce(Return(kNullApppId));
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest, OnTTSLanguageChangeNotificationEmptyData) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLang;
- utils::SharedPtr<Command> command =
- CreateCommand<OnTTSLanguageChangeNotification>(message);
-
- EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(_));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
- EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(*app_ptr_, app_id()).Times(0);
- EXPECT_CALL(*app_ptr_, language()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnTTSLanguageChangeNotificationAppLangEqualMessageLang) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLang;
- utils::SharedPtr<Command> command =
- CreateCommand<OnTTSLanguageChangeNotification>(message);
-
- application_set_.insert(app_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_ptr_, app_id()).WillOnce(Return(kAppId_));
- EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
-
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
- (*message)[am::strings::msg_params][am::strings::hmi_display_language]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnTTSLanguageChangeNotificationAppLangNotEqualMessageLang) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] =
- mobile_apis::Language::EN_US;
- utils::SharedPtr<Command> command =
- CreateCommand<OnTTSLanguageChangeNotification>(message);
-
- application_set_.insert(app_);
- smart_objects::SmartObjectSPtr notification =
- utils::MakeShared<smart_objects::SmartObject>();
- (*notification)[am::strings::params][am::strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- (*notification)[am::strings::params][am::strings::message_type] =
- static_cast<int32_t>(am::MessageType::kNotification);
- (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
- (*notification)[am::strings::msg_params][am::strings::reason] =
- static_cast<int32_t>(
- mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
-
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(_));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
- EXPECT_CALL(*app_ptr_, language()).WillRepeatedly(ReturnRef(kLang));
- EXPECT_CALL(mock_message_helper_,
- GetOnAppInterfaceUnregisteredNotificationToMobile(
- kAppId_,
- mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE))
- .WillOnce(Return(notification));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(notification, Command::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_,
- UnregisterApplication(
- kAppId_, mobile_apis::Result::SUCCESS, false, false));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(hmi_apis::Common_Language::EN_AU),
- (*message)[am::strings::msg_params][am::strings::hmi_display_language]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest, OnUILanguageChangeNotificationEmptyData) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLang;
- utils::SharedPtr<Command> command =
- CreateCommand<OnUILanguageChangeNotification>(message);
-
- EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(_));
- EXPECT_CALL(mock_hmi_capabilities_, active_vr_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(*app_ptr_, app_id()).Times(0);
- EXPECT_CALL(*app_ptr_, ui_language()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnUILanguageChangeNotificationAppLangEqualMessageLang) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] = kLang;
- utils::SharedPtr<Command> command =
- CreateCommand<OnUILanguageChangeNotification>(message);
-
- application_set_.insert(app_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(mock_hmi_capabilities_, active_vr_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_ptr_, app_id()).WillOnce(Return(kAppId_));
- EXPECT_CALL(*app_ptr_, ui_language()).WillRepeatedly(ReturnRef(kLang));
-
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kLang),
- (*message)[am::strings::msg_params][am::strings::hmi_display_language]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnUILanguageChangeNotificationAppLangNotEqualMessageLang) {
- const mobile_apis::Language::eType& kLang = mobile_apis::Language::EN_GB;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::language] =
- mobile_apis::Language::EN_US;
- utils::SharedPtr<Command> command =
- CreateCommand<OnUILanguageChangeNotification>(message);
-
- application_set_.insert(app_);
- smart_objects::SmartObjectSPtr notification =
- utils::MakeShared<smart_objects::SmartObject>();
- (*notification)[am::strings::params][am::strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- (*notification)[am::strings::params][am::strings::message_type] =
- static_cast<int32_t>(am::MessageType::kNotification);
- (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
- (*notification)[am::strings::msg_params][am::strings::reason] =
- static_cast<int32_t>(
- mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
-
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- EXPECT_CALL(mock_hmi_capabilities_, active_vr_language())
- .WillOnce(Return(hmi_apis::Common_Language::EN_AU));
- EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(_));
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
- EXPECT_CALL(*app_ptr_, ui_language()).WillRepeatedly(ReturnRef(kLang));
- EXPECT_CALL(mock_message_helper_,
- GetOnAppInterfaceUnregisteredNotificationToMobile(
- kAppId_,
- mobile_apis::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE))
- .WillOnce(Return(notification));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(notification, Command::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_,
- UnregisterApplication(
- kAppId_, mobile_apis::Result::SUCCESS, false, false));
- command->Run();
- EXPECT_EQ(static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(mobile_apis::Language::EN_US),
- (*message)[am::strings::msg_params][am::strings::hmi_display_language]
- .asInt());
-}
-
-TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationEmptyData) {
- const hmi_apis::Common_DriverDistractionState::eType state =
- hmi_apis::Common_DriverDistractionState::DD_ON;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_notification::state] = state;
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnDriverDistractionNotification>(message);
-
- EXPECT_CALL(app_mngr_, set_driver_distraction_state(state));
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(*app_ptr_, app_id()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest,
- OnDriverDistractionNotificationInvalidApp) {
- const hmi_apis::Common_DriverDistractionState::eType state =
- hmi_apis::Common_DriverDistractionState::DD_ON;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::hmi_notification::state] = state;
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnDriverDistractionNotification>(message);
-
- ApplicationSharedPtr invalid_app;
- application_set_.insert(invalid_app);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(*app_ptr_, app_id()).Times(0);
- command->Run();
-}
-
-TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationValidApp) {
- const hmi_apis::Common_DriverDistractionState::eType state =
- hmi_apis::Common_DriverDistractionState::DD_ON;
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::mobile_notification::state] = state;
- utils::SharedPtr<Command> command =
- CreateCommand<hmi::OnDriverDistractionNotification>(message);
-
- application_set_.insert(app_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_));
- policy::CheckPermissionResult result;
- result.hmi_level_permitted = policy::kRpcAllowed;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_interface_));
- EXPECT_CALL(policy_interface_, CheckPermissions(_, _, _, _))
- .WillOnce(GetArg3(&result));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(GetMessage(message));
- EXPECT_CALL(*app_ptr_, app_id()).WillRepeatedly(Return(kAppId_));
-
- command->Run();
- EXPECT_EQ(
- static_cast<int32_t>(am::mobile_api::FunctionID::OnDriverDistractionID),
- (*message)[am::strings::params][am::strings::function_id].asInt());
- EXPECT_EQ(
- static_cast<int32_t>(kAppId_),
- (*message)[am::strings::params][am::strings::connection_key].asInt());
- EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
- (*message)[am::strings::params][am::strings::message_type].asInt());
-}
-
-} // namespace hmi_notifications_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/mixing_audio_supported_request_test.cc b/src/components/application_manager/test/commands/hmi/mixing_audio_supported_request_test.cc
deleted file mode 100644
index 322f7dd398..0000000000
--- a/src/components/application_manager/test/commands/hmi/mixing_audio_supported_request_test.cc
+++ /dev/null
@@ -1,92 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-#include "hmi/request_to_hmi.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace mixing_audio_supported_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::RequestToHMI;
-using am::commands::MixingAudioSupportedRequest;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<RequestToHMI> RequestToHMIPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class MixingAudioSupportedRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(MixingAudioSupportedRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = "123";
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- RequestToHMIPtr command(
- CreateCommand<MixingAudioSupportedRequest>(command_msg));
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-} // namespace mixing_audio_supported_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/mixing_audio_supported_response_test.cc b/src/components/application_manager/test/commands/hmi/mixing_audio_supported_response_test.cc
deleted file mode 100644
index 89ba6c8bdb..0000000000
--- a/src/components/application_manager/test/commands/hmi/mixing_audio_supported_response_test.cc
+++ /dev/null
@@ -1,106 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command.h"
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace mixing_audio_supported_response {
-
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::NiceMock;
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::ResponseFromHMI;
-using am::commands::MixingAudioSupportedResponse;
-using am::commands::CommandImpl;
-using am::HMICapabilities;
-namespace hmi_response = ::application_manager::hmi_response;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class MixingAudioSupportedResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(MixingAudioSupportedResponseTest, RUN_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = "123";
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- ResponseFromHMIPtr command(
- CreateCommand<MixingAudioSupportedResponse>(command_msg));
- MockHMICapabilities mock_hmi_capabilities;
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
-
- const bool hmiResponse =
- (*command_msg)[strings::msg_params][hmi_response::attenuated_supported]
- .asBool();
-
- EXPECT_CALL(mock_hmi_capabilities, set_attenuated_supported(hmiResponse));
-
- command->Run();
-}
-
-} // namespace mixing_audio_supported_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_audio_start_stream_request_test.cc b/src/components/application_manager/test/commands/hmi/navi_audio_start_stream_request_test.cc
deleted file mode 100644
index c187cc75d9..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_audio_start_stream_request_test.cc
+++ /dev/null
@@ -1,120 +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 <utility>
-
-#include "application_manager/commands/hmi/navi_audio_start_stream_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_audio_start_stream_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-namespace commands = am::commands;
-using commands::MessageSharedPtr;
-using commands::AudioStartStreamRequest;
-using am::event_engine::Event;
-
-namespace {
-const uint32_t kHmiAppId = 13u;
-const am::HmiInterfaces::InterfaceID kHmiInterface =
- am::HmiInterfaces::HMI_INTERFACE_Navigation;
-} // namespace
-
-class AudioStartStreamRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- AudioStartStreamRequestTest() {
- ON_CALL(app_mngr_settings_, start_stream_retry_amount())
- .WillByDefault(ReturnRef(start_stream_retry_amount_));
- msg_ = CreateMessage();
- command_ = CreateCommand<AudioStartStreamRequest>(msg_);
- }
-
- std::pair<uint32_t, int32_t> start_stream_retry_amount_;
- MessageSharedPtr msg_;
- SharedPtr<AudioStartStreamRequest> command_;
-};
-
-TEST_F(AudioStartStreamRequestTest, Run_HmiInterfaceNotAvailable_NoRequest) {
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- EXPECT_CALL(app_mngr_, SendMessageToHMI(_)).Times(0);
-
- command_->Run();
-}
-
-TEST_F(AudioStartStreamRequestTest,
- Run_HmiInterfaceAvailableButNoApp_NoRequest) {
- (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_, SendMessageToHMI(_)).Times(0);
-
- command_->Run();
-}
-
-TEST_F(AudioStartStreamRequestTest, Run_HmiInterfaceAvailable_SentRequest) {
- (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_audio_streaming_allowed(true));
- EXPECT_CALL(app_mngr_, SendMessageToHMI(msg_));
-
- command_->Run();
-}
-
-} // namespace navi_audio_start_stream_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_is_ready_request_test.cc b/src/components/application_manager/test/commands/hmi/navi_is_ready_request_test.cc
deleted file mode 100644
index 825cca9185..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_is_ready_request_test.cc
+++ /dev/null
@@ -1,138 +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 "application_manager/commands/hmi/navi_is_ready_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_is_ready_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::NaviIsReadyRequest;
-using am::event_engine::Event;
-
-namespace {
-const hmi_apis::FunctionID::eType kEventID =
- hmi_apis::FunctionID::Navigation_IsReady;
-} // namespace
-
-typedef SharedPtr<NaviIsReadyRequest> NaviIsReadyRequestPtr;
-
-class NaviIsReadyRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- NaviIsReadyRequestTest() : command_(CreateCommand<NaviIsReadyRequest>()) {
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(mock_hmi_capabilities_));
- }
-
- NaviIsReadyRequestPtr command_;
- MOCK(application_manager_test::MockHMICapabilities) mock_hmi_capabilities_;
-};
-
-TEST_F(NaviIsReadyRequestTest,
- OnEvent_HmiInterfaceIsAvailable_NaviCooperatingIsAvailable) {
- const bool is_hmi_interface_available = true;
-
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[am::strings::msg_params][am::strings::available] =
- is_hmi_interface_available;
-
- Event event(kEventID);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(mock_hmi_interfaces_,
- SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation,
- am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_navi_cooperating(is_hmi_interface_available));
-
- command_->on_event(event);
-}
-
-TEST_F(NaviIsReadyRequestTest,
- OnEvent_HmiInterfaceIsNotAvailable_NaviCooperatingIsNotAvailable) {
- const bool is_hmi_interface_available = false;
-
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[am::strings::msg_params][am::strings::available] =
- is_hmi_interface_available;
-
- Event event(kEventID);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(mock_hmi_interfaces_,
- SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation,
- am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_navi_cooperating(is_hmi_interface_available));
-
- command_->on_event(event);
-}
-
-TEST_F(NaviIsReadyRequestTest,
- OnEvent_AvailabilityFieldMissing_NaviCooperatingIsNotAvailable) {
- const bool is_hmi_interface_available = false;
-
- MessageSharedPtr event_msg = CreateMessage();
- Event event(kEventID);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_navi_cooperating(is_hmi_interface_available));
-
- command_->on_event(event);
-}
-
-} // namespace navi_is_ready_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_is_ready_response_test.cc b/src/components/application_manager/test/commands/hmi/navi_is_ready_response_test.cc
deleted file mode 100644
index 7185a5f7ed..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_is_ready_response_test.cc
+++ /dev/null
@@ -1,76 +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 <string>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/commands/hmi/navi_is_ready_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_is_ready_responce {
-
-namespace am = ::application_manager;
-namespace commands = am::commands;
-
-using ::testing::ReturnRef;
-using ::utils::SharedPtr;
-using commands::ResponseFromHMI;
-using test::components::event_engine_test::MockEventDispatcher;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-
-class NaviIsReadyResponseTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(NaviIsReadyResponseTest, NaviIsReadyResponse_Run_SUCCESS) {
- ResponseFromHMIPtr command(CreateCommand<commands::NaviIsReadyResponse>());
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
- command->Run();
-}
-
-} // namespace navi_is_ready_responce
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_set_video_config_request_test.cc b/src/components/application_manager/test/commands/hmi/navi_set_video_config_request_test.cc
deleted file mode 100644
index 7c04aa724c..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_set_video_config_request_test.cc
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 names of the copyright holders 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/commands/hmi/navi_set_video_config_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_set_video_config_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::NaviSetVideoConfigRequest;
-using am::event_engine::Event;
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kHmiAppId = 13u;
-const hmi_apis::FunctionID::eType kEventID =
- hmi_apis::FunctionID::Navigation_SetVideoConfig;
-} // namespace
-
-typedef SharedPtr<NaviSetVideoConfigRequest> NaviSetVideoConfigRequestPtr;
-
-class NaviSetVideoConfigRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- NaviSetVideoConfigRequestTest() {
- mock_app_ptr_ = CreateMockApp();
- ON_CALL(app_mngr_, hmi_interfaces())
- .WillByDefault(ReturnRef(mock_hmi_interfaces_));
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_ptr_));
- ON_CALL(app_mngr_, application_by_hmi_app(_))
- .WillByDefault(Return(mock_app_ptr_));
- ON_CALL(app_mngr_, event_dispatcher())
- .WillByDefault(ReturnRef(mock_event_dispatcher_));
- ON_CALL(*mock_app_ptr_, app_id()).WillByDefault(Return(kAppId));
- ON_CALL(*mock_app_ptr_, hmi_app_id()).WillByDefault(Return(kHmiAppId));
- }
-
- MOCK(am::MockHmiInterfaces) mock_hmi_interfaces_;
- MockAppPtr mock_app_ptr_;
- MockEventDispatcher mock_event_dispatcher_;
-};
-
-TEST_F(NaviSetVideoConfigRequestTest, OnEventWithSuccessResponse) {
- MessageSharedPtr request_msg = CreateMessage();
- (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
-
- NaviSetVideoConfigRequestPtr command =
- CreateCommand<NaviSetVideoConfigRequest>(request_msg);
-
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- 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))
- .Times(1);
-
- command->on_event(event);
-}
-
-static bool ValidateList(std::vector<std::string>& expected,
- std::vector<std::string>& actual) {
- std::sort(expected.begin(), expected.end());
- std::sort(actual.begin(), actual.end());
- return std::equal(expected.begin(), expected.end(), actual.begin());
-}
-
-TEST_F(NaviSetVideoConfigRequestTest, OnEventWithRejectedResponse) {
- MessageSharedPtr request_msg = CreateMessage();
- (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*request_msg)[am::strings::msg_params][am::strings::config] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*request_msg)[am::strings::msg_params][am::strings::config]
- [am::strings::protocol] =
- hmi_apis::Common_VideoStreamingProtocol::RTP;
- (*request_msg)[am::strings::msg_params][am::strings::config]
- [am::strings::codec] =
- hmi_apis::Common_VideoStreamingCodec::H265;
- (*request_msg)[am::strings::msg_params][am::strings::config]
- [am::strings::height] = 640;
- (*request_msg)[am::strings::msg_params][am::strings::config]
- [am::strings::width] = 480;
-
- NaviSetVideoConfigRequestPtr command =
- CreateCommand<NaviSetVideoConfigRequest>(request_msg);
-
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::REJECTED;
-
- (*event_msg)[am::strings::msg_params][am::strings::rejected_params] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*event_msg)[am::strings::msg_params][am::strings::rejected_params][0] =
- "codec";
- (*event_msg)[am::strings::msg_params][am::strings::rejected_params][1] =
- "protocol";
- Event event(kEventID);
- 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));
-
- command->on_event(event);
-
- ASSERT_EQ(2u, rejected_params.size());
- std::vector<std::string> expected_list;
- expected_list.push_back(std::string("protocol"));
- expected_list.push_back(std::string("codec"));
- ASSERT_TRUE(ValidateList(expected_list, rejected_params));
-}
-
-TEST_F(NaviSetVideoConfigRequestTest,
- OnEventWithRejectedResponseWithoutParams) {
- MessageSharedPtr request_msg = CreateMessage();
- (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
-
- NaviSetVideoConfigRequestPtr command =
- CreateCommand<NaviSetVideoConfigRequest>(request_msg);
-
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::REJECTED;
-
- Event event(kEventID);
- event.set_smart_object(*event_msg);
-
- std::vector<std::string> empty;
- EXPECT_CALL(
- app_mngr_,
- OnStreamingConfigured(
- kAppId, protocol_handler::ServiceType::kMobileNav, false, empty))
- .WillOnce(Return());
-
- command->on_event(event);
-}
-
-TEST_F(NaviSetVideoConfigRequestTest, OnTimeout) {
- MessageSharedPtr request_msg = CreateMessage();
- (*request_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
-
- NaviSetVideoConfigRequestPtr command =
- CreateCommand<NaviSetVideoConfigRequest>(request_msg);
-
- std::vector<std::string> empty;
- EXPECT_CALL(
- app_mngr_,
- OnStreamingConfigured(
- kAppId, protocol_handler::ServiceType::kMobileNav, false, empty))
- .WillOnce(Return());
-
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(1);
-
- command->onTimeOut();
-}
-
-} // namespace navi_set_video_config_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_set_video_config_response_test.cc b/src/components/application_manager/test/commands/hmi/navi_set_video_config_response_test.cc
deleted file mode 100644
index 753c2a9179..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_set_video_config_response_test.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 names of the copyright holders 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 "application_manager/commands/commands_test.h"
-#include "application_manager/commands/hmi/navi_set_video_config_response.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_set_video_config_response {
-
-using utils::SharedPtr;
-using application_manager::commands::NaviSetVideoConfigResponse;
-using test::components::event_engine_test::MockEventDispatcher;
-using testing::_;
-using testing::ReturnRef;
-using ::testing::NiceMock;
-
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-class NaviSetVideoConfigResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(NaviSetVideoConfigResponseTest, RUN_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<NaviSetVideoConfigResponse> command(
- CreateCommand<NaviSetVideoConfigResponse>(msg));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace navi_set_video_config_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_start_stream_request_test.cc b/src/components/application_manager/test/commands/hmi/navi_start_stream_request_test.cc
deleted file mode 100644
index 1327ff6dd6..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_start_stream_request_test.cc
+++ /dev/null
@@ -1,120 +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 <utility>
-
-#include "application_manager/commands/hmi/navi_start_stream_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_start_stream_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-namespace commands = am::commands;
-using commands::MessageSharedPtr;
-using commands::NaviStartStreamRequest;
-using am::event_engine::Event;
-
-namespace {
-const uint32_t kHmiAppId = 13u;
-const am::HmiInterfaces::InterfaceID kHmiInterface =
- am::HmiInterfaces::HMI_INTERFACE_Navigation;
-} // namespace
-
-class NaviStartStreamRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- NaviStartStreamRequestTest() {
- ON_CALL(app_mngr_settings_, start_stream_retry_amount())
- .WillByDefault(ReturnRef(start_stream_retry_amount_));
- msg_ = CreateMessage();
- command_ = CreateCommand<NaviStartStreamRequest>(msg_);
- }
-
- std::pair<uint32_t, int32_t> start_stream_retry_amount_;
- MessageSharedPtr msg_;
- SharedPtr<NaviStartStreamRequest> command_;
-};
-
-TEST_F(NaviStartStreamRequestTest, Run_HmiInterfaceNotAvailable_NoRequest) {
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- EXPECT_CALL(app_mngr_, SendMessageToHMI(_)).Times(0);
-
- command_->Run();
-}
-
-TEST_F(NaviStartStreamRequestTest,
- Run_HmiInterfaceAvailableButNoApp_NoRequest) {
- (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_, SendMessageToHMI(_)).Times(0);
-
- command_->Run();
-}
-
-TEST_F(NaviStartStreamRequestTest, Run_HmiInterfaceAvailable_SentRequest) {
- (*msg_)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_video_streaming_allowed(true));
- EXPECT_CALL(app_mngr_, SendMessageToHMI(msg_));
-
- command_->Run();
-}
-
-} // namespace navi_start_stream_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/navi_stop_stream_requests_test.cc b/src/components/application_manager/test/commands/hmi/navi_stop_stream_requests_test.cc
deleted file mode 100644
index 18f82cd645..0000000000
--- a/src/components/application_manager/test/commands/hmi/navi_stop_stream_requests_test.cc
+++ /dev/null
@@ -1,104 +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 "application_manager/commands/hmi/navi_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_audio_stop_stream_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace navi_stop_stream_requests {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-namespace commands = am::commands;
-using commands::MessageSharedPtr;
-using am::event_engine::Event;
-
-namespace {
-const am::HmiInterfaces::InterfaceID kHmiInterface =
- am::HmiInterfaces::HMI_INTERFACE_Navigation;
-} // namespace
-
-template <typename Command>
-class NaviStopStreamRequestsTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- NaviStopStreamRequestsTest() {
- ON_CALL(this->app_mngr_, hmi_interfaces())
- .WillByDefault(ReturnRef(mock_hmi_interfaces_));
- msg_ = CreateMessage();
- command_ = CreateCommand<Command>(msg_);
- }
-
- MessageSharedPtr msg_;
- SharedPtr<Command> command_;
-};
-
-typedef testing::Types<commands::AudioStopStreamRequest,
- commands::NaviStopStreamRequest> RequestCommandsList;
-TYPED_TEST_CASE(NaviStopStreamRequestsTest, RequestCommandsList);
-
-TYPED_TEST(NaviStopStreamRequestsTest, Run_HmiInterfaceNotAvailable_NoRequest) {
- EXPECT_CALL(TestFixture::mock_hmi_interfaces_,
- GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- EXPECT_CALL(TestFixture::app_mngr_, SendMessageToHMI(_)).Times(0);
-
- TestFixture::command_->Run();
-}
-
-TYPED_TEST(NaviStopStreamRequestsTest, Run_HmiInterfaceAvailable_SentRequest) {
- EXPECT_CALL(TestFixture::mock_hmi_interfaces_,
- GetInterfaceState(kHmiInterface))
- .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(TestFixture::app_mngr_, SendMessageToHMI(TestFixture::msg_));
-
- TestFixture::command_->Run();
-}
-
-} // namespace navi_stop_stream_requests
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/on_driver_distraction_notification_test.cc b/src/components/application_manager/test/commands/hmi/on_driver_distraction_notification_test.cc
deleted file mode 100644
index b8a8c68ece..0000000000
--- a/src/components/application_manager/test/commands/hmi/on_driver_distraction_notification_test.cc
+++ /dev/null
@@ -1,161 +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 <string>
-
-#include "gtest/gtest.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "utils/shared_ptr.h"
-#include "utils/lock.h"
-#include "utils/make_shared.h"
-#include "utils/data_accessor.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "hmi/on_driver_distraction_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace on_driver_distraction_notification {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::Eq;
-using ::utils::SharedPtr;
-
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::hmi::OnDriverDistractionNotification;
-using namespace am::commands;
-
-typedef ::utils::SharedPtr<OnDriverDistractionNotification> NotificationPtr;
-
-class HMIOnDriverDistractionNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- ::sync_primitives::Lock app_set_lock_;
- policy_test::MockPolicyHandlerInterface mock_policy_handler_interface_;
-};
-
-MATCHER_P2(CheckNotificationParams, function_id, state, "") {
- bool is_function_id_matched =
- function_id ==
- static_cast<am::mobile_api::FunctionID::eType>(
- (*arg)[am::strings::params][am::strings::function_id].asInt());
- bool is_state_matched =
- state ==
- static_cast<hmi_apis::Common_DriverDistractionState::eType>(
- (*arg)[am::strings::msg_params][am::mobile_notification::state]
- .asInt());
- return is_function_id_matched && is_state_matched;
-}
-
-ACTION_P(GetArg3, result) {
- arg3 = *result;
-}
-
-TEST_F(HMIOnDriverDistractionNotificationTest, Run_PushMobileMessage_SUCCESS) {
- const hmi_apis::Common_DriverDistractionState::eType state =
- hmi_apis::Common_DriverDistractionState::DD_ON;
- MessageSharedPtr commands_msg(CreateMessage(smart_objects::SmartType_Map));
- (*commands_msg)[am::strings::msg_params][am::hmi_notification::state] = state;
-
- NotificationPtr command(
- CreateCommand<OnDriverDistractionNotification>(commands_msg));
-
- EXPECT_CALL(app_mngr_, set_driver_distraction_state(Eq(state)));
-
- MockAppPtr mock_app = CreateMockApp();
- am::ApplicationSet app_set;
- app_set.insert(mock_app);
-
- DataAccessor<am::ApplicationSet> accessor(app_set, app_set_lock_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
- policy::CheckPermissionResult result;
- result.hmi_level_permitted = policy::kRpcDisallowed;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_interface_));
- EXPECT_CALL(mock_policy_handler_interface_, CheckPermissions(_, _, _, _))
- .WillOnce(GetArg3(&result));
-
- EXPECT_CALL(*mock_app,
- PushMobileMessage(CheckNotificationParams(
- am::mobile_api::FunctionID::OnDriverDistractionID, state)));
-
- command->Run();
-}
-
-TEST_F(HMIOnDriverDistractionNotificationTest,
- Run_SendNotificationToMobile_SUCCESS) {
- const hmi_apis::Common_DriverDistractionState::eType state =
- hmi_apis::Common_DriverDistractionState::DD_ON;
- MessageSharedPtr commands_msg(CreateMessage(smart_objects::SmartType_Map));
- (*commands_msg)[am::strings::msg_params][am::hmi_notification::state] = state;
-
- NotificationPtr command(
- CreateCommand<OnDriverDistractionNotification>(commands_msg));
-
- EXPECT_CALL(app_mngr_, set_driver_distraction_state(Eq(state)));
-
- MockAppPtr mock_app = CreateMockApp();
- am::ApplicationSet app_set;
- app_set.insert(mock_app);
-
- DataAccessor<am::ApplicationSet> accessor(app_set, app_set_lock_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
-
- policy::CheckPermissionResult result;
- result.hmi_level_permitted = policy::kRpcAllowed;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_interface_));
- EXPECT_CALL(mock_policy_handler_interface_, CheckPermissions(_, _, _, _))
- .WillOnce(GetArg3(&result));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- CheckNotificationParams(
- am::mobile_api::FunctionID::OnDriverDistractionID, state),
- Command::CommandOrigin::ORIGIN_SDL));
-
- command->Run();
-}
-
-} // on_driver_distraction_notification
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/rc_get_capabilities_response_test.cc b/src/components/application_manager/test/commands/hmi/rc_get_capabilities_response_test.cc
deleted file mode 100644
index 90be018e74..0000000000
--- a/src/components/application_manager/test/commands/hmi/rc_get_capabilities_response_test.cc
+++ /dev/null
@@ -1,181 +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 "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/commands/hmi/rc_get_capabilities_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace rc_get_capabilities_response {
-
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = am::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::RCGetCapabilitiesResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<RCGetCapabilitiesResponse> RCGetCapabilitiesResponsePtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class RCGetCapabilitiesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateCommandMsg() {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::msg_params][strings::rc_capability] =
- (capabilities_);
-
- return command_msg;
- }
-
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(RCGetCapabilitiesResponseTest, RUN_SUCCESSS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
-
- (*command_msg)[strings::msg_params][strings::system_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::rc_capability] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject& remote_control_capability =
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::rc_capability];
-
- remote_control_capability["climateControlCapabilities"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- remote_control_capability["climateControlCapabilities"][0] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& climate_control_capability =
- remote_control_capability["climateControlCapabilities"][0];
-
- climate_control_capability["moduleName"] = "Climate";
- climate_control_capability["fanSpeedAvailable"] = true;
- climate_control_capability["desiredTemperatureAvailable"] = true;
- climate_control_capability["acEnableAvailable"] = true;
- climate_control_capability["acMaxEnableAvailable"] = true;
- climate_control_capability["circulateAirEnableAvailable"] = true;
- climate_control_capability["autoModeEnableAvailable"] = true;
- climate_control_capability["dualModeEnableAvailable"] = true;
-
- climate_control_capability["defrostZoneAvailable"] = true;
- climate_control_capability["defrostZone"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- climate_control_capability["defrostZone"][0] = "ALL";
-
- climate_control_capability["ventilationModeAvailable"] = true;
- climate_control_capability["ventilationMode"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- climate_control_capability["ventilationMode"][0] = "BOTH";
-
- remote_control_capability["radioControlCapabilities"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- remote_control_capability["radioControlCapabilities"][0] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& radio_control_capability =
- remote_control_capability["radioControlCapabilities"][0];
-
- radio_control_capability["moduleName"] = "Radio";
- radio_control_capability["radioEnableAvailable"] = true;
- radio_control_capability["radioBandAvailable"] = true;
- radio_control_capability["radioFrequencyAvailable"] = true;
- radio_control_capability["hdChannelAvailable"] = true;
- radio_control_capability["rdsDataAvailable"] = true;
- radio_control_capability["availableHDsAvailable"] = true;
- radio_control_capability["stateAvailable"] = true;
- radio_control_capability["signalStrengthAvailable"] = true;
- radio_control_capability["signalChangeThresholdAvailable"] = true;
-
- remote_control_capability[hmi_response::button_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- remote_control_capability[hmi_response::button_capabilities][0] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& button_capability =
- remote_control_capability[hmi_response::button_capabilities][0];
-
- button_capability[strings::button_name] = "OK";
- button_capability["shortPressAvailable"] = true;
- button_capability["longPressAvailable"] = true;
- button_capability["upDownAvailable"] = true;
-
- RCGetCapabilitiesResponsePtr command(
- CreateCommand<RCGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject rc_capability_so =
- (*command_msg)[strings::msg_params][strings::rc_capability];
-
- EXPECT_CALL(mock_hmi_capabilities_, set_rc_capability(rc_capability_so));
- EXPECT_CALL(mock_hmi_capabilities_, set_rc_supported(true));
-
- command->Run();
-}
-
-} // namespace rc_get_capabilities_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/rc_is_ready_request_test.cc b/src/components/application_manager/test/commands/hmi/rc_is_ready_request_test.cc
deleted file mode 100644
index 73a43342f1..0000000000
--- a/src/components/application_manager/test/commands/hmi/rc_is_ready_request_test.cc
+++ /dev/null
@@ -1,174 +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 "application_manager/commands/hmi/rc_is_ready_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace rc_is_ready_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::RCIsReadyRequest;
-using am::event_engine::Event;
-
-typedef SharedPtr<RCIsReadyRequest> RCIsReadyRequestPtr;
-
-class RCIsReadyRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- RCIsReadyRequestTest() : command_(CreateCommand<RCIsReadyRequest>()) {}
-
- void SetUpExpectations(bool is_rc_cooperating_available,
- bool is_send_message_to_hmi,
- bool is_message_contain_param,
- am::HmiInterfaces::InterfaceState state) {
- if (is_send_message_to_hmi) {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillRepeatedly(ReturnRef(mock_hmi_capabilities_));
- ExpectSendMessagesToHMI();
- } else {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- }
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_rc_cooperating(is_rc_cooperating_available));
- if (!is_rc_cooperating_available) {
- EXPECT_CALL(mock_hmi_capabilities_, set_rc_supported(false));
- }
-
- if (is_message_contain_param) {
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_RC, 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_RC))
- .WillOnce(Return(state));
- }
-
- void ExpectSendMessagesToHMI() {
- smart_objects::SmartObjectSPtr capabilities(
- new smart_objects::SmartObject(smart_objects::SmartType_Map));
- EXPECT_CALL(mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::RC_GetCapabilities, _))
- .WillOnce(Return(capabilities));
- EXPECT_CALL(app_mngr_, ManageHMICommand(capabilities));
- }
-
- void PrepareEvent(bool is_message_contain_param,
- Event& event,
- bool is_rc_cooperating_available = false) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- if (is_message_contain_param) {
- (*msg)[am::strings::msg_params][am::strings::available] =
- is_rc_cooperating_available;
- }
- event.set_smart_object(*msg);
- }
-
- RCIsReadyRequestPtr command_;
- am::MockHmiInterfaces mock_hmi_interfaces_;
- application_manager_test::MockHMICapabilities mock_hmi_capabilities_;
-};
-
-TEST_F(RCIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
- const bool is_rc_cooperating_available = false;
- 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);
- SetUpExpectations(is_rc_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_RESPONSE);
- command_->on_event(event);
-}
-
-TEST_F(RCIsReadyRequestTest, Run_KeyAvailableEqualToFalse_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);
- PrepareEvent(is_message_contain_param, event);
- 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_KeyAvailableEqualToTrue_StateAvailable) {
- const bool is_rc_cooperating_available = true;
- const bool is_send_message_to_hmi = true;
- const bool is_message_contain_param = true;
- Event event(hmi_apis::FunctionID::RC_IsReady);
- PrepareEvent(is_message_contain_param, event, is_rc_cooperating_available);
- SetUpExpectations(is_rc_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_AVAILABLE);
- command_->on_event(event);
-}
-
-TEST_F(RCIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
- ExpectSendMessagesToHMI();
- command_->onTimeOut();
-}
-
-} // namespace rc_is_ready_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/rc_is_ready_response_test.cc b/src/components/application_manager/test/commands/hmi/rc_is_ready_response_test.cc
deleted file mode 100644
index 157dff6216..0000000000
--- a/src/components/application_manager/test/commands/hmi/rc_is_ready_response_test.cc
+++ /dev/null
@@ -1,79 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/commands/hmi/rc_is_ready_response.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace rc_is_ready_response {
-
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::RCIsReadyResponse;
-using test::components::event_engine_test::MockEventDispatcher;
-
-typedef SharedPtr<RCIsReadyResponse> RCIsReadyResponsePtr;
-
-class RCIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
-};
-
-TEST_F(RCIsReadyResponseTest, RUN_SUCCESS) {
- RCIsReadyResponsePtr command(CreateCommand<RCIsReadyResponse>());
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace rc_is_ready_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/response_from_hmi_test.cc b/src/components/application_manager/test/commands/hmi/response_from_hmi_test.cc
deleted file mode 100644
index 8ee86f098d..0000000000
--- a/src/components/application_manager/test/commands/hmi/response_from_hmi_test.cc
+++ /dev/null
@@ -1,137 +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 "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "hmi/response_from_hmi.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace response_from_hmi {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::SaveArg;
-using ::testing::DoAll;
-
-using ::utils::SharedPtr;
-using ::test::components::event_engine_test::MockEventDispatcher;
-
-namespace am = ::application_manager;
-
-using am::commands::ResponseFromHMI;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-
-class ResponseFromHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(ResponseFromHMITest, BasicMethodsOverloads_SUCCESS) {
- ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
-
- // Current implementation always return `true`
- EXPECT_TRUE(command->Init());
- EXPECT_NO_THROW(command->Run());
- EXPECT_TRUE(command->CleanUp());
-}
-
-TEST_F(ResponseFromHMITest, SendResponseToMobile_SUCCESS) {
- ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
-
- MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(msg, _));
-
- command->SendResponseToMobile(msg, app_mngr_);
-
- const application_manager::MessageType received_message_tipe =
- static_cast<application_manager::MessageType>(
- (*msg)[am::strings::params][am::strings::message_type].asInt());
-
- EXPECT_EQ(application_manager::MessageType::kResponse, received_message_tipe);
-}
-
-TEST_F(ResponseFromHMITest, CreateHMIRequest_SUCCESS) {
- ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
-
- MessageSharedPtr result_msg;
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&result_msg), Return(true)));
-
- const hmi_apis::FunctionID::eType posted_function_id =
- hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr dummy_msg_params = CreateMessage();
- command->CreateHMIRequest(posted_function_id, *dummy_msg_params);
-
- ASSERT_TRUE(result_msg);
-
- const application_manager::MessageType received_message_tipe =
- static_cast<application_manager::MessageType>(
- (*result_msg)[am::strings::params][am::strings::message_type]
- .asInt());
-
- EXPECT_EQ(am::MessageType::kRequest, received_message_tipe);
-
- const hmi_apis::FunctionID::eType received_function_id =
- static_cast<hmi_apis::FunctionID::eType>(
- (*result_msg)[am::strings::params][am::strings::function_id].asInt());
-
- EXPECT_EQ(posted_function_id, received_function_id);
-}
-
-TEST_F(ResponseFromHMITest, CreateHMIRequest_CantManageCommand_Covering) {
- ResponseFromHMIPtr command(CreateCommand<ResponseFromHMI>());
-
- MessageSharedPtr result_msg;
- ON_CALL(app_mngr_, GetNextHMICorrelationID()).WillByDefault(Return(1u));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&result_msg), Return(false)));
-
- const hmi_apis::FunctionID::eType posted_function_id =
- hmi_apis::FunctionID::INVALID_ENUM;
- MessageSharedPtr dummy_msg_params = CreateMessage();
- command->CreateHMIRequest(posted_function_id, *dummy_msg_params);
-}
-
-} // namespace response_from_hmi
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/sdl_activate_app_request_test.cc b/src/components/application_manager/test/commands/hmi/sdl_activate_app_request_test.cc
deleted file mode 100644
index d36b55ee25..0000000000
--- a/src/components/application_manager/test/commands/hmi/sdl_activate_app_request_test.cc
+++ /dev/null
@@ -1,503 +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 "gtest/gtest.h"
-#include "utils/lock.h"
-#include "utils/helpers.h"
-#include "application_manager/commands/hmi/sdl_activate_app_request.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "commands/command_request_test.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_state_controller.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace sdl_activate_app_request {
-
-namespace am = ::application_manager;
-namespace strings = am::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::MessageSharedPtr;
-using am::commands::SDLActivateAppRequest;
-using am::ApplicationSet;
-using testing::Mock;
-using testing::Return;
-using testing::ReturnRef;
-using testing::Mock;
-using ::testing::NiceMock;
-using policy_test::MockPolicyHandlerInterface;
-using am::event_engine::Event;
-
-namespace {
-const uint32_t kCorrelationID = 1u;
-const uint32_t kAppID = 2u;
-const uint32_t kAppIDFirst = 1u;
-const connection_handler::DeviceHandle kHandle = 2u;
-} // namespace
-
-MATCHER_P2(CheckMsgParams, result, corr_id, "") {
- const bool is_func_id_valid =
- hmi_apis::FunctionID::SDL_ActivateApp ==
- static_cast<int32_t>(
- (*arg)[am::strings::params][am::strings::function_id].asInt());
-
- const bool is_result_code_valid =
- hmi_apis::Common_Result::APPLICATION_NOT_REGISTERED ==
- static_cast<int32_t>(
- (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
-
- const bool is_result_valid =
- result == (*arg)[am::strings::msg_params][am::strings::success].asBool();
-
- const bool is_corr_id_valid =
- corr_id ==
- ((*arg)[am::strings::params][am::strings::correlation_id].asUInt());
-
- using namespace helpers;
- return Compare<bool, EQ, ALL>(true,
- is_func_id_valid,
- is_result_code_valid,
- is_result_valid,
- is_corr_id_valid);
-}
-
-class SDLActivateAppRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- protected:
- ~SDLActivateAppRequestTest() {
- // Fix DataAccessor release and WinQt crash
- Mock::VerifyAndClearExpectations(&app_mngr_);
- }
-
- void InitCommand(const uint32_t& timeout) OVERRIDE {
- MockAppPtr mock_app = CreateMockApp();
- CommandRequestTest<CommandsTestMocks::kIsNice>::InitCommand(timeout);
- ON_CALL((*mock_app), app_id()).WillByDefault(Return(kAppID));
- ON_CALL(app_mngr_, application_by_hmi_app(kAppID))
- .WillByDefault(Return(mock_app));
- }
- void SetCorrelationAndAppID(MessageSharedPtr msg) {
- (*msg)[am::strings::params][strings::correlation_id] = kCorrelationID;
- (*msg)[am::strings::msg_params][strings::app_id] = kAppID;
- }
-
- ApplicationSet app_list_;
- ::sync_primitives::Lock lock_;
- policy_test::MockPolicyHandlerInterface policy_handler_;
- application_manager_test::MockStateController mock_state_controller_;
- NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
-};
-
-#ifdef EXTERNAL_PROPRIETARY_MODE
-
-TEST_F(SDLActivateAppRequestTest, Run_ActivateApp_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler_));
- EXPECT_CALL(policy_handler_, OnActivateApp(kAppID, kCorrelationID));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, DISABLED_Run_DactivateApp_REJECTED) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
- (*msg)[am::strings::msg_params][strings::function_id] =
- hmi_apis::FunctionID::SDL_ActivateApp;
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(true));
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::SDL_ActivateApp)))
- .WillOnce(Return(true));
-
- command->Run();
-}
-#else
-
-TEST_F(SDLActivateAppRequestTest, FindAppToRegister_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kAppID)).WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(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(false));
- ON_CALL(*mock_app, device()).WillByDefault(Return(kHandle));
-
- MockAppPtr mock_app_first(CreateMockApp());
- ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
- ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
-
- app_list_.insert(mock_app_first);
- DataAccessor<ApplicationSet> accessor(app_list_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
-
- ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
- EXPECT_CALL(*mock_app_first, is_foreground()).WillOnce(Return(false));
- ON_CALL(*mock_app_first, protocol_version())
- .WillByDefault(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- ON_CALL(*mock_app, protocol_version())
- .WillByDefault(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
-
- const std::string url = "url";
- ON_CALL(*mock_app_first, SchemaUrl()).WillByDefault(Return(url));
- const std::string package = "package";
- ON_CALL(*mock_app_first, PackageName()).WillByDefault(Return(package));
-
- EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, AppIdNotFound_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kAppID))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_, WaitingApplicationByID(kAppID))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, DevicesAppsEmpty_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- 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_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
-
- EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(false));
- ON_CALL(*mock_app, device()).WillByDefault(Return(kHandle));
-
- DataAccessor<ApplicationSet> accessor(app_list_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
- app_list_ = accessor.GetData();
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, FirstAppActive_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- 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_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
-
- DataAccessor<ApplicationSet> accessor(app_list_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
-
- app_list_ = accessor.GetData();
-
- MockAppPtr mock_app_first(CreateMockApp());
- ON_CALL(app_mngr_, application(kAppIDFirst))
- .WillByDefault(Return(mock_app_first));
-
- app_list_.insert(mock_app_first);
- ON_CALL(*mock_app_first, protocol_version())
- .WillByDefault(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
-
- ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
- EXPECT_CALL(*mock_app_first, is_foreground()).WillRepeatedly(Return(true));
-
- EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, FirstAppNotActive_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- 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_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
- EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler_));
- EXPECT_CALL(policy_handler_, OnActivateApp(kAppID, kCorrelationID));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, FirstAppIsForeground_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- MockAppPtr mock_app(CreateMockApp());
-
- const std::string schema("schema");
- mock_app->SetShemaUrl(schema);
- const std::string package_name("package_name");
- mock_app->SetPackageName(package_name);
-
- ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
- MockAppPtr mock_app_first(CreateMockApp());
- ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
-
- app_list_.insert(mock_app_first);
- DataAccessor<ApplicationSet> accessor(app_list_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
- ON_CALL(*mock_app_first, protocol_version())
- .WillByDefault(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
- EXPECT_CALL(*mock_app_first, is_foreground()).WillOnce(Return(true));
-
- EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, schema, package_name, _));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, FirstAppNotRegisteredAndEmpty_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- MockAppPtr mock_app(CreateMockApp());
- ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
-
- MockAppPtr mock_app_first(CreateMockApp());
- ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
- ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
-
- app_list_.insert(mock_app_first);
- DataAccessor<ApplicationSet> accessor(app_list_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
- ON_CALL(*mock_app_first, protocol_version())
- .WillByDefault(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- EXPECT_CALL(*mock_app_first, is_foreground()).WillOnce(Return(false));
-
- EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
-
- command->Run();
-}
-
-TEST_F(SDLActivateAppRequestTest, FirstAppNotRegistered_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- MockAppPtr mock_app(CreateMockApp());
- ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
- EXPECT_CALL(mock_state_controller_,
- IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
- .WillOnce(Return(false));
- DataAccessor<ApplicationSet> accessor(app_list_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
-
- app_list_ = accessor.GetData();
-
- MockAppPtr mock_app_first(CreateMockApp());
- ON_CALL(*mock_app_first, device()).WillByDefault(Return(kHandle));
- ON_CALL(*mock_app_first, is_foreground()).WillByDefault(Return(false));
-
- app_list_.insert(mock_app_first);
- ON_CALL(*mock_app_first, protocol_version())
- .WillByDefault(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- EXPECT_CALL(*mock_app_first, is_foreground()).WillRepeatedly(Return(true));
-
- EXPECT_CALL(mock_message_helper_, SendLaunchApp(_, _, _, _));
-
- command->Run();
-}
-#endif
-
-TEST_F(SDLActivateAppRequestTest, OnTimeout_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- SetCorrelationAndAppID(msg);
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
- ON_CALL(mock_event_dispatcher_, remove_observer(_, _));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
-
- command->onTimeOut();
-}
-
-TEST_F(SDLActivateAppRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[am::strings::params][strings::correlation_id] = kCorrelationID;
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>());
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
- event.set_smart_object(*event_msg);
- EXPECT_CALL(app_mngr_, application_by_hmi_app(_)).Times(0);
-
- command->on_event(event);
-}
-
-TEST_F(SDLActivateAppRequestTest, OnEvent_InvalidAppId_UNSUCCESS) {
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[strings::msg_params][strings::application][strings::app_id] =
- kAppID;
-
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>());
-
- Event event(hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
- event.set_smart_object(*event_msg);
-
- MockAppPtr invalid_mock_app;
- EXPECT_CALL(app_mngr_, application_by_hmi_app(_))
- .WillOnce(Return(invalid_mock_app));
- EXPECT_CALL(app_mngr_, GetPolicyHandler()).Times(0);
-
- command->on_event(event);
-}
-
-TEST_F(SDLActivateAppRequestTest, OnEvent_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
- SharedPtr<SDLActivateAppRequest> command(
- CreateCommand<SDLActivateAppRequest>(msg));
-
- MessageSharedPtr event_msg = CreateMessage();
- (*event_msg)[strings::msg_params][strings::application][strings::app_id] =
- kAppID;
-
- Event event(hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
- event.set_smart_object(*event_msg);
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application_by_hmi_app(_)).WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppID));
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler_));
- EXPECT_CALL(policy_handler_, OnActivateApp(kAppID, kCorrelationID));
-
- command->on_event(event);
-}
-
-} // namespace sdl_activate_app_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/sdl_activate_app_response_test.cc b/src/components/application_manager/test/commands/hmi/sdl_activate_app_response_test.cc
deleted file mode 100644
index 5dff55f7c3..0000000000
--- a/src/components/application_manager/test/commands/hmi/sdl_activate_app_response_test.cc
+++ /dev/null
@@ -1,88 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/commands/hmi/sdl_activate_app_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace sdl_activate_app_response {
-
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::SDLActivateAppResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<SDLActivateAppResponse> SDLActivateAppResponsePtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const std::string kStrNumber = "123";
-} // namespace
-
-class SDLActivateAppResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(SDLActivateAppResponseTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
-
- SDLActivateAppResponsePtr command(
- CreateCommand<SDLActivateAppResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-} // namespace sdl_activate_app_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc b/src/components/application_manager/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc
deleted file mode 100644
index 1bcdaebb35..0000000000
--- a/src/components/application_manager/test/commands/hmi/sdl_get_list_of_permisssions_request_test.cc
+++ /dev/null
@@ -1,116 +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 "gtest/gtest.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_request.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "commands/command_request_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace sdl_get_list_of_permissions_request {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::SDLGetListOfPermissionsRequest;
-using test::components::policy_test::MockPolicyHandlerInterface;
-using smart_objects::SmartObject;
-using testing::Return;
-using testing::ReturnRef;
-
-namespace {
-const uint32_t kCorrelationID = 1u;
-const uint32_t kAppID = 2u;
-const uint32_t kConnectionKey = 0u;
-} // namespace
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-class SDLGetListOfPermissionsRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- protected:
- void SetUp() OVERRIDE {
- mock_app_ = CreateMockApp();
- }
-
- void InitCommand(const uint32_t& timeout) OVERRIDE {
- CommandRequestTest<CommandsTestMocks::kIsNice>::InitCommand(timeout);
- ON_CALL((*mock_app_), app_id()).WillByDefault(Return(kAppID));
- }
- MockAppPtr mock_app_;
-};
-
-TEST_F(SDLGetListOfPermissionsRequestTest, Run_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
- (*msg)[strings::msg_params][strings::app_id] = kAppID;
-
- EXPECT_CALL(app_mngr_, application_by_hmi_app(kAppID))
- .WillOnce(Return(mock_app_));
-
- SharedPtr<SDLGetListOfPermissionsRequest> command(
- CreateCommand<SDLGetListOfPermissionsRequest>(msg));
-
- MockPolicyHandlerInterface policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler));
- EXPECT_CALL(policy_handler, OnGetListOfPermissions(kAppID, kCorrelationID));
-
- command->Run();
-}
-
-TEST_F(SDLGetListOfPermissionsRequestTest, Run_KeyDoesntExist_SUCCESS) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Binary);
- (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
-
- SharedPtr<SDLGetListOfPermissionsRequest> command(
- CreateCommand<SDLGetListOfPermissionsRequest>(msg));
-
- MockPolicyHandlerInterface policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler));
- EXPECT_CALL(policy_handler,
- OnGetListOfPermissions(kConnectionKey, kCorrelationID));
-
- command->Run();
-}
-
-} // namespace sdl_get_list_of_permissions_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/sdl_get_status_update_request_test.cc b/src/components/application_manager/test/commands/hmi/sdl_get_status_update_request_test.cc
deleted file mode 100644
index 988cdd18c7..0000000000
--- a/src/components/application_manager/test/commands/hmi/sdl_get_status_update_request_test.cc
+++ /dev/null
@@ -1,82 +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 "gtest/gtest.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_request.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "commands/command_request_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace sdl_get_status_update_request {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::SDLGetStatusUpdateRequest;
-using test::components::policy_test::MockPolicyHandlerInterface;
-using testing::Return;
-using testing::ReturnRef;
-
-namespace {
-const uint32_t kCorrelationID = 1u;
-} // namespace
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-class SDLGetStatusUpdateRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(SDLGetStatusUpdateRequestTest, Run_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
-
- SharedPtr<SDLGetStatusUpdateRequest> command(
- CreateCommand<SDLGetStatusUpdateRequest>(msg));
-
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler));
- EXPECT_CALL(mock_policy_handler, OnGetStatusUpdate(kCorrelationID));
-
- command->Run();
-}
-
-} // namespace sdl_get_status_update_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc b/src/components/application_manager/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc
deleted file mode 100644
index 66fedda3ca..0000000000
--- a/src/components/application_manager/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc
+++ /dev/null
@@ -1,169 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/hmi/sdl_get_user_friendly_message_request.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_state_controller.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "smart_objects/smart_object.h"
-#include "commands/command_request_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace sdl_get_user_friendly_message_request {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::SDLGetUserFriendlyMessageRequest;
-using application_manager::MockMessageHelper;
-using test::components::policy_test::MockPolicyHandlerInterface;
-using test::components::application_manager_test::MockHMICapabilities;
-using testing::_;
-using testing::Return;
-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 kMessageCodes = "messageCodes";
-const hmi_apis::Common_Language::eType kLanguage =
- hmi_apis::Common_Language::EN_GB;
-} // namespace
-
-namespace strings = ::application_manager::strings;
-
-class SDLGetUserFriendlyMessageRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- protected:
- void SetUp() OVERRIDE {
- mock_app_ = CreateMockApp();
- }
-
- void InitCommand(const uint32_t& timeout) OVERRIDE {
- CommandRequestTest<CommandsTestMocks::kIsNice>::InitCommand(timeout);
- ON_CALL((*mock_app_), app_id()).WillByDefault(Return(kAppID));
- EXPECT_CALL(app_mngr_, application_by_hmi_app(kAppID))
- .WillOnce(Return(mock_app_));
- }
- MockAppPtr mock_app_;
- MockPolicyHandlerInterface mock_policy_handler_;
-};
-
-TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_LanguageSet_SUCCESS) {
- 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(kLanguageDe);
- (*msg)[strings::msg_params][kMessageCodes][1] = SmartObject(kLanguageEn);
-
- (*msg)[strings::msg_params][strings::language] = kLanguage;
-
- SharedPtr<SDLGetUserFriendlyMessageRequest> command(
- CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
-
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(kLanguage))
- .WillOnce(Return(kLanguageEn));
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_));
- 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->Run();
-}
-
-TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_LanguageNotSet_SUCCESS) {
- 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(kLanguageDe);
- (*msg)[strings::msg_params][kMessageCodes][1] = SmartObject(kLanguageEn);
-
- SharedPtr<SDLGetUserFriendlyMessageRequest> command(
- CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities, active_ui_language())
- .WillOnce(Return(kLanguage));
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(kLanguage))
- .WillOnce(Return(kLanguageEn));
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_));
- 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->Run();
-}
-
-TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_NoMsgCodes_Canceled) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
- (*msg)[strings::msg_params][strings::app_id] = kAppID;
-
- SharedPtr<SDLGetUserFriendlyMessageRequest> command(
- CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
-
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(_)).Times(0);
- EXPECT_CALL(app_mngr_, GetPolicyHandler()).Times(0);
- EXPECT_CALL(mock_policy_handler_, OnGetUserFriendlyMessage(_, _, _)).Times(0);
-
- command->Run();
-}
-
-} // namespace sdl_get_user_friendly_message_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/simple_notifications_test.cc b/src/components/application_manager/test/commands/hmi/simple_notifications_test.cc
deleted file mode 100644
index 9d7441fef7..0000000000
--- a/src/components/application_manager/test/commands/hmi/simple_notifications_test.cc
+++ /dev/null
@@ -1,77 +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 "commands/commands_test.h"
-
-#include "hmi/notification_to_hmi.h"
-#include "application_manager/commands/command_notification_impl.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace simple_notifications_test {
-
-using namespace application_manager;
-
-using ::testing::Types;
-
-template <typename Command>
-class SimpleNotificationsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-typedef Types<commands::CommandNotificationImpl, commands::NotificationToHMI>
- CommandsList;
-
-TYPED_TEST_CASE(SimpleNotificationsTest, CommandsList);
-
-TYPED_TEST(SimpleNotificationsTest, Run_SendMessageToHMI_SUCCESS) {
- typedef typename TestFixture::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
-
- // Current implementation always return `true`
- EXPECT_TRUE(command->Init());
- EXPECT_NO_THROW(command->Run());
- EXPECT_TRUE(command->CleanUp());
-}
-
-} // namespace simple_notifications_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/simple_request_from_hmi_test.cc b/src/components/application_manager/test/commands/hmi/simple_request_from_hmi_test.cc
deleted file mode 100644
index 4f7a7a9f72..0000000000
--- a/src/components/application_manager/test/commands/hmi/simple_request_from_hmi_test.cc
+++ /dev/null
@@ -1,99 +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 "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "hmi/request_from_hmi.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace simple_requests_from_hmi_test {
-
-using ::testing::_;
-using ::testing::Types;
-using ::testing::NotNull;
-using ::testing::NiceMock;
-
-using ::utils::SharedPtr;
-namespace commands = ::application_manager::commands;
-using commands::MessageSharedPtr;
-using ::application_manager::event_engine::EventObserver;
-using ::test::components::event_engine_test::MockEventDispatcher;
-
-class RequestFromHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {
- protected:
- void SetUp() OVERRIDE {
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher_));
- }
- NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
-};
-
-TEST_F(RequestFromHMITest, BasicMethodsOverloads_SUCCESS) {
- SharedPtr<commands::RequestFromHMI> command(
- CreateCommand<commands::RequestFromHMI>());
- application_manager::event_engine::Event event(
- hmi_apis::FunctionID::BasicCommunication_ActivateApp);
- // Current implementation always return `true`
- EXPECT_TRUE(command->Init());
- EXPECT_TRUE(command->CleanUp());
- EXPECT_NO_THROW(command->Run());
- EXPECT_NO_THROW(command->on_event(event));
-}
-
-TEST_F(RequestFromHMITest, SendResponse_SUCCESS) {
- SharedPtr<commands::RequestFromHMI> command(
- CreateCommand<commands::RequestFromHMI>());
-
- const bool success = false;
- const uint32_t correlation_id = 1u;
- EXPECT_CALL(app_mngr_, ManageHMICommand(NotNull()));
-
- command->SendResponse(success,
- correlation_id,
- hmi_apis::FunctionID::BasicCommunication_ActivateApp,
- hmi_apis::Common_Result::SUCCESS);
-}
-
-} // namespace simple_requests_to_hmi_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/simple_requests_to_hmi_test.cc b/src/components/application_manager/test/commands/hmi/simple_requests_to_hmi_test.cc
deleted file mode 100644
index 3fa3aaef3a..0000000000
--- a/src/components/application_manager/test/commands/hmi/simple_requests_to_hmi_test.cc
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Copyright (c) 2017 Xevo Inc.
- * 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 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 "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/commands/command.h"
-#include "application_manager/commands/hmi/allow_app_request.h"
-#include "application_manager/commands/hmi/allow_all_apps_request.h"
-#include "application_manager/commands/hmi/basic_communication_system_request.h"
-#include "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_request.h"
-#include "application_manager/commands/hmi/navi_audio_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_get_way_points_request.h"
-#include "application_manager/commands/hmi/navi_is_ready_request.h"
-#include "application_manager/commands/hmi/navi_send_location_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
-#include "application_manager/commands/hmi/sdl_activate_app_response.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_response.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_response.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_request.h"
-#include "application_manager/commands/hmi/ui_set_app_icon_request.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_request.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_request.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_request.h"
-#include "application_manager/commands/hmi/vi_is_ready_request.h"
-#include "application_manager/commands/hmi/vi_read_did_request.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/dial_number_request.h"
-#include "application_manager/commands/hmi/tts_is_ready_request.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_request.h"
-#include "application_manager/commands/hmi/tts_speak_request.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_request.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/tts_change_registration_request.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_request.h"
-#include "application_manager/commands/hmi/tts_get_language_request.h"
-#include "application_manager/commands/hmi/close_popup_request.h"
-#include "application_manager/commands/hmi/ui_add_command_request.h"
-#include "application_manager/commands/hmi/ui_add_submenu_request.h"
-#include "application_manager/commands/hmi/ui_alert_request.h"
-#include "application_manager/commands/hmi/ui_change_registration_request.h"
-#include "application_manager/commands/hmi/ui_delete_command_request.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_request.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_request.h"
-#include "application_manager/commands/hmi/ui_get_language_request.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/ui_is_ready_request.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_request.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_request.h"
-#include "application_manager/commands/hmi/vi_get_dtcs_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_request.h"
-#include "application_manager/commands/hmi/ui_show_request.h"
-#include "application_manager/commands/hmi/ui_slider_request.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vr_add_command_request.h"
-#include "application_manager/commands/hmi/vr_change_registration_request.h"
-#include "application_manager/commands/hmi/vr_delete_command_request.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_request.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/vr_get_language_request.h"
-#include "application_manager/commands/hmi/vr_is_ready_request.h"
-#include "application_manager/commands/hmi/vr_perform_interaction_request.h"
-#include "application_manager/commands/hmi/allow_all_apps_request.h"
-#include "application_manager/commands/hmi/basic_communication_system_request.h"
-#include "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "application_manager/commands/hmi/allow_app_request.h"
-#include "application_manager/commands/hmi/navi_send_location_request.h"
-#include "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
-#include "application_manager/commands/hmi/sdl_policy_update.h"
-#include "application_manager/commands/hmi/ui_set_icon_request.h"
-#include "application_manager/commands/hmi/dial_number_request.h"
-#include "application_manager/commands/hmi/ui_send_haptic_data_request.h"
-
-#include "application_manager/test/include/application_manager/mock_event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace simple_requests_to_hmi_test {
-
-using ::testing::_;
-using ::testing::Types;
-using ::testing::NotNull;
-
-using ::utils::SharedPtr;
-
-namespace am_commands = application_manager::commands;
-using am_commands::MessageSharedPtr;
-using event_engine_test::MockEventDispatcher;
-
-class RequestToHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(RequestToHMITest, BasicMethodsOverloads_SUCCESS) {
- SharedPtr<am_commands::RequestToHMI> command(
- CreateCommand<am_commands::RequestToHMI>());
-
- // Current implementation always return `true`
- EXPECT_TRUE(command->Init());
- EXPECT_NO_THROW(command->Run());
- EXPECT_TRUE(command->CleanUp());
-}
-
-TEST_F(RequestToHMITest, SendRequest_SUCCESS) {
- SharedPtr<am_commands::RequestToHMI> command(
- CreateCommand<am_commands::RequestToHMI>());
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(NotNull()));
-
- command->SendRequest();
-}
-
-template <typename Command>
-class RequestToHMICommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-template <typename Command>
-class RequestToHMICommandsTest2 : public RequestToHMICommandsTest<Command> {};
-
-template <typename Command>
-class RequestToHMICommandsTest3
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-typedef Types<am_commands::VIGetVehicleTypeRequest,
- am_commands::VIReadDIDRequest,
- am_commands::VISubscribeVehicleDataRequest,
- am_commands::hmi::DialNumberRequest,
- am_commands::ClosePopupRequest,
- am_commands::TTSSetGlobalPropertiesRequest,
- am_commands::TTSSpeakRequest,
- am_commands::TTSStopSpeakingRequest,
- am_commands::TTSGetSupportedLanguagesRequest,
- am_commands::UIAddCommandRequest,
- am_commands::UIAddSubmenuRequest,
- am_commands::UIAlertRequest,
- am_commands::UIChangeRegistrationRequest,
- am_commands::UIDeleteCommandRequest,
- am_commands::UIDeleteSubmenuRequest,
- am_commands::UIEndAudioPassThruRequest,
- am_commands::UIGetCapabilitiesRequest,
- am_commands::UIGetLanguageRequest,
- am_commands::UIGetSupportedLanguagesRequest,
- am_commands::UIPerformAudioPassThruRequest,
- am_commands::UIPerformInteractionRequest,
- am_commands::VIDiagnosticMessageRequest,
- am_commands::VIGetDTCsRequest,
- am_commands::VIGetVehicleDataRequest,
- am_commands::UISetMediaClockTimerRequest,
- am_commands::UIShowRequest,
- am_commands::VIUnsubscribeVehicleDataRequest,
- am_commands::VRAddCommandRequest,
- am_commands::VRChangeRegistrationRequest,
- am_commands::VRDeleteCommandRequest,
- am_commands::UISliderRequest,
- am_commands::TTSChangeRegistrationRequest,
- am_commands::TTSGetCapabilitiesRequest,
- am_commands::TTSGetLanguageRequest,
- am_commands::AllowAllAppsRequest,
- am_commands::BasicCommunicationSystemRequest,
- am_commands::ButtonGetCapabilitiesRequest,
- am_commands::NaviSendLocationRequest,
- am_commands::NaviUnSubscribeWayPointsRequest,
- am_commands::NaviUpdateTurnListRequest,
- am_commands::NaviShowConstantTBTRequest,
- am_commands::NaviStopStreamRequest,
- am_commands::NaviSubscribeWayPointsRequest,
- am_commands::NaviAlertManeuverRequest,
- am_commands::AudioStopStreamRequest,
- am_commands::NaviGetWayPointsRequest,
- am_commands::UISetGlobalPropertiesRequest,
- am_commands::UISendHapticDataRequest> RequestCommandsList;
-
-typedef Types<am_commands::UIScrollableMessageRequest,
- am_commands::VRGetCapabilitiesRequest,
- am_commands::UISetAppIconRequest,
- am_commands::UiSetDisplayLayoutRequest,
- am_commands::VRGetSupportedLanguagesRequest,
- am_commands::VRGetLanguageRequest,
- am_commands::VRPerformInteractionRequest,
- am_commands::AllowAppRequest,
-// TODO (OKozlov). Need to clarify why UT fails
-// for UISetIconRequest
-// am_commands::UISetIconRequest,
-#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
- am_commands::SDLPolicyUpdate,
-#endif
- am_commands::hmi::DialNumberRequest> RequestCommandsList2;
-
-typedef Types<am_commands::VIIsReadyRequest,
- am_commands::TTSIsReadyRequest,
- am_commands::UIIsReadyRequest,
- am_commands::NaviIsReadyRequest,
- am_commands::VRIsReadyRequest> RequestCommandsList3;
-
-TYPED_TEST_CASE(RequestToHMICommandsTest, RequestCommandsList);
-TYPED_TEST_CASE(RequestToHMICommandsTest2, RequestCommandsList2);
-TYPED_TEST_CASE(RequestToHMICommandsTest3, RequestCommandsList3);
-
-TYPED_TEST(RequestToHMICommandsTest, Run_SendMessageToHMI_SUCCESS) {
- typedef typename TestFixture::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
- EXPECT_CALL(this->app_mngr_, SendMessageToHMI(NotNull()));
-
- command->Run();
-}
-
-TYPED_TEST(RequestToHMICommandsTest2, Run_SendMessageToHMI_SUCCESS) {
- typedef typename TestFixture::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
- EXPECT_CALL(this->app_mngr_, SendMessageToHMI(NotNull()));
-
- command->Run();
-}
-
-TYPED_TEST(RequestToHMICommandsTest3, Run_SendMessageToHMI_SUCCESS) {
- typedef typename TestFixture::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
-
- EXPECT_CALL(this->app_mngr_, SendMessageToHMI(NotNull()));
-
- command->Run();
-}
-
-} // namespace simple_requests_to_hmi_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/simple_response_from_hmi_test.cc b/src/components/application_manager/test/commands/hmi/simple_response_from_hmi_test.cc
deleted file mode 100644
index f55b2e5835..0000000000
--- a/src/components/application_manager/test/commands/hmi/simple_response_from_hmi_test.cc
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Copyright (c) 2017 Xevo Inc.
- * 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 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 <stdint.h>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command.h"
-#include "hmi/activate_app_response.h"
-#include "hmi/basic_communication_system_response.h"
-#include "hmi/navi_alert_maneuver_response.h"
-#include "hmi/navi_audio_start_stream_response.h"
-#include "hmi/navi_audio_stop_stream_response.h"
-#include "hmi/navi_get_way_points_response.h"
-#include "hmi/navi_send_location_response.h"
-#include "hmi/navi_show_constant_tbt_response.h"
-#include "hmi/navi_start_stream_response.h"
-#include "hmi/navi_stop_stream_response.h"
-#include "hmi/navi_subscribe_way_points_response.h"
-#include "hmi/navi_unsubscribe_way_points_response.h"
-#include "hmi/navi_update_turn_list_response.h"
-#include "hmi/tts_change_registration_response.h"
-#include "hmi/ui_set_app_icon_response.h"
-#include "hmi/ui_set_display_layout_response.h"
-#include "hmi/ui_set_global_properties_response.h"
-#include "hmi/ui_scrollable_message_response.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "hmi/vi_read_did_response.h"
-#include "hmi/vi_subscribe_vehicle_data_response.h"
-#include "hmi/vi_get_vehicle_type_response.h"
-#include "hmi/vi_is_ready_response.h"
-#include "hmi/dial_number_response.h"
-#include "hmi/close_popup_response.h"
-#include "hmi/tts_set_global_properties_response.h"
-#include "hmi/tts_speak_response.h"
-#include "hmi/tts_stop_speaking_response.h"
-#include "hmi/tts_change_registration_response.h"
-#include "hmi/ui_add_command_response.h"
-#include "hmi/ui_add_submenu_response.h"
-#include "hmi/ui_alert_response.h"
-#include "hmi/ui_change_registration_response.h"
-#include "hmi/ui_delete_command_response.h"
-#include "hmi/ui_delete_submenu_response.h"
-#include "hmi/ui_end_audio_pass_thru_response.h"
-#include "hmi/ui_perform_audio_pass_thru_response.h"
-#include "hmi/ui_perform_interaction_response.h"
-#include "hmi/vi_diagnostic_message_response.h"
-#include "hmi/vi_get_dtcs_response.h"
-#include "hmi/ui_set_media_clock_timer_response.h"
-#include "hmi/ui_show_response.h"
-#include "hmi/ui_slider_response.h"
-#include "hmi/vi_unsubscribe_vehicle_data_response.h"
-#include "hmi/vr_add_command_response.h"
-#include "hmi/vr_change_registration_response.h"
-#include "hmi/vr_delete_command_response.h"
-#include "hmi/vr_perform_interaction_response.h"
-#include "hmi/activate_app_response.h"
-#include "hmi/basic_communication_system_response.h"
-#include "hmi/navi_unsubscribe_way_points_response.h"
-#include "hmi/navi_update_turn_list_response.h"
-#include "hmi/navi_send_location_response.h"
-#include "hmi/navi_show_constant_tbt_response.h"
-#include "hmi/navi_start_stream_response.h"
-#include "hmi/navi_subscribe_way_points_response.h"
-#include "hmi/on_find_applications.h"
-#include "hmi/on_update_device_list.h"
-#include "hmi/sdl_policy_update_response.h"
-#include "hmi/update_app_list_response.h"
-#include "hmi/update_device_list_response.h"
-#include "hmi/notification_from_hmi.h"
-#include "hmi/ui_send_haptic_data_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace simple_response_from_hmi_test {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::Types;
-using ::testing::Eq;
-
-using ::utils::SharedPtr;
-using ::test::components::event_engine_test::MockEventDispatcher;
-
-namespace am = ::application_manager;
-namespace commands = am::commands;
-using commands::MessageSharedPtr;
-
-template <class CommandD>
-class ResponseFromHMICommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef CommandD CommandData;
- MockEventDispatcher event_dispatcher_;
-
- ResponseFromHMICommandsTest() {
- ON_CALL(app_mngr_, event_dispatcher())
- .WillByDefault(ReturnRef(event_dispatcher_));
- }
-};
-
-template <class Command>
-class EmptyResponseFromHMICommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-template <class Command, hmi_apis::FunctionID::eType kExpectedEventId>
-struct CommandData {
- typedef Command CommandType;
- enum { kEventId = kExpectedEventId };
-};
-
-typedef Types<
- CommandData<commands::VIReadDIDResponse,
- hmi_apis::FunctionID::VehicleInfo_ReadDID>,
- CommandData<commands::TTSSpeakResponse, hmi_apis::FunctionID::TTS_Speak>,
- CommandData<commands::VISubscribeVehicleDataResponse,
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData>,
- CommandData<commands::hmi::DialNumberResponse,
- hmi_apis::FunctionID::BasicCommunication_DialNumber>,
- CommandData<commands::UIDeleteSubmenuResponse,
- hmi_apis::FunctionID::UI_DeleteSubMenu>,
- CommandData<commands::UIEndAudioPassThruResponse,
- hmi_apis::FunctionID::UI_EndAudioPassThru>,
- CommandData<commands::TTSSetGlobalPropertiesResponse,
- hmi_apis::FunctionID::TTS_SetGlobalProperties>,
- CommandData<commands::TTSStopSpeakingResponse,
- hmi_apis::FunctionID::TTS_StopSpeaking>,
- CommandData<commands::UIAddCommandResponse,
- hmi_apis::FunctionID::UI_AddCommand>,
- CommandData<commands::UIAddSubmenuResponse,
- hmi_apis::FunctionID::UI_AddSubMenu>,
- CommandData<commands::UIAlertResponse, hmi_apis::FunctionID::UI_Alert>,
- CommandData<commands::UIChangeRegistratioResponse,
- hmi_apis::FunctionID::UI_ChangeRegistration>,
- CommandData<commands::UIDeleteCommandResponse,
- hmi_apis::FunctionID::UI_DeleteCommand>,
- CommandData<commands::UIPerformAudioPassThruResponse,
- hmi_apis::FunctionID::UI_PerformAudioPassThru>,
- CommandData<commands::UIPerformInteractionResponse,
- hmi_apis::FunctionID::UI_PerformInteraction>,
- CommandData<commands::UIDeleteSubmenuResponse,
- hmi_apis::FunctionID::UI_DeleteSubMenu>,
- CommandData<commands::UIEndAudioPassThruResponse,
- hmi_apis::FunctionID::UI_EndAudioPassThru>,
- CommandData<commands::VIDiagnosticMessageResponse,
- hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage>,
- CommandData<commands::VIGetDTCsResponse,
- hmi_apis::FunctionID::VehicleInfo_GetDTCs>,
- CommandData<commands::UISetMediaClockTimerResponse,
- hmi_apis::FunctionID::UI_SetMediaClockTimer>,
- CommandData<commands::UIShowResponse, hmi_apis::FunctionID::UI_Show>,
- CommandData<commands::VIUnsubscribeVehicleDataResponse,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData>,
- CommandData<commands::VRAddCommandResponse,
- hmi_apis::FunctionID::VR_AddCommand>,
- CommandData<commands::VRChangeRegistrationResponse,
- hmi_apis::FunctionID::VR_ChangeRegistration>,
- CommandData<commands::VRDeleteCommandResponse,
- hmi_apis::FunctionID::VR_DeleteCommand>,
- CommandData<commands::UISliderResponse, hmi_apis::FunctionID::UI_Slider>,
- CommandData<commands::TTSChangeRegistratioResponse,
- hmi_apis::FunctionID::TTS_ChangeRegistration>,
- CommandData<commands::ActivateAppResponse,
- hmi_apis::FunctionID::BasicCommunication_ActivateApp>,
- CommandData<commands::BasicCommunicationSystemResponse,
- hmi_apis::FunctionID::BasicCommunication_SystemRequest>,
- CommandData<commands::NaviAlertManeuverResponse,
- hmi_apis::FunctionID::Navigation_AlertManeuver>,
- CommandData<commands::AudioStartStreamResponse,
- hmi_apis::FunctionID::Navigation_StartAudioStream>,
- CommandData<commands::NaviGetWayPointsResponse,
- hmi_apis::FunctionID::Navigation_GetWayPoints>,
- CommandData<commands::NaviSendLocationResponse,
- hmi_apis::FunctionID::Navigation_SendLocation>,
- CommandData<commands::NaviShowConstantTBTResponse,
- hmi_apis::FunctionID::Navigation_ShowConstantTBT>,
- CommandData<commands::NaviStartStreamResponse,
- hmi_apis::FunctionID::Navigation_StartStream>,
- CommandData<commands::NaviSubscribeWayPointsResponse,
- hmi_apis::FunctionID::Navigation_SubscribeWayPoints>,
- CommandData<commands::NaviUnsubscribeWayPointsResponse,
- hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints>,
- CommandData<commands::NaviUpdateTurnListResponse,
- hmi_apis::FunctionID::Navigation_UpdateTurnList>,
- CommandData<commands::UISetAppIconResponse,
- hmi_apis::FunctionID::UI_SetAppIcon>,
- CommandData<commands::UiSetDisplayLayoutResponse,
- hmi_apis::FunctionID::UI_SetDisplayLayout>,
- CommandData<commands::UISetGlobalPropertiesResponse,
- hmi_apis::FunctionID::UI_SetGlobalProperties>,
- CommandData<commands::UISetGlobalPropertiesResponse,
- hmi_apis::FunctionID::UI_SetGlobalProperties>,
- CommandData<commands::VRPerformInteractionResponse,
- hmi_apis::FunctionID::VR_PerformInteraction>,
- CommandData<commands::UIScrollableMessageResponse,
- hmi_apis::FunctionID::UI_ScrollableMessage>,
- CommandData<commands::UISendHapticDataResponse,
- hmi_apis::FunctionID::UI_SendHapticData> > ResponseCommandsList;
-
-typedef Types<commands::AudioStopStreamResponse,
- commands::NaviStopStreamResponse,
- commands::OnFindApplications,
- commands::OnUpdateDeviceList,
- commands::SDLPolicyUpdateResponse,
- commands::UpdateAppListResponse,
- commands::UpdateDeviceListResponse> EmptyResponseCommandsList;
-
-TYPED_TEST_CASE(ResponseFromHMICommandsTest, ResponseCommandsList);
-
-TYPED_TEST_CASE(EmptyResponseFromHMICommandsTest, EmptyResponseCommandsList);
-
-MATCHER_P(EventIdIsEqualTo, function_id, "") {
- return static_cast<hmi_apis::FunctionID::eType>(function_id) == arg.id();
-}
-
-TYPED_TEST(ResponseFromHMICommandsTest, Run_SendMessageToHMI_SUCCESS) {
- typedef typename TestFixture::CommandData CommandData;
- typedef typename CommandData::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
-
- EXPECT_CALL(this->event_dispatcher_,
- raise_event(EventIdIsEqualTo(CommandData::kEventId)));
-
- command->Run();
-}
-
-TYPED_TEST(EmptyResponseFromHMICommandsTest, Run_SUCCESS) {
- typedef typename TestFixture::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
-
- command->Run();
-}
-
-class OtherResponseFromHMICommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-MATCHER_P(VehicleTypeIsEqualTo, vehicle_type, "") {
- return (*vehicle_type) == arg.asString();
-}
-
-TEST_F(OtherResponseFromHMICommandsTest, VIGetVehicleTypeResponse_Run_SUCCESS) {
- const std::string kVehicleType = "Test";
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::hmi_response::vehicle_type] =
- kVehicleType;
-
- SharedPtr<commands::VIGetVehicleTypeResponse> command(
- CreateCommand<commands::VIGetVehicleTypeResponse>(command_msg));
-
- application_manager_test::MockHMICapabilities hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(hmi_capabilities));
-
- EXPECT_CALL(hmi_capabilities,
- set_vehicle_type(VehicleTypeIsEqualTo(&kVehicleType)));
-
- command->Run();
-}
-
-TEST_F(OtherResponseFromHMICommandsTest, VIIsReadyResponse_Run_SUCCESS) {
- SharedPtr<commands::VIIsReadyResponse> command(
- CreateCommand<commands::VIIsReadyResponse>());
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-MATCHER_P(CheckMsgType, msg_type, "") {
- return msg_type ==
- static_cast<int32_t>(
- (*arg)[am::strings::params][am::strings::message_type].asInt());
-}
-
-class NotificationFromHMITest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(NotificationFromHMITest, BasicMethodsOverloads_SUCCESS) {
- SharedPtr<commands::NotificationFromHMI> command(
- CreateCommand<commands::NotificationFromHMI>());
- // Current implementation always return `true`
- EXPECT_TRUE(command->Init());
- EXPECT_TRUE(command->CleanUp());
- EXPECT_NO_THROW(command->Run());
-}
-
-TEST_F(NotificationFromHMITest, SendNotificationToMobile_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::message_type] =
- static_cast<int32_t>(am::MessageType::kNotification);
-
- SharedPtr<commands::NotificationFromHMI> command(
- CreateCommand<commands::NotificationFromHMI>());
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(CheckMsgType(am::MessageType::kNotification),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- command->SendNotificationToMobile(command_msg);
-}
-
-TEST_F(NotificationFromHMITest, CreateHMIRequest_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params] = 0;
- SharedPtr<commands::NotificationFromHMI> command(
- CreateCommand<commands::NotificationFromHMI>(command_msg));
-
- const uint32_t correlation_id = 1u;
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(correlation_id));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(CheckMsgType(am::MessageType::kRequest)))
- .WillOnce(Return(false));
-
- command->CreateHMIRequest(hmi_apis::FunctionID::INVALID_ENUM,
- (*command_msg)[am::strings::msg_params]);
-}
-
-} // namespace simple_response_from_hmi_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/simple_response_to_hmi_test.cc b/src/components/application_manager/test/commands/hmi/simple_response_to_hmi_test.cc
deleted file mode 100644
index 3948d2bfe3..0000000000
--- a/src/components/application_manager/test/commands/hmi/simple_response_to_hmi_test.cc
+++ /dev/null
@@ -1,107 +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 "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command.h"
-#include "application_manager/commands/hmi/sdl_activate_app_response.h"
-#include "application_manager/commands/hmi/sdl_get_list_of_permissions_response.h"
-#include "application_manager/commands/hmi/sdl_get_status_update_response.h"
-#include "application_manager/commands/hmi/sdl_get_user_friendly_message_response.h"
-#include "application_manager/commands/hmi/response_to_hmi.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace simple_response_to_hmi_test {
-
-using ::testing::_;
-using ::testing::Types;
-using ::testing::NotNull;
-using ::utils::SharedPtr;
-
-namespace commands = ::application_manager::commands;
-using commands::MessageSharedPtr;
-
-template <class Command>
-class ResponseToHMICommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-typedef Types<commands::SDLActivateAppResponse,
- commands::SDLGetListOfPermissionsResponse,
- commands::SDLGetStatusUpdateResponse,
- commands::SDLGetUserFriendlyMessageResponse> ResponseCommandsList;
-
-TYPED_TEST_CASE(ResponseToHMICommandsTest, ResponseCommandsList);
-
-TYPED_TEST(ResponseToHMICommandsTest, Run_SendMessageToHMI_SUCCESS) {
- typedef typename TestFixture::CommandType CommandType;
-
- SharedPtr<CommandType> command = this->template CreateCommand<CommandType>();
-
- EXPECT_CALL(this->app_mngr_, SendMessageToHMI(NotNull()));
-
- command->Run();
-}
-
-class ResponseToHMITest : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(ResponseToHMITest, BasicMethodsOverloads_SUCCESS) {
- SharedPtr<commands::ResponseToHMI> command(
- CreateCommand<commands::ResponseToHMI>());
-
- // Current implementation always return `true`
- EXPECT_TRUE(command->Init());
- EXPECT_TRUE(command->CleanUp());
-}
-
-TEST_F(ResponseToHMITest, Run_SUCCESS) {
- SharedPtr<commands::ResponseToHMI> command(
- CreateCommand<commands::ResponseToHMI>());
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(NotNull()));
-
- command->Run();
-}
-
-} // namespace simple_response_to_hmi_test
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/tts_get_capabilities_response_test.cc b/src/components/application_manager/test/commands/hmi/tts_get_capabilities_response_test.cc
deleted file mode 100644
index c7b5c76b40..0000000000
--- a/src/components/application_manager/test/commands/hmi/tts_get_capabilities_response_test.cc
+++ /dev/null
@@ -1,136 +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 <string>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_response.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "smart_objects/smart_object.h"
-#include "commands/commands_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace tts_get_capabilities_response {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::TTSGetCapabilitiesResponse;
-using test::components::application_manager_test::MockHMICapabilities;
-using utils::SharedPtr;
-using testing::_;
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-namespace {
-const std::string kText = "TEXT";
-}
-
-class TTSGetCapabilitiesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MockHMICapabilities mock_hmi_capabilities_;
-};
-
-TEST_F(TTSGetCapabilitiesResponseTest, Run_BothExist_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::speech_capabilities] = kText;
- (*msg)[strings::msg_params][hmi_response::prerecorded_speech_capabilities] =
- kText;
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_,
- set_speech_capabilities(SmartObject(kText)));
- EXPECT_CALL(mock_hmi_capabilities_,
- set_prerecorded_speech(SmartObject(kText)));
-
- SharedPtr<TTSGetCapabilitiesResponse> command(
- CreateCommand<TTSGetCapabilitiesResponse>(msg));
-
- command->Run();
-}
-
-TEST_F(TTSGetCapabilitiesResponseTest, Run_OnlySpeech_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::speech_capabilities] = kText;
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_,
- set_speech_capabilities(SmartObject(kText)));
- EXPECT_CALL(mock_hmi_capabilities_, set_prerecorded_speech(_)).Times(0);
-
- SharedPtr<TTSGetCapabilitiesResponse> command(
- CreateCommand<TTSGetCapabilitiesResponse>(msg));
-
- command->Run();
-}
-
-TEST_F(TTSGetCapabilitiesResponseTest, Run_OnlyPrerecorded_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::prerecorded_speech_capabilities] =
- kText;
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_, set_speech_capabilities(_)).Times(0);
- EXPECT_CALL(mock_hmi_capabilities_,
- set_prerecorded_speech(SmartObject(kText)));
-
- SharedPtr<TTSGetCapabilitiesResponse> command(
- CreateCommand<TTSGetCapabilitiesResponse>(msg));
-
- command->Run();
-}
-
-TEST_F(TTSGetCapabilitiesResponseTest, Run_Nothing_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_, set_speech_capabilities(_)).Times(0);
- EXPECT_CALL(mock_hmi_capabilities_, set_prerecorded_speech(_)).Times(0);
-
- SharedPtr<TTSGetCapabilitiesResponse> command(
- CreateCommand<TTSGetCapabilitiesResponse>(msg));
-
- command->Run();
-}
-
-} // namespace tts_get_capabilities_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/tts_get_language_response_test.cc b/src/components/application_manager/test/commands/hmi/tts_get_language_response_test.cc
deleted file mode 100644
index e0b2fad5b9..0000000000
--- a/src/components/application_manager/test/commands/hmi/tts_get_language_response_test.cc
+++ /dev/null
@@ -1,109 +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 "application_manager/commands/hmi/tts_get_language_response.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "commands/commands_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace tts_get_language_response {
-
-using utils::SharedPtr;
-using application_manager::commands::TTSGetLanguageResponse;
-using test::components::application_manager_test::MockHMICapabilities;
-using test::components::event_engine_test::MockEventDispatcher;
-using testing::_;
-using testing::ReturnRef;
-
-namespace strings = application_manager::strings;
-namespace hmi_response = application_manager::hmi_response;
-using namespace hmi_apis;
-
-namespace {
-const Common_Language::eType kLanguage = Common_Language::EN_GB;
-} // namespace
-
-class TTSGetLanguageResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(TTSGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::language] = kLanguage;
-
- SharedPtr<TTSGetLanguageResponse> command(
- CreateCommand<TTSGetLanguageResponse>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities, set_active_tts_language(kLanguage));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-TEST_F(TTSGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<TTSGetLanguageResponse> command(
- CreateCommand<TTSGetLanguageResponse>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities,
- set_active_tts_language(Common_Language::INVALID_ENUM));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace tts_get_language_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/tts_get_supported_languages_response_test.cc b/src/components/application_manager/test/commands/hmi/tts_get_supported_languages_response_test.cc
deleted file mode 100644
index 547fc02481..0000000000
--- a/src/components/application_manager/test/commands/hmi/tts_get_supported_languages_response_test.cc
+++ /dev/null
@@ -1,134 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_response.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace tts_get_supported_languages_response {
-
-using ::testing::_;
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::ResponseFromHMI;
-using am::commands::TTSGetSupportedLanguagesResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class TTSGetSupportedLanguageResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(TTSGetSupportedLanguageResponseTest, RUN_SUCCESS) {
- smart_objects::SmartObject supported_languages("EN_US");
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
- (*command_msg)[strings::msg_params][hmi_response::languages] =
- supported_languages;
-
- ResponseFromHMIPtr command(
- CreateCommand<TTSGetSupportedLanguagesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_tts_supported_languages((
- *command_msg)[strings::msg_params][hmi_response::languages]));
-
- command->Run();
-}
-TEST_F(TTSGetSupportedLanguageResponseTest, RUN_UNSUCCESS) {
- smart_objects::SmartObject supported_languages("EN_US");
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::WRONG_LANGUAGE;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
-
- ResponseFromHMIPtr command(
- CreateCommand<TTSGetSupportedLanguagesResponse>(command_msg));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_tts_supported_languages(supported_languages)).Times(0);
-
- command->Run();
-
- EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
- am::hmi_response::languages));
-}
-
-} // namespace tts_get_supported_languages_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/tts_is_ready_response_test.cc b/src/components/application_manager/test/commands/hmi/tts_is_ready_response_test.cc
deleted file mode 100644
index 52c66ff877..0000000000
--- a/src/components/application_manager/test/commands/hmi/tts_is_ready_response_test.cc
+++ /dev/null
@@ -1,99 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/commands/hmi/tts_is_ready_response.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace tts_is_ready_response {
-
-using ::testing::_;
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::ResponseFromHMI;
-using am::commands::TTSIsReadyResponse;
-using am::commands::CommandImpl;
-using test::components::event_engine_test::MockEventDispatcher;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const bool kIsAvailable = true;
-const bool kIsNotAvailable = false;
-} // namespace
-
-class TTSIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(TTSIsReadyResponseTest, RUN_SUCCESS) {
- ResponseFromHMIPtr command(CreateCommand<TTSIsReadyResponse>());
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace tts_is_ready_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/ui_get_capabilities_response_test.cc b/src/components/application_manager/test/commands/hmi/ui_get_capabilities_response_test.cc
deleted file mode 100644
index b02c9851ee..0000000000
--- a/src/components/application_manager/test/commands/hmi/ui_get_capabilities_response_test.cc
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Copyright (c) 2017 Xevo Inc.
- * 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 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 <stdint.h>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace ui_get_capabilities_response {
-
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = am::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::ResponseFromHMI;
-using am::commands::UIGetCapabilitiesResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<ResponseFromHMI> ResponseFromHMIPtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class UIGetCapabilitiesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateCommandMsg() {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
-
- return command_msg;
- }
-
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(UIGetCapabilitiesResponseTest, RUN_SetDisplay_SUCCESSS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][hmi_response::display_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- (*command_msg)[strings::msg_params][hmi_response::display_capabilities]
- [hmi_response::display_type] = "GEN2_8_DMA";
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject display_capabilities_so =
- (*command_msg)[strings::msg_params][hmi_response::display_capabilities];
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_display_capabilities(display_capabilities_so));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetSoftButton_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][hmi_response::soft_button_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*command_msg)[strings::msg_params][hmi_response::soft_button_capabilities]
- [hmi_response::image_supported] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject soft_button_capabilities_so = (*command_msg)
- [strings::msg_params][hmi_response::soft_button_capabilities];
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_soft_button_capabilities(soft_button_capabilities_so));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetHmiZone_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][hmi_response::hmi_zone_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*command_msg)[strings::msg_params][hmi_response::hmi_zone_capabilities][0] =
- "FRONT";
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject hmi_zone_capabilities_so =
- (*command_msg)[strings::msg_params][hmi_response::hmi_zone_capabilities];
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_hmi_zone_capabilities(hmi_zone_capabilities_so));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetAudioPassThru_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::audio_pass_thru_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject audio_pass_thru_capabilities_so = (*command_msg)
- [strings::msg_params][strings::audio_pass_thru_capabilities];
- EXPECT_CALL(
- mock_hmi_capabilities_,
- set_audio_pass_thru_capabilities(audio_pass_thru_capabilities_so));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetNavigation_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::hmi_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- (*command_msg)[strings::msg_params][strings::hmi_capabilities]
- [strings::navigation] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject hmi_capabilities_so =
- (*command_msg)[strings::msg_params][strings::hmi_capabilities];
- EXPECT_CALL(mock_hmi_capabilities_,
- set_navigation_supported(
- hmi_capabilities_so[strings::navigation].asBool()));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetPhoneCall_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::hmi_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- (*command_msg)[strings::msg_params][strings::hmi_capabilities]
- [strings::phone_call] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject hmi_capabilities_so =
- (*command_msg)[strings::msg_params][strings::hmi_capabilities];
- EXPECT_CALL(mock_hmi_capabilities_,
- set_phone_call_supported(
- hmi_capabilities_so[strings::phone_call].asBool()));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreaming_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::hmi_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- (*command_msg)[strings::msg_params][strings::hmi_capabilities]
- [strings::video_streaming] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject hmi_capabilities_so =
- (*command_msg)[strings::msg_params][strings::hmi_capabilities];
- EXPECT_CALL(mock_hmi_capabilities_,
- set_video_streaming_supported(
- hmi_capabilities_so[strings::video_streaming].asBool()));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetNavigationCapability_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::system_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::navigation_capability]["sendLocationEnabled"] = true;
-
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::navigation_capability]["getWayPointsEnabled"] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject navigation_capability_so =
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::navigation_capability];
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_navigation_capability(navigation_capability_so));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetPhonenCapability_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::system_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::phone_capability]["dialNumberEnabled"] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject phone_capability_so =
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::phone_capability];
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_phone_capability(phone_capability_so));
-
- command->Run();
-}
-
-TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::system_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::video_streaming_capability] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject& video_streaming_capability =
- (*command_msg)[strings::msg_params][strings::system_capabilities]
- [strings::video_streaming_capability];
-
- video_streaming_capability[strings::preferred_resolution] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- video_streaming_capability[strings::preferred_resolution]
- [strings::resolution_width] = 800;
- video_streaming_capability[strings::preferred_resolution]
- [strings::resolution_height] = 350;
-
- video_streaming_capability[strings::max_bitrate] = 10000;
-
- video_streaming_capability[strings::supported_formats] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- video_streaming_capability[strings::supported_formats][0] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- video_streaming_capability[strings::supported_formats][0][strings::protocol] =
- hmi_apis::Common_VideoStreamingProtocol::RAW;
-
- video_streaming_capability[strings::supported_formats][0][strings::codec] =
- hmi_apis::Common_VideoStreamingCodec::H264;
-
- video_streaming_capability[strings::haptic_spatial_data_supported] = true;
-
- ResponseFromHMIPtr command(
- CreateCommand<UIGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_video_streaming_capability(video_streaming_capability));
-
- command->Run();
-}
-
-} // namespace ui_get_capabilities_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/ui_get_language_response_test.cc b/src/components/application_manager/test/commands/hmi/ui_get_language_response_test.cc
deleted file mode 100644
index e45e4583e5..0000000000
--- a/src/components/application_manager/test/commands/hmi/ui_get_language_response_test.cc
+++ /dev/null
@@ -1,113 +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 "application_manager/commands/hmi/ui_get_language_response.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_application_manager.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace ui_get_language_response {
-
-using utils::SharedPtr;
-using application_manager::commands::UIGetLanguageResponse;
-using test::components::event_engine_test::MockEventDispatcher;
-using testing::_;
-using testing::ReturnRef;
-using ::testing::NiceMock;
-
-namespace strings = application_manager::strings;
-namespace hmi_response = application_manager::hmi_response;
-using namespace hmi_apis;
-
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const hmi_apis::Common_Language::eType kLanguage = Common_Language::EN_GB;
-} // namespace
-
-class UIGetLanguageResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(UIGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::language] = kLanguage;
-
- SharedPtr<UIGetLanguageResponse> command(
- CreateCommand<UIGetLanguageResponse>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities, set_active_ui_language(kLanguage));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-TEST_F(UIGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<UIGetLanguageResponse> command(
- CreateCommand<UIGetLanguageResponse>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities,
- set_active_ui_language(Common_Language::INVALID_ENUM));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace ui_get_language_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/ui_get_supported_languages_response_test.cc b/src/components/application_manager/test/commands/hmi/ui_get_supported_languages_response_test.cc
deleted file mode 100644
index 690c863ccb..0000000000
--- a/src/components/application_manager/test/commands/hmi/ui_get_supported_languages_response_test.cc
+++ /dev/null
@@ -1,128 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/application.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_response.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace ui_get_supported_languages_response {
-
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::UIGetSupportedLanguagesResponse;
-
-typedef SharedPtr<UIGetSupportedLanguagesResponse>
- UIGetSupportedLanguagesResponsePtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const std::string kStringNum = "123";
-const std::string kLanguage = "EN_US";
-const smart_objects::SmartObject supported_languages(kLanguage);
-} // namespace
-
-class UIGetSupportedLanguagesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(UIGetSupportedLanguagesResponseTest, RUN_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStringNum;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
- (*command_msg)[strings::msg_params][hmi_response::languages] =
- supported_languages;
-
- UIGetSupportedLanguagesResponsePtr command(
- CreateCommand<UIGetSupportedLanguagesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_ui_supported_languages((supported_languages)));
-
- command->Run();
-}
-TEST_F(UIGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStringNum;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::WRONG_LANGUAGE;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
-
- UIGetSupportedLanguagesResponsePtr command(
- CreateCommand<UIGetSupportedLanguagesResponse>(command_msg));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_ui_supported_languages(supported_languages)).Times(0);
-
- command->Run();
-
- EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
- am::hmi_response::languages));
-}
-
-} // namespace ui_get_supported_languages_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/ui_is_ready_request_test.cc b/src/components/application_manager/test/commands/hmi/ui_is_ready_request_test.cc
deleted file mode 100644
index 66b1317870..0000000000
--- a/src/components/application_manager/test/commands/hmi/ui_is_ready_request_test.cc
+++ /dev/null
@@ -1,204 +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 "application_manager/commands/hmi/ui_is_ready_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace ui_is_ready_request {
-
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using am::commands::MessageSharedPtr;
-using am::commands::UIIsReadyRequest;
-using am::event_engine::Event;
-
-typedef SharedPtr<UIIsReadyRequest> UIIsReadyRequestPtr;
-
-class UIIsReadyRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- UIIsReadyRequestTest() : command_(CreateCommand<UIIsReadyRequest>()) {}
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(mock_hmi_capabilities_));
- }
- void SetUpExpectations(bool is_ui_cooperating_available,
- bool is_send_message_to_hmi,
- bool is_message_contain_param,
- am::HmiInterfaces::InterfaceState state) {
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_ui_cooperating(is_ui_cooperating_available));
-
- if (is_message_contain_param) {
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI, 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_UI))
- .WillOnce(Return(state));
-
- if (is_send_message_to_hmi) {
- ExpectSendMessagesToHMI();
- }
- }
-
- void ExpectSendMessagesToHMI() {
- smart_objects::SmartObjectSPtr get_language(CreateMessage());
- (*get_language)[am::strings::params][am::strings::message_type] =
- static_cast<int>(am::MessageType::kRequest);
- (*get_language)[am::strings::msg_params] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetLanguage, _))
- .WillOnce(Return(get_language));
-
- smart_objects::SmartObjectSPtr get_all_language(CreateMessage());
- (*get_all_language)[am::strings::params][am::strings::message_type] =
- static_cast<int>(am::MessageType::kRequest);
- (*get_all_language)[am::strings::msg_params] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- EXPECT_CALL(
- mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetSupportedLanguages, _))
- .WillOnce(Return(get_all_language));
-
- smart_objects::SmartObjectSPtr get_capabilities(CreateMessage());
- (*get_capabilities)[am::strings::params][am::strings::message_type] =
- static_cast<int>(am::MessageType::kRequest);
- (*get_capabilities)[am::strings::msg_params] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetCapabilities, _))
- .WillOnce(Return(get_capabilities));
-
- EXPECT_CALL(mock_hmi_capabilities_, set_handle_response_for(*get_language));
- EXPECT_CALL(app_mngr_, ManageHMICommand(get_language));
- EXPECT_CALL(app_mngr_, ManageHMICommand(get_all_language));
- EXPECT_CALL(app_mngr_, ManageHMICommand(get_capabilities));
- }
-
- void PrepareEvent(bool is_message_contain_param,
- Event& event,
- bool is_ui_cooperating_available = false) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- if (is_message_contain_param) {
- (*msg)[am::strings::msg_params][am::strings::available] =
- is_ui_cooperating_available;
- }
- event.set_smart_object(*msg);
- }
-
- UIIsReadyRequestPtr command_;
- application_manager_test::MockHMICapabilities mock_hmi_capabilities_;
- policy_test::MockPolicyHandlerInterface mock_policy_handler_interface_;
-};
-
-TEST_F(UIIsReadyRequestTest,
- OnEvent_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
- 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);
- SetUpExpectations(is_ui_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_RESPONSE);
-
- command_->on_event(event);
-}
-
-TEST_F(UIIsReadyRequestTest,
- OnEvent_KeyAvailableEqualToFalse_StateNotAvailable) {
- const bool is_ui_cooperating_available = false;
- const bool is_send_message_to_hmi = false;
- const bool is_message_contain_param = true;
- Event event(hmi_apis::FunctionID::UI_IsReady);
- PrepareEvent(is_message_contain_param, event);
- SetUpExpectations(is_ui_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_AVAILABLE);
- command_->on_event(event);
-}
-
-TEST_F(UIIsReadyRequestTest, OnEvent_KeyAvailableEqualToTrue_StateAvailable) {
- 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);
- SetUpExpectations(is_ui_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_AVAILABLE);
- command_->on_event(event);
-}
-
-TEST_F(UIIsReadyRequestTest, OnTimeout_SUCCESS) {
- ExpectSendMessagesToHMI();
- command_->onTimeOut();
-}
-
-} // namespace ui_is_ready_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/ui_is_ready_response_test.cc b/src/components/application_manager/test/commands/hmi/ui_is_ready_response_test.cc
deleted file mode 100644
index d69ec0528e..0000000000
--- a/src/components/application_manager/test/commands/hmi/ui_is_ready_response_test.cc
+++ /dev/null
@@ -1,92 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/commands/hmi/ui_is_ready_response.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace ui_is_ready_response {
-
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::UIIsReadyResponse;
-using test::components::event_engine_test::MockEventDispatcher;
-
-typedef SharedPtr<UIIsReadyResponse> UIIsReadyResponsePtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const std::string kStringNum = "123";
-const bool kIsAvailable = true;
-const bool kIsNotAvailable = false;
-} // namespace
-
-class UIIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(UIIsReadyResponseTest, RUN_SUCCESS) {
- UIIsReadyResponsePtr command(CreateCommand<UIIsReadyResponse>());
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace ui_is_ready_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/update_device_list_request_test.cc b/src/components/application_manager/test/commands/hmi/update_device_list_request_test.cc
deleted file mode 100644
index 99eed48f71..0000000000
--- a/src/components/application_manager/test/commands/hmi/update_device_list_request_test.cc
+++ /dev/null
@@ -1,175 +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 "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/request_controller_settings.h"
-#include "application_manager/mock_application_manager_settings.h"
-#include "application_manager/commands/hmi/update_device_list_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace update_device_list_request {
-
-using ::utils::SharedPtr;
-using testing::_;
-using testing::ReturnRef;
-using testing::Return;
-using test::components::event_engine_test::MockEventDispatcher;
-using ::test::components::application_manager_test::
- MockApplicationManagerSettings;
-namespace am = ::application_manager;
-namespace strings = am::strings;
-namespace hmi_response = am::hmi_response;
-using am::event_engine::Event;
-using am::commands::UpdateDeviceListRequest;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<UpdateDeviceListRequest> UpdateDeviceListRequestPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class UpdateDeviceListRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateCommandMsg() {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
-
- return command_msg;
- }
-
- MockApplicationManagerSettings settings_;
- MockEventDispatcher mock_event_dispatcher_;
-};
-
-TEST_F(UpdateDeviceListRequestTest, RUN_LaunchHMIReturnsFalse) {
- MessageSharedPtr command_msg = CreateCommandMsg();
-
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher_));
- EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
-
- UpdateDeviceListRequestPtr command(
- CreateCommand<UpdateDeviceListRequest>(command_msg));
-
- EXPECT_CALL(app_mngr_, get_settings()).WillOnce(ReturnRef(settings_));
-
- EXPECT_CALL(settings_, launch_hmi()).WillOnce(Return(false));
-
- EXPECT_CALL(app_mngr_, IsHMICooperating()).Times(0);
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-TEST_F(UpdateDeviceListRequestTest, RUN_HMICooperatingReturnsTrue_SUCCESSS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
-
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher_));
- EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
-
- UpdateDeviceListRequestPtr command(
- CreateCommand<UpdateDeviceListRequest>(command_msg));
-
- EXPECT_CALL(app_mngr_, get_settings()).WillOnce(ReturnRef(settings_));
-
- EXPECT_CALL(settings_, launch_hmi()).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, IsHMICooperating()).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-TEST_F(UpdateDeviceListRequestTest, OnEvent_WrongEventId_UNSUCCESS) {
- Event event(Event::EventID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher_));
- EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
-
- UpdateDeviceListRequestPtr command(CreateCommand<UpdateDeviceListRequest>());
-
- command->on_event(event);
-}
-
-TEST_F(UpdateDeviceListRequestTest, OnEvent_SUCCESS) {
- Event event(Event::EventID::BasicCommunication_OnReady);
-
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher_));
- EXPECT_CALL(mock_event_dispatcher_, remove_observer(_, _));
- EXPECT_CALL(mock_event_dispatcher_, remove_observer(_));
-
- UpdateDeviceListRequestPtr command(CreateCommand<UpdateDeviceListRequest>());
-
- command->on_event(event);
-}
-
-} // namespace update_device_list_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/update_sdl_request_test.cc b/src/components/application_manager/test/commands/hmi/update_sdl_request_test.cc
deleted file mode 100644
index e9bf402aa7..0000000000
--- a/src/components/application_manager/test/commands/hmi/update_sdl_request_test.cc
+++ /dev/null
@@ -1,91 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/commands/hmi/update_sdl_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace update_sdl_request {
-
-using ::utils::SharedPtr;
-using ::testing::ReturnRef;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::UpdateSDLRequest;
-
-typedef SharedPtr<UpdateSDLRequest> UpdateSDLRequestPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 1u;
-const std::string kStrNumber = "123";
-} // namespace
-
-class UpdateSDLRequestTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(UpdateSDLRequestTest, RUN_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][strings::correlation_id] = kCorrelationId;
-
- UpdateSDLRequestPtr command(CreateCommand<UpdateSDLRequest>(command_msg));
- policy_test::MockPolicyHandlerInterface policy_handler;
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler));
- EXPECT_CALL(policy_handler, PTExchangeAtUserRequest(kCorrelationId));
-
- command->Run();
-
- EXPECT_EQ(kCorrelationId,
- (*command_msg)[strings::params][strings::correlation_id].asUInt());
-}
-
-} // namespace update_sdl_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/update_sdl_response_test.cc b/src/components/application_manager/test/commands/hmi/update_sdl_response_test.cc
deleted file mode 100644
index e612f438cc..0000000000
--- a/src/components/application_manager/test/commands/hmi/update_sdl_response_test.cc
+++ /dev/null
@@ -1,87 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "hmi/update_sdl_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace update_sdl_response {
-
-using ::utils::SharedPtr;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-using am::commands::UpdateSDLResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<UpdateSDLResponse> UpdateSDLResponsePtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const std::string kStrNumber = "123";
-} // namespace
-
-class UpdateSDLResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
-};
-
-TEST_F(UpdateSDLResponseTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
-
- UpdateSDLResponsePtr command(CreateCommand<UpdateSDLResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, SendMessageToHMI(command_msg));
-
- command->Run();
-
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
-}
-
-} // namespace update_sdl_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vi_get_vehicle_data_response_test.cc b/src/components/application_manager/test/commands/hmi/vi_get_vehicle_data_response_test.cc
deleted file mode 100644
index e61f90a2fa..0000000000
--- a/src/components/application_manager/test/commands/hmi/vi_get_vehicle_data_response_test.cc
+++ /dev/null
@@ -1,156 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "commands/commands_test.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "hmi/vi_get_vehicle_data_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vi_get_vehicle_data_response {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::MessageSharedPtr;
-using am::commands::VIGetVehicleDataResponse;
-using am::event_engine::Event;
-using test::components::event_engine_test::MockEventDispatcher;
-
-typedef SharedPtr<VIGetVehicleDataResponse> VIGetVehicleDataResponsePtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 1u;
-const std::string kStrNumber = "123";
-} // namespace
-
-class VIGetVehicleDataResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(VIGetVehicleDataResponseTest, RUN_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][strings::message_type] =
- hmi_apis::messageType::response;
-
- VIGetVehicleDataResponsePtr command(
- CreateCommand<VIGetVehicleDataResponse>(command_msg));
-
- am::event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
- event.set_smart_object(*command_msg);
-
- policy_test::MockPolicyHandlerInterface policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(policy_handler));
- EXPECT_CALL(policy_handler, OnVehicleDataUpdated(*command_msg));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-TEST_F(VIGetVehicleDataResponseTest, ErrorResponse_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][strings::message_type] =
- hmi_apis::messageType::error_response;
- (*command_msg)[strings::params][strings::data][strings::slider_position] = 1;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::params][strings::correlation_id] = kCorrelationId;
- (*command_msg)[am::strings::params][am::strings::error_msg] = "test_error";
- (*command_msg)[am::strings::params][am::strings::protocol_type] =
- am::commands::CommandImpl::hmi_protocol_type_;
- (*command_msg)[strings::params][strings::protocol_version] =
- am::commands::CommandImpl::protocol_version_;
-
- smart_objects::SmartObject result(smart_objects::SmartType_Map);
- result[strings::msg_params] = (*command_msg)[strings::params][strings::data];
- result[strings::params][hmi_response::code] =
- (*command_msg)[strings::params][hmi_response::code];
- result[strings::params][strings::correlation_id] =
- (*command_msg)[strings::params][strings::correlation_id];
- result[strings::params][strings::error_msg] =
- (*command_msg)[strings::params][strings::error_msg];
- result[strings::params][strings::message_type] =
- (*command_msg)[strings::params][strings::message_type];
- result[strings::params][strings::protocol_type] =
- (*command_msg)[strings::params][strings::protocol_type];
- result[strings::params][strings::protocol_version] =
- (*command_msg)[strings::params][strings::protocol_version];
-
- VIGetVehicleDataResponsePtr command(
- CreateCommand<VIGetVehicleDataResponse>(command_msg));
-
- am::event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
- event.set_smart_object(result);
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace vi_get_vehicle_data_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vi_is_ready_request_test.cc b/src/components/application_manager/test/commands/hmi/vi_is_ready_request_test.cc
deleted file mode 100644
index 557afa98d0..0000000000
--- a/src/components/application_manager/test/commands/hmi/vi_is_ready_request_test.cc
+++ /dev/null
@@ -1,175 +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 "application_manager/commands/hmi/vi_is_ready_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vi_is_ready_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-using ::testing::Return;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::VIIsReadyRequest;
-using am::event_engine::Event;
-
-typedef SharedPtr<VIIsReadyRequest> VIIsReadyRequestPtr;
-
-class VIIsReadyRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- VIIsReadyRequestTest() : command_(CreateCommand<VIIsReadyRequest>()) {}
-
- void SetUpExpectations(bool is_vi_cooperating_available,
- bool is_send_message_to_hmi,
- bool is_message_contain_param,
- am::HmiInterfaces::InterfaceState state) {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_ivi_cooperating(is_vi_cooperating_available));
-
- if (is_message_contain_param) {
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
- EXPECT_CALL(mock_hmi_interfaces_,
- SetInterfaceState(
- am::HmiInterfaces::HMI_INTERFACE_VehicleInfo, state));
- } else {
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillOnce(ReturnRef(mock_hmi_interfaces_));
- EXPECT_CALL(mock_hmi_interfaces_, SetInterfaceState(_, _)).Times(0);
- }
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_interface_));
- EXPECT_CALL(mock_policy_handler_interface_, OnVIIsReady());
-
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VehicleInfo))
- .WillOnce(Return(state));
-
- if (is_send_message_to_hmi) {
- ExpectSendMessagesToHMI();
- }
- }
-
- void ExpectSendMessagesToHMI() {
- smart_objects::SmartObjectSPtr ivi_type;
- EXPECT_CALL(
- mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::VehicleInfo_GetVehicleType, _))
- .WillOnce(Return(ivi_type));
- EXPECT_CALL(app_mngr_, ManageHMICommand(ivi_type));
- }
-
- void PrepareEvent(bool is_message_contain_param,
- Event& event,
- bool is_vi_cooperating_available = false) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- if (is_message_contain_param) {
- (*msg)[am::strings::msg_params][am::strings::available] =
- is_vi_cooperating_available;
- }
- event.set_smart_object(*msg);
- }
-
- VIIsReadyRequestPtr command_;
- application_manager_test::MockHMICapabilities mock_hmi_capabilities_;
- policy_test::MockPolicyHandlerInterface mock_policy_handler_interface_;
-};
-
-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;
- Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- PrepareEvent(is_message_contain_param, event);
- SetUpExpectations(is_vi_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_RESPONSE);
- 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;
- Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- PrepareEvent(is_message_contain_param, event);
- SetUpExpectations(is_vi_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_AVAILABLE);
- 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;
- Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- PrepareEvent(is_message_contain_param, event, is_vi_cooperating_available);
- SetUpExpectations(is_vi_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_AVAILABLE);
- command_->on_event(event);
-}
-
-TEST_F(VIIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
- ExpectSendMessagesToHMI();
- command_->onTimeOut();
-}
-
-} // namespace vi_is_ready_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vr_get_capabilities_response_test.cc b/src/components/application_manager/test/commands/hmi/vr_get_capabilities_response_test.cc
deleted file mode 100644
index 907a013972..0000000000
--- a/src/components/application_manager/test/commands/hmi/vr_get_capabilities_response_test.cc
+++ /dev/null
@@ -1,112 +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 "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vr_get_capabilities_response {
-
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = am::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::VRGetCapabilitiesResponse;
-using am::commands::CommandImpl;
-
-typedef SharedPtr<VRGetCapabilitiesResponse> VRGetCapabilitiesResponsePtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class VRGetCapabilitiesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateCommandMsg() {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = "123";
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
-
- return command_msg;
- }
-
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(VRGetCapabilitiesResponseTest, RUN_SUCCESSS) {
- MessageSharedPtr command_msg = CreateCommandMsg();
- (*command_msg)[strings::msg_params][strings::vr_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- (*command_msg)[strings::msg_params][strings::vr_capabilities][0] =
- "vrCapabilities";
-
- VRGetCapabilitiesResponsePtr command(
- CreateCommand<VRGetCapabilitiesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- smart_objects::SmartObject vr_capabilities_so =
- (*command_msg)[strings::msg_params][strings::vr_capabilities];
-
- EXPECT_CALL(mock_hmi_capabilities_, set_vr_capabilities(vr_capabilities_so));
-
- command->Run();
-}
-
-} // namespace vr_get_capabilities_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vr_get_language_response_test.cc b/src/components/application_manager/test/commands/hmi/vr_get_language_response_test.cc
deleted file mode 100644
index 7d42e39548..0000000000
--- a/src/components/application_manager/test/commands/hmi/vr_get_language_response_test.cc
+++ /dev/null
@@ -1,113 +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 "application_manager/commands/hmi/vr_get_language_response.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_application_manager.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vr_get_language_response {
-
-using utils::SharedPtr;
-using application_manager::commands::VRGetLanguageResponse;
-using test::components::event_engine_test::MockEventDispatcher;
-using testing::_;
-using testing::ReturnRef;
-using ::testing::NiceMock;
-
-namespace strings = application_manager::strings;
-namespace hmi_response = application_manager::hmi_response;
-using namespace hmi_apis;
-
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const hmi_apis::Common_Language::eType kLanguage = Common_Language::EN_GB;
-} // namespace
-
-class VRGetLanguageResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(VRGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::msg_params][hmi_response::language] = kLanguage;
-
- SharedPtr<VRGetLanguageResponse> command(
- CreateCommand<VRGetLanguageResponse>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities, set_active_vr_language(kLanguage));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-TEST_F(VRGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<VRGetLanguageResponse> command(
- CreateCommand<VRGetLanguageResponse>(msg));
-
- MockHMICapabilities mock_hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_hmi_capabilities,
- set_active_vr_language(Common_Language::INVALID_ENUM));
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace vr_get_language_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vr_get_supported_languages_response_test.cc b/src/components/application_manager/test/commands/hmi/vr_get_supported_languages_response_test.cc
deleted file mode 100644
index 27be9e0f0f..0000000000
--- a/src/components/application_manager/test/commands/hmi/vr_get_supported_languages_response_test.cc
+++ /dev/null
@@ -1,128 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/application.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_response.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vr_get_supported_languages_response {
-
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::VRGetSupportedLanguagesResponse;
-
-typedef SharedPtr<VRGetSupportedLanguagesResponse>
- VRGetSupportedLanguagesResponsePtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const std::string kStringNum = "123";
-const std::string kLanguage = "EN_US";
-const smart_objects::SmartObject supported_languages(kLanguage);
-} // namespace
-
-class VRGetSupportedLanguagesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MockHMICapabilities mock_hmi_capabilities_;
- SmartObject capabilities_;
-};
-
-TEST_F(VRGetSupportedLanguagesResponseTest, RUN_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStringNum;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
- (*command_msg)[strings::msg_params][hmi_response::languages] =
- supported_languages;
-
- VRGetSupportedLanguagesResponsePtr command(
- CreateCommand<VRGetSupportedLanguagesResponse>(command_msg));
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_vr_supported_languages((supported_languages)));
-
- command->Run();
-}
-TEST_F(VRGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[strings::msg_params][strings::number] = kStringNum;
- (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*command_msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::WRONG_LANGUAGE;
- (*command_msg)[strings::msg_params][hmi_response::capabilities] =
- (capabilities_);
-
- VRGetSupportedLanguagesResponsePtr command(
- CreateCommand<VRGetSupportedLanguagesResponse>(command_msg));
-
- EXPECT_CALL(mock_hmi_capabilities_,
- set_vr_supported_languages(supported_languages)).Times(0);
-
- command->Run();
-
- EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
- am::hmi_response::languages));
-}
-
-} // namespace vr_get_supported_languages_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vr_is_ready_request_test.cc b/src/components/application_manager/test/commands/hmi/vr_is_ready_request_test.cc
deleted file mode 100644
index c9403b2f0e..0000000000
--- a/src/components/application_manager/test/commands/hmi/vr_is_ready_request_test.cc
+++ /dev/null
@@ -1,193 +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 "application_manager/commands/hmi/vr_is_ready_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/hmi_interfaces.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vr_is_ready_request {
-
-using ::testing::_;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::VRIsReadyRequest;
-using am::event_engine::Event;
-
-typedef SharedPtr<VRIsReadyRequest> VRIsReadyRequestPtr;
-
-class VRIsReadyRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- VRIsReadyRequestTest() : command_(CreateCommand<VRIsReadyRequest>()) {}
-
- void SetUpExpectations(bool is_vr_cooperating_available,
- 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) {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillRepeatedly(ReturnRef(mock_hmi_capabilities_));
- ExpectSendMessagesToHMI(is_send_message_by_timeout);
- } else {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- }
- EXPECT_CALL(mock_hmi_capabilities_,
- set_is_vr_cooperating(is_vr_cooperating_available));
-
- if (is_message_contain_param) {
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR, 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_VR))
- .WillOnce(Return(state));
- }
-
- void ExpectSendMessagesToHMI(bool is_send_message_by_timeout) {
- if (is_send_message_by_timeout) {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- }
-
- smart_objects::SmartObjectSPtr language(
- new smart_objects::SmartObject(smart_objects::SmartType_Map));
- EXPECT_CALL(mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetLanguage, _))
- .WillOnce(Return(language));
- EXPECT_CALL(mock_hmi_capabilities_, set_handle_response_for(*language));
- EXPECT_CALL(app_mngr_, ManageHMICommand(language));
-
- smart_objects::SmartObjectSPtr support_language(
- new smart_objects::SmartObject(smart_objects::SmartType_Map));
- EXPECT_CALL(
- mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetSupportedLanguages, _))
- .WillOnce(Return(support_language));
- EXPECT_CALL(app_mngr_, ManageHMICommand(support_language));
-
- smart_objects::SmartObjectSPtr capabilities(
- new smart_objects::SmartObject(smart_objects::SmartType_Map));
- EXPECT_CALL(mock_message_helper_,
- CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetCapabilities, _))
- .WillOnce(Return(capabilities));
- EXPECT_CALL(app_mngr_, ManageHMICommand(capabilities));
- }
-
- void PrepareEvent(bool is_message_contain_param,
- Event& event,
- bool is_vr_cooperating_available = false) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- if (is_message_contain_param) {
- (*msg)[am::strings::msg_params][am::strings::available] =
- is_vr_cooperating_available;
- }
- event.set_smart_object(*msg);
- }
-
- VRIsReadyRequestPtr command_;
- application_manager_test::MockHMICapabilities mock_hmi_capabilities_;
-};
-
-TEST_F(VRIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
- 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);
- SetUpExpectations(is_vr_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_RESPONSE);
- command_->on_event(event);
-}
-
-TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
- const bool is_vr_cooperating_available = false;
- const bool is_send_message_to_hmi = false;
- const bool is_message_contain_param = true;
- Event event(hmi_apis::FunctionID::VR_IsReady);
- PrepareEvent(is_message_contain_param, event);
- SetUpExpectations(is_vr_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_AVAILABLE);
- command_->on_event(event);
-}
-
-TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
- 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);
- SetUpExpectations(is_vr_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_AVAILABLE);
- command_->on_event(event);
-}
-
-TEST_F(VRIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
- const bool is_send_message_by_timeout = true;
- ExpectSendMessagesToHMI(is_send_message_by_timeout);
- command_->onTimeOut();
-}
-
-} // namespace vr_is_ready_request
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/hmi/vr_is_ready_response_test.cc b/src/components/application_manager/test/commands/hmi/vr_is_ready_response_test.cc
deleted file mode 100644
index 37e945bc11..0000000000
--- a/src/components/application_manager/test/commands/hmi/vr_is_ready_response_test.cc
+++ /dev/null
@@ -1,79 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/commands/hmi/vr_is_ready_response.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace hmi_commands_test {
-namespace vr_is_ready_response {
-
-using ::testing::Return;
-using ::utils::SharedPtr;
-using ::testing::NiceMock;
-namespace am = ::application_manager;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = am::hmi_response;
-using am::commands::VRIsReadyResponse;
-using test::components::event_engine_test::MockEventDispatcher;
-
-typedef SharedPtr<VRIsReadyResponse> VRIsReadyResponsePtr;
-
-class VRIsReadyResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
-};
-
-TEST_F(VRIsReadyResponseTest, RUN_SUCCESS) {
- VRIsReadyResponsePtr command(CreateCommand<VRIsReadyResponse>());
-
- MockEventDispatcher mock_event_dispatcher;
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(mock_event_dispatcher, raise_event(_));
-
- command->Run();
-}
-
-} // namespace vr_is_ready_response
-} // namespace hmi_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/add_command_request_test.cc b/src/components/application_manager/test/commands/mobile/add_command_request_test.cc
deleted file mode 100644
index 471f0763de..0000000000
--- a/src/components/application_manager/test/commands/mobile/add_command_request_test.cc
+++ /dev/null
@@ -1,1084 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/add_command_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/helpers.h"
-#include "utils/make_shared.h"
-#include "smart_objects/smart_object.h"
-#include "utils/custom_string.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace add_command_request {
-
-namespace am = application_manager;
-using am::commands::CommandImpl;
-using am::ApplicationManager;
-using am::commands::MessageSharedPtr;
-using am::ApplicationSharedPtr;
-using ::testing::_;
-using ::utils::SharedPtr;
-using ::testing::Return;
-using ::testing::InSequence;
-using am::commands::AddCommandRequest;
-using NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr;
-using ::test::components::application_manager_test::MockApplication;
-using am::event_engine::EventObserver;
-using namespace smart_objects;
-
-namespace custom_str = utils::custom_string;
-namespace strings = ::application_manager::strings;
-namespace mobile_result = mobile_apis::Result;
-namespace hmi_response = ::application_manager::hmi_response;
-namespace hmi_request = ::application_manager::hmi_request;
-using namespace strings;
-
-namespace {
-const hmi_apis::FunctionID::eType kInvalidFunctionId =
- hmi_apis::FunctionID::INVALID_ENUM;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const std::string kMenuName = "LG";
-const uint32_t kFirstParentId = 10u;
-const uint32_t kSecondParentId = 1u;
-const std::string kErroredVRCommand = "l\namer";
-const std::string kFirstVrCommand = "lamer";
-const std::string kSecondVrCommand = "hacker";
-const uint32_t kFirstCommandId = 10u;
-const uint32_t kSecondCommandId = 11u;
-const int32_t kType = 34;
-const int32_t kGrammarId = 12;
-const int32_t kPosition = 10;
-} // namespace
-
-class AddCommandRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- AddCommandRequestTest()
- : msg_(CreateMessage())
- , default_app_name_("test_default_app_name_")
- , mock_app_(CreateMockApp()) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app_));
- InitGetters();
- InitBasicMessage();
- }
-
- protected:
- void InitBasicMessage() {
- (*msg_)[params][connection_key] = kConnectionKey;
- (*msg_)[msg_params][app_id] = kAppId;
- (*msg_)[msg_params][app_name] = default_app_name_;
- }
-
- void InitGetters() {
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
- ON_CALL(*mock_app_, FindCommand(kCmdId))
- .WillByDefault(Return(so_ptr_.get()));
- }
-
- void CreateBasicParamsUIRequest() {
- SmartObject menu_params = SmartObject(SmartType_Map);
- menu_params[position] = kPosition;
- menu_params[menu_name] = kMenuName;
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[cmd_id] = kCmdId;
- msg_params[strings::menu_params] = menu_params;
- msg_params[cmd_icon] = 1;
- msg_params[cmd_icon][value] = "10";
- msg_params[info] = "UI info";
- }
-
- void CreateBasicParamsVRRequest() {
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[cmd_id] = kCmdId;
- msg_params[vr_commands] = SmartObject(SmartType_Array);
- msg_params[vr_commands][0] = kFirstVrCommand;
- msg_params[type] = kPosition;
- msg_params[grammar_id] = kGrammarId;
- msg_params[info] = "VR info";
- }
-
- const am::CommandsMap CreateCommandsMap(SmartObject& first_command,
- SmartObject& second_command) {
- second_command[menu_params] = SmartObject(SmartType_Map);
- second_command[menu_params][hmi_request::parent_id] = kFirstParentId;
- second_command[menu_params][menu_name] = kMenuName;
- second_command[vr_commands] = SmartObject(SmartType_Array);
- second_command[vr_commands][0] = kSecondVrCommand;
- am::CommandsMap commands_map;
- commands_map.insert(std::make_pair(kFirstCommandId, &first_command));
- commands_map.insert(std::make_pair(kSecondCommandId, &second_command));
- return commands_map;
- }
-
- void CheckOnTimeOutCommandDeletion(
- const hmi_apis::FunctionID::eType incoming_cmd,
- const hmi_apis::FunctionID::eType cmd_to_delete) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
- 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()));
- SmartObject first_command = SmartObject(SmartType_Map);
- SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
- CreateCommandsMap(first_command, second_command);
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
- commands_map, lock_)));
- so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
- {
- InSequence dummy;
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- Event event(incoming_cmd);
- event.set_smart_object(*msg_);
- request_ptr->on_event(event);
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- EXPECT_CALL(app_mngr_, ManageHMICommand(HMIResultCodeIs(cmd_to_delete)))
- .WillOnce(Return(true));
- SmartObjectSPtr response = utils::MakeShared<SmartObject>(SmartType_Map);
- (*response)[strings::msg_params][strings::info] = "info";
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
- .WillOnce(Return(response));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(response,
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- utils::SharedPtr<CommandRequestImpl> base_class_request =
- static_cast<utils::SharedPtr<CommandRequestImpl> >(request_ptr);
- base_class_request->onTimeOut();
- }
-
- MessageSharedPtr msg_;
- SmartObjectSPtr so_ptr_;
- const utils::custom_string::CustomString default_app_name_;
- sync_primitives::Lock lock_;
- MockAppPtr mock_app_;
-};
-
-TEST_F(AddCommandRequestTest, Run_AppNotExisted_EXPECT_AppNotRegistered) {
- CreateBasicParamsUIRequest();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, Run_ImageVerificationFailed_EXPECT_INVALID_DATA) {
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- SmartObject& image = msg_params[cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::INVALID_DATA));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, Run_MenuNameHasSyntaxError_EXPECT_INVALID_DATA) {
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kFirstParentId;
- const std::string errored_menu_name = "L\nG";
- msg_params[menu_params][menu_name] = errored_menu_name;
- 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()));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- SmartObject parent = SmartObject(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindSubMenu(kFirstParentId))
- .WillOnce(Return(&parent));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest,
- Run_VRCommandsHaveSyntaxError_EXPECT_INVALID_DATA) {
- 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()));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, Run_CMDIconHasError_EXPECT_INVALID_DATA) {
- MessageSharedPtr msg = CreateMessage();
- SmartObject& msg_params = (*msg)[strings::msg_params];
- (*msg)[params][connection_key] = kConnectionKey;
- msg_params[cmd_id] = kCmdId;
- msg_params[cmd_icon] = 1;
- const std::string errored_cmd_icon_value = "1\n0";
- msg_params[cmd_icon][value] = errored_cmd_icon_value;
- msg_params[vr_commands][0] = kFirstVrCommand;
- 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()));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, Run_CommandIDAlreadyExists_EXPECT_INVALID_ID) {
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- SmartObject& image = msg_params[cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_ID), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest,
- Run_CommandNameAlreadyExists_EXPECT_DUPLICATE_NAME) {
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kFirstParentId;
- 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()));
- SmartObject first_command = SmartObject(SmartType_Map);
- SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
- CreateCommandsMap(first_command, second_command);
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::DUPLICATE_NAME), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest,
- Run_CmdAndMsgParentIDsAreDifferentSubmenuNotExisted_EXPECT_INVALID_ID) {
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
- 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()));
- SmartObject first_command = SmartObject(SmartType_Map);
- SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
- CreateCommandsMap(first_command, second_command);
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_ID), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest,
- Run_CmdAndMsgVrSynonymsAreTheSame_EXPECT_DUPLICATE_NAME) {
- CreateBasicParamsVRRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
- msg_params[vr_commands][0] = kSecondVrCommand;
- 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()));
-
- SmartObject first_command = SmartObject(SmartType_Map);
- SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
- CreateCommandsMap(first_command, second_command);
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::DUPLICATE_NAME), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, Run_MsgDataEmpty_EXPECT_INVALID_DATA) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[params][connection_key] = kConnectionKey;
- 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(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest,
- Run_CmdAndMsg_UI_and_Vr_AreCorrect_EXPECT_VR_AND_UI_SENT) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
- 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()));
- SmartObject first_command = SmartObject(SmartType_Map);
- SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
- CreateCommandsMap(first_command, second_command);
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, GetRunMethods_SUCCESS) {
- CreateBasicParamsUIRequest();
- 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_, AddCommand(kCmdId, (*msg_)[msg_params]));
-
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-}
-
-TEST_F(AddCommandRequestTest, OnEvent_UI_SUCCESS) {
- CreateBasicParamsUIRequest();
- (*msg_)[params][hmi_response::code] = hmi_apis::Common_Result::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_, AddCommand(kCmdId, (*msg_)[msg_params]));
-
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(
- Return(DataAccessor<am::CommandsMap>(commands_map, lock_)));
-
- Event event(hmi_apis::FunctionID::UI_AddCommand);
- event.set_smart_object(*msg_);
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- request_ptr->on_event(event);
-}
-
-TEST_F(AddCommandRequestTest, OnEvent_VR_SUCCESS) {
- CreateBasicParamsVRRequest();
- MessageSharedPtr msg = CreateMessage(SmartType_Map);
- (*msg)[params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
- (*msg)[msg_params][cmd_id] = kCmdId;
-
- Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*msg);
- EXPECT_CALL(*mock_app_, AddCommand(kCmdId, (*msg_)[msg_params]));
-
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(
- Return(DataAccessor<am::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- request_ptr->on_event(event);
-}
-
-TEST_F(AddCommandRequestTest, OnTimeOut_EXPECT_VR_DeleteCommand) {
- CheckOnTimeOutCommandDeletion(hmi_apis::FunctionID::VR_AddCommand,
- hmi_apis::FunctionID::VR_DeleteCommand);
-}
-
-TEST_F(AddCommandRequestTest, OnTimeOut_EXPECT_UI_DeleteCommand) {
- CheckOnTimeOutCommandDeletion(hmi_apis::FunctionID::UI_AddCommand,
- hmi_apis::FunctionID::UI_DeleteCommand);
-}
-
-TEST_F(AddCommandRequestTest, OnEvent_BothSend_SUCCESS) {
- MessageSharedPtr command_msg = CreateMessage(SmartType_Map);
- (*command_msg)[params][connection_key] = kConnectionKey;
- MessageSharedPtr event_msg = CreateMessage(SmartType_Map);
- (*event_msg)[params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
- (*event_msg)[msg_params][cmd_id] = kCmdId;
-
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*event_msg);
-
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- event_vr.set_smart_object(*event_msg);
-
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(0);
-
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(command_msg);
- request_ptr->Run();
- request_ptr->on_event(event_ui);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(AddCommandRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
- request_ptr->on_event(event);
-}
-
-TEST_F(AddCommandRequestTest, OnEvent_AppNotExisted_UNSUCCESS) {
- CreateBasicParamsUIRequest();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
- Event event(hmi_apis::FunctionID::UI_AddCommand);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->on_event(event);
-}
-
-TEST_F(AddCommandRequestTest,
- OnEvent_HmiResponseCodeIsRejected_ExpectUICommandRemoved) {
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::REJECTED;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::REJECTED), _));
- Event event(hmi_apis::FunctionID::UI_AddCommand);
- event.set_smart_object(*msg_);
- request_ptr->on_event(event);
-}
-
-TEST_F(AddCommandRequestTest,
- OnEvent_HmiResponseCodeIsWarnings_ExpectCommandUpdated) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::WARNINGS;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::WARNINGS), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*msg_);
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- event_vr.set_smart_object(*msg_);
- request_ptr->on_event(event_ui);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(
- AddCommandRequestTest,
- OnEvent_UI_HmiResponseCodeIsGenericError_VR_HmiResponseCodeIsUnsupportedResourse_ExpectCommandRemoved) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::GENERIC_ERROR;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
-
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*msg_);
- request_ptr->on_event(event_ui);
-
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- MessageSharedPtr msg_vr = CreateMessage(SmartType_Map);
- (*msg_vr)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_vr)[msg_params][cmd_id] = kCmdId;
- event_vr.set_smart_object(*msg_vr);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(
- AddCommandRequestTest,
- OnEvent_VR_HmiResponseCodeIsGenericError_UI_HmiResponseCodeIsUnsupportedResourse_ExpectCommandRemoved) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::GENERIC_ERROR;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
-
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- event_vr.set_smart_object(*msg_);
- request_ptr->on_event(event_vr);
-
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- MessageSharedPtr msg_ui = CreateMessage(SmartType_Map);
- (*msg_ui)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_ui)[msg_params][cmd_id] = kCmdId;
- event_ui.set_smart_object(*msg_ui);
- request_ptr->on_event(event_ui);
-}
-
-TEST_F(
- AddCommandRequestTest,
- OnEvent_UI_VR_HmiResponseCodeIsUnsupportedResourse_UI_NotAvailableInterfaceState_ExpectCommandRemoved) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*msg_);
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- event_vr.set_smart_object(*msg_);
- request_ptr->on_event(event_ui);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(
- AddCommandRequestTest,
- OnEvent_UI_VR_HmiResponseCodeIsUnsupportedResourse_VR_NotAvailableInterfaceState_ExpectCommandRemoved) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*msg_);
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- event_vr.set_smart_object(*msg_);
- request_ptr->on_event(event_ui);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(
- AddCommandRequestTest,
- OnEvent_UI_HmiResponseCodeIsUnsupportedResource_NotAvailableInterfaceState_ExpectCommandRemoved) {
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
- Event event(hmi_apis::FunctionID::UI_AddCommand);
- event.set_smart_object(*msg_);
- request_ptr->on_event(event);
-}
-
-TEST_F(
- AddCommandRequestTest,
- OnEvent_VR_HmiResponseCodeIsUnsupportedResource_NotAvailableInterfaceState_ExpectCommandRemoved) {
- CreateBasicParamsVRRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
- Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*msg_);
- request_ptr->on_event(event);
-}
-
-TEST_F(AddCommandRequestTest,
- OnEvent_UI_EventWithNotSuccesResponseCode_ExpectVRCommandDelete) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-
- MessageSharedPtr msg_ui = CreateMessage(SmartType_Map);
- (*msg_ui)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::ABORTED;
- (*msg_ui)[msg_params][cmd_id] = kCmdId;
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*msg_ui);
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- event_vr.set_smart_object(*msg_);
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_DeleteCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(2);
- request_ptr->on_event(event_ui);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(AddCommandRequestTest,
- OnEvent_UI_VR_Events_VRErrorPresent_ExpectRemoveCommand) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& params = (*msg_)[strings::params];
- params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
- SmartObject& image = (*msg_)[msg_params][cmd_icon];
- EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- am::CommandsMap commands_map;
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR), _));
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
-
- Event event_ui(hmi_apis::FunctionID::UI_AddCommand);
- event_ui.set_smart_object(*msg_);
- request_ptr->on_event(event_ui);
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_DeleteCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(2);
- Event event_vr(hmi_apis::FunctionID::VR_AddCommand);
- MessageSharedPtr msg_vr = CreateMessage(SmartType_Map);
- (*msg_vr)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::ABORTED;
- (*msg_vr)[msg_params][cmd_id] = kCmdId;
- event_vr.set_smart_object(*msg_vr);
- request_ptr->on_event(event_vr);
-}
-
-TEST_F(AddCommandRequestTest,
- OnTimeOut_AppNotExisted_NoAppRemoveCommandCalled) {
- CreateBasicParamsUIRequest();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId)).Times(0);
- SmartObjectSPtr response = utils::MakeShared<SmartObject>(SmartType_Map);
- (*response)[strings::msg_params][strings::info] = "info";
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
- .WillOnce(Return(response));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- response, am::commands::Command::CommandOrigin::ORIGIN_SDL));
- utils::SharedPtr<CommandRequestImpl> base_class_request =
- static_cast<utils::SharedPtr<CommandRequestImpl> >(
- CreateCommand<AddCommandRequest>(msg_));
- base_class_request->onTimeOut();
-}
-
-TEST_F(AddCommandRequestTest, OnTimeOut_AppRemoveCommandCalled) {
- CreateBasicParamsVRRequest();
- CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- SmartObject& image = msg_params[cmd_icon];
- 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()));
- SmartObject first_command = SmartObject(SmartType_Map);
- SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
- CreateCommandsMap(first_command, second_command);
- EXPECT_CALL(*mock_app_, commands_map())
- .WillRepeatedly(Return(
- DataAccessor<application_manager::CommandsMap>(commands_map, lock_)));
- so_ptr_ = utils::MakeShared<SmartObject>(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
- {
- InSequence dummy;
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::VR_AddCommand)))
- .WillOnce(Return(true));
- }
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- utils::SharedPtr<AddCommandRequest> request_ptr =
- CreateCommand<AddCommandRequest>(msg_);
- request_ptr->Run();
- EXPECT_CALL(*mock_app_, RemoveCommand(kCmdId));
- SmartObjectSPtr response = utils::MakeShared<SmartObject>(SmartType_Map);
- (*response)[strings::msg_params][strings::info] = "info";
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
- .WillOnce(Return(response));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- response, am::commands::Command::CommandOrigin::ORIGIN_SDL));
- utils::SharedPtr<CommandRequestImpl> base_class_request =
- static_cast<utils::SharedPtr<CommandRequestImpl> >(request_ptr);
- base_class_request->onTimeOut();
-}
-
-} // namespace add_command_test
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc b/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc
deleted file mode 100644
index f5bb7888d8..0000000000
--- a/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc
+++ /dev/null
@@ -1,121 +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 <string>
-
-#include "application_manager/commands/mobile/add_sub_menu_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace add_sub_menu_request {
-
-namespace am = ::application_manager;
-using am::commands::AddSubMenuRequest;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using ::testing::_;
-using ::testing::Return;
-
-typedef SharedPtr<AddSubMenuRequest> AddSubMenuPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class AddSubMenuRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(AddSubMenuRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
- const uint32_t menu_id = 10u;
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::msg_params][am::strings::menu_id] = menu_id;
-
- utils::SharedPtr<AddSubMenuRequest> command =
- CreateCommand<AddSubMenuRequest>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
- EXPECT_CALL(*mock_app, AddSubMenu(menu_id, _));
- EXPECT_CALL(*mock_app, UpdateHash());
-
- MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
- (*ev_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*ev_msg)[am::strings::msg_params][am::strings::info] = "info";
-
- Event event(hmi_apis::FunctionID::UI_AddSubMenu);
- event.set_smart_object(*ev_msg);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
- command->Init();
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*ui_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*ui_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-} // namespace add_sub_menu_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/alert_maneuver_request_test.cc b/src/components/application_manager/test/commands/mobile/alert_maneuver_request_test.cc
deleted file mode 100644
index 90c6409fa8..0000000000
--- a/src/components/application_manager/test/commands/mobile/alert_maneuver_request_test.cc
+++ /dev/null
@@ -1,265 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "event_engine/event.h"
-#include "application_manager/commands/mobile/alert_maneuver_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace alert_maneuver_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::AlertManeuverRequest;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-
-typedef SharedPtr<AlertManeuverRequest> CommandPtr;
-
-class AlertManeuverRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- void CheckExpectations(const hmi_apis::Common_Result::eType hmi_response,
- const mobile_apis::Result::eType mobile_response,
- const am::HmiInterfaces::InterfaceState state,
- const bool success) {
- MessageSharedPtr response = CreateMessage(smart_objects::SmartType_Map);
- (*response)[am::strings::params][am::hmi_response::code] = hmi_response;
- (*response)[am::strings::msg_params][am::strings::info] = "test";
-
- am::event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*response);
-
- utils::SharedPtr<AlertManeuverRequest> command =
- CreateCommand<AlertManeuverRequest>(response);
-
- MockAppPtr mock_app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(state));
-
- MessageSharedPtr response_to_mobile;
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- _, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
- command->on_event(event);
-
- EXPECT_EQ(
- (*response_to_mobile)[am::strings::msg_params][am::strings::success]
- .asBool(),
- success);
- EXPECT_EQ(
- (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(mobile_response));
- }
-
- protected:
- NiceMock<policy_test::MockPolicyHandlerInterface> policy_interface_;
-};
-
-TEST_F(AlertManeuverRequestTest, Run_RequiredFieldsDoesNotExist_UNSUCCESS) {
- CommandPtr command(CreateCommand<AlertManeuverRequest>());
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::INVALID_DATA,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertManeuverRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::strings::soft_buttons] = 0;
- (*msg)[am::strings::msg_params][am::strings::tts_chunks] = 0;
-
- CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
-
- ON_CALL(app_mngr_, application(_))
- .WillByDefault(Return(ApplicationSharedPtr()));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertManeuverRequestTest, Run_ProcessingResult_UNSUCCESS) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::strings::soft_buttons][0]
- [am::strings::text] = "text";
-
- CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(policy_interface_));
-
- const mobile_apis::Result::eType kProcessingResult =
- mobile_apis::Result::ABORTED;
-
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _))
- .WillOnce(Return(kProcessingResult));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(kProcessingResult,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertManeuverRequestTest, Run_IsWhiteSpaceExist_UNSUCCESS) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::strings::soft_buttons] = 0;
- (*msg)[am::strings::msg_params][am::strings::tts_chunks] =
- SmartObject(smart_objects::SmartType_Array);
-
- SmartObject tts_chunk(smart_objects::SmartType_Map);
- tts_chunk[am::strings::text] = "wrong chunk syntax\t\n";
-
- (*msg)[am::strings::msg_params][am::strings::tts_chunks].asArray()->push_back(
- tts_chunk);
-
- CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::INVALID_DATA,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertManeuverRequestTest, Run_ProcessingResult_SUCCESS) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::strings::soft_buttons][0]
- [am::strings::text] = "text";
-
- CommandPtr command(CreateCommand<AlertManeuverRequest>(msg));
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(policy_interface_));
-
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceFromFunction(_))
- .WillRepeatedly(
- Return(am::HmiInterfaces::InterfaceID::HMI_INTERFACE_TTS));
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(mock_message_helper_, SubscribeApplicationToSoftButton(_, _, _));
-
- MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command)));
- EXPECT_EQ(hmi_apis::FunctionID::Navigation_AlertManeuver,
- static_cast<hmi_apis::FunctionID::eType>(
- (*result_msg)[am::strings::params][am::strings::function_id]
- .asInt()));
-}
-
-TEST_F(AlertManeuverRequestTest, OnEvent_ReceivedUnknownEvent_UNSUCCESS) {
- CommandPtr command(CreateCommand<AlertManeuverRequest>());
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- MessageSharedPtr result_msg(
- CatchMobileCommandResult(CallOnEvent(*command, event)));
- EXPECT_EQ(mobile_apis::Result::INVALID_ENUM,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertManeuverRequestTest, OnEvent_SUCCESS) {
- CheckExpectations(hmi_apis::Common_Result::SUCCESS,
- mobile_apis::Result::SUCCESS,
- am::HmiInterfaces::STATE_AVAILABLE,
- true);
-}
-
-TEST_F(AlertManeuverRequestTest, OnEvent_UNSUPPORTED_RESOURCE) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_AVAILABLE,
- false);
-}
-
-TEST_F(AlertManeuverRequestTest, OnEvent_WARNINGS) {
- CheckExpectations(hmi_apis::Common_Result::WARNINGS,
- mobile_apis::Result::WARNINGS,
- am::HmiInterfaces::STATE_NOT_RESPONSE,
- true);
-}
-
-TEST_F(AlertManeuverRequestTest, OnEvent_GENERIC_ERROR) {
- CheckExpectations(hmi_apis::Common_Result::GENERIC_ERROR,
- mobile_apis::Result::GENERIC_ERROR,
- am::HmiInterfaces::STATE_NOT_RESPONSE,
- false);
-}
-
-} // namespace alert_maneuver_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/alert_request_test.cc b/src/components/application_manager/test/commands/mobile/alert_request_test.cc
deleted file mode 100644
index 5d9e507511..0000000000
--- a/src/components/application_manager/test/commands/mobile/alert_request_test.cc
+++ /dev/null
@@ -1,771 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/alert_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace alert_request {
-
-namespace am = application_manager;
-using am::commands::AlertRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using ::utils::SharedPtr;
-using am::event_engine::Event;
-using policy_test::MockPolicyHandlerInterface;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-typedef SharedPtr<AlertRequest> CommandPtr;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kDefaultTimeout = 1000u;
-const uint32_t kCorrelationId = 2u;
-const mobile_apis::FunctionID::eType kFunctionId =
- mobile_apis::FunctionID::AlertID;
-} // namespace
-
-class AlertRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- AlertRequestTest() : mock_app_(CreateMockApp()), msg_(CreateMessage()) {}
-
- protected:
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- void PreConditions() {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(
- Return(am::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(
- Return(am::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
- }
-
- void Expectations() {
- (*msg_)[am::strings::params][am::strings::function_id] = kFunctionId;
- (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg_)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
-
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(
- *mock_app_,
- AreCommandLimitsExceeded(kFunctionId, am::TLimitSource::POLICY_TABLE))
- .WillByDefault(Return(false));
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
- ON_CALL(*mock_app_, hmi_level())
- .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
- ON_CALL(*mock_app_, hmi_level())
- .WillByDefault(Return(mobile_apis::HMILevel::HMI_BACKGROUND));
- }
-
- void AddAlertTextsToMsg() {
- (*msg_)[am::strings::msg_params][am::strings::alert_text1] = "alert_text1";
- (*msg_)[am::strings::msg_params][am::strings::alert_text2] = "alert_text2";
- (*msg_)[am::strings::msg_params][am::strings::alert_text3] = "alert_text3";
- }
- void AddTTSChunkToMsg() {
- (*msg_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "tts_chunk_text";
- }
-
- void ExpectCallHmiLevel(const mobile_apis::HMILevel::eType level) {
- EXPECT_CALL(*mock_app_, hmi_level()).WillRepeatedly(Return(level));
- }
-
- void ExpectManageMobileCommandWithResultCode(
- const mobile_apis::Result::eType code) {
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(code),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- }
-
- void ExpectManageHmiCommandTTSAndUI() {
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_Alert)))
- .WillOnce(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
- .WillOnce(Return(true));
- }
- sync_primitives::Lock lock_;
-
- MockAppPtr mock_app_;
- MessageSharedPtr msg_;
- MockPolicyHandlerInterface mock_policy_handler_;
-};
-
-TEST_F(AlertRequestTest, OnTimeout_GENERIC_ERROR) {
- PreConditions();
- MessageSharedPtr command_msg = CreateMessage(smart_objects::SmartType_Map);
- (*command_msg)[am::strings::msg_params][am::strings::result_code] =
- am::mobile_api::Result::GENERIC_ERROR;
- (*command_msg)[am::strings::msg_params][am::strings::success] = false;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- utils::SharedPtr<AlertRequest> command = CreateCommand<AlertRequest>();
-
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
- .WillOnce(Return(command_msg));
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->onTimeOut();
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- false);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
-}
-
-TEST_F(AlertRequestTest, OnEvent_UI_HmiSendSuccess_UNSUPPORTED_RESOURCE) {
- PreConditions();
- MessageSharedPtr command_msg = CreateFullParamsUISO();
- (*command_msg)[am::strings::msg_params][am::strings::menu_params]
- [am::hmi_request::parent_id] = 10u;
- (*command_msg)[am::strings::msg_params][am::strings::menu_params]
- [am::strings::menu_name] = "menu_name";
-
- utils::SharedPtr<AlertRequest> command =
- CreateCommand<AlertRequest>(command_msg);
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
- (*msg)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
-
- MessageSharedPtr msg_tts = CreateMessage();
- (*msg_tts)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- Event event_vr(hmi_apis::FunctionID::TTS_Speak);
- event_vr.set_smart_object(*msg_tts);
-
- command->on_event(event_vr);
-
- Event event(hmi_apis::FunctionID::UI_Alert);
- event.set_smart_object(*msg);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- ResultCommandExpectations(ui_command_result, "UI is not supported by system");
-}
-
-class CallOnTimeOut {
- public:
- CallOnTimeOut(CommandRequestImpl& command) : command_(command) {}
-
- void operator()() {
- command_.onTimeOut();
- }
-
- CommandRequestImpl& command_;
-};
-
-TEST_F(AlertRequestTest, Init_DurationExists_SUCCESS) {
- Expectations();
- (*msg_)[am::strings::msg_params][am::strings::duration] = kDefaultTimeout;
- (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- EXPECT_TRUE(command->Init());
-}
-
-TEST_F(AlertRequestTest, Init_DurationNotExists_SUCCESS) {
- Expectations();
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- EXPECT_TRUE(command->Init());
-}
-
-TEST_F(AlertRequestTest, OnTimeOut_SUCCESS) {
- Expectations();
- MessageSharedPtr result_msg(CreateMessage(smart_objects::SmartType_Null));
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, mobile_apis::Result::GENERIC_ERROR))
- .WillOnce(Return(result_msg));
-
- CommandPtr command(CreateCommand<AlertRequest>());
- MessageSharedPtr received_result_msg(
- CatchMobileCommandResult(CallOnTimeOut(*command)));
- EXPECT_EQ(result_msg, received_result_msg);
-}
-
-TEST_F(AlertRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- Expectations();
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(invalid_app));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- ExpectManageMobileCommandWithResultCode(
- mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- command->Run();
-}
-
-TEST_F(AlertRequestTest, Run_AlertFrequencyIsTooHigh_UNSUCCESS) {
- Expectations();
- EXPECT_CALL(
- *mock_app_,
- AreCommandLimitsExceeded(kFunctionId, am::TLimitSource::POLICY_TABLE))
- .WillOnce(Return(true));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::REJECTED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertRequestTest, Run_FailToProcessSoftButtons_UNSUCCESS) {
- Expectations();
- const mobile_apis::Result::eType result_code =
- mobile_apis::Result::INVALID_ENUM;
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(result_code));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(result_code,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(AlertRequestTest, Run_MandatoryParametersAreMissed_UNSUCCESS) {
- Expectations();
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-}
-
-TEST_F(AlertRequestTest, Run_MandatoryParametersAreInvalid_UNSUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- (*msg_)[am::strings::msg_params][am::strings::alert_text2] =
- "invalid\t\nParam";
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-}
-
-TEST_F(AlertRequestTest, Run_SUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- AddTTSChunkToMsg();
-
- (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
- (*msg_)[am::strings::msg_params][am::strings::progress_indicator] =
- "progress_indicator";
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
-
- EXPECT_CALL(mock_message_helper_,
- SubscribeApplicationToSoftButton(
- (*msg_)[am::strings::msg_params], _, kFunctionId));
-
- ExpectManageHmiCommandTTSAndUI();
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-}
-
-TEST_F(AlertRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
- Expectations();
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
- event.set_smart_object(*msg_);
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, DISABLED_OnEvent_UI_OnResetTimeout_SUCCESS) {
- PreConditions();
- Expectations();
- AddAlertTextsToMsg();
-
- (*msg_)[am::strings::msg_params][am::strings::duration] = kDefaultTimeout;
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- EXPECT_TRUE(command->Init());
-
- EXPECT_CALL(
- app_mngr_,
- updateRequestTimeout(kConnectionKey, kCorrelationId, kDefaultTimeout));
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_ENUM);
-
- Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, OnEvent_UIAlertHasHmiResponsesToWait_UNSUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- AddTTSChunkToMsg();
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::WARNINGS;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
-
- ExpectManageHmiCommandTTSAndUI();
-
- command->Run();
-
- Event event(hmi_apis::FunctionID::UI_Alert);
- event.set_smart_object(*msg_);
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)));
-
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSWarnings_SUCCESS) {
- PreConditions();
- Expectations();
- AddTTSChunkToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::WARNINGS;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
- .WillOnce(Return(true));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSUnsupportedResource_SUCCESS) {
- Expectations();
- AddTTSChunkToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
- .WillOnce(Return(true));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- PreConditions();
-
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest,
- DISABLED_OnEvent_TTSUnsupportedResourceUiAlertSent_SUCCESS) {
- PreConditions();
-
- Expectations();
- AddAlertTextsToMsg();
- AddTTSChunkToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
- (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(mock_message_helper_,
- SubscribeApplicationToSoftButton(
- (*msg_)[am::strings::msg_params], _, kFunctionId));
-
- ExpectManageHmiCommandTTSAndUI();
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
- .WillOnce(Return(true));
-
- Event ui_event(hmi_apis::FunctionID::UI_Alert);
- ui_event.set_smart_object(*msg_);
- command->on_event(ui_event);
-
- Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
- tts_stop_event.set_smart_object(*msg_);
- command->on_event(tts_stop_event);
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, OnEvent_TTSUnsupportedResourceUiAlertSuccess_SUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- AddTTSChunkToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
- (*msg_)[am::strings::msg_params][am::strings::soft_buttons] = "soft_buttons";
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(mock_message_helper_,
- SubscribeApplicationToSoftButton(
- (*msg_)[am::strings::msg_params], _, kFunctionId));
- ExpectManageHmiCommandTTSAndUI();
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
- .WillOnce(Return(true));
-
- Event ui_event(hmi_apis::FunctionID::UI_Alert);
- ui_event.set_smart_object(*msg_);
- command->on_event(ui_event);
-
- Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
- tts_stop_event.set_smart_object(*msg_);
- command->on_event(tts_stop_event);
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, OnEvent_TTSSuccesUiAlertInvalidEnum_SUCCESS) {
- Expectations();
- AddTTSChunkToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
- .WillOnce(Return(true));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::INVALID_ENUM;
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
- .WillOnce(Return(true));
-
- Event ui_event(hmi_apis::FunctionID::UI_Alert);
- ui_event.set_smart_object(*msg_);
- command->on_event(ui_event);
-
- Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
- tts_stop_event.set_smart_object(*msg_);
- command->on_event(tts_stop_event);
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSAbortedUiAlertNotSent_SUCCESS) {
- Expectations();
- AddTTSChunkToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)))
- .WillOnce(Return(true));
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::INVALID_ENUM;
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
- .WillOnce(Return(true));
-
- Event ui_event(hmi_apis::FunctionID::UI_Alert);
- ui_event.set_smart_object(*msg_);
- command->on_event(ui_event);
-
- Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
- tts_stop_event.set_smart_object(*msg_);
- command->on_event(tts_stop_event);
-
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::ABORTED;
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::ABORTED);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, DISABLED_OnEvent_TTSWarningUiAlertWarning_SUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::WARNINGS;
- (*msg_)[am::strings::msg_params][am::strings::play_tone] = true;
-
- ExpectCallHmiLevel(mobile_apis::HMILevel::HMI_FULL);
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*msg_)[am::strings::msg_params], _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- ExpectManageHmiCommandTTSAndUI();
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
- .WillOnce(Return(true));
-
- Event ui_event(hmi_apis::FunctionID::UI_Alert);
- ui_event.set_smart_object(*msg_);
- command->on_event(ui_event);
-
- Event tts_stop_event(hmi_apis::FunctionID::TTS_StopSpeaking);
- tts_stop_event.set_smart_object(*msg_);
- command->on_event(tts_stop_event);
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::WARNINGS);
-
- Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(AlertRequestTest, Run_InvalidAlert2_UNSUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- (*msg_)[am::strings::msg_params][am::strings::alert_text2] =
- "invalid_text_with_empty_str\\n";
-
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-}
-
-TEST_F(AlertRequestTest, Run_InvalidAlert3_UNSUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- (*msg_)[am::strings::msg_params][am::strings::alert_text3] =
- "invalid_text_with_empty_str\\n";
-
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-}
-
-TEST_F(AlertRequestTest, Run_InvalidTTSChunk_UNSUCCESS) {
- Expectations();
- AddAlertTextsToMsg();
- (*msg_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "invalid_text_with_empty_str\\n";
-
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- CommandPtr command(CreateCommand<AlertRequest>(msg_));
- command->Run();
-}
-
-} // namespace alert_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/change_registration_test.cc b/src/components/application_manager/test/commands/mobile/change_registration_test.cc
deleted file mode 100644
index 3d7671015c..0000000000
--- a/src/components/application_manager/test/commands/mobile/change_registration_test.cc
+++ /dev/null
@@ -1,565 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/change_registration_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/helpers.h"
-#include "utils/make_shared.h"
-#include "utils/custom_string.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/smart_object_keys.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace change_registration_request {
-
-namespace am = application_manager;
-using am::commands::CommandImpl;
-using am::ApplicationManager;
-using am::commands::MessageSharedPtr;
-using am::ApplicationSharedPtr;
-using am::MockMessageHelper;
-using ::testing::_;
-using ::utils::SharedPtr;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SetArgPointee;
-using am::commands::ChangeRegistrationRequest;
-using policy_test::MockPolicyHandlerInterface;
-using ::test::components::application_manager_test::MockApplication;
-
-namespace custom_str = utils::custom_string;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class ChangeRegistrationRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- ChangeRegistrationRequestTest()
- : mock_app_(CreateMockApp())
- , supported_languages_(CreateMessage(smart_objects::SmartType_Array)) {}
-
- MessageSharedPtr CreateMsgFromMobile() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::hmi_display_language] = mobile_apis::Language::EN_US;
- msg_params[strings::language] = mobile_apis::Language::EN_US;
- (*msg)[strings::msg_params] = msg_params;
- return msg;
- }
- void PrepareExpectationBeforeRun() {
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities_));
- (*supported_languages_)[0] =
- static_cast<int32_t>(mobile_apis::Language::EN_US);
- EXPECT_CALL(hmi_capabilities_, ui_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
- EXPECT_CALL(hmi_capabilities_, vr_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
- EXPECT_CALL(hmi_capabilities_, tts_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
-
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
- .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
- .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
- .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- }
-
- void CheckExpectations(const hmi_apis::Common_Result::eType hmi_response,
- const mobile_apis::Result::eType mobile_response,
- const am::HmiInterfaces::InterfaceState state,
- const bool success,
- const hmi_apis::Common_Result::eType ui_hmi_response =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- const hmi_apis::Common_Result::eType vr_hmi_response =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
-
- utils::SharedPtr<ChangeRegistrationRequest> command =
- CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(1));
- am::ApplicationSet application_set;
- const utils::custom_string::CustomString name("name");
- MockAppPtr app = CreateMockApp();
- app->set_name(name);
-
- DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_);
-
- application_set.insert(app);
-
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
- EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
- PrepareExpectationBeforeRun();
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(state));
- command->Run();
-
- MessageSharedPtr ui_response = CreateMessage(smart_objects::SmartType_Map);
- MessageSharedPtr vr_response = CreateMessage(smart_objects::SmartType_Map);
- MessageSharedPtr tts_response = CreateMessage(smart_objects::SmartType_Map);
- CreateResponseFromHMI(ui_response, ui_hmi_response, "ui_info");
- CreateResponseFromHMI(vr_response, vr_hmi_response, "unsupported_resource");
-
- (*tts_response)[strings::params][hmi_response::code] = hmi_response;
- (*tts_response)[strings::msg_params] = 0;
-
- am::event_engine::Event event_ui(
- hmi_apis::FunctionID::UI_ChangeRegistration);
- event_ui.set_smart_object(*ui_response);
- am::event_engine::Event event_vr(
- hmi_apis::FunctionID::VR_ChangeRegistration);
- event_vr.set_smart_object(*vr_response);
- am::event_engine::Event event_tts(
- hmi_apis::FunctionID::TTS_ChangeRegistration);
- event_tts.set_smart_object(*tts_response);
-
- MessageSharedPtr response_to_mobile;
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- _, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_ui);
- command->on_event(event_vr);
- command->on_event(event_tts);
-
- EXPECT_EQ(
- (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
- success);
- EXPECT_EQ((*response_to_mobile)[strings::msg_params][strings::result_code]
- .asInt(),
- static_cast<int32_t>(mobile_response));
- }
-
- void CreateResponseFromHMI(MessageSharedPtr msg,
- hmi_apis::Common_Result::eType result,
- const std::string& info) {
- (*msg)[strings::params][hmi_response::code] = static_cast<int32_t>(result);
- (*msg)[strings::msg_params][strings::info] = info;
- }
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities_));
- }
-
- void ExpectationsHmiCapabilities(
- smart_objects::SmartObjectSPtr supported_languages) {
- EXPECT_CALL(hmi_capabilities_, ui_supported_languages())
- .WillOnce(Return(supported_languages.get()));
- EXPECT_CALL(hmi_capabilities_, vr_supported_languages())
- .WillOnce(Return(supported_languages.get()));
- EXPECT_CALL(hmi_capabilities_, tts_supported_languages())
- .WillOnce(Return(supported_languages.get()));
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- typedef TypeIf<kMocksAreNice,
- NiceMock<application_manager_test::MockHMICapabilities>,
- application_manager_test::MockHMICapabilities>::Result
- MockHMICapabilities;
- sync_primitives::Lock app_set_lock_;
- MockHMICapabilities hmi_capabilities_;
- MockAppPtr mock_app_;
- MessageSharedPtr supported_languages_;
- MockPolicyHandlerInterface mock_policy_handler_;
-};
-
-typedef ChangeRegistrationRequestTest::MockHMICapabilities MockHMICapabilities;
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_VRHmiSendSuccess_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
- utils::SharedPtr<ChangeRegistrationRequest> command =
- CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
-
- am::ApplicationSet application_set;
- const utils::custom_string::CustomString name("name");
- MockAppPtr app = CreateMockApp();
- app->set_name(name);
-
- DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_);
-
- application_set.insert(app);
-
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
- EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
-
- smart_objects::SmartObjectSPtr supported_languages(
- CreateMessage(smart_objects::SmartType_Array));
- (*supported_languages)[0] =
- static_cast<int32_t>(mobile_apis::Language::EN_US);
-
- ExpectationsHmiCapabilities(supported_languages);
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_RESPONSE));
-
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- command->Run();
-
- MessageSharedPtr ui_response = CreateMessage(smart_objects::SmartType_Map);
- MessageSharedPtr vr_response = CreateMessage(smart_objects::SmartType_Map);
- MessageSharedPtr tts_response = CreateMessage(smart_objects::SmartType_Map);
- CreateResponseFromHMI(
- ui_response, hmi_apis::Common_Result::WARNINGS, "ui_info");
- CreateResponseFromHMI(vr_response,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- "VR is not supported by system");
- CreateResponseFromHMI(
- tts_response, hmi_apis::Common_Result::SUCCESS, "tts_info");
- (*ui_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*vr_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*tts_response)[am::strings::msg_params][am::strings::app_id] =
- kConnectionKey;
- am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_ChangeRegistration);
- event_ui.set_smart_object(*ui_response);
- am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_ChangeRegistration);
- event_vr.set_smart_object(*vr_response);
- am::event_engine::Event event_tts(
- hmi_apis::FunctionID::TTS_ChangeRegistration);
- event_tts.set_smart_object(*tts_response);
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- MessageSharedPtr response_to_mobile;
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_ui);
- command->on_event(event_tts);
- command->on_event(event_vr);
-
- ResultCommandExpectations(response_to_mobile,
- "ui_info, VR is not supported by system, tts_info");
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_UNSUPPORTED_RESOURCE_STATE_NOT_AVAILABLE_Expect_false) {
- MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
- utils::SharedPtr<ChangeRegistrationRequest> command =
- CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(1));
- am::ApplicationSet application_set;
- const utils::custom_string::CustomString name("name");
- MockAppPtr app = CreateMockApp();
- app->set_name(name);
- DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_);
- application_set.insert(app);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
- EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
-
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities_));
- (*supported_languages_)[0] =
- static_cast<int32_t>(mobile_apis::Language::EN_US);
- EXPECT_CALL(hmi_capabilities_, ui_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
- EXPECT_CALL(hmi_capabilities_, vr_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
- EXPECT_CALL(hmi_capabilities_, tts_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
-
- EXPECT_CALL(app_mngr_, hmi_interfaces())
- .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- MessageSharedPtr response_to_mobile;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
- command->Run();
-
- EXPECT_EQ(
- (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
- false);
- EXPECT_EQ(
- (*response_to_mobile)[strings::msg_params][strings::result_code].asInt(),
- static_cast<int32_t>(mobile_apis::Result::UNSUPPORTED_RESOURCE));
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_UNSUPPORTED_RESOURCE_STATE_NOT_RESPONSE_Expect_false) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_NOT_RESPONSE,
- false);
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_UNSUPPORTED_RESOURCE_STATE_AVAILABLE_Expect_false) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_AVAILABLE,
- false);
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_UNSUPPORTED_RESOURCE_SUCCESS_STATE_AVAILABLE_Expect_true) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_AVAILABLE,
- true,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::SUCCESS);
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_SUCCESS_STATE_AVAILABLE_Expect_true) {
- CheckExpectations(hmi_apis::Common_Result::SUCCESS,
- mobile_apis::Result::SUCCESS,
- am::HmiInterfaces::STATE_AVAILABLE,
- true,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::SUCCESS);
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_WRONG_LANGUAGE_STATE_AVAILABLE_Expect_true) {
- CheckExpectations(hmi_apis::Common_Result::WRONG_LANGUAGE,
- mobile_apis::Result::WRONG_LANGUAGE,
- am::HmiInterfaces::STATE_AVAILABLE,
- true,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::SUCCESS);
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_TTS_INVALID_DATA_STATE_AVAILABLE_Expect_false) {
- CheckExpectations(hmi_apis::Common_Result::INVALID_DATA,
- mobile_apis::Result::INVALID_DATA,
- am::HmiInterfaces::STATE_AVAILABLE,
- false,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::SUCCESS);
-}
-
-TEST_F(ChangeRegistrationRequestTest,
- OnEvent_UIHmiSendSuccess_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_from_mobile = CreateMsgFromMobile();
-
- utils::SharedPtr<ChangeRegistrationRequest> command =
- CreateCommand<ChangeRegistrationRequest>(msg_from_mobile);
-
- am::ApplicationSet application_set;
- const utils::custom_string::CustomString name("name");
- MockAppPtr app = CreateMockApp();
- app->set_name(name);
-
- DataAccessor<am::ApplicationSet> accessor(application_set, app_set_lock_);
-
- application_set.insert(app);
-
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
- EXPECT_CALL(*app, name()).WillOnce(ReturnRef(name));
-
- smart_objects::SmartObjectSPtr supported_languages(
- CreateMessage(smart_objects::SmartType_Array));
- (*supported_languages)[0] =
- static_cast<int32_t>(mobile_apis::Language::EN_US);
-
- ExpectationsHmiCapabilities(supported_languages);
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- command->Run();
-
- MessageSharedPtr ui_response = CreateMessage(smart_objects::SmartType_Map);
- MessageSharedPtr vr_response = CreateMessage(smart_objects::SmartType_Map);
- MessageSharedPtr tts_response = CreateMessage(smart_objects::SmartType_Map);
- CreateResponseFromHMI(ui_response,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- "unsupported_resource");
- CreateResponseFromHMI(
- vr_response, hmi_apis::Common_Result::WARNINGS, "vr_info");
- CreateResponseFromHMI(
- tts_response, hmi_apis::Common_Result::SUCCESS, "tts_info");
- (*ui_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*vr_response)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*tts_response)[am::strings::msg_params][am::strings::app_id] =
- kConnectionKey;
- am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_ChangeRegistration);
- event_ui.set_smart_object(*ui_response);
- am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_ChangeRegistration);
- event_vr.set_smart_object(*vr_response);
- am::event_engine::Event event_tts(
- hmi_apis::FunctionID::TTS_ChangeRegistration);
- event_tts.set_smart_object(*tts_response);
-
- MessageSharedPtr response_to_mobile;
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_vr);
- command->on_event(event_tts);
- command->on_event(event_ui);
-
- ResultCommandExpectations(response_to_mobile,
- "unsupported_resource, vr_info, tts_info");
-}
-
-} // namespace change_registration_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/create_interaction_choice_set_test.cc b/src/components/application_manager/test/commands/mobile/create_interaction_choice_set_test.cc
deleted file mode 100644
index c3513d2acb..0000000000
--- a/src/components/application_manager/test/commands/mobile/create_interaction_choice_set_test.cc
+++ /dev/null
@@ -1,814 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/create_interaction_choice_set_request.h"
-#include "application_manager/commands/mobile/create_interaction_choice_set_response.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/helpers.h"
-#include "utils/make_shared.h"
-#include "smart_objects/smart_object.h"
-#include "utils/custom_string.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace create_interaction_choice_set_request {
-
-namespace am = application_manager;
-using am::commands::CommandImpl;
-using am::ApplicationManager;
-using am::commands::MessageSharedPtr;
-using am::ApplicationSharedPtr;
-using am::MockMessageHelper;
-using ::testing::_;
-using ::utils::SharedPtr;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::AtLeast;
-using am::commands::CreateInteractionChoiceSetRequest;
-using am::commands::CreateInteractionChoiceSetResponse;
-using ::test::components::application_manager_test::MockApplication;
-
-namespace custom_str = utils::custom_string;
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-typedef SharedPtr<CreateInteractionChoiceSetRequest>
- CreateInteractionChoiceSetRequestPtr;
-typedef SharedPtr<CreateInteractionChoiceSetResponse>
- CreateInteractionChoiceSetResponsePtr;
-
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-namespace {
-const hmi_apis::FunctionID::eType kInvalidFunctionId =
- hmi_apis::FunctionID::INVALID_ENUM;
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 10u;
-const uint32_t kGrammarId = 10u;
-const int32_t kMenuId = 5;
-const uint32_t kChoiceSetId = 1u;
-const uint32_t kChoiceId1 = 2u;
-const uint32_t kChoiceId2 = 3u;
-const std::string kImage = "image";
-const std::string kSecondImage = "second_image";
-const std::string kVrCommands1 = "vr_commands_1";
-const std::string kVrCommands2 = "vr_commands_2";
-const std::string kMenuName = "menu_name";
-
-} // namespace
-
-class CreateInteractionChoiceSetRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- CreateInteractionChoiceSetRequestTest()
- : message_(CreateMessage())
- , command_(CreateCommand<CreateInteractionChoiceSetRequest>(message_))
- , mock_app_(CreateMockApp()) {}
-
- MessageSharedPtr CreateFullParamsVRSO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = kCmdId;
- msg_params[strings::vr_commands] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- msg_params[strings::vr_commands][0] = "lamer";
- msg_params[strings::type] = 34;
- msg_params[strings::grammar_id] = 12;
- msg_params[strings::app_id] = kAppId;
- (*msg)[strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void FillMessageFieldsItem1(MessageSharedPtr message) {
- (*message)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::menu_name] = kMenuName;
- (*message)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image][am::strings::value] = kImage;
- (*message)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::choice_id] = kChoiceId1;
- (*message)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::vr_commands][0] = kVrCommands1;
- (*message)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_image][am::strings::value] = kSecondImage;
- }
- void FillMessageFieldsItem2(MessageSharedPtr message) {
- (*message)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::choice_id] = kChoiceId2;
- (*message)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::menu_name] = kMenuName;
- (*message)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::vr_commands][0] = kVrCommands2;
- (*message)[am::strings::msg_params]
- [am::strings::interaction_choice_set_id] = kChoiceSetId;
- }
-
- MessageSharedPtr message_;
- CreateInteractionChoiceSetRequestPtr command_;
- MockAppPtr mock_app_;
- sync_primitives::Lock lock_;
-};
-
-class CreateInteractionChoiceSetResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeout_GENERIC_ERROR) {
- MessageSharedPtr msg_vr = CreateMessage(smart_objects::SmartType_Map);
- (*msg_vr)[strings::msg_params][strings::result_code] =
- am::mobile_api::Result::GENERIC_ERROR;
- (*msg_vr)[strings::msg_params][strings::success] = false;
-
- utils::SharedPtr<CreateInteractionChoiceSetRequest> req_vr =
- CreateCommand<CreateInteractionChoiceSetRequest>();
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app));
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(*mock_app, get_grammar_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(*mock_app, RemoveCommand(_)).WillByDefault(Return());
-
- MessageSharedPtr vr_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
-
- req_vr->onTimeOut();
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::success].asBool(),
- false);
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::result_code].asInt(),
- static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_VR_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_vr = CreateFullParamsVRSO();
- (*msg_vr)[strings::msg_params][strings::choice_set][0][strings::choice_id] =
- 10;
- (*msg_vr)[strings::msg_params][strings::choice_set][0][strings::menu_name] =
- "menu_name";
- (*msg_vr)[strings::msg_params][strings::interaction_choice_set_id] = 11;
- utils::SharedPtr<CreateInteractionChoiceSetRequest> req_vr =
- CreateCommand<CreateInteractionChoiceSetRequest>(msg_vr);
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
-
- smart_objects::SmartObject* null_obj = NULL;
- ON_CALL(*mock_app_, FindChoiceSet(_)).WillByDefault(Return(null_obj));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[strings::msg_params][strings::info] = "VR is not supported by system";
- (*msg)[strings::msg_params][strings::cmd_id] = kCommandId;
-
- 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);
-
- am::CommandsMap commands_map;
- ON_CALL(*mock_app_, commands_map())
- .WillByDefault(
- Return(DataAccessor<am::CommandsMap>(commands_map, lock_)));
-
- ON_CALL(mock_hmi_interfaces_, GetInterfaceFromFunction(_))
- .WillByDefault(
- Return(am::HmiInterfaces::HMI_INTERFACE_BasicCommunication));
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
-
- req_vr->Run();
-
- MessageSharedPtr vr_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
-
- req_vr->on_event(event);
-
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::success].asBool(),
- false);
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*vr_command_result)[strings::msg_params].keyExists(strings::info)) {
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::info].asString(),
- (*msg)[strings::msg_params][strings::info].asString());
- }
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, Run_InvalidApp_UNSUCCESS) {
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
-
- command_->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, Run_VerifyImageFail_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image] = kImage;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_image] = kSecondImage;
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::INVALID_DATA));
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
-
- command_->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, Run_FindChoiceSetFail_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image] = kImage;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_image] = kSecondImage;
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
- 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]);
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(invalid_choice_set_id));
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command_->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- Run_CheckChoiceSet_InvalidChoiceId_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::menu_name] = kMenuName;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image][am::strings::value] = kImage;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::choice_id] = kChoiceId1;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_image][am::strings::value] = kSecondImage;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::vr_commands][0] = kVrCommands1;
-
- FillMessageFieldsItem2(message_);
- (*message_)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::vr_commands][0] = kVrCommands1;
- (*message_)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::vr_commands][1] = " kVrCommands2\t";
- (*message_)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::vr_commands][0] = kVrCommands1;
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command_->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- Run_IsWhiteSpaceVRCommandsExist_InvalidMenuName_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::menu_name] = "menu_name\t";
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_text] = "secondary_text\t";
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::tertiary_text] = "tertiary_text\t";
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image][am::strings::value] = "image\t";
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::choice_id] = kChoiceId1;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_image][am::strings::value] =
- "second_image\t";
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::vr_commands][0] = "vr_commands_1\t";
-
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillRepeatedly(Return(choice_set_id));
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
- .keyExists(am::strings::menu_name)) {
- CreateInteractionChoiceSetRequestPtr command(
- CreateCommand<CreateInteractionChoiceSetRequest>(message_));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command->Run();
- }
- if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
- .keyExists(am::strings::secondary_text)) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::menu_name] = kMenuName;
- CreateInteractionChoiceSetRequestPtr command(
- CreateCommand<CreateInteractionChoiceSetRequest>(message_));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command->Run();
- }
- if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
- .keyExists(am::strings::tertiary_text)) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_text] = "secondary_text";
- CreateInteractionChoiceSetRequestPtr command(
- CreateCommand<CreateInteractionChoiceSetRequest>(message_));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command->Run();
- }
- if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
- .keyExists(am::strings::vr_commands)) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::tertiary_text] = "tertiary_text";
- CreateInteractionChoiceSetRequestPtr command(
- CreateCommand<CreateInteractionChoiceSetRequest>(message_));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command->Run();
- }
- if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
- .keyExists(am::strings::image)) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::vr_commands][0] = "vr_commands";
- CreateInteractionChoiceSetRequestPtr command(
- CreateCommand<CreateInteractionChoiceSetRequest>(message_));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command->Run();
- }
- if ((*message_)[am::strings::msg_params][am::strings::choice_set][0]
- .keyExists(am::strings::secondary_image)) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image][am::strings::value] = kImage;
- CreateInteractionChoiceSetRequestPtr command(
- CreateCommand<CreateInteractionChoiceSetRequest>(message_));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
- command->Run();
- }
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- Run_ValidAmountVrCommands_SUCCESS) {
- FillMessageFieldsItem1(message_);
- FillMessageFieldsItem2(message_);
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .Times(AtLeast(2))
- .WillOnce(Return(kConnectionKey))
- .WillOnce(Return(kConnectionKey));
- command_->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- Run_EmptyAmountVrCommands_SUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::menu_name] = kMenuName;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::image][am::strings::value] = kImage;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::choice_id] = kChoiceId1;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::secondary_image][am::strings::value] = kSecondImage;
- (*message_)[am::strings::msg_params][am::strings::choice_set][0]
- [am::strings::vr_commands][0] = kVrCommands1;
- (*message_)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::choice_id] = kChoiceId2;
- (*message_)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::menu_name] = kMenuName;
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
- (*message_)[am::strings::msg_params][am::strings::choice_set][1]
- [am::strings::vr_commands][0] = kVrCommands2;
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- command_->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnEvent_InvalidEventId_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
- command_->on_event(event);
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnEvent_InvalidVrCommand_UNSUCCESS) {
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::WARNINGS;
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
-
- Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*message_);
-
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
- command_->on_event(event);
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_ValidVrNoError_SUCCESS) {
- Event event(hmi_apis::FunctionID::VR_AddCommand);
-
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::WARNINGS;
-
- FillMessageFieldsItem1(message_);
- FillMessageFieldsItem2(message_);
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- command_->Run();
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
- event.set_smart_object(*message_);
-
- command_->on_event(event);
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnEvent_InValidVrNoError_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::VR_AddCommand);
-
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::INVALID_DATA;
-
- FillMessageFieldsItem1(message_);
- FillMessageFieldsItem2(message_);
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- command_->Run();
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(0);
- event.set_smart_object(*message_);
-
- command_->on_event(event);
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnEvent_ValidVrNoErrorAndExpectedChoiceLessThanReceiveChoice_SUCCESS) {
- Event event(hmi_apis::FunctionID::VR_AddCommand);
-
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::WARNINGS;
-
- FillMessageFieldsItem1(message_);
-
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- command_->Run();
-
- FillMessageFieldsItem2(message_);
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
- event.set_smart_object(*message_);
- command_->on_event(event);
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnTimeOut_InvalidErrorFromHMI_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR),
- am::commands::Command::ORIGIN_SDL));
-
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
- command_->onTimeOut();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnTimeOut_ValidErrorFromHMI_SUCCESS) {
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::INVALID_ENUM;
-
- FillMessageFieldsItem1(message_);
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- command_->Run();
-
- FillMessageFieldsItem2(message_);
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
- Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*message_);
- command_->on_event(event);
-
- EXPECT_CALL(*mock_app_, RemoveChoiceSet(kChoiceSetId));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
- command_->onTimeOut();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeOut_InvalidApp_UNSUCCESS) {
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::INVALID_ENUM;
-
- FillMessageFieldsItem1(message_);
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- command_->Run();
-
- FillMessageFieldsItem2(message_);
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(2);
- Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*message_);
- command_->on_event(event);
-
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(invalid_app));
- EXPECT_CALL(*mock_app_, RemoveChoiceSet(_)).Times(0);
- command_->onTimeOut();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest,
- OnTimeOut_SuccessfulResponseReceived_UNSUCCESS) {
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
-
- FillMessageFieldsItem1(message_);
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
-
- smart_objects::SmartObject* choice_set_id = NULL;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(app_mngr_, GenerateGrammarID()).WillOnce(Return(kGrammarId));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
-
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _));
-
- command_->Run();
-
- FillMessageFieldsItem2(message_);
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
-
- Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*message_);
-
- command_->on_event(event);
-
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, RemoveChoiceSet(_));
-
- command_->onTimeOut();
-}
-
-TEST_F(CreateInteractionChoiceSetResponseTest, Run_SuccessFalse_UNSUCCESS) {
- MessageSharedPtr message(CreateMessage());
- (*message)[am::strings::msg_params][am::strings::success] = false;
- (*message)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::INVALID_ENUM;
- CreateInteractionChoiceSetResponsePtr command(
- CreateCommand<CreateInteractionChoiceSetResponse>(message));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(message, false));
- command->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetResponseTest, Run_SuccessTrue_SUCCESS) {
- MessageSharedPtr message(CreateMessage());
- (*message)[am::strings::msg_params][am::strings::success] = true;
- (*message)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::SUCCESS;
- CreateInteractionChoiceSetResponsePtr command(
- CreateCommand<CreateInteractionChoiceSetResponse>(message));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(message, false));
- command->Run();
-}
-
-TEST_F(CreateInteractionChoiceSetRequestTest, Run_ErrorFromHmiFalse_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::VR_AddCommand);
-
- (*message_)[am::strings::params][am::strings::correlation_id] =
- kCorrelationId;
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::GENERIC_ERROR;
-
- FillMessageFieldsItem1(message_);
-
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillRepeatedly(Return(mobile_apis::Result::GENERIC_ERROR));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
- .WillRepeatedly(Return(choice_set_id));
-
- EXPECT_CALL(app_mngr_, GenerateGrammarID())
- .WillRepeatedly(Return(kGrammarId));
- EXPECT_CALL(*mock_app_, AddChoiceSet(kChoiceSetId, _)).Times(2);
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- command_->Run();
-
- FillMessageFieldsItem2(message_);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR),
- am::commands::Command::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
- event.set_smart_object(*message_);
- command_->on_event(event);
- command_->Run();
-}
-
-} // namespace create_interaction_choice_set_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/delete_command_request_test.cc b/src/components/application_manager/test/commands/mobile/delete_command_request_test.cc
deleted file mode 100644
index c92ec81a1f..0000000000
--- a/src/components/application_manager/test/commands/mobile/delete_command_request_test.cc
+++ /dev/null
@@ -1,258 +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 <string>
-
-#include "application_manager/commands/mobile/delete_command_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace delete_command_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::DeleteCommandRequest;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using am::MockMessageHelper;
-using am::MockHmiInterfaces;
-
-typedef SharedPtr<DeleteCommandRequest> DeleteCommandPtr;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class DeleteCommandRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- DeleteCommandRequestTest() : mock_app_(CreateMockApp()) {}
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- MessageSharedPtr CreateFullParamsVRSO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::vr_commands] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- msg_params[am::strings::vr_commands][0] = "lamer";
- msg_params[am::strings::type] = 34;
- msg_params[am::strings::grammar_id] = 12;
- msg_params[am::strings::app_id] = kAppId;
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(app_mngr_, hmi_interfaces())
- .WillByDefault(ReturnRef(hmi_interfaces_));
- }
-
- NiceMock<MockHmiInterfaces> hmi_interfaces_;
- MockAppPtr mock_app_;
-};
-
-TEST_F(DeleteCommandRequestTest,
- OnEvent_VrHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr command_msg = CreateFullParamsVRSO();
- (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DeleteCommandPtr command(CreateCommand<DeleteCommandRequest>(command_msg));
-
- 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;
-
- ON_CALL(hmi_interfaces_, GetInterfaceFromFunction(_))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
- ON_CALL(hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- 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_, get_grammar_id()).WillByDefault(Return(kConnectionKey));
-
- MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- Event event_ui(hmi_apis::FunctionID::UI_DeleteCommand);
- event_ui.set_smart_object(*msg);
- command->Init();
- command->Run();
- command->on_event(event_ui);
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*event_msg)[am::strings::msg_params][am::strings::info] =
- "VR is not supported by system";
- Event event_vr(hmi_apis::FunctionID::VR_DeleteCommand);
- event_vr.set_smart_object(*event_msg);
-
- EXPECT_CALL(*mock_app_, RemoveCommand(kCommandId));
-
- EXPECT_CALL(*mock_app_, UpdateHash());
-
- MessageSharedPtr vr_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
-
- command->on_event(event_vr);
-
- ResultCommandExpectations(vr_command_result, "VR is not supported by system");
-}
-
-TEST_F(DeleteCommandRequestTest,
- OnEvent_UIHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr command_msg = CreateFullParamsUISO();
- (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DeleteCommandPtr command(CreateCommand<DeleteCommandRequest>(command_msg));
-
- 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;
-
- ON_CALL(hmi_interfaces_, GetInterfaceFromFunction(_))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- 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, get_grammar_id()).WillByDefault(Return(kConnectionKey));
-
- MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- Event event_vr(hmi_apis::FunctionID::VR_DeleteCommand);
- event_vr.set_smart_object(*msg);
-
- command->Init();
- command->Run();
- command->on_event(event_vr);
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*event_msg)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
- Event event_ui(hmi_apis::FunctionID::UI_DeleteCommand);
- event_ui.set_smart_object(*event_msg);
-
- EXPECT_CALL(*app, RemoveCommand(kCommandId));
-
- EXPECT_CALL(*app, UpdateHash());
-
- MessageSharedPtr result_msg(
- CatchMobileCommandResult(CallOnEvent(*command, event_ui)));
-
- ASSERT_TRUE(result_msg);
-
- ResultCommandExpectations(result_msg, "UI is not supported by system");
-}
-
-} // namespace delete_command_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/delete_file_test.cc b/src/components/application_manager/test/commands/mobile/delete_file_test.cc
deleted file mode 100644
index 3692f7298e..0000000000
--- a/src/components/application_manager/test/commands/mobile/delete_file_test.cc
+++ /dev/null
@@ -1,246 +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 <vector>
-#include <string>
-#include <map>
-
-#include "mobile/delete_file_request.h"
-#include "mobile/delete_file_response.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/file_system.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_application_manager_settings.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "application_manager/policies/policy_handler.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace delete_file {
-
-using ::testing::_;
-using ::testing::Test;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SetArgReferee;
-using ::testing::AtLeast;
-namespace am = ::application_manager;
-using am::commands::DeleteFileRequest;
-using am::commands::DeleteFileResponse;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using am::MockMessageHelper;
-
-typedef SharedPtr<DeleteFileRequest> DeleteFileRequestPtr;
-typedef SharedPtr<DeleteFileResponse> DeleteFileResponsePtr;
-typedef NiceMock<
- ::test::components::application_manager_test::MockHMICapabilities>
- MockHMICapabilities;
-
-ACTION_TEMPLATE(SetArgPointer,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(vec)) {
- *std::tr1::get<k>(args) = *vec;
-}
-
-MATCHER_P(CheckMessageResultCode, result_code, "") {
- return (*arg)[am::strings::msg_params][am::strings::result_code].asInt() ==
- result_code;
-}
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const uint32_t kCorrelationId = 10u;
-const int32_t kMenuId = 5;
-} // namespace
-
-class DeleteFileRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- protected:
- void SetUp() OVERRIDE {
- message_ = CreateMessage();
- command_ = CreateCommand<DeleteFileRequest>(message_);
- mock_app_ = CreateMockApp();
- }
- DeleteFileRequestPtr command_;
- MessageSharedPtr message_;
- MockAppPtr mock_app_;
-};
-
-class DeleteFileResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
-};
-
-TEST_F(DeleteFileRequestTest, Run_InvalidApp_UNSUCCESS) {
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(app_mngr_, get_settings()).Times(0);
-
- command_->Run();
-}
-
-TEST_F(DeleteFileRequestTest, Run_HMILevelNone_UNSUCCESS) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_NONE));
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- const uint32_t num = 0;
- EXPECT_CALL(app_mngr_settings_, delete_file_in_none())
- .WillOnce(ReturnRef(num));
- EXPECT_CALL(*mock_app_, delete_file_in_none_count()).WillOnce(Return(1));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(CheckMessageResultCode(mobile_apis::Result::REJECTED),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- command_->Run();
-}
-
-TEST_F(DeleteFileRequestTest, Run_ValidFileName_SUCCESS) {
- const std::string file_name = "test_file.txt";
- EXPECT_TRUE(file_system::CreateFile(file_name));
- (*message_)[am::strings::msg_params][am::strings::sync_file_name] = file_name;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app_));
- EXPECT_CALL(*mock_app_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- const std::string kFullFilePath = file_system::CurrentWorkingDirectory();
- EXPECT_CALL(app_mngr_settings_, app_storage_folder())
- .WillOnce(ReturnRef(kFullFilePath));
-
- am::AppFile file;
- file.file_name = file_name;
- file.file_type = mobile_apis::FileType::BINARY;
-
- EXPECT_CALL(*mock_app_, GetFile(_)).WillOnce(Return(&file));
- EXPECT_CALL(*mock_app_, DeleteFile(_));
- EXPECT_CALL(*mock_app_, increment_delete_file_in_none_count());
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(CheckMessageResultCode(mobile_apis::Result::SUCCESS),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- command_->Run();
-}
-
-TEST_F(DeleteFileRequestTest, Run_InvalidFile_UNSUCCESS) {
- const std::string file_name = "test_file.txt";
- (*message_)[am::strings::msg_params][am::strings::sync_file_name] = file_name;
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- const std::string kFullFilePath = file_system::CurrentWorkingDirectory();
- EXPECT_CALL(app_mngr_settings_, app_storage_folder())
- .WillOnce(ReturnRef(kFullFilePath));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::REJECTED),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- command_->Run();
-}
-
-TEST_F(DeleteFileResponseTest, Run_InvalidApp_UNSUCCESS) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- DeleteFileResponsePtr command = CreateCommand<DeleteFileResponse>(message);
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(invalid_app));
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(CheckMessageResultCode(
- mobile_apis::Result::APPLICATION_NOT_REGISTERED),
- false));
-
- command->Run();
-}
-
-TEST_F(DeleteFileResponseTest, Run_ValidApp_SUCCESS) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*message)[am::strings::msg_params][am::strings::success] = true;
-
- DeleteFileResponsePtr command = CreateCommand<DeleteFileResponse>(message);
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
- const uint32_t kAvailableDiskSpace = 10u;
- EXPECT_CALL(*app, GetAvailableDiskSpace())
- .WillOnce(Return(kAvailableDiskSpace));
-
- EXPECT_CALL(app_mngr_,
- SendMessageToMobile(
- CheckMessageResultCode(mobile_apis::Result::SUCCESS), _));
-
- command->Run();
-}
-
-} // namespace delete_file
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc b/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc
deleted file mode 100644
index 192cad12b0..0000000000
--- a/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc
+++ /dev/null
@@ -1,284 +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 <map>
-
-#include "mobile/delete_interaction_choice_set_request.h"
-#include "mobile/delete_interaction_choice_set_response.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace delete_interaction_choice_set {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::InSequence;
-
-namespace am = ::application_manager;
-
-using am::commands::DeleteInteractionChoiceSetRequest;
-using am::commands::DeleteInteractionChoiceSetResponse;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-
-typedef SharedPtr<DeleteInteractionChoiceSetRequest>
- DeleteInteractionChoiceSetRequestPtr;
-typedef SharedPtr<DeleteInteractionChoiceSetResponse>
- DeleteInteractionChoiceSetResponsePtr;
-
-MATCHER_P(CheckMessageSuccess, success, "") {
- return success ==
- (*arg)[am::strings::msg_params][am::strings::success].asBool();
-}
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kChoiceSetId = 11u;
-const uint32_t kChoiceId = 110u;
-const uint32_t kGrammarId = 101u;
-} // namespace
-
-class DeleteInteractionChoiceSetRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- DeleteInteractionChoiceSetRequestTest()
- : accessor_(choice_set_map_, performinteraction_choice_set_lock_) {}
-
- ~DeleteInteractionChoiceSetRequestTest() {
- // Fix DataAccessor release and WinQt crash
- Mock::VerifyAndClearExpectations(&app_mngr_);
- }
-
- am::PerformChoiceSetMap choice_set_map_;
- mutable sync_primitives::Lock performinteraction_choice_set_lock_;
- DataAccessor<am::PerformChoiceSetMap> accessor_;
-
- protected:
- void SetUp() OVERRIDE {
- message_ = CreateMessage();
- command_ = CreateCommand<DeleteInteractionChoiceSetRequest>(message_);
- app_ = CreateMockApp();
- }
-
- DeleteInteractionChoiceSetRequestPtr command_;
- MessageSharedPtr message_;
- MockAppPtr app_;
-};
-
-class DeleteInteractionChoiceSetResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- protected:
- void SetUp() OVERRIDE {
- message_ = CreateMessage();
- command_ = CreateCommand<DeleteInteractionChoiceSetResponse>(message_);
- app_ = CreateMockApp();
- }
- DeleteInteractionChoiceSetResponsePtr command_;
- MessageSharedPtr message_;
- MockAppPtr app_;
-};
-
-TEST_F(DeleteInteractionChoiceSetRequestTest, Run_InvalidApp_UNSUCCESS) {
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_, FindChoiceSet(_)).Times(0);
- command_->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetRequestTest, Run_FindChoiceSetFail_UNSUCCESS) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
-
- smart_objects::SmartObject* choice_set_id = NULL;
- EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- command_->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetRequestTest, Run_ChoiceSetInUse_SUCCESS) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
-
- 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]);
-
- choice_set_map_[0].insert(
- std::make_pair(kChoiceSetId,
- &((*message_)[am::strings::msg_params]
- [am::strings::interaction_choice_set_id])));
-
- EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
- EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(true));
- EXPECT_CALL(*app_, performinteraction_choice_set_map())
- .WillOnce(Return(accessor_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- command_->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetRequestTest,
- Run_SendVrDeleteCommand_PerformInteractionFalse_UNSUCCESS) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- 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;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(app_));
-
- InSequence seq;
-
- EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
- EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false));
- EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0);
-
- EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(invalid_choice_set_id));
-
- EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
- EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId));
- EXPECT_CALL(*app_, UpdateHash());
-
- DeleteInteractionChoiceSetRequestPtr command =
- CreateCommand<DeleteInteractionChoiceSetRequest>(message_);
-
- command->Init();
- command->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetRequestTest, Run_SendVrDeleteCommand_SUCCESS) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
- kChoiceSetId;
- (*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]);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(app_));
-
- InSequence seq;
-
- EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
- EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false));
- EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0);
-
- EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
- .WillOnce(Return(choice_set_id));
-
- EXPECT_CALL(*app_, app_id())
- .WillOnce(Return(kConnectionKey))
- .WillOnce(Return(kConnectionKey));
- EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId));
- EXPECT_CALL(*app_, UpdateHash());
-
- DeleteInteractionChoiceSetRequestPtr command =
- CreateCommand<DeleteInteractionChoiceSetRequest>(message_);
-
- command->Init();
- command->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetResponseTest, Run_SuccessFalse_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::success] = false;
-
- EXPECT_CALL(app_mngr_,
- SendMessageToMobile(CheckMessageSuccess(false), false));
- command_->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetResponseTest, Run_ValidResultCode_SUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::result_code] =
- hmi_apis::Common_Result::SUCCESS;
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(CheckMessageSuccess(true), false));
- command_->Run();
-}
-
-TEST_F(DeleteInteractionChoiceSetResponseTest,
- Run_InvalidResultCode_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::result_code] =
- hmi_apis::Common_Result::INVALID_ENUM;
-
- EXPECT_CALL(app_mngr_,
- SendMessageToMobile(CheckMessageSuccess(false), false));
- command_->Run();
-}
-
-} // namespace delete_interaction_choice_set
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc b/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc
deleted file mode 100644
index cc21e5366e..0000000000
--- a/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc
+++ /dev/null
@@ -1,338 +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 <string>
-
-#include "application_manager/commands/mobile/delete_sub_menu_request.h"
-#include "application_manager/commands/mobile/delete_sub_menu_response.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace delete_sub_menu_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::InSequence;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using am::MockHmiInterfaces;
-using am::MockMessageHelper;
-
-using am::commands::DeleteSubMenuRequest;
-using am::commands::DeleteSubMenuResponse;
-
-typedef SharedPtr<DeleteSubMenuRequest> DeleteSubMenuRequestPtr;
-typedef SharedPtr<DeleteSubMenuResponse> DeleteSubMenuResponsePtr;
-
-MATCHER_P(CheckMessageResultCode, result_code, "") {
- return (*arg)[am::strings::msg_params][am::strings::result_code].asInt() ==
- result_code;
-}
-
-MATCHER_P(CheckMessageConnectionKey, connection_key, "") {
- return (*arg)[am::strings::msg_params][am::strings::connection_key].asInt() ==
- connection_key;
-}
-
-ACTION_P(DeleteCommand, commands_map) {
- am::CommandsMap::iterator it = (*commands_map).begin();
- if ((*commands_map).end() != it) {
- (*commands_map).erase(it);
- }
-}
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 10u;
-const uint32_t kMenuId = 100u;
-const uint32_t kGrammarId = 101u;
-const int32_t kCmdId = 102;
-} // namespace
-
-class DeleteSubMenuRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- DeleteSubMenuRequestTest()
- : accessor_(commands_map_, commands_lock_)
- , message_(CreateMessage())
- , command_(CreateCommand<DeleteSubMenuRequest>(message_))
- , app_(CreateMockApp()) {}
-
- am::CommandsMap commands_map_;
- mutable sync_primitives::Lock commands_lock_;
- DataAccessor<am::CommandsMap> accessor_;
-
- MessageSharedPtr message_;
- DeleteSubMenuRequestPtr command_;
- MockAppPtr app_;
-};
-
-class DeleteSubMenuResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(DeleteSubMenuRequestTest, DISABLED_OnEvent_UI_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::msg_params][am::strings::menu_id] = 10u;
-
- utils::SharedPtr<DeleteSubMenuRequest> command =
- CreateCommand<DeleteSubMenuRequest>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
- EXPECT_CALL(*mock_app, RemoveSubMenu(_));
-
- MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
- (*ev_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*ev_msg)[am::strings::msg_params][am::strings::info] = "info";
-
- Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- event.set_smart_object(*ev_msg);
-
- MockHmiInterfaces hmi_interfaces;
- ON_CALL(app_mngr_, hmi_interfaces()).WillByDefault(ReturnRef(hmi_interfaces));
- EXPECT_CALL(hmi_interfaces,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillOnce(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- am::CommandsMap commands_map;
- smart_objects::SmartObject commands_msg(smart_objects::SmartType_Map);
- commands_map.insert(std::pair<uint32_t, SmartObject*>(1u, &commands_msg));
- sync_primitives::Lock lock;
- DataAccessor<am::CommandsMap> accessor(commands_map, lock);
- EXPECT_CALL(*mock_app, commands_map())
- .WillOnce(Return(accessor))
- .WillOnce(Return(accessor));
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*ui_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*ui_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-TEST_F(DeleteSubMenuRequestTest, Run_InvalidApp_UNSUCCESS) {
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(CheckMessageResultCode(
- mobile_apis::Result::APPLICATION_NOT_REGISTERED),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_, FindSubMenu(_)).Times(0);
- command_->Run();
-}
-
-TEST_F(DeleteSubMenuRequestTest, Run_FindSubMenuFalse_UNSUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- smart_objects::SmartObject* invalid_sub_menu = NULL;
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
- EXPECT_CALL(*app_, FindSubMenu(kMenuId)).WillOnce(Return(invalid_sub_menu));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- CheckMessageResultCode(mobile_apis::Result::INVALID_ID),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- EXPECT_CALL(*app_, app_id()).Times(0);
- command_->Run();
-}
-
-TEST_F(DeleteSubMenuRequestTest, Run_SendHMIRequest_SUCCESS) {
- (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- 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));
-
- EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(kCorrelationId));
-
- command_->Run();
-}
-
-TEST_F(DeleteSubMenuRequestTest, OnEvent_UnknownEventId_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
- EXPECT_CALL(app_mngr_, application(_)).Times(0);
- command_->on_event(event);
-}
-
-TEST_F(DeleteSubMenuRequestTest, OnEvent_InvalidApp_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
- event.set_smart_object(*message_);
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
- EXPECT_CALL(*app_, RemoveSubMenu(_)).Times(0);
- command_->on_event(event);
-}
-
-TEST_F(DeleteSubMenuRequestTest, OnEvent_DeleteSubmenu_SUCCESS) {
- Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::msg_params][am::strings::vr_commands] =
- "vr_commands";
- (*message_)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- (*message_)[am::strings::msg_params][am::strings::menu_params]
- [am::hmi_request::parent_id] = kMenuId;
- const hmi_apis::Common_Result::eType result_code =
- hmi_apis::Common_Result::SUCCESS;
- (*message_)[am::strings::params][am::hmi_response::code] = result_code;
- event.set_smart_object(*message_);
-
- commands_map_.insert(
- std::make_pair(0, &((*message_)[am::strings::msg_params])));
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
-
- InSequence seq;
- EXPECT_CALL(*app_, commands_map()).WillOnce(Return(accessor_));
- EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
- EXPECT_CALL(*app_, get_grammar_id()).WillOnce(Return(kGrammarId));
-
- EXPECT_CALL(*app_, commands_map()).WillOnce(Return(accessor_));
- EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey));
- EXPECT_CALL(*app_, RemoveCommand(_)).WillOnce(DeleteCommand(&commands_map_));
-
- EXPECT_CALL(*app_, RemoveSubMenu(_));
- EXPECT_CALL(*app_, UpdateHash());
-
- DeleteSubMenuRequestPtr command =
- CreateCommand<DeleteSubMenuRequest>(message_);
-
- command->Init();
- command->on_event(event);
-}
-
-TEST_F(DeleteSubMenuResponseTest, Run_SUCCESS) {
- MessageSharedPtr message(CreateMessage());
- (*message)[am::strings::msg_params][am::strings::connection_key] =
- kConnectionKey;
- DeleteSubMenuResponsePtr command(
- CreateCommand<DeleteSubMenuResponse>(message));
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(CheckMessageConnectionKey(kConnectionKey), _));
- command->Run();
-}
-
-TEST_F(DeleteSubMenuRequestTest,
- DeleteSubmenu_CommandhaventVrCommadsAndMenuParams_DontSendHMIRequest) {
- Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::params][am::hmi_response::code] =
- am::mobile_api::Result::SUCCESS;
- event.set_smart_object(*message_);
-
- commands_map_.insert(
- std::make_pair(0, &((*message_)[am::strings::msg_params])));
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*app_, commands_map()).Times(2).WillRepeatedly(Return(accessor_));
- EXPECT_CALL(*app_, RemoveCommand(_)).Times(0);
-
- command_->on_event(event);
-}
-
-TEST_F(DeleteSubMenuRequestTest,
- DeleteSubmenu_NotAChildOfMenupartam_DontSendHMIRequest) {
- Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- (*message_)[am::strings::msg_params][am::strings::menu_id] = kMenuId;
- (*message_)[am::strings::msg_params][am::strings::menu_params]
- [am::hmi_request::parent_id] = kMenuId + 1;
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*message_)[am::strings::params][am::hmi_response::code] =
- am::mobile_api::Result::SUCCESS;
- event.set_smart_object(*message_);
-
- commands_map_.insert(
- std::make_pair(0, &((*message_)[am::strings::msg_params])));
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*app_, commands_map()).Times(2).WillRepeatedly(Return(accessor_));
- EXPECT_CALL(*app_, RemoveCommand(_)).Times(0);
-
- command_->on_event(event);
-}
-
-} // namespace delete_sub_menu_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc b/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc
deleted file mode 100644
index 4f46a6f715..0000000000
--- a/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc
+++ /dev/null
@@ -1,185 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/commands/mobile/diagnostic_message_request.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace diagnostic_message_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::DiagnosticMessageRequest;
-using am::event_engine::Event;
-namespace mobile_result = mobile_apis::Result;
-
-typedef SharedPtr<DiagnosticMessageRequest> DiagnosticMessageRequestPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kDiagnosticMode = 5u;
-} // namespace
-
-class DiagnosticMessageRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(DiagnosticMessageRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DiagnosticMessageRequestPtr command(
- CreateCommand<DiagnosticMessageRequest>(command_msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(DiagnosticMessageRequestTest, Run_NotSupportedDiagnosticMode_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::message_data][0] =
- kDiagnosticMode;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DiagnosticMessageRequestPtr command(
- CreateCommand<DiagnosticMessageRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
-
- const std::vector<uint32_t> empty_supported_diag_modes;
- EXPECT_CALL(app_mngr_settings_, supported_diag_modes())
- .WillOnce(ReturnRef(empty_supported_diag_modes));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::REJECTED), _));
-
- command->Run();
-}
-
-TEST_F(DiagnosticMessageRequestTest, Run_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::message_data][0] =
- kDiagnosticMode;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DiagnosticMessageRequestPtr command(
- CreateCommand<DiagnosticMessageRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
-
- std::vector<uint32_t> supported_diag_modes;
- supported_diag_modes.push_back(kDiagnosticMode);
-
- EXPECT_CALL(app_mngr_settings_, supported_diag_modes())
- .WillOnce(ReturnRef(supported_diag_modes));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage)));
-
- command->Run();
-}
-
-TEST_F(DiagnosticMessageRequestTest, OnEvent_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- DiagnosticMessageRequestPtr command(
- CreateCommand<DiagnosticMessageRequest>());
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command->on_event(event);
-}
-
-TEST_F(DiagnosticMessageRequestTest, OnEvent_SUCCESS) {
- Event event(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
-
- MessageSharedPtr event_message(CreateMessage(smart_objects::SmartType_Map));
- (*event_message)[am::strings::msg_params] = 0;
- (*event_message)[am::strings::params][am::hmi_response::code] =
- mobile_result::SUCCESS;
- event.set_smart_object(*event_message);
-
- DiagnosticMessageRequestPtr command(
- CreateCommand<DiagnosticMessageRequest>());
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
-
- command->on_event(event);
-}
-
-} // namespace diagnostic_message_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/dial_number_request_test.cc b/src/components/application_manager/test/commands/mobile/dial_number_request_test.cc
deleted file mode 100644
index 33c84d305a..0000000000
--- a/src/components/application_manager/test/commands/mobile/dial_number_request_test.cc
+++ /dev/null
@@ -1,187 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/mobile/dial_number_request.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace dial_number_request {
-
-using ::testing::_;
-using ::testing::Return;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::DialNumberRequest;
-using am::event_engine::Event;
-namespace mobile_result = mobile_apis::Result;
-
-typedef SharedPtr<DialNumberRequest> DialNumberRequestPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class DialNumberRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(DialNumberRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- DialNumberRequestPtr command(CreateCommand<DialNumberRequest>());
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(DialNumberRequestTest, Run_InvalidNumber_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = "\t\n";
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(DialNumberRequestTest, Run_EmptyNumber_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = "NotANumber";
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(DialNumberRequestTest, Run_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = "123";
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::BasicCommunication_DialNumber)));
-
- command->Run();
-}
-
-TEST_F(DialNumberRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command->on_event(event);
-}
-
-TEST_F(DialNumberRequestTest, OnEvent_SUCCESS) {
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- mobile_apis::Result::SUCCESS;
- (*event_msg)[am::strings::params][am::strings::info] = "test_info";
-
- Event event(hmi_apis::FunctionID::BasicCommunication_DialNumber);
- event.set_smart_object(*event_msg);
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg));
- command->on_event(event);
-}
-
-} // namespace dial_number_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/dummy_mobile_commands_test.cc b/src/components/application_manager/test/commands/mobile/dummy_mobile_commands_test.cc
deleted file mode 100644
index 27a8499c09..0000000000
--- a/src/components/application_manager/test/commands/mobile/dummy_mobile_commands_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 "commands/command_request_test.h"
-
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include "gtest/gtest.h"
-
-#include "mobile/add_command_request.h"
-#include "mobile/add_command_response.h"
-#include "mobile/add_sub_menu_request.h"
-#include "mobile/add_sub_menu_response.h"
-#include "mobile/alert_maneuver_request.h"
-#include "mobile/alert_maneuver_response.h"
-#include "mobile/alert_request.h"
-#include "mobile/alert_response.h"
-#include "mobile/change_registration_request.h"
-#include "mobile/change_registration_response.h"
-#include "mobile/create_interaction_choice_set_request.h"
-#include "mobile/create_interaction_choice_set_response.h"
-#include "mobile/delete_command_request.h"
-#include "mobile/delete_command_response.h"
-#include "mobile/delete_file_request.h"
-#include "mobile/delete_file_response.h"
-#include "mobile/delete_interaction_choice_set_request.h"
-#include "mobile/delete_interaction_choice_set_response.h"
-#include "mobile/delete_sub_menu_request.h"
-#include "mobile/delete_sub_menu_response.h"
-#include "mobile/diagnostic_message_request.h"
-#include "mobile/diagnostic_message_response.h"
-#include "mobile/dial_number_request.h"
-#include "mobile/dial_number_response.h"
-#include "mobile/end_audio_pass_thru_request.h"
-#include "mobile/end_audio_pass_thru_response.h"
-#include "mobile/generic_response.h"
-#include "mobile/get_dtcs_request.h"
-#include "mobile/get_dtcs_response.h"
-#include "mobile/get_vehicle_data_request.h"
-#include "mobile/get_vehicle_data_response.h"
-#include "mobile/get_way_points_request.h"
-#include "mobile/get_way_points_response.h"
-#include "mobile/list_files_request.h"
-#include "mobile/list_files_response.h"
-#include "mobile/on_app_interface_unregistered_notification.h"
-#include "mobile/on_audio_pass_thru_notification.h"
-#include "mobile/on_button_event_notification.h"
-#include "mobile/on_button_press_notification.h"
-#include "mobile/on_command_notification.h"
-#include "mobile/on_driver_distraction_notification.h"
-#include "mobile/on_hash_change_notification.h"
-#include "mobile/on_hmi_status_notification.h"
-#include "mobile/on_hmi_status_notification_from_mobile.h"
-#include "mobile/on_keyboard_input_notification.h"
-#include "mobile/on_language_change_notification.h"
-#include "mobile/on_permissions_change_notification.h"
-#include "mobile/on_system_request_notification.h"
-#include "mobile/on_tbt_client_state_notification.h"
-#include "mobile/on_touch_event_notification.h"
-#include "mobile/on_vehicle_data_notification.h"
-#include "mobile/on_way_point_change_notification.h"
-#include "mobile/perform_audio_pass_thru_request.h"
-#include "mobile/perform_audio_pass_thru_response.h"
-#include "mobile/perform_interaction_request.h"
-#include "mobile/perform_interaction_response.h"
-#include "mobile/put_file_request.h"
-#include "mobile/put_file_response.h"
-#include "mobile/read_did_request.h"
-#include "mobile/read_did_response.h"
-#include "mobile/register_app_interface_request.h"
-#include "mobile/register_app_interface_response.h"
-#include "mobile/reset_global_properties_request.h"
-#include "mobile/reset_global_properties_response.h"
-#include "mobile/scrollable_message_request.h"
-#include "mobile/scrollable_message_response.h"
-#include "mobile/send_location_request.h"
-#include "mobile/send_location_response.h"
-#include "mobile/set_app_icon_request.h"
-#include "mobile/set_app_icon_response.h"
-#include "mobile/set_display_layout_request.h"
-#include "mobile/set_display_layout_response.h"
-#include "mobile/set_global_properties_request.h"
-#include "mobile/set_global_properties_response.h"
-#include "mobile/set_media_clock_timer_request.h"
-#include "mobile/set_media_clock_timer_response.h"
-#include "mobile/show_constant_tbt_request.h"
-#include "mobile/show_constant_tbt_response.h"
-#include "mobile/show_request.h"
-#include "mobile/show_response.h"
-#include "mobile/slider_request.h"
-#include "mobile/slider_response.h"
-#include "mobile/speak_request.h"
-#include "mobile/speak_response.h"
-#include "mobile/subscribe_button_request.h"
-#include "mobile/subscribe_button_response.h"
-#include "mobile/subscribe_vehicle_data_request.h"
-#include "mobile/subscribe_vehicle_data_response.h"
-#include "mobile/subscribe_way_points_request.h"
-#include "mobile/subscribe_way_points_response.h"
-#include "mobile/system_response.h"
-#include "mobile/unregister_app_interface_request.h"
-#include "mobile/unregister_app_interface_response.h"
-#include "mobile/unsubscribe_button_request.h"
-#include "mobile/unsubscribe_button_response.h"
-#include "mobile/unsubscribe_vehicle_data_request.h"
-#include "mobile/unsubscribe_vehicle_data_response.h"
-#include "mobile/unsubscribe_way_points_request.h"
-#include "mobile/unsubscribe_way_points_response.h"
-#include "mobile/update_turn_list_request.h"
-#include "mobile/update_turn_list_response.h"
-
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "test/application_manager/mock_application_manager_settings.h"
-#include "application_manager/mock_event_dispatcher.h"
-
-namespace am = application_manager;
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace dummy_mobile_commands_test {
-
-namespace commands = ::application_manager::commands;
-
-using ::testing::_;
-using ::testing::NotNull;
-using ::testing::Types;
-using commands::MessageSharedPtr;
-using ::test::components::event_engine_test::MockEventDispatcher;
-using ::test::components::application_manager_test::MockApplicationManager;
-using ::test::components::application_manager_test::
- MockApplicationManagerSettings;
-using ::application_manager::ApplicationSharedPtr;
-using ::test::components::application_manager_test::MockApplication;
-
-namespace {
-const std::string kEmptyString_ = "";
-} // namespace
-
-template <class Command>
-class MobileCommandsTest : public components::commands_test::CommandRequestTest<
- CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-
- void InitCommand(const uint32_t& timeout) OVERRIDE {
- EXPECT_CALL(app_mngr_settings_, default_timeout())
- .WillOnce(ReturnRef(timeout));
- ON_CALL(app_mngr_, event_dispatcher())
- .WillByDefault(ReturnRef(event_dispatcher_));
- ON_CALL(app_mngr_, get_settings())
- .WillByDefault(ReturnRef(app_mngr_settings_));
- ON_CALL(app_mngr_settings_, app_icons_folder())
- .WillByDefault(ReturnRef(kEmptyString_));
- }
-};
-
-template <class Command>
-class MobileCommandsTestFirst : public MobileCommandsTest<Command> {
- public:
- using typename MobileCommandsTest<Command>::CommandType;
-};
-
-template <class Command>
-class MobileCommandsTestSecond : public MobileCommandsTest<Command> {
- public:
- using typename MobileCommandsTest<Command>::CommandType;
-};
-
-template <class Command>
-class MobileCommandsTestThird : public MobileCommandsTest<Command> {
- public:
- using typename MobileCommandsTest<Command>::CommandType;
-};
-
-/* macro TYPED_TEST_CASE takes max 50 args. That is why there are few
- * TYPED_TEST_CASE for HMI and mobile commands
- */
-
-typedef Types<commands::AddCommandRequest,
- commands::AddCommandResponse,
- commands::AddSubMenuRequest,
- commands::AddSubMenuResponse,
- commands::AlertManeuverRequest,
- commands::AlertManeuverResponse,
- commands::AlertRequest,
- commands::AlertResponse,
- commands::ChangeRegistrationRequest,
- commands::ChangeRegistrationResponse,
- commands::CreateInteractionChoiceSetRequest,
- commands::CreateInteractionChoiceSetResponse,
- commands::DeleteCommandRequest,
- commands::DeleteCommandResponse,
- commands::DeleteFileRequest,
- commands::DeleteFileResponse,
- commands::DeleteInteractionChoiceSetRequest,
- commands::DeleteInteractionChoiceSetResponse,
- commands::DeleteSubMenuRequest,
- commands::DeleteSubMenuResponse,
- commands::DiagnosticMessageRequest,
- commands::DiagnosticMessageResponse,
- commands::DialNumberRequest,
- commands::DialNumberResponse,
- commands::EndAudioPassThruRequest,
- commands::EndAudioPassThruResponse,
- commands::GenericResponse,
- commands::GetDTCsRequest,
- commands::GetDTCsResponse,
- commands::GetVehicleDataRequest,
- commands::GetVehicleDataResponse,
- commands::GetWayPointsRequest,
- commands::GetWayPointsResponse,
- commands::ListFilesRequest,
- commands::ListFilesResponse,
- commands::OnAppInterfaceUnregisteredNotification,
- commands::OnAudioPassThruNotification,
- commands::mobile::OnButtonEventNotification,
- commands::mobile::OnButtonPressNotification,
- commands::OnCommandNotification,
- commands::mobile::OnDriverDistractionNotification,
- commands::mobile::OnHashChangeNotification,
- commands::OnHMIStatusNotification,
- commands::OnHMIStatusNotificationFromMobile,
- commands::mobile::OnKeyBoardInputNotification,
- commands::OnLanguageChangeNotification,
- commands::OnPermissionsChangeNotification,
- commands::mobile::OnSystemRequestNotification,
- commands::OnTBTClientStateNotification,
- commands::mobile::OnTouchEventNotification>
- MobileCommandsListFirst;
-
-typedef Types<commands::OnVehicleDataNotification,
- commands::OnWayPointChangeNotification,
- commands::PerformAudioPassThruRequest,
- commands::PerformAudioPassThruResponse,
- commands::PerformInteractionRequest,
- commands::PerformInteractionResponse,
- commands::PutFileRequest,
- commands::PutFileResponse,
- commands::ReadDIDRequest,
- commands::ReadDIDResponse,
- commands::RegisterAppInterfaceRequest,
- commands::RegisterAppInterfaceResponse,
- commands::ResetGlobalPropertiesRequest,
- commands::ResetGlobalPropertiesResponse,
- commands::ScrollableMessageRequest,
- commands::ScrollableMessageResponse,
- commands::SendLocationRequest,
- commands::SendLocationResponse,
- commands::SetAppIconRequest,
- commands::SetAppIconResponse,
- commands::SetDisplayLayoutRequest,
- commands::SetDisplayLayoutResponse,
- commands::SetGlobalPropertiesRequest,
- commands::SetGlobalPropertiesResponse,
- commands::SetMediaClockRequest,
- commands::SetMediaClockTimerResponse,
- commands::ShowConstantTBTRequest,
- commands::ShowConstantTBTResponse,
- commands::ShowRequest,
- commands::ShowResponse,
- commands::SliderRequest,
- commands::SliderResponse,
- commands::SpeakRequest,
- commands::SpeakResponse,
- commands::SubscribeButtonRequest,
- commands::SubscribeButtonResponse,
- commands::SubscribeVehicleDataRequest,
- commands::SubscribeVehicleDataResponse,
- commands::SubscribeWayPointsRequest,
- commands::SubscribeWayPointsResponse,
- commands::SystemResponse,
- commands::UnregisterAppInterfaceRequest,
- commands::UnregisterAppInterfaceResponse,
- commands::UnsubscribeButtonRequest,
- commands::UnsubscribeButtonResponse,
- commands::UnsubscribeVehicleDataRequest> MobileCommandsListSecond;
-
-typedef Types<commands::UnsubscribeVehicleDataResponse,
- commands::UnSubscribeWayPointsRequest,
- commands::UnsubscribeWayPointsResponse,
- commands::UpdateTurnListRequest,
- commands::UpdateTurnListResponse> MobileCommandsListThird;
-
-TYPED_TEST_CASE(MobileCommandsTestFirst, MobileCommandsListFirst);
-TYPED_TEST_CASE(MobileCommandsTestSecond, MobileCommandsListSecond);
-TYPED_TEST_CASE(MobileCommandsTestThird, MobileCommandsListThird);
-
-TYPED_TEST(MobileCommandsTestFirst, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-
-TYPED_TEST(MobileCommandsTestSecond, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-TYPED_TEST(MobileCommandsTestThird, CtorAndDtorCall) {
- utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- UNUSED(command);
-}
-
-} // namespace dummy_mobile_commands_test
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/end_audio_pass_thru_request_test.cc b/src/components/application_manager/test/commands/mobile/end_audio_pass_thru_request_test.cc
deleted file mode 100644
index 6b1d909121..0000000000
--- a/src/components/application_manager/test/commands/mobile/end_audio_pass_thru_request_test.cc
+++ /dev/null
@@ -1,120 +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 <string>
-#include <vector>
-
-#include "application_manager/commands/mobile/end_audio_pass_thru_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace end_audio_pass_thru_request {
-
-namespace am = ::application_manager;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using am::commands::MessageSharedPtr;
-using am::commands::EndAudioPassThruRequest;
-using am::event_engine::Event;
-using am::MockMessageHelper;
-
-typedef SharedPtr<EndAudioPassThruRequest> EndAudioPassThruRequestPtr;
-
-class EndAudioPassThruRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(EndAudioPassThruRequestTest, OnEvent_UI_UNSUPPORTED_RESOUCRE) {
- const uint32_t kConnectionKey = 2u;
- const uint32_t app_id = kConnectionKey;
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- EndAudioPassThruRequestPtr command(
- CreateCommand<EndAudioPassThruRequest>(command_msg));
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::msg_params] = 0;
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- mobile_apis::Result::UNSUPPORTED_RESOURCE;
-
- Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
-
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*ui_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*ui_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-} // namespace end_audio_pass_thru_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc b/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc
deleted file mode 100644
index 106a59803b..0000000000
--- a/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc
+++ /dev/null
@@ -1,142 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/mobile/get_dtcs_request.h"
-#include "application_manager/mock_message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace get_dtcs_request {
-
-using ::testing::_;
-using ::testing::Return;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::GetDTCsRequest;
-using am::event_engine::Event;
-using am::MockMessageHelper;
-using testing::Mock;
-namespace mobile_result = mobile_apis::Result;
-
-typedef SharedPtr<GetDTCsRequest> GetDTCsRequestPtr;
-
-class GetDTCsRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- GetDTCsRequestTest() : CommandRequestTest<CommandsTestMocks::kIsNice>() {}
-};
-
-TEST_F(GetDTCsRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>());
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(GetDTCsRequestTest, Run_SUCCESS) {
- const uint32_t kConnectionKey = 2u;
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::dtc_mask] = 0;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::VehicleInfo_GetDTCs)));
-
- command->Run();
-}
-
-TEST_F(GetDTCsRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
- GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>());
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command->on_event(event);
-}
-
-TEST_F(GetDTCsRequestTest, OnEvent_SUCCESS) {
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::msg_params] = 0;
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- mobile_apis::Result::SUCCESS;
-
- Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
-
- GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>());
- command->on_event(event);
-}
-
-} // namespace get_dtcs_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/get_vehicle_data_request_test.cc b/src/components/application_manager/test/commands/mobile/get_vehicle_data_request_test.cc
deleted file mode 100644
index 52aed6feb8..0000000000
--- a/src/components/application_manager/test/commands/mobile/get_vehicle_data_request_test.cc
+++ /dev/null
@@ -1,254 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/mobile/get_vehicle_data_request.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace get_vehicle_data_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-namespace am = ::application_manager;
-using am::commands::MessageSharedPtr;
-using am::commands::GetVehicleDataRequest;
-using am::event_engine::Event;
-namespace mobile_result = mobile_apis::Result;
-
-typedef SharedPtr<GetVehicleDataRequest> GetVehicleDataRequestPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class GetVehicleDataRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-class UnwrappedGetVehicleDataRequest : public GetVehicleDataRequest {
- public:
- UnwrappedGetVehicleDataRequest(const MessageSharedPtr& message,
- am::ApplicationManager& application_manager)
- : GetVehicleDataRequest(message, application_manager) {}
-
- policy::RPCParams& get_disallowed_params() {
- return removed_parameters_permissions_.disallowed_params;
- }
-
- using GetVehicleDataRequest::on_event;
-};
-
-#ifdef HMI_DBUS_API
-// HMI_DBUS_API currently not supported
-#else
-
-TEST_F(GetVehicleDataRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- GetVehicleDataRequestPtr command(CreateCommand<GetVehicleDataRequest>());
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(GetVehicleDataRequestTest, Run_TooHighFrequency_UNSUCCESS) {
- const mobile_apis::FunctionID::eType kFunctionId =
- mobile_apis::FunctionID::GetVehicleDataID;
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::function_id] = kFunctionId;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- GetVehicleDataRequestPtr command(
- CreateCommand<GetVehicleDataRequest>(command_msg));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(
- *app,
- AreCommandLimitsExceeded(kFunctionId, am::TLimitSource::CONFIG_FILE))
- .WillOnce(Return(true));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::REJECTED), _));
-
- command->Run();
-}
-
-TEST_F(GetVehicleDataRequestTest, Run_EmptyMsgParams_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- GetVehicleDataRequestPtr command(
- CreateCommand<GetVehicleDataRequest>(command_msg));
-
- const am::VehicleData kEmptyVehicleData;
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(kEmptyVehicleData));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(GetVehicleDataRequestTest,
- Run_EmptyMsgParamsAndHasDisallowedParams_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- SharedPtr<UnwrappedGetVehicleDataRequest> command(
- CreateCommand<UnwrappedGetVehicleDataRequest>(command_msg));
-
- const am::VehicleData kEmptyVehicleData;
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillRepeatedly(ReturnRef(kEmptyVehicleData));
-
- policy::RPCParams& disallowed_params = command->get_disallowed_params();
- disallowed_params.insert("test_param");
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::DISALLOWED), _));
-
- command->Run();
-}
-
-TEST_F(GetVehicleDataRequestTest, Run_SUCCESS) {
- const std::string kMsgParamKey("test_key");
-
- 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] = true;
-
- GetVehicleDataRequestPtr command(
- CreateCommand<GetVehicleDataRequest>(command_msg));
-
- am::VehicleData vehicle_data;
- vehicle_data.insert(am::VehicleData::value_type(
- kMsgParamKey, mobile_apis::VehicleDataType::VEHICLEDATA_SPEED));
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(vehicle_data));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData)));
-
- command->Run();
-}
-
-TEST_F(GetVehicleDataRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- SharedPtr<UnwrappedGetVehicleDataRequest> command(
- CreateCommand<UnwrappedGetVehicleDataRequest>(command_msg));
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command->on_event(event);
-}
-
-TEST_F(GetVehicleDataRequestTest, OnEvent_DataNotAvailable_SUCCESS) {
- const hmi_apis::Common_Result::eType hmi_response_code =
- hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
- const mobile_result::eType mobile_response_code =
- mobile_result::DATA_NOT_AVAILABLE;
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- SharedPtr<UnwrappedGetVehicleDataRequest> command(
- CreateCommand<UnwrappedGetVehicleDataRequest>(command_msg));
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
- (*event_msg)[am::strings::params][am::strings::error_msg] = "test_error";
- (*event_msg)[am::strings::msg_params][am::hmi_response::method] = 0;
-
- Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
- event.set_smart_object(*event_msg);
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
-
- command->on_event(event);
-}
-
-#endif // HMI_DBUS_API
-
-} // namespace get_vehicle_data_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/get_way_points_request_test.cc b/src/components/application_manager/test/commands/mobile/get_way_points_request_test.cc
deleted file mode 100644
index 979fb0cc83..0000000000
--- a/src/components/application_manager/test/commands/mobile/get_way_points_request_test.cc
+++ /dev/null
@@ -1,284 +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 "utils/shared_ptr.h"
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "mobile/get_way_points_request.h"
-#include "application_manager/smart_object_keys.h"
-#include "mock_message_helper.h"
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_message_helper.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace get_way_points_request {
-
-using namespace mobile_apis::Result;
-using ::testing::Return;
-using ::testing::_;
-using application_manager::commands::GetWayPointsRequest;
-using application_manager::MockMessageHelper;
-using application_manager::MockHmiInterfaces;
-
-typedef SharedPtr<GetWayPointsRequest> CommandPtr;
-typedef mobile_apis::Result::eType MobileResult;
-typedef hmi_apis::Common_Result::eType HmiResult;
-
-namespace {
-const uint32_t kCorrelationId = 2u;
-const uint32_t kAppId = 3u;
-const uint32_t kConnectionKey = kAppId;
-const std::string kMethodName = "Navigation.GetWayPoints";
-}
-
-class GetWayPointsRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- GetWayPointsRequestTest() : mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- message_ = utils::MakeShared<SmartObject>(::smart_objects::SmartType_Map);
- (*message_)[am::strings::msg_params] =
- ::smart_objects::SmartObject(::smart_objects::SmartType_Map);
-
- command_sptr_ =
- CreateCommand<application_manager::commands::GetWayPointsRequest>(
- message_);
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
- }
-
- MockAppPtr mock_app_;
- MessageSharedPtr message_;
- utils::SharedPtr<application_manager::commands::GetWayPointsRequest>
- command_sptr_;
-};
-
-class GetWayPointsRequestOnEventTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- GetWayPointsRequestOnEventTest() : app_(CreateMockApp()) {}
-
- void CheckOnEventResponse(const std::string& wayPointsParam,
- const HmiResult ResultCode,
- const bool success) {
- Event event(Event::EventID::Navigation_GetWayPoints);
- CommandPtr command(CreateCommand<GetWayPointsRequest>());
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] = ResultCode;
- if ("0" == wayPointsParam) {
- (*event_msg)[am::strings::msg_params] = 0;
- } else {
- (*event_msg)[am::strings::msg_params][am::strings::way_points][0]["123"] =
- wayPointsParam;
- }
-
- event.set_smart_object(*event_msg);
-
- const MobileResult mobile_result = static_cast<MobileResult>(ResultCode);
-
- MessageSharedPtr result_msg(
- CatchMobileCommandResult(CallOnEvent(*command, event)));
- EXPECT_EQ(
- mobile_result,
- static_cast<MobileResult>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
- EXPECT_EQ(
- success,
- (*result_msg)[am::strings::msg_params][am::strings::success].asBool());
- }
-
- protected:
- MockAppPtr app_;
- MockHmiInterfaces hmi_interfaces_;
-};
-
-TEST_F(GetWayPointsRequestTest,
- Run_InvalidApp_ApplicationNotRegisteredResponce) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- utils::SharedPtr<am::Application> null_application_sptr;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(null_application_sptr));
-
- CallRun caller(*command_sptr_);
-
- MessageSharedPtr result_message = CatchMobileCommandResult(caller);
-
- const mobile_apis::Result::eType result =
- static_cast<mobile_apis::Result::eType>(
- (*result_message)[am::strings::msg_params][am::strings::result_code]
- .asInt());
-
- EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED, result);
-}
-
-TEST_F(GetWayPointsRequestTest, Run_ApplicationRegistered_Success) {
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- MockAppPtr application_sptr = CreateMockApp();
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(application_sptr));
- EXPECT_CALL(*application_sptr, app_id()).WillOnce(Return(1));
-
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(kCorrelationId));
-
- CallRun caller(*command_sptr_);
-
- MessageSharedPtr result_message = CatchHMICommandResult(caller);
-
- const hmi_apis::FunctionID::eType result_function_id =
- static_cast<hmi_apis::FunctionID::eType>(
- (*result_message)[am::strings::params][am::strings::function_id]
- .asInt());
-
- EXPECT_EQ(hmi_apis::FunctionID::Navigation_GetWayPoints, result_function_id);
- EXPECT_EQ(kCorrelationId,
- (*result_message)[am::strings::params][am::strings::correlation_id]
- .asUInt());
-}
-
-TEST_F(GetWayPointsRequestTest,
- OnEvent_NavigationGetWayPointsEvent_SendResponse) {
- am::event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints);
-
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
-
- event.set_smart_object(*message_);
-
- CallOnEvent caller(*command_sptr_, event);
-
- MessageSharedPtr result_message = CatchMobileCommandResult(caller);
-
- const mobile_apis::Result::eType result =
- static_cast<mobile_apis::Result::eType>(
- (*result_message)[am::strings::msg_params][am::strings::result_code]
- .asInt());
-
- EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
-}
-
-TEST_F(GetWayPointsRequestTest, OnEvent_DefaultCase) {
- am::event_engine::Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- event.set_smart_object(*message_);
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
-
- CallOnEvent caller(*command_sptr_, event);
- caller();
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_WrongEventId_UNSUCCESS) {
- Event event(Event::EventID::INVALID_ENUM);
- CommandPtr command(CreateCommand<GetWayPointsRequest>());
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->on_event(event);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_SUCCESS_Case1) {
- CheckOnEventResponse("0", HmiResult::SUCCESS, true);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_SUCCESS_Case2) {
- CheckOnEventResponse("", HmiResult::SUCCESS, true);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_SUCCESS_Case3) {
- CheckOnEventResponse("test", HmiResult::SUCCESS, true);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case1) {
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- CheckOnEventResponse(" ", HmiResult::GENERIC_ERROR, false);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case2) {
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- CheckOnEventResponse("test\t", HmiResult::GENERIC_ERROR, false);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case3) {
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- CheckOnEventResponse("test\n", HmiResult::GENERIC_ERROR, false);
-}
-
-TEST_F(GetWayPointsRequestOnEventTest, OnEvent_Expect_GENERIC_ERROR_Case4) {
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_Navigation))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- CheckOnEventResponse("test\t\n", HmiResult::GENERIC_ERROR, false);
-}
-
-} // namespace get_way_points_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/list_files_request_test.cc b/src/components/application_manager/test/commands/mobile/list_files_request_test.cc
deleted file mode 100644
index ae0e523832..0000000000
--- a/src/components/application_manager/test/commands/mobile/list_files_request_test.cc
+++ /dev/null
@@ -1,145 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/commands/mobile/list_files_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace list_files_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::DoAll;
-using ::testing::SaveArg;
-namespace am = ::application_manager;
-using am::commands::ListFilesRequest;
-using am::commands::MessageSharedPtr;
-
-class ListFilesRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- ListFilesRequestTest() : kStoragePath_("storage"), kResponseSize_(1) {}
- const std::string kStoragePath_;
- const uint32_t kResponseSize_;
-};
-
-TEST_F(ListFilesRequestTest, Run_AppNotRegistered_UNSUCCESS) {
- SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>());
-
- ON_CALL(app_mngr_, application(_))
- .WillByDefault(Return(SharedPtr<am::Application>()));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(ListFilesRequestTest, Run_TooManyHmiNone_UNSUCCESS) {
- MockAppPtr app(CreateMockApp());
- SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>());
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- ON_CALL(*app, hmi_level())
- .WillByDefault(Return(mobile_apis::HMILevel::HMI_NONE));
-
- const uint32_t kListFilesInNoneAllowed = 1u;
- const uint32_t kListFilesInNoneCount = 2u;
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillOnce(ReturnRef(app_mngr_settings_));
- ON_CALL(app_mngr_settings_, list_files_in_none())
- .WillByDefault(ReturnRef(kListFilesInNoneAllowed));
- ON_CALL(*app, list_files_in_none_count())
- .WillByDefault(Return(kListFilesInNoneCount));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::REJECTED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(ListFilesRequestTest, Run_SUCCESS) {
- MockAppPtr app(CreateMockApp());
- SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>());
-
- EXPECT_CALL(app_mngr_, get_settings())
- .WillRepeatedly(ReturnRef(app_mngr_settings_));
-
- ON_CALL(app_mngr_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kStoragePath_));
-
- ON_CALL(app_mngr_settings_, list_files_response_size())
- .WillByDefault(ReturnRef(kResponseSize_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- ON_CALL(*app, hmi_level())
- .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
-
- ON_CALL(*app, increment_list_files_in_none_count()).WillByDefault(Return());
-
- ON_CALL(*app, GetAvailableDiskSpace()).WillByDefault(Return(0));
-
- am::AppFilesMap files_map;
- ON_CALL(*app, getAppFiles()).WillByDefault(ReturnRef(files_map));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::SUCCESS,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-} // namespace list_files_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_button_notification_commands_test.cc b/src/components/application_manager/test/commands/mobile/on_button_notification_commands_test.cc
deleted file mode 100644
index 48f4497033..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_button_notification_commands_test.cc
+++ /dev/null
@@ -1,355 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-
-#include "application_manager/include/application_manager/commands/command_impl.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/commands/mobile/on_button_event_notification.h"
-#include "application_manager/commands/mobile/on_button_press_notification.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_button_notification {
-
-namespace am = ::application_manager;
-namespace commands = am::commands;
-
-using ::testing::_;
-using ::testing::Types;
-using ::testing::Return;
-
-using ::utils::SharedPtr;
-using am::commands::MessageSharedPtr;
-
-namespace {
-const uint32_t kAppId = 5u;
-const uint32_t kCustomButtonId = 3u;
-const mobile_apis::ButtonName::eType kButtonName = mobile_apis::ButtonName::OK;
-} // namespace
-
-template <class NotificationT,
- mobile_apis::FunctionID::eType kExpectedFunctionId>
-struct NotificationData {
- typedef NotificationT Notification;
- enum { kFunctionId = kExpectedFunctionId };
-};
-
-template <class NotificationDataT>
-class OnButtonNotificationCommandsTest
- : public CommandsTest<CommandsTestMocks::kNotNice>,
- public NotificationDataT {};
-
-typedef Types<NotificationData<commands::mobile::OnButtonEventNotification,
- mobile_apis::FunctionID::OnButtonEventID>,
- NotificationData<commands::mobile::OnButtonPressNotification,
- mobile_apis::FunctionID::OnButtonPressID> >
- OnButtonNotificationCommandsList;
-
-MATCHER_P(CheckNotificationMessage, function_id, "") {
- const bool kIsMobileProtocolTypeCorrect =
- (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- commands::CommandImpl::mobile_protocol_type_;
-
- const bool kIsProtocolVersionCorrect =
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- commands::CommandImpl::protocol_version_;
-
- const bool kIsNotificationCorrect =
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- am::MessageType::kNotification;
-
- const bool kIsFunctionIdCorrect =
- (*arg)[am::strings::params][am::strings::function_id].asInt() ==
- function_id;
-
- bool is_custom_button_id_correct = true;
- if ((*arg)[am::strings::msg_params].keyExists(
- am::hmi_response::custom_button_id)) {
- is_custom_button_id_correct =
- (*arg)[am::strings::msg_params][am::strings::custom_button_id] ==
- kCustomButtonId;
- }
-
- return kIsMobileProtocolTypeCorrect && kIsProtocolVersionCorrect &&
- kIsNotificationCorrect && kIsFunctionIdCorrect &&
- is_custom_button_id_correct;
-}
-
-TYPED_TEST_CASE(OnButtonNotificationCommandsTest,
- OnButtonNotificationCommandsList);
-
-TYPED_TEST(OnButtonNotificationCommandsTest,
- Run_CustomButton_NoAppId_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- mobile_apis::ButtonName::CUSTOM_BUTTON;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest,
- Run_CustomButton_NoCustomButtonId_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- mobile_apis::ButtonName::CUSTOM_BUTTON;
- (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
- EXPECT_CALL(this->app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest,
- Run_CustomButton_AppNotRegistered_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- mobile_apis::ButtonName::CUSTOM_BUTTON;
- (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*notification_msg)[am::strings::msg_params]
- [am::hmi_response::custom_button_id] = kCustomButtonId;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- EXPECT_CALL(this->app_mngr_, application(kAppId))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest,
- Run_CustomButton_AppNotSubscribedToCustomButtonId_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- mobile_apis::ButtonName::CUSTOM_BUTTON;
- (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*notification_msg)[am::strings::msg_params]
- [am::hmi_response::custom_button_id] = kCustomButtonId;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
- EXPECT_CALL(this->app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
-
- EXPECT_CALL(*mock_app, IsSubscribedToSoftButton(kCustomButtonId))
- .WillOnce(Return(false));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest, Run_CustomButton_SUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- mobile_apis::ButtonName::CUSTOM_BUTTON;
- (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*notification_msg)[am::strings::msg_params]
- [am::hmi_response::custom_button_id] = kCustomButtonId;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
- ON_CALL(*mock_app, hmi_level())
- .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
- EXPECT_CALL(this->app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, IsSubscribedToSoftButton(kCustomButtonId))
- .WillOnce(Return(true));
-
- EXPECT_CALL(this->app_mngr_,
- SendMessageToMobile(
- CheckNotificationMessage(TestFixture::kFunctionId), _));
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest, Run_NoSubscribedApps_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- kButtonName;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- const std::vector<ApplicationSharedPtr> empty_subscribed_apps_list;
- EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
- .WillOnce(Return(empty_subscribed_apps_list));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest, Run_InvalidHmiLevel_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- kButtonName;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
- std::vector<ApplicationSharedPtr> subscribed_apps_list;
- subscribed_apps_list.push_back(mock_app);
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_NONE));
-
- EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
- .WillOnce(Return(subscribed_apps_list));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest,
- Run_ButtonOkOnlyForHmiLevelFull_UNSUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- kButtonName;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
- std::vector<ApplicationSharedPtr> subscribed_apps_list;
- subscribed_apps_list.push_back(mock_app);
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_LIMITED));
-
- EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
- .WillOnce(Return(subscribed_apps_list));
-
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command->Run();
-}
-
-TYPED_TEST(OnButtonNotificationCommandsTest, Run_SUCCESS) {
- typedef typename TestFixture::Notification Notification;
-
- MessageSharedPtr notification_msg(
- this->CreateMessage(smart_objects::SmartType_Map));
-
- (*notification_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*notification_msg)[am::strings::msg_params][am::hmi_response::button_name] =
- kButtonName;
-
- SharedPtr<Notification> command(
- this->template CreateCommand<Notification>(notification_msg));
-
- typename TestFixture::MockAppPtr mock_app = this->CreateMockApp();
- std::vector<ApplicationSharedPtr> subscribed_apps_list;
- subscribed_apps_list.push_back(mock_app);
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
-
- ON_CALL(*mock_app, IsFullscreen()).WillByDefault(Return(true));
-
- EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
- .WillOnce(Return(subscribed_apps_list));
-
- EXPECT_CALL(this->app_mngr_,
- SendMessageToMobile(
- CheckNotificationMessage(TestFixture::kFunctionId), _));
-
- command->Run();
-}
-
-} // namespace on_button_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_command_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_command_notification_test.cc
deleted file mode 100644
index def324bfb6..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_command_notification_test.cc
+++ /dev/null
@@ -1,137 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/commands/mobile/on_command_notification.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_command_notification {
-
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::Return;
-
-using am::commands::MessageSharedPtr;
-using am::commands::OnCommandNotification;
-
-typedef ::utils::SharedPtr<OnCommandNotification> CommandPtr;
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kCommandId = 5u;
-} // namespace
-
-class OnCommandNotificationTest
- : public CommandsTest<CommandsTestMocks::kNotNice> {};
-
-TEST_F(OnCommandNotificationTest, Run_AppNotRegistered_UNSUCCESS) {
- CommandPtr command(CreateCommand<OnCommandNotification>());
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command->Run();
-}
-
-TEST_F(OnCommandNotificationTest, Run_NoAppsForTheCommand_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
-
- CommandPtr command(CreateCommand<OnCommandNotification>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
-
- EXPECT_CALL(*mock_app, FindCommand(kCommandId))
- .WillOnce(Return(static_cast<SmartObject*>(NULL)));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command->Run();
-}
-
-MATCHER(CheckNotificationMessage, "") {
- const bool kIsMobileProtocolTypeCorrect =
- (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- am::commands::CommandImpl::mobile_protocol_type_;
-
- const bool kIsProtocolVersionCorrect =
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- am::commands::CommandImpl::protocol_version_;
-
- const bool kIsNotificationCorrect =
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- am::MessageType::kNotification;
-
- return kIsMobileProtocolTypeCorrect && kIsProtocolVersionCorrect &&
- kIsNotificationCorrect;
-}
-
-TEST_F(OnCommandNotificationTest, Run_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*command_msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
-
- CommandPtr command(CreateCommand<OnCommandNotification>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
-
- MessageSharedPtr dummy_msg(CreateMessage());
- EXPECT_CALL(*mock_app, FindCommand(kCommandId))
- .WillOnce(Return(dummy_msg.get()));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(CheckNotificationMessage(), _));
-
- command->Run();
-}
-
-} // namespace on_command_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_hash_change_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_hash_change_notification_test.cc
deleted file mode 100644
index 6d7ccb1fa0..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_hash_change_notification_test.cc
+++ /dev/null
@@ -1,117 +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 <string>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/on_hash_change_notification.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_hash_change_notification {
-
-namespace strings = application_manager::strings;
-
-using application_manager::commands::mobile::OnHashChangeNotification;
-using application_manager::MockMessageHelper;
-using application_manager::commands::CommandImpl;
-using testing::Mock;
-using testing::Return;
-using testing::ReturnRef;
-using testing::_;
-
-class OnHashChangeNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(OnHashChangeNotificationTest, Run_ValidApp_SUCCESS) {
- const uint32_t kConnectionKey = 1u;
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
-
- SharedPtr<OnHashChangeNotification> command =
- CreateCommand<OnHashChangeNotification>(msg);
-
- std::string return_string = "1234";
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, curHash()).WillOnce(ReturnRef(return_string));
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
- .WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _));
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
- ASSERT_EQ(CommandImpl::mobile_protocol_type_,
- (*msg)[strings::params][strings::protocol_type].asInt());
- ASSERT_EQ(CommandImpl::protocol_version_,
- (*msg)[strings::params][strings::protocol_version].asInt());
- ASSERT_EQ(return_string,
- (*msg)[strings::msg_params][strings::hash_id].asString());
-}
-
-TEST_F(OnHashChangeNotificationTest, Run_InvalidApp_NoNotification) {
- const uint32_t kConnectionKey = 1u;
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
-
- SharedPtr<OnHashChangeNotification> command =
- CreateCommand<OnHashChangeNotification>(msg);
-
- std::string return_string;
- MockAppPtr mock_app = CreateMockApp();
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
- EXPECT_CALL(*mock_app, curHash()).Times(0);
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)).Times(0);
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-} // namespace on_hash_change_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc b/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc
deleted file mode 100644
index 78875ad164..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_from_mobile_test.cc
+++ /dev/null
@@ -1,282 +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 "application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include <application_manager/smart_object_keys.h>
-#include "application_manager/message.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/mock_message_helper.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_hmi_status_notification_from_mobile {
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const connection_handler::DeviceHandle kHandle = 2u;
-} // namespace
-
-namespace strings = application_manager::strings;
-
-using application_manager::commands::OnHMIStatusNotificationFromMobile;
-using protocol_handler::MajorProtocolVersion;
-using application_manager::ApplicationSet;
-using testing::Mock;
-using testing::Return;
-using testing::_;
-
-class OnHMIStatusNotificationFromMobileTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateMsgParams(
- const mobile_apis::HMILevel::eType kHMIState) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][strings::hmi_level] = kHMIState;
- return msg;
- }
- ApplicationSet app_set_;
- sync_primitives::Lock lock_;
-};
-
-TEST_F(OnHMIStatusNotificationFromMobileTest,
- Run_CurrentStateForeground_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_foreground(true));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
-
- DataAccessor<ApplicationSet> accessor(app_set_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
-
- EXPECT_CALL(*mock_app, protocol_version())
- .WillRepeatedly(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- EXPECT_CALL(*mock_app, is_foreground()).WillRepeatedly(Return(true));
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-TEST_F(OnHMIStatusNotificationFromMobileTest, Run_InvalidApp_NoNotification) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
- EXPECT_CALL(*mock_app, set_foreground(true)).Times(0);
-
- EXPECT_CALL(*mock_app, device()).Times(0);
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).Times(0);
-
- EXPECT_CALL(app_mngr_, applications()).Times(0);
-
- EXPECT_CALL(*mock_app, protocol_version()).Times(0);
- EXPECT_CALL(*mock_app, is_foreground()).Times(0);
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-TEST_F(OnHMIStatusNotificationFromMobileTest,
- Run_CurrentStateNotForeground_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_foreground(false));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
-
- DataAccessor<ApplicationSet> accessor(app_set_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
-
- EXPECT_CALL(*mock_app, protocol_version())
- .WillRepeatedly(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- EXPECT_CALL(*mock_app, is_foreground()).WillRepeatedly(Return(true));
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-TEST_F(OnHMIStatusNotificationFromMobileTest,
- Run_ProtocolVersionKV3_NoNotification) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_foreground(false));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
-
- DataAccessor<ApplicationSet> accessor(app_set_, lock_);
- EXPECT_CALL(app_mngr_, applications()).Times(0);
-
- EXPECT_CALL(*mock_app, protocol_version())
- .WillOnce(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3));
- EXPECT_CALL(*mock_app, is_foreground()).Times(0);
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-TEST_F(OnHMIStatusNotificationFromMobileTest,
- Run_AppNotRequestedBeforeAndKV3_NoNotification) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_foreground(true));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(false));
-
- EXPECT_CALL(app_mngr_, applications()).Times(0);
-
- EXPECT_CALL(*mock_app, protocol_version())
- .WillOnce(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3));
- EXPECT_CALL(*mock_app, is_foreground()).Times(0);
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-TEST_F(OnHMIStatusNotificationFromMobileTest,
- Run_AppNotRequestedBefore_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_foreground(true));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(false));
-
- EXPECT_CALL(*mock_app, protocol_version())
- .WillOnce(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
-
- EXPECT_CALL(app_mngr_, applications()).Times(0);
-
- EXPECT_CALL(*mock_app, is_foreground()).WillOnce(Return(true));
-
- EXPECT_CALL(mock_message_helper_, SendQueryApps(kConnectionKey, _));
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-TEST_F(OnHMIStatusNotificationFromMobileTest,
- Run_AnotherForegroundSDLApp_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotificationFromMobile> command =
- CreateCommand<OnHMIStatusNotificationFromMobile>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, set_foreground(true));
-
- EXPECT_CALL(*mock_app, device()).WillOnce(Return(kHandle));
- EXPECT_CALL(app_mngr_, IsAppsQueriedFrom(kHandle)).WillOnce(Return(true));
-
- DataAccessor<ApplicationSet> accessor(app_set_, lock_);
- EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(accessor));
-
- EXPECT_CALL(*mock_app, protocol_version())
- .WillRepeatedly(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
- EXPECT_CALL(*mock_app, is_foreground()).WillRepeatedly(Return(false));
-
- EXPECT_CALL(app_mngr_, MarkAppsGreyOut(kHandle, false));
- EXPECT_CALL(app_mngr_, SendUpdateAppList());
-
- command->Run();
-
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
-}
-
-} // namespace on_hmi_status_notification_from_mobile
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc
deleted file mode 100644
index acc7395cf3..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc
+++ /dev/null
@@ -1,167 +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 "application_manager/commands/mobile/on_hmi_status_notification.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/commands/command_impl.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_hmi_status_notification {
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-} // namespace
-
-namespace strings = application_manager::strings;
-
-using application_manager::commands::OnHMIStatusNotification;
-using protocol_handler::MajorProtocolVersion;
-using application_manager::MockMessageHelper;
-using application_manager::commands::CommandImpl;
-using testing::Mock;
-using testing::Return;
-using testing::_;
-
-class OnHMIStatusNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateMsgParams(
- const mobile_apis::HMILevel::eType kHMIState) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][strings::hmi_level] = kHMIState;
- return msg;
- }
-
- void SetSendNotificationExpectations(MessageSharedPtr& msg) {
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
- .WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _));
- }
-
- void VerifySendNotificationData(MessageSharedPtr& msg) {
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
- ASSERT_EQ(CommandImpl::mobile_protocol_type_,
- (*msg)[strings::params][strings::protocol_type].asInt());
- ASSERT_EQ(CommandImpl::protocol_version_,
- (*msg)[strings::params][strings::protocol_version].asInt());
- }
-};
-
-TEST_F(OnHMIStatusNotificationTest, Run_InvalidApp_NoNotification) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotification> command =
- CreateCommand<OnHMIStatusNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
-
- EXPECT_CALL(*mock_app, tts_properties_in_full()).Times(0);
- EXPECT_CALL(*mock_app, set_tts_properties_in_full(_)).Times(0);
- EXPECT_CALL(*mock_app, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, AddAppToTTSGlobalPropertiesList(kConnectionKey))
- .Times(0);
-
- command->Run();
-}
-
-TEST_F(OnHMIStatusNotificationTest, Run_InvalidEnum_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::INVALID_ENUM);
-
- SharedPtr<OnHMIStatusNotification> command =
- CreateCommand<OnHMIStatusNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- SetSendNotificationExpectations(msg);
-
- command->Run();
-
- VerifySendNotificationData(msg);
-}
-
-TEST_F(OnHMIStatusNotificationTest, Run_FullAndFalseProperties_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotification> command =
- CreateCommand<OnHMIStatusNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(*mock_app, tts_properties_in_full()).WillOnce(Return(false));
- EXPECT_CALL(*mock_app, set_tts_properties_in_full(true));
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey));
- EXPECT_CALL(app_mngr_, AddAppToTTSGlobalPropertiesList(kConnectionKey));
-
- SetSendNotificationExpectations(msg);
-
- command->Run();
-
- VerifySendNotificationData(msg);
-}
-
-TEST_F(OnHMIStatusNotificationTest, Run_FullAndTrueProperties_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL);
-
- SharedPtr<OnHMIStatusNotification> command =
- CreateCommand<OnHMIStatusNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(*mock_app, tts_properties_in_full()).WillOnce(Return(true));
-
- SetSendNotificationExpectations(msg);
-
- command->Run();
-
- VerifySendNotificationData(msg);
-}
-
-} // namespace on_hmi_status_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc
deleted file mode 100644
index 7313f32dca..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc
+++ /dev/null
@@ -1,164 +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 "application_manager/commands/mobile/on_keyboard_input_notification.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include <application_manager/smart_object_keys.h>
-#include "application_manager/message.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/commands/command_impl.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_keyboard_input_notification {
-
-namespace strings = application_manager::strings;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-} // namespace
-
-using application_manager::commands::mobile::OnKeyBoardInputNotification;
-using application_manager::MockMessageHelper;
-using application_manager::commands::CommandImpl;
-using application_manager::ApplicationSet;
-using testing::Mock;
-using testing::Return;
-using testing::_;
-
-class OnKeyBoardInputNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- void SetSendNotificationExpectations(MessageSharedPtr msg) {
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
- .WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _));
- }
-
- void SetSendNotificationVariables(MessageSharedPtr msg) {
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
- ASSERT_EQ(CommandImpl::mobile_protocol_type_,
- (*msg)[strings::params][strings::protocol_type].asInt());
- ASSERT_EQ(CommandImpl::protocol_version_,
- (*msg)[strings::params][strings::protocol_version].asInt());
- }
-
- MockAppPtr InitAppSetDataAccessor(SharedPtr<ApplicationSet>& app_set) {
- app_set = (!app_set ? ::utils::MakeShared<ApplicationSet>() : app_set);
- MockAppPtr app(CreateMockApp());
- app_set->insert(app);
- EXPECT_CALL(app_mngr_, applications())
- .WillOnce(Return(DataAccessor<ApplicationSet>(*app_set, lock_)));
- return app;
- }
-
- SharedPtr<ApplicationSet> app_set_;
- sync_primitives::Lock lock_;
-};
-
-TEST_F(OnKeyBoardInputNotificationTest, Run_ActionActive_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<OnKeyBoardInputNotification> command =
- CreateCommand<OnKeyBoardInputNotification>(msg);
-
- MockAppPtr mock_app(InitAppSetDataAccessor(app_set_));
- EXPECT_CALL(*mock_app, is_perform_interaction_active()).WillOnce(Return(1));
- EXPECT_CALL(*mock_app, perform_interaction_layout())
- .WillOnce(Return(mobile_apis::LayoutMode::KEYBOARD));
- EXPECT_CALL(*mock_app, hmi_level()).Times(0);
-
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey));
-
- SetSendNotificationExpectations(msg);
-
- command->Run();
-
- SetSendNotificationVariables(msg);
-
- ASSERT_EQ(kConnectionKey,
- (*msg)[strings::params][strings::connection_key].asInt());
-}
-
-TEST_F(OnKeyBoardInputNotificationTest, Run_ActionNotActive_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<OnKeyBoardInputNotification> command =
- CreateCommand<OnKeyBoardInputNotification>(msg);
-
- MockAppPtr mock_app(InitAppSetDataAccessor(app_set_));
- EXPECT_CALL(*mock_app, is_perform_interaction_active())
- .WillRepeatedly(Return(0));
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::eType::HMI_FULL));
-
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey));
-
- SetSendNotificationExpectations(msg);
-
- command->Run();
-
- SetSendNotificationVariables(msg);
-
- ASSERT_EQ(kConnectionKey,
- (*msg)[strings::params][strings::connection_key].asInt());
-}
-
-TEST_F(OnKeyBoardInputNotificationTest, Run_InvalidApp_NoNotification) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<OnKeyBoardInputNotification> command =
- CreateCommand<OnKeyBoardInputNotification>(msg);
-
- MockAppPtr mock_app(InitAppSetDataAccessor(app_set_));
- EXPECT_CALL(*mock_app, is_perform_interaction_active())
- .WillRepeatedly(Return(0));
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::eType::HMI_BACKGROUND));
-
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)).Times(0);
-
- command->Run();
-}
-
-} // namespace on_keyboard_input_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc
deleted file mode 100644
index 7840e35cec..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc
+++ /dev/null
@@ -1,206 +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 <string>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/on_system_request_notification.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_system_request_notification {
-
-namespace strings = application_manager::strings;
-
-using application_manager::commands::mobile::OnSystemRequestNotification;
-using application_manager::commands::CommandImpl;
-using application_manager::MockMessageHelper;
-using test::components::policy_test::MockPolicyHandlerInterface;
-using namespace mobile_apis;
-using testing::Mock;
-using testing::Return;
-using testing::ReturnRef;
-using testing::_;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-} // namespace
-
-class OnSystemRequestNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(OnSystemRequestNotificationTest, Run_ProprietaryType_SUCCESS) {
- const RequestType::eType kRequestType = RequestType::PROPRIETARY;
-
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][strings::request_type] = kRequestType;
-
- SharedPtr<OnSystemRequestNotification> command =
- CreateCommand<OnSystemRequestNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillRepeatedly(ReturnRef(mock_policy_handler));
- std::string policy_app_id;
- EXPECT_CALL(*mock_app, policy_app_id()).WillOnce(Return(policy_app_id));
- EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _))
- .WillOnce(Return(true));
-
-#ifdef PROPRIETARY_MODE
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .Times(2)
- .WillRepeatedly(ReturnRef(mock_policy_handler));
- EXPECT_CALL(mock_policy_handler, TimeoutExchangeSec()).WillOnce(Return(5u));
-#endif // PROPRIETARY_MODE
-
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
- .WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _));
-
- command->Run();
-
- ASSERT_EQ(FileType::JSON,
- (*msg)[strings::msg_params][strings::file_type].asInt());
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
- ASSERT_EQ(CommandImpl::mobile_protocol_type_,
- (*msg)[strings::params][strings::protocol_type].asInt());
- ASSERT_EQ(CommandImpl::protocol_version_,
- (*msg)[strings::params][strings::protocol_version].asInt());
-}
-
-TEST_F(OnSystemRequestNotificationTest, Run_HTTPType_SUCCESS) {
- const RequestType::eType kRequestType = RequestType::HTTP;
-
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][strings::request_type] = kRequestType;
-
- SharedPtr<OnSystemRequestNotification> command =
- CreateCommand<OnSystemRequestNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler));
- std::string policy_app_id;
- EXPECT_CALL(*mock_app, policy_app_id()).WillOnce(Return(policy_app_id));
- EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _))
- .WillOnce(Return(true));
-
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
- .WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _));
-
- command->Run();
-
- ASSERT_EQ(FileType::BINARY,
- (*msg)[strings::msg_params][strings::file_type].asInt());
- ASSERT_EQ(application_manager::MessageType::kNotification,
- (*msg)[strings::params][strings::message_type].asInt());
- ASSERT_EQ(CommandImpl::mobile_protocol_type_,
- (*msg)[strings::params][strings::protocol_type].asInt());
- ASSERT_EQ(CommandImpl::protocol_version_,
- (*msg)[strings::params][strings::protocol_version].asInt());
-}
-
-TEST_F(OnSystemRequestNotificationTest, Run_InvalidApp_NoNotification) {
- const RequestType::eType kRequestType = RequestType::HTTP;
-
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][strings::request_type] = kRequestType;
-
- SharedPtr<OnSystemRequestNotification> command =
- CreateCommand<OnSystemRequestNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
- EXPECT_CALL(app_mngr_, GetPolicyHandler()).Times(0);
- EXPECT_CALL(*mock_app, policy_app_id()).Times(0);
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _)).Times(0);
-
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)).Times(0);
-
- command->Run();
-}
-
-TEST_F(OnSystemRequestNotificationTest, Run_RequestNotAllowed_NoNotification) {
- const RequestType::eType kRequestType = RequestType::HTTP;
-
- MessageSharedPtr msg = CreateMessage();
- (*msg)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg)[strings::msg_params][strings::request_type] = kRequestType;
-
- SharedPtr<OnSystemRequestNotification> command =
- CreateCommand<OnSystemRequestNotification>(msg);
-
- MockAppPtr mock_app = CreateMockApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler));
- std::string policy_app_id;
- EXPECT_CALL(*mock_app, policy_app_id()).WillOnce(Return(policy_app_id));
- EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _))
- .WillOnce(Return(false));
-
- EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0);
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)).Times(0);
- ;
-
- command->Run();
-}
-
-} // namespace on_system_request_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_tbt_client_state_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_tbt_client_state_notification_test.cc
deleted file mode 100644
index 59cddc325f..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_tbt_client_state_notification_test.cc
+++ /dev/null
@@ -1,140 +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 <vector>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/on_tbt_client_state_notification.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "utils/helpers.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_tbt_client_state_notification {
-
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::Return;
-
-using am::commands::MessageSharedPtr;
-using am::commands::OnTBTClientStateNotification;
-
-typedef ::utils::SharedPtr<OnTBTClientStateNotification> NotificationPtr;
-
-namespace {
-const uint32_t kAppId = 1u;
-} // namespace
-
-class OnTBTClientStateNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- OnTBTClientStateNotificationTest()
- : command_(CreateCommand<OnTBTClientStateNotification>()) {}
-
- NotificationPtr command_;
-};
-
-TEST_F(OnTBTClientStateNotificationTest, Run_HmiLevelNone_UNSUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- std::vector<ApplicationSharedPtr> applications_with_navi;
- applications_with_navi.push_back(mock_app);
-
- EXPECT_CALL(app_mngr_, applications_with_navi())
- .WillOnce(Return(applications_with_navi));
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
-
- EXPECT_CALL(*mock_app, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command_->Run();
-}
-
-MATCHER(CheckMessageData, "") {
- const bool kIsMobileProtocolTypeCorrect =
- (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- am::commands::CommandImpl::mobile_protocol_type_;
-
- const bool kIsProtocolVersionCorrect =
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- am::commands::CommandImpl::protocol_version_;
-
- const bool kIsNotificationCorrect =
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- am::MessageType::kNotification;
-
- const bool kIsConnectionKeyCorrect =
- (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
- kAppId;
-
- using namespace helpers;
- return Compare<bool, EQ, ALL>(true,
- kIsMobileProtocolTypeCorrect,
- kIsProtocolVersionCorrect,
- kIsNotificationCorrect,
- kIsConnectionKeyCorrect);
-}
-
-TEST_F(OnTBTClientStateNotificationTest,
- Run_NotEmptyListOfAppsWithNavi_SUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- std::vector<ApplicationSharedPtr> applications_with_navi;
- applications_with_navi.push_back(mock_app);
-
- EXPECT_CALL(app_mngr_, applications_with_navi())
- .WillOnce(Return(applications_with_navi));
-
- EXPECT_CALL(*mock_app, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
-
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(CheckMessageData(), _));
-
- command_->Run();
-}
-
-} // namespace on_tbt_client_state_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_touch_event_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_touch_event_notification_test.cc
deleted file mode 100644
index c90991fdf7..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_touch_event_notification_test.cc
+++ /dev/null
@@ -1,149 +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 <vector>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/on_touch_event_notification.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "utils/helpers.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_touch_event_notification {
-
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::Return;
-
-using am::commands::MessageSharedPtr;
-using am::commands::mobile::OnTouchEventNotification;
-
-typedef ::utils::SharedPtr<OnTouchEventNotification> NotificationPtr;
-
-namespace {
-const uint32_t kAppId = 1u;
-} // namespace
-
-class OnTouchEventNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- OnTouchEventNotificationTest()
- : command_(CreateCommand<OnTouchEventNotification>()) {}
-
- NotificationPtr command_;
-};
-
-TEST_F(OnTouchEventNotificationTest, Run_AppIsNotFullscreen_UNSUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- std::vector<ApplicationSharedPtr> applications_with_navi;
- applications_with_navi.push_back(mock_app);
-
- std::vector<ApplicationSharedPtr> applications_with_mobile_projection;
- applications_with_mobile_projection.push_back(mock_app);
-
- EXPECT_CALL(app_mngr_, applications_with_navi())
- .WillOnce(Return(applications_with_navi));
-
- EXPECT_CALL(app_mngr_, applications_with_mobile_projection())
- .WillOnce(Return(applications_with_mobile_projection));
-
- EXPECT_CALL(*mock_app, IsFullscreen()).WillRepeatedly(Return(false));
-
- EXPECT_CALL(*mock_app, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(_, _)).Times(0);
-
- command_->Run();
-}
-
-MATCHER(CheckMessageData, "") {
- const bool kIsMobileProtocolTypeCorrect =
- (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- am::commands::CommandImpl::mobile_protocol_type_;
-
- const bool kIsProtocolVersionCorrect =
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- am::commands::CommandImpl::protocol_version_;
-
- const bool kIsNotificationCorrect =
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- am::MessageType::kNotification;
-
- const bool kIsConnectionKeyCorrect =
- (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
- kAppId;
-
- using namespace helpers;
- return Compare<bool, EQ, ALL>(true,
- kIsMobileProtocolTypeCorrect,
- kIsProtocolVersionCorrect,
- kIsNotificationCorrect,
- kIsConnectionKeyCorrect);
-}
-
-TEST_F(OnTouchEventNotificationTest, Run_NotEmptyListOfAppsWithNavi_SUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- std::vector<ApplicationSharedPtr> applications_with_navi;
- applications_with_navi.push_back(mock_app);
-
- std::vector<ApplicationSharedPtr> applications_with_mobile_projection;
- applications_with_mobile_projection.push_back(mock_app);
-
- EXPECT_CALL(app_mngr_, applications_with_navi())
- .WillOnce(Return(applications_with_navi));
-
- EXPECT_CALL(app_mngr_, applications_with_mobile_projection())
- .WillOnce(Return(applications_with_mobile_projection));
-
- EXPECT_CALL(*mock_app, IsFullscreen()).WillRepeatedly(Return(true));
-
- EXPECT_CALL(*mock_app, app_id()).WillRepeatedly(Return(kAppId));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(CheckMessageData(), _)).Times(2);
-
- command_->Run();
-}
-
-} // namespace on_touch_event_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_vehicle_data_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_vehicle_data_notification_test.cc
deleted file mode 100644
index 05d97856e4..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_vehicle_data_notification_test.cc
+++ /dev/null
@@ -1,148 +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 <vector>
-#include <map>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/on_vehicle_data_notification.h"
-#include "utils/shared_ptr.h"
-#include "utils/custom_string.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/mock_message_helper.h"
-#include "utils/helpers.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_vehicle_data_notification {
-
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-using am::commands::MessageSharedPtr;
-using am::commands::OnVehicleDataNotification;
-
-typedef ::utils::SharedPtr<OnVehicleDataNotification> NotificationPtr;
-
-namespace {
-const uint32_t kAppId = 1u;
-} // namespace
-
-class OnVehicleDataNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- OnVehicleDataNotificationTest()
- : command_msg_(CreateMessage(smart_objects::SmartType_Map))
- , command_(CreateCommand<OnVehicleDataNotification>(command_msg_)) {}
-
- MessageSharedPtr command_msg_;
- NotificationPtr command_;
-};
-
-MATCHER_P2(CheckMessageData, key, value, "") {
- const bool kIsMobileProtocolTypeCorrect =
- (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- am::commands::CommandImpl::mobile_protocol_type_;
-
- const bool kIsProtocolVersionCorrect =
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- am::commands::CommandImpl::protocol_version_;
-
- const bool kIsNotificationCorrect =
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- am::MessageType::kNotification;
-
- const bool kIsConnectionKeyCorrect =
- (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
- kAppId;
-
- const bool kAreMsgParamsCorrect =
- (*arg)[am::strings::msg_params][key].asInt() == value;
-
- using namespace helpers;
- return Compare<bool, EQ, ALL>(true,
- kIsMobileProtocolTypeCorrect,
- kIsProtocolVersionCorrect,
- kIsNotificationCorrect,
- kIsConnectionKeyCorrect,
- kAreMsgParamsCorrect);
-}
-
-TEST_F(OnVehicleDataNotificationTest,
- Run_NotEmptyListOfAppsSubscribedForEvent_SUCCESS) {
- am::VehicleData test_vehicle_data;
- test_vehicle_data.insert(am::VehicleData::value_type(
- am::strings::fuel_level,
- mobile_apis::VehicleDataType::VEHICLEDATA_FUELLEVEL));
-
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(test_vehicle_data));
-
- const int kFuelLevel = 100;
- (*command_msg_)[am::strings::msg_params][am::strings::fuel_level] =
- kFuelLevel;
-
- MockAppPtr mock_app(CreateMockApp());
- std::vector<ApplicationSharedPtr> applications;
- applications.push_back(mock_app);
-
- EXPECT_CALL(
- app_mngr_,
- IviInfoUpdated(mobile_apis::VehicleDataType::VEHICLEDATA_FUELLEVEL,
- kFuelLevel)).WillOnce(Return(applications));
-
- EXPECT_CALL(*mock_app, app_id()).WillRepeatedly(Return(kAppId));
- ::utils::custom_string::CustomString dummy_name("test_app");
- ON_CALL(*mock_app, name()).WillByDefault(ReturnRef(dummy_name));
-
- EXPECT_CALL(app_mngr_,
- SendMessageToMobile(
- CheckMessageData(am::strings::fuel_level, kFuelLevel), _));
-
- command_->Run();
-}
-
-} // namespace on_vehicle_data_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/on_way_point_change_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_way_point_change_notification_test.cc
deleted file mode 100644
index b0dd3c142c..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_way_point_change_notification_test.cc
+++ /dev/null
@@ -1,116 +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 <set>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/on_way_point_change_notification.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_impl.h"
-#include "utils/helpers.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace on_way_point_change_notification {
-
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::Return;
-
-using am::commands::MessageSharedPtr;
-using am::commands::OnWayPointChangeNotification;
-
-typedef ::utils::SharedPtr<OnWayPointChangeNotification> NotificationPtr;
-
-namespace {
-const uint32_t kAppId = 1u;
-} // namespace
-
-class OnWayPointChangeNotificationTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- OnWayPointChangeNotificationTest()
- : command_(CreateCommand<OnWayPointChangeNotification>()) {}
-
- NotificationPtr command_;
-};
-
-MATCHER(CheckMessageData, "") {
- const bool kIsMobileProtocolTypeCorrect =
- (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- am::commands::CommandImpl::mobile_protocol_type_;
-
- const bool kIsProtocolVersionCorrect =
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- am::commands::CommandImpl::protocol_version_;
-
- const bool kIsNotificationCorrect =
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- am::MessageType::kNotification;
-
- const bool kIsConnectionKeyCorrect =
- (*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
- kAppId;
-
- using namespace helpers;
- return Compare<bool, EQ, ALL>(true,
- kIsMobileProtocolTypeCorrect,
- kIsProtocolVersionCorrect,
- kIsNotificationCorrect,
- kIsConnectionKeyCorrect);
-}
-
-TEST_F(OnWayPointChangeNotificationTest,
- Run_NotEmptyListOfAppsSubscribedForWayPoints_SUCCESS) {
- std::set<int32_t> apps_subscribed_for_way_points;
- apps_subscribed_for_way_points.insert(kAppId);
-
- EXPECT_CALL(app_mngr_, GetAppsSubscribedForWayPoints())
- .WillOnce(Return(apps_subscribed_for_way_points));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(CheckMessageData(), _));
-
- command_->Run();
-}
-
-} // namespace on_way_point_change_notification
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/perform_audio_pass_thru_test.cc b/src/components/application_manager/test/commands/mobile/perform_audio_pass_thru_test.cc
deleted file mode 100644
index a27bac970c..0000000000
--- a/src/components/application_manager/test/commands/mobile/perform_audio_pass_thru_test.cc
+++ /dev/null
@@ -1,801 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/perform_audio_pass_thru_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace perform_audio_pass_thru_request {
-
-namespace am = application_manager;
-using am::commands::PerformAudioPassThruRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::InSequence;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 2u;
-const std::string kCorrectPrompt = "CorrectPrompt";
-const std::string kCorrectType = "CorrectType";
-const std::string kCorrectDisplayText1 = "CorrectDisplayText1";
-const std::string kCorrectDisplayText2 = "CorrectDisplayText2";
-const std::string kFunctionId = "FunctionId";
-const uint32_t kTimeoutForTTSSpeak = 1u;
-} // namespace
-
-class PerformAudioPassThruRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- PerformAudioPassThruRequestTest()
- : mock_app_(CreateMockApp())
- , message_(utils::MakeShared<SmartObject>(::smart_objects::SmartType_Map))
- , msg_params_((*message_)[am::strings::msg_params]) {}
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void TestWrongSyntaxInField(const std::string& field) {
- if (field == am::strings::initial_prompt) {
- msg_params_[field][0][am::strings::text] = "prompt\\n";
- } else {
- msg_params_[field] = "prompt\\n";
- }
-
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- CallRun caller(*command_sptr_);
- MessageSharedPtr result_message = CatchMobileCommandResult(caller);
-
- const am::mobile_api::Result::eType result =
- static_cast<am::mobile_api::Result::eType>(
- (*result_message)[am::strings::msg_params][am::strings::result_code]
- .asInt());
-
- EXPECT_EQ(am::mobile_api::Result::INVALID_DATA, result);
- }
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- (*message_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- command_sptr_ =
- CreateCommand<am::commands::PerformAudioPassThruRequest>(message_);
-
- application_sptr_ = CreateMockApp();
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(application_sptr_));
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- sync_primitives::Lock lock_;
- MockAppPtr mock_app_;
- MessageSharedPtr message_;
- ::smart_objects::SmartObject& msg_params_;
- utils::SharedPtr<am::commands::PerformAudioPassThruRequest> command_sptr_;
- MockAppPtr application_sptr_;
-};
-
-TEST_F(PerformAudioPassThruRequestTest, OnTimeout_GENERIC_ERROR) {
- MessageSharedPtr msg_ui = CreateMessage(smart_objects::SmartType_Map);
- (*msg_ui)[am::strings::msg_params][am::strings::result_code] =
- am::mobile_api::Result::GENERIC_ERROR;
- (*msg_ui)[am::strings::msg_params][am::strings::success] = false;
-
- MessageSharedPtr message =
- utils::MakeShared<SmartObject>(::smart_objects::SmartType_Map);
- (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
-
- utils::SharedPtr<PerformAudioPassThruRequest> command =
- CreateCommand<PerformAudioPassThruRequest>(message);
-
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(true));
- EXPECT_CALL(app_mngr_, StopAudioPassThru(_));
-
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
- .WillOnce(Return(msg_ui));
-
- MessageSharedPtr vr_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
-
- command->onTimeOut();
- EXPECT_EQ((*vr_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- false);
- EXPECT_EQ(
- (*vr_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- OnEvent_UIHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr mobile_request = CreateFullParamsUISO();
- (*mobile_request)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- smart_objects::SmartObject initial_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- initial_prompt[0] = smart_objects::SmartObject(smart_objects::SmartType_Map);
- initial_prompt[0][am::strings::text] = "tts chunk text";
- initial_prompt[0][am::strings::type] = 0;
- (*mobile_request)[am::strings::msg_params][am::strings::initial_prompt] =
- initial_prompt;
-
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
- utils::SharedPtr<PerformAudioPassThruRequest> command =
- CreateCommand<PerformAudioPassThruRequest>(mobile_request);
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- MessageSharedPtr response_msg_tts =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_msg_tts)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*response_msg_tts)[am::strings::msg_params][am::strings::cmd_id] = kCmdId;
- am::event_engine::Event event_tts(hmi_apis::FunctionID::TTS_Speak);
- event_tts.set_smart_object(*response_msg_tts);
-
- MessageSharedPtr response_ui = CreateMessage(smart_objects::SmartType_Map);
- (*response_ui)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*response_ui)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
- (*response_ui)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
- am::event_engine::Event event_ui(
- hmi_apis::FunctionID::UI_PerformAudioPassThru);
- event_ui.set_smart_object(*response_ui);
-
- MessageSharedPtr response_to_mobile;
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillRepeatedly(Return(true));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->Run();
- command->on_event(event_tts);
- command->on_event(event_ui);
-
- EXPECT_EQ((*response_to_mobile)[am::strings::msg_params][am::strings::success]
- .asBool(),
- false);
- EXPECT_EQ(
- (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*response_to_mobile)[am::strings::msg_params][am::strings::info]
- .asString(),
- "UI is not supported by system");
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_InvalidApp_ApplicationNotRegisteredResponce) {
- utils::SharedPtr<am::Application> null_application_sptr;
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(null_application_sptr));
-
- CallRun caller(*command_sptr_);
- MessageSharedPtr result_message = CatchMobileCommandResult(caller);
-
- const am::mobile_api::Result::eType result =
- static_cast<am::mobile_api::Result::eType>(
- (*result_message)[am::strings::msg_params][am::strings::result_code]
- .asInt());
- EXPECT_EQ(am::mobile_api::Result::APPLICATION_NOT_REGISTERED, result);
-}
-
-TEST_F(PerformAudioPassThruRequestTest, Run_HmiLevelNone_Rejected) {
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_NONE));
-
- CallRun caller(*command_sptr_);
- MessageSharedPtr result_message = CatchMobileCommandResult(caller);
-
- const am::mobile_api::Result::eType result =
- static_cast<am::mobile_api::Result::eType>(
- (*result_message)[am::strings::msg_params][am::strings::result_code]
- .asInt());
- EXPECT_EQ(am::mobile_api::Result::REJECTED, result);
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_WhitespaceInInitialPrompt_InvalidData) {
- TestWrongSyntaxInField(am::strings::initial_prompt);
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_WhitespaceInAudioPassDisplayText1_InvalidData) {
- TestWrongSyntaxInField(am::strings::audio_pass_display_text1);
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_WhitespaceInAudioPassDisplayText2_InvalidData) {
- TestWrongSyntaxInField(am::strings::audio_pass_display_text2);
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_InitPromptCorrect_TTSSpeakIsAbsent) {
- // First we need to call SendSpeakRequest()
- // to enable the "is_active_tts_speak" key
-
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- msg_params_[am::strings::initial_prompt][0][am::strings::text] =
- kCorrectPrompt;
- msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
-
- MessageSharedPtr speak_reqeust_result_msg;
- MessageSharedPtr perform_result_msg;
- {
- InSequence dummy;
- // Send speak request sending
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
-
- // Perform audio path thru request sending
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
- }
- CallRun run_caller(*command_sptr_);
- run_caller();
-
- const ::smart_objects::SmartObject& speak_msg_params =
- (*speak_reqeust_result_msg)[am::strings::msg_params];
-
- const std::string result_initial_prompt =
- speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::text]
- .asString();
- const std::string result_prompt_type =
- speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::type]
- .asString();
-
- EXPECT_EQ(kCorrectPrompt, result_initial_prompt);
- EXPECT_EQ(kCorrectType, result_prompt_type);
-
- // Now we recieve on_event()
-
- am::event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::GENERIC_ERROR;
- event.set_smart_object(*message_);
-
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
-
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_StopSpeaking))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- CallOnEvent on_event_caller(*command_sptr_, event);
- MessageSharedPtr command_result = CatchHMICommandResult(on_event_caller);
-
- const hmi_apis::FunctionID::eType result_function_id =
- static_cast<hmi_apis::FunctionID::eType>(
- (*command_result)[am::strings::params][am::strings::function_id]
- .asInt());
-
- EXPECT_EQ(hmi_apis::FunctionID::TTS_StopSpeaking, result_function_id);
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_InitPromptCorrect_SpeakAndPerformAPTRequestsSendMuteTrue) {
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- msg_params_[am::strings::initial_prompt][0][am::strings::text] =
- kCorrectPrompt;
- msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
- msg_params_[am::strings::audio_pass_display_text1] = kCorrectDisplayText1;
- msg_params_[am::strings::audio_pass_display_text2] = kCorrectDisplayText2;
-
- MessageSharedPtr speak_reqeust_result_msg;
- MessageSharedPtr perform_result_msg;
- {
- InSequence dummy;
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
-
- // Perform audio path thru request sending
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
- }
- CallRun caller(*command_sptr_);
- caller();
-
- const ::smart_objects::SmartObject& speak_msg_params =
- (*speak_reqeust_result_msg)[am::strings::msg_params];
- const ::smart_objects::SmartObject& perform_msg_params =
- (*perform_result_msg)[am::strings::msg_params];
-
- const std::string result_initial_prompt =
- speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::text]
- .asString();
- const std::string result_prompt_type =
- speak_msg_params[am::hmi_request::tts_chunks][0][am::strings::type]
- .asString();
- const std::string result_display_text_1 =
- perform_msg_params[am::hmi_request::audio_pass_display_texts][0]
- [am::hmi_request::field_text].asString();
- const std::string result_display_text_2 =
- perform_msg_params[am::hmi_request::audio_pass_display_texts][1]
- [am::hmi_request::field_text].asString();
-
- EXPECT_EQ(kCorrectPrompt, result_initial_prompt);
- EXPECT_EQ(kCorrectType, result_prompt_type);
- EXPECT_EQ(kCorrectDisplayText1, result_display_text_1);
- EXPECT_EQ(kCorrectDisplayText2, result_display_text_2);
-
- EXPECT_EQ(true, perform_msg_params[am::strings::mute_audio].asBool());
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- Run_InitPromptCorrect_SpeakAndPerformAPTRequestsSendMuteFalse) {
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- msg_params_[am::strings::initial_prompt][0][am::strings::text] =
- kCorrectPrompt;
- msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
-
- const bool muted = false;
-
- msg_params_[am::strings::mute_audio] = muted;
-
- MessageSharedPtr speak_reqeust_result_msg;
- MessageSharedPtr perform_result_msg;
- {
- InSequence dummy;
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
-
- // Perform audio path thru request sending
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
- }
- CallRun caller(*command_sptr_);
- caller();
-
- EXPECT_EQ(
- muted,
- (*perform_result_msg)[am::strings::msg_params][am::strings::mute_audio]
- .asBool());
-}
-
-TEST_F(
- PerformAudioPassThruRequestTest,
- Run_InitPromptEmpty_PerformAndRecordStartNotificationsAndStartRecording) {
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- MessageSharedPtr start_record_result_msg;
- MessageSharedPtr perform_result_msg;
- {
- InSequence dummy;
-
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- // Perform audio path thru request sending
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
-
- // Perform audio path thru request sending
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_OnRecordStart))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- // Start recording notification sending
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&start_record_result_msg), Return(true)));
- }
-
- // Start microphone recording cals
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id));
- EXPECT_CALL(app_mngr_, StartAudioPassThruThread(_, _, _, _, _, _));
-
- CallRun caller(*command_sptr_);
- caller();
-
- const hmi_apis::FunctionID::eType start_record_result_function_id =
- static_cast<hmi_apis::FunctionID::eType>(
- (*start_record_result_msg)[am::strings::params]
- [am::strings::function_id].asInt());
- EXPECT_EQ(hmi_apis::FunctionID::UI_OnRecordStart,
- start_record_result_function_id);
-}
-
-TEST_F(PerformAudioPassThruRequestTest, OnEvent_UIPAPT_Rejected) {
- am::event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
-
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::REJECTED;
- event.set_smart_object(*message_);
-
- CallOnEvent caller(*command_sptr_, event);
-
- MessageSharedPtr result_message = CatchMobileCommandResult(caller);
-
- const am::mobile_api::Result::eType result_code =
- static_cast<am::mobile_api::Result::eType>(
- (*result_message)[am::strings::msg_params][am::strings::result_code]
- .asInt());
-
- EXPECT_EQ(am::mobile_api::Result::REJECTED, result_code);
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- OnEvent_TTSSpeakSuccess_UpdateRequestTimeout) {
- am::event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
-
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- event.set_smart_object(*message_);
-
- // Start recording notification sending
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
-
- // Start microphone recording cals
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id));
- EXPECT_CALL(app_mngr_, StartAudioPassThruThread(_, _, _, _, _, _));
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
-
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- CallOnEvent caller(*command_sptr_, event);
- caller();
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- DISABLED_OnEvent_PAPTunsupportedResource_CorrectInfo) {
- const std::string return_info = "Unsupported phoneme type sent in a prompt";
-
- am::event_engine::Event event_speak(hmi_apis::FunctionID::TTS_Speak);
- am::event_engine::Event event_perform(
- hmi_apis::FunctionID::UI_PerformAudioPassThru);
-
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- event_speak.set_smart_object(*message_);
-
- (*message_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- event_perform.set_smart_object(*message_);
-
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- // First call on_event for setting result_tts_speak_ to UNSUPPORTED_RESOURCE
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
- CallOnEvent caller_speak(*command_sptr_, event_speak);
- caller_speak();
-
- // Second call for test correct behavior of UI_PerformAudioPassThru event
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(false));
- EXPECT_CALL(app_mngr_, StopAudioPassThru(_)).Times(0);
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- CallOnEvent caller_perform(*command_sptr_, event_perform);
-
- MessageSharedPtr perform_event_result =
- CatchMobileCommandResult(caller_perform);
-
- EXPECT_EQ(return_info,
- (*perform_event_result)[am::strings::msg_params][am::strings::info]
- .asString());
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- DISABLED_OnEvent_TTSSpeak_UpdateTimeout) {
- am::event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
-
- msg_params_[am::strings::connection_key] = kConnectionKey;
- msg_params_[am::strings::function_id] = kFunctionId;
- msg_params_[am::strings::correlation_id] = kCorrelationId;
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
-
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id)).WillOnce(Return(true));
-
- EXPECT_CALL(
- app_mngr_,
- StartAudioPassThruThread(kConnectionKey, kCorrelationId, _, _, _, _));
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- CallOnEvent caller(*command_sptr_, event);
- caller();
-
- EXPECT_EQ(kConnectionKey, msg_params_[am::strings::connection_key].asUInt());
- EXPECT_EQ(kFunctionId, msg_params_[am::strings::function_id].asString());
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- DISABLED_OnEvent_TTSOnResetTimeout_UpdateTimeout) {
- am::event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout);
-
- msg_params_[am::strings::connection_key] = kConnectionKey;
- msg_params_[am::strings::function_id] = kFunctionId;
-
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
- EXPECT_CALL(app_mngr_, BeginAudioPassThru(app_id)).WillOnce(Return(true));
-
- EXPECT_CALL(
- app_mngr_,
- StartAudioPassThruThread(kConnectionKey, kCorrelationId, _, _, _, _));
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- CallOnEvent caller(*command_sptr_, event);
- caller();
-
- EXPECT_EQ(kConnectionKey, msg_params_[am::strings::connection_key].asUInt());
- EXPECT_EQ(kFunctionId, msg_params_[am::strings::function_id].asString());
-}
-
-TEST_F(PerformAudioPassThruRequestTest, OnEvent_DefaultCase) {
- am::event_engine::Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).Times(0);
-
- CallOnEvent caller(*command_sptr_, event);
- caller();
-}
-
-TEST_F(PerformAudioPassThruRequestTest, Init_CorrectTimeout) {
- const uint32_t kDefaultTimeout = command_sptr_->default_timeout();
- const uint32_t kMaxDuration = 10000u;
-
- msg_params_[am::strings::max_duration] = kMaxDuration;
-
- command_sptr_->Init();
-
- EXPECT_EQ(kDefaultTimeout + kMaxDuration, command_sptr_->default_timeout());
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- onTimeOut_ttsSpeakNotActive_DontSendHMIReqeust) {
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(true));
- EXPECT_CALL(app_mngr_, StopAudioPassThru(_));
-
- // For setting current_state_ -> kCompleted
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- command_sptr_->SendResponse(true, am::mobile_api::Result::SUCCESS);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
-
- command_sptr_->onTimeOut();
-}
-
-TEST_F(PerformAudioPassThruRequestTest,
- DISABLED_onTimeOut_ttsSpeakActive_SendHMIReqeust) {
- uint32_t app_id = kConnectionKey;
- EXPECT_CALL(app_mngr_, EndAudioPassThru(app_id)).WillOnce(Return(true));
- EXPECT_CALL(app_mngr_, StopAudioPassThru(_));
-
- EXPECT_CALL(*application_sptr_, hmi_level())
- .WillOnce(Return(am::mobile_api::HMILevel::HMI_FULL));
-
- msg_params_[am::strings::initial_prompt][0][am::strings::text] =
- kCorrectPrompt;
- msg_params_[am::strings::initial_prompt][0][am::strings::type] = kCorrectType;
- MessageSharedPtr speak_reqeust_result_msg;
- MessageSharedPtr perform_result_msg;
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_Speak))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&speak_reqeust_result_msg), Return(true)));
-
- // Perform audio path thru request sending
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_PerformAudioPassThru))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&perform_result_msg), Return(true)));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
- .WillOnce(Return(msg));
-
- // For setting is_active_tts_speak -> true
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .Times(2)
- .WillRepeatedly(Return(false));
- CallRun caller(*command_sptr_);
- caller();
-
- // For setting current_state_ -> kCompleted
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, am::commands::Command::ORIGIN_SDL));
- command_sptr_->SendResponse(true, am::mobile_api::Result::SUCCESS);
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_StopSpeaking)))
- .WillOnce(Return(false));
-
- command_sptr_->onTimeOut();
-}
-
-} // namespace perform_audio_pass_thru_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/perform_interaction_test.cc b/src/components/application_manager/test/commands/mobile/perform_interaction_test.cc
deleted file mode 100644
index a272234e82..0000000000
--- a/src/components/application_manager/test/commands/mobile/perform_interaction_test.cc
+++ /dev/null
@@ -1,262 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/perform_interaction_request.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/helpers.h"
-#include "utils/make_shared.h"
-#include "smart_objects/smart_object.h"
-#include "utils/custom_string.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace perform_interaction_request {
-
-namespace am = application_manager;
-using am::commands::CommandImpl;
-using am::ApplicationManager;
-using am::commands::MessageSharedPtr;
-using am::ApplicationSharedPtr;
-using am::MockMessageHelper;
-using ::testing::_;
-using ::utils::SharedPtr;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using am::commands::PerformInteractionRequest;
-using ::test::components::application_manager_test::MockApplication;
-
-namespace strings = ::application_manager::strings;
-namespace hmi_response = ::application_manager::hmi_response;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class PerformInteractionRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- PerformInteractionRequestTest() : mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- sync_primitives::Lock lock_;
- MockAppPtr mock_app_;
-};
-
-TEST_F(PerformInteractionRequestTest, OnTimeout_VR_GENERIC_ERROR) {
- MessageSharedPtr response_msg_vr =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_msg_vr)[strings::params][hmi_response::code] =
- static_cast<uint64_t>(hmi_apis::Common_Result::SUCCESS);
- (*response_msg_vr)[strings::msg_params][strings::info] = "info";
- MessageSharedPtr request_msg = CreateMessage(smart_objects::SmartType_Map);
- (*request_msg)[strings::msg_params][strings::interaction_mode] =
- mobile_apis::InteractionMode::BOTH;
- utils::SharedPtr<PerformInteractionRequest> command =
- CreateCommand<PerformInteractionRequest>(request_msg);
- MockAppPtr mock_app;
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
-
- Event event(hmi_apis::FunctionID::VR_PerformInteraction);
- event.set_smart_object(*response_msg_vr);
-
- command->Init();
- command->on_event(event);
- MessageSharedPtr response_to_mobile =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_to_mobile)[strings::msg_params][strings::result_code] =
- static_cast<uint64_t>(am::mobile_api::Result::GENERIC_ERROR);
- EXPECT_CALL(
- mock_message_helper_,
- CreateNegativeResponse(_, _, _, am::mobile_api::Result::GENERIC_ERROR))
- .WillOnce(Return(response_to_mobile));
-
- MessageSharedPtr vr_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
- command->onTimeOut();
-
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::success].asBool(),
- false);
- EXPECT_EQ(
- (*vr_command_result)[strings::msg_params][strings::result_code].asInt(),
- static_cast<int32_t>(am::mobile_api::Result::GENERIC_ERROR));
-}
-
-TEST_F(PerformInteractionRequestTest,
- OnEvent_VRHmiSendSuccess_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_from_mobile =
- CreateMessage(smart_objects::SmartType_Map);
- (*msg_from_mobile)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg_from_mobile)[strings::msg_params][strings::interaction_mode] =
- mobile_apis::InteractionMode::VR_ONLY;
- utils::SharedPtr<PerformInteractionRequest> command =
- CreateCommand<PerformInteractionRequest>(msg_from_mobile);
- command->Init();
-
- MockAppPtr mock_app;
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app));
-
- MessageSharedPtr response_msg_vr =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_msg_vr)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*response_msg_vr)[strings::msg_params][strings::cmd_id] = kCommandId;
- (*response_msg_vr)[am::strings::msg_params][am::strings::info] =
- "VR is not supported by system";
-
- am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_PerformInteraction);
- event_vr.set_smart_object(*response_msg_vr);
-
- MessageSharedPtr response_msg_ui =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_msg_ui)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
-
- am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_PerformInteraction);
- event_ui.set_smart_object(*response_msg_ui);
-
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- MessageSharedPtr response_to_mobile;
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_vr);
- command->on_event(event_ui);
-
- ResultCommandExpectations(response_to_mobile,
- "VR is not supported by system");
-}
-
-TEST_F(PerformInteractionRequestTest,
- OnEvent_UIHmiSendSuccess_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_from_mobile =
- CreateMessage(smart_objects::SmartType_Map);
- (*msg_from_mobile)[strings::params][strings::connection_key] = kConnectionKey;
- (*msg_from_mobile)[strings::msg_params][strings::interaction_mode] =
- mobile_apis::InteractionMode::VR_ONLY;
- utils::SharedPtr<PerformInteractionRequest> command =
- CreateCommand<PerformInteractionRequest>(msg_from_mobile);
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- MessageSharedPtr response_msg_vr =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_msg_vr)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- am::event_engine::Event event_vr(hmi_apis::FunctionID::VR_PerformInteraction);
- event_vr.set_smart_object(*response_msg_vr);
-
- MessageSharedPtr response_msg_ui =
- CreateMessage(smart_objects::SmartType_Map);
- (*response_msg_ui)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*response_msg_ui)[strings::msg_params][strings::cmd_id] = kCommandId;
- (*response_msg_ui)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
-
- am::event_engine::Event event_ui(hmi_apis::FunctionID::UI_PerformInteraction);
- event_ui.set_smart_object(*response_msg_ui);
-
- MessageSharedPtr response_to_mobile;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_vr);
-
- EXPECT_CALL(*mock_app_, is_perform_interaction_active())
- .WillOnce(Return(false));
- EXPECT_CALL(*mock_app_, DeletePerformInteractionChoiceSet(_));
-
- command->on_event(event_ui);
-
- ResultCommandExpectations(response_to_mobile,
- "UI is not supported by system");
-}
-
-} // namespace perform_interaction_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/put_file_test.cc b/src/components/application_manager/test/commands/mobile/put_file_test.cc
deleted file mode 100644
index b48ac67501..0000000000
--- a/src/components/application_manager/test/commands/mobile/put_file_test.cc
+++ /dev/null
@@ -1,351 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-
-#include "mobile/put_file_response.h"
-#include "mobile/put_file_request.h"
-
-#include "utils/make_shared.h"
-#include "utils/file_system.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace put_file {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::AtLeast;
-
-namespace am = ::application_manager;
-
-using am::commands::PutFileRequest;
-using am::commands::PutFileResponse;
-using am::commands::MessageSharedPtr;
-using policy_test::MockPolicyHandlerInterface;
-
-typedef SharedPtr<PutFileRequest> PutFileRequestPtr;
-typedef SharedPtr<PutFileResponse> PutFileResponsePtr;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const std::string kFileName = "sync_file_name.txt";
-const int64_t kOffset = 10u;
-const int64_t kZeroOffset = 0u;
-const std::string kStorageFolder = "./storage";
-const std::string kAppFolder = "app_folder";
-}
-
-class PutFileRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- PutFileRequestTest()
- : msg_(CreateMessage(::smart_objects::SmartType_Map))
- , mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- binary_data_.push_back(1u);
-
- (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg_)[am::strings::msg_params][am::strings::sync_file_name] = kFileName;
- (*msg_)[am::strings::msg_params][am::strings::persistent_file] = true;
- (*msg_)[am::strings::msg_params][am::strings::file_type] =
- mobile_apis::FileType::JSON;
- (*msg_)[am::strings::params][am::strings::binary_data] = binary_data_;
-
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
- ON_CALL(*mock_app_, hmi_level())
- .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL));
- }
-
- void ExpectReceiveMessageFromSDK() {
- EXPECT_CALL(mock_policy_handler_,
- ReceiveMessageFromSDK(kFileName, binary_data_))
- .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
- }
- void ExpectManageMobileCommandWithResultCode(
- const mobile_apis::Result::eType code) {
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(code),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- }
-
- MessageSharedPtr msg_;
- MockAppPtr mock_app_;
- MockPolicyHandlerInterface mock_policy_handler_;
- std::vector<uint8_t> binary_data_;
-};
-
-class PutFileResponceTest : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- PutFileResponceTest() : message_(CreateMessage()) {}
-
- void SetUp() OVERRIDE {
- command_sptr_ = CreateCommand<PutFileResponse>(message_);
- }
-
- MessageSharedPtr message_;
- SharedPtr<PutFileResponse> command_sptr_;
-};
-
-TEST_F(PutFileResponceTest, Run_InvalidApp_ApplicationNotRegisteredResponce) {
- ::smart_objects::SmartObject& message_ref = *message_;
-
- message_ref[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- utils::SharedPtr<am::Application> null_application_sptr;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(null_application_sptr));
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(
- MobileResultCodeIs(mobile_apis::Result::APPLICATION_NOT_REGISTERED),
- _));
- command_sptr_->Run();
-}
-
-TEST_F(PutFileResponceTest, Run_ApplicationRegistered_Success) {
- ::smart_objects::SmartObject& message_ref = *message_;
-
- message_ref[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- message_ref[am::strings::msg_params][am::strings::success] = true;
-
- utils::SharedPtr<am::Application> application_sptr =
- utils::MakeShared<MockApplication>();
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(application_sptr));
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
- command_sptr_->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
- ExpectManageMobileCommandWithResultCode(
- mobile_apis::Result::APPLICATION_NOT_REGISTERED);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_HmiLevelNone_UNSUCCESS) {
- EXPECT_CALL(*mock_app_, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
-
- const uint32_t settings_put_file_in_none = 1u;
- const uint32_t app_put_file_in_none_count = 2u;
- EXPECT_CALL(app_mngr_settings_, put_file_in_none())
- .WillOnce(ReturnRef(settings_put_file_in_none));
- EXPECT_CALL(*mock_app_, put_file_in_none_count())
- .WillOnce(Return(app_put_file_in_none_count));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::REJECTED);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_BinaryDataDoesNotExists_UNSUCCESS) {
- (*msg_)[am::strings::params].erase(am::strings::binary_data);
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_SyncFileNameDoesNotExists_UNSUCCESS) {
- (*msg_)[am::strings::msg_params].erase(am::strings::sync_file_name);
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_FileTypeDoesNotExists_UNSUCCESS) {
- (*msg_)[am::strings::msg_params].erase(am::strings::file_type);
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_BinaryDataGreaterThanAvaliableSpace_UNSUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::offset] = kOffset;
- (*msg_)[am::strings::msg_params][am::strings::system_file] = false;
-
- ExpectReceiveMessageFromSDK();
- EXPECT_CALL(app_mngr_settings_, app_storage_folder())
- .WillOnce(ReturnRef(kStorageFolder));
- EXPECT_CALL(*mock_app_, folder_name()).WillOnce(Return(kAppFolder));
-
- const uint32_t avaliable_space = 0u;
- EXPECT_CALL(*mock_app_, GetAvailableDiskSpace())
- .WillOnce(Return(avaliable_space));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::OUT_OF_MEMORY);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_IvalidCreationDirectory_UNSUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::offset] = kOffset;
- (*msg_)[am::strings::msg_params][am::strings::system_file] = true;
-
- ExpectReceiveMessageFromSDK();
-
- const std::string storage_folder = "/storage";
- EXPECT_CALL(app_mngr_settings_, system_files_path())
- .WillOnce(ReturnRef(storage_folder));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::GENERIC_ERROR);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_IvalidUpdateFile_UNSUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
- (*msg_)[am::strings::msg_params][am::strings::system_file] = false;
-
- ExpectReceiveMessageFromSDK();
- EXPECT_CALL(app_mngr_settings_, app_storage_folder())
- .WillOnce(ReturnRef(kStorageFolder));
- EXPECT_CALL(*mock_app_, folder_name()).WillOnce(Return(kAppFolder));
-
- const uint32_t avaliable_space = 2u;
- EXPECT_CALL(*mock_app_, GetAvailableDiskSpace())
- .WillOnce(Return(avaliable_space))
- .WillOnce(Return(avaliable_space));
-
- const std::string file_path = kStorageFolder + "/" + kAppFolder;
- EXPECT_CALL(app_mngr_,
- SaveBinary(binary_data_, file_path, kFileName, kZeroOffset))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, AddFile(_)).WillOnce(Return(false));
- EXPECT_CALL(*mock_app_, UpdateFile(_)).WillOnce(Return(false));
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_AddFile_SUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
- (*msg_)[am::strings::msg_params][am::strings::system_file] = false;
-
- ExpectReceiveMessageFromSDK();
- EXPECT_CALL(app_mngr_settings_, app_storage_folder())
- .WillOnce(ReturnRef(kStorageFolder));
- EXPECT_CALL(*mock_app_, folder_name()).WillOnce(Return(kAppFolder));
-
- const uint32_t avaliable_space = 2u;
- EXPECT_CALL(*mock_app_, GetAvailableDiskSpace())
- .WillOnce(Return(avaliable_space))
- .WillOnce(Return(avaliable_space));
-
- const std::string file_path = kStorageFolder + "/" + kAppFolder;
- EXPECT_CALL(app_mngr_,
- SaveBinary(binary_data_, file_path, kFileName, kZeroOffset))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, AddFile(_)).WillOnce(Return(true));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_SendOnPutFileNotification_SUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
- (*msg_)[am::strings::msg_params][am::strings::system_file] = true;
-
- ExpectReceiveMessageFromSDK();
- EXPECT_CALL(app_mngr_settings_, system_files_path())
- .WillOnce(ReturnRef(kStorageFolder));
- EXPECT_CALL(app_mngr_,
- SaveBinary(binary_data_, kStorageFolder, kFileName, kZeroOffset))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::BasicCommunication_OnPutFile)))
- .WillOnce(Return(true));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::SUCCESS);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-TEST_F(PutFileRequestTest, Run_InvalidPutFile_UNSUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::offset] = kZeroOffset;
- (*msg_)[am::strings::msg_params][am::strings::system_file] = true;
-
- ExpectReceiveMessageFromSDK();
- EXPECT_CALL(app_mngr_settings_, system_files_path())
- .WillOnce(ReturnRef(kStorageFolder));
- EXPECT_CALL(app_mngr_,
- SaveBinary(binary_data_, kStorageFolder, kFileName, kZeroOffset))
- .WillOnce(Return(mobile_apis::Result::INVALID_DATA));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- PutFileRequestPtr command(CreateCommand<PutFileRequest>(msg_));
- command->Run();
-}
-
-} // namespace put_file
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/read_did_request_test.cc b/src/components/application_manager/test/commands/mobile/read_did_request_test.cc
deleted file mode 100644
index c88f4626f0..0000000000
--- a/src/components/application_manager/test/commands/mobile/read_did_request_test.cc
+++ /dev/null
@@ -1,166 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/commands/mobile/read_did_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace read_did_request {
-
-using ::testing::_;
-using ::testing::DoAll;
-using ::testing::Return;
-using ::testing::SaveArg;
-namespace am = ::application_manager;
-using am::commands::ReadDIDRequest;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using ::utils::SharedPtr;
-
-class ReadDIDRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(ReadDIDRequestTest, OnEvent_WrongEventId_UNSUCCESS) {
- Event event(Event::EventID::INVALID_ENUM);
- SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->on_event(event);
-}
-
-TEST_F(ReadDIDRequestTest, OnEvent_SUCCESS) {
- Event event(Event::EventID::VehicleInfo_ReadDID);
-
- SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
-
- const hmi_apis::Common_Result::eType hmi_response_code =
- hmi_apis::Common_Result::SUCCESS;
- const mobile_apis::Result::eType mobile_response_code =
- mobile_apis::Result::SUCCESS;
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
- (*event_msg)[am::strings::msg_params] = 0;
-
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
-
- command->on_event(event);
-}
-
-TEST_F(ReadDIDRequestTest, Run_AppNotRegistered_UNSUCCESS) {
- SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
-
- ON_CALL(app_mngr_, application(_))
- .WillByDefault(Return(SharedPtr<am::Application>()));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(ReadDIDRequestTest, Run_CommandLimitsExceeded_UNSUCCESS) {
- SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- ON_CALL(*app, AreCommandLimitsExceeded(_, _)).WillByDefault(Return(true));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::REJECTED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(ReadDIDRequestTest, Run_EmptyDidLocation_UNSUCCESS) {
- MockAppPtr app(CreateMockApp());
- SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>());
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- ON_CALL(*app, AreCommandLimitsExceeded(_, _)).WillByDefault(Return(false));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::INVALID_DATA,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(ReadDIDRequestTest, Run_SUCCESS) {
- MockAppPtr app(CreateMockApp());
- MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
- (*msg)[am::strings::msg_params][am::strings::did_location]["SomeData"] = 0;
- SharedPtr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>(msg));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- ON_CALL(*app, AreCommandLimitsExceeded(_, _)).WillByDefault(Return(false));
-
- MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command)));
- EXPECT_EQ(hmi_apis::FunctionID::VehicleInfo_ReadDID,
- static_cast<hmi_apis::FunctionID::eType>(
- (*result_msg)[am::strings::params][am::strings::function_id]
- .asInt()));
-}
-
-} // namespace read_did_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/register_app_interface_request_test.cc b/src/components/application_manager/test/commands/mobile/register_app_interface_request_test.cc
deleted file mode 100644
index b7a004f199..0000000000
--- a/src/components/application_manager/test/commands/mobile/register_app_interface_request_test.cc
+++ /dev/null
@@ -1,522 +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 <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "mobile/register_app_interface_request.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "protocol_handler/mock_session_observer.h"
-#include "connection_handler/mock_connection_handler.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_resume_ctrl.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "utils/data_accessor.h"
-#include "utils/custom_string.h"
-#include "utils/lock.h"
-#include "utils/macro.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace register_app_interface_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::DoAll;
-
-namespace am = ::application_manager;
-
-using ::utils::SharedPtr;
-using am::commands::MessageSharedPtr;
-using am::commands::RegisterAppInterfaceRequest;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const hmi_apis::Common_Language::eType kHmiLanguage =
- hmi_apis::Common_Language::EN_US;
-const mobile_apis::Language::eType kMobileLanguage =
- mobile_apis::Language::EN_US;
-const std::string kMacAddress = "test_mac_address";
-const std::string kAppId = "test_app_id";
-const std::string kDummyString = "test_string";
-const std::vector<uint32_t> kDummyDiagModes;
-} // namespace
-
-class RegisterAppInterfaceRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- RegisterAppInterfaceRequestTest()
- : msg_(CreateMessage())
- , command_(CreateCommand<RegisterAppInterfaceRequest>(msg_))
- , app_name_("test_app_name_")
- , mock_application_helper_(
- application_manager_test::MockApplicationHelper::
- application_helper_mock()) {
- InitGetters();
- InitLanguage();
- }
-
- void SetUp() OVERRIDE {
- testing::Mock::VerifyAndClearExpectations(&mock_application_helper_);
- }
-
- void TearDown() OVERRIDE {
- testing::Mock::VerifyAndClearExpectations(&mock_application_helper_);
- }
-
- void InitBasicMessage() {
- (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg_)[am::strings::msg_params][am::strings::app_id] = kAppId;
- (*msg_)[am::strings::msg_params][am::strings::app_name] = app_name_;
- (*msg_)[am::strings::msg_params][am::strings::language_desired] =
- kHmiLanguage;
- (*msg_)[am::strings::msg_params]
- [am::strings::hmi_display_language_desired] = kHmiLanguage;
- }
-
- MockAppPtr CreateBasicMockedApp() {
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(*mock_app, name()).WillByDefault(ReturnRef(app_name_));
- ON_CALL(*mock_app, mac_address()).WillByDefault(ReturnRef(kMacAddress));
- ON_CALL(*mock_app, app_icon_path()).WillByDefault(ReturnRef(kDummyString));
- ON_CALL(*mock_app, language()).WillByDefault(ReturnRef(kMobileLanguage));
- ON_CALL(*mock_app, ui_language()).WillByDefault(ReturnRef(kMobileLanguage));
- ON_CALL(*mock_app, policy_app_id()).WillByDefault(Return(kAppId));
- return mock_app;
- }
-
- void InitLanguage(
- hmi_apis::Common_Language::eType ui_language = kHmiLanguage,
- hmi_apis::Common_Language::eType vr_language = kHmiLanguage,
- hmi_apis::Common_Language::eType tts_language = kHmiLanguage) {
- ON_CALL(mock_hmi_capabilities_, active_vr_language())
- .WillByDefault(Return(vr_language));
- ON_CALL(mock_hmi_capabilities_, active_ui_language())
- .WillByDefault(Return(ui_language));
- ON_CALL(mock_hmi_capabilities_, active_tts_language())
- .WillByDefault(Return(tts_language));
- }
-
- void InitGetters() {
- ON_CALL(app_mngr_, IsHMICooperating()).WillByDefault(Return(true));
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
- ON_CALL(app_mngr_, resume_controller())
- .WillByDefault(ReturnRef(mock_resume_crt_));
- ON_CALL(app_mngr_, connection_handler())
- .WillByDefault(ReturnRef(mock_connection_handler_));
- ON_CALL(mock_connection_handler_, get_session_observer())
- .WillByDefault(ReturnRef(mock_session_observer_));
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(mock_hmi_capabilities_));
- ON_CALL(app_mngr_settings_, sdl_version())
- .WillByDefault(ReturnRef(kDummyString));
- ON_CALL(mock_hmi_capabilities_, ccpu_version())
- .WillByDefault(ReturnRef(kDummyString));
- ON_CALL(app_mngr_settings_, supported_diag_modes())
- .WillByDefault(ReturnRef(kDummyDiagModes));
- ON_CALL(mock_policy_handler_, GetAppRequestTypes(_))
- .WillByDefault(Return(std::vector<std::string>()));
- ON_CALL(mock_policy_handler_, GetUserConsentForDevice(_))
- .WillByDefault(Return(policy::DeviceConsent::kDeviceAllowed));
- ON_CALL(app_mngr_, GetDeviceTransportType(_))
- .WillByDefault(Return(hmi_apis::Common_TransportType::WIFI));
- ON_CALL(app_mngr_, IsAppInReconnectMode(_)).WillByDefault(Return(false));
- ON_CALL(app_mngr_, application_by_policy_id(_))
- .WillByDefault(Return(ApplicationSharedPtr()));
- ON_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::VR_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_ChangeRegistration))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- }
-
- void SetCommonExpectionsOnSwitchedApplication(
- MockAppPtr mock_app, mobile_apis::Result::eType response_result_code) {
- EXPECT_CALL(mock_policy_handler_, AddApplication(_, _)).Times(0);
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(response_result_code), _));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered)))
- .Times(0);
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::Buttons_OnButtonSubscription)))
- .Times(0);
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::UI_ChangeRegistration))).Times(0);
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::TTS_ChangeRegistration))).Times(0);
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::VR_ChangeRegistration))).Times(0);
-
- EXPECT_CALL(
- app_mngr_,
- OnApplicationSwitched(
- MockAppPtr::static_pointer_cast<application_manager::Application>(
- mock_app)));
- }
-
- MessageSharedPtr msg_;
- SharedPtr<RegisterAppInterfaceRequest> command_;
-
- const utils::custom_string::CustomString app_name_;
- sync_primitives::Lock lock_;
- am::ApplicationSet app_set_;
-
- typedef IsNiceMock<policy_test::MockPolicyHandlerInterface,
- kMocksAreNice>::Result MockPolicyHandlerInterface;
-
- typedef IsNiceMock<resumprion_test::MockResumeCtrl, kMocksAreNice>::Result
- MockResumeCtrl;
-
- typedef IsNiceMock<connection_handler_test::MockConnectionHandler,
- kMocksAreNice>::Result MockConnectionHandler;
-
- typedef IsNiceMock<protocol_handler_test::MockSessionObserver,
- kMocksAreNice>::Result MockSessionObserver;
-
- typedef IsNiceMock<application_manager_test::MockHMICapabilities,
- kMocksAreNice>::Result MockHMICapabilities;
-
- MockPolicyHandlerInterface mock_policy_handler_;
- MockResumeCtrl mock_resume_crt_;
- MockConnectionHandler mock_connection_handler_;
- MockSessionObserver mock_session_observer_;
- MockHMICapabilities mock_hmi_capabilities_;
- application_manager_test::MockApplicationHelper& mock_application_helper_;
-};
-
-TEST_F(RegisterAppInterfaceRequestTest, Init_SUCCESS) {
- EXPECT_TRUE(command_->Init());
-}
-
-TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
- InitBasicMessage();
- (*msg_)[am::strings::msg_params][am::strings::hash_id] = kAppId;
- EXPECT_CALL(app_mngr_, IsStopping())
- .WillOnce(Return(false))
- .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));
-
- MockAppPtr mock_app = CreateBasicMockedApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()))
- .WillRepeatedly(Return(mock_app));
-
- ON_CALL(app_mngr_, applications())
- .WillByDefault(Return(DataAccessor<am::ApplicationSet>(app_set_, lock_)));
- ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
- ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId, _, _))
- .WillByDefault(Return(true));
- policy::StatusNotifier notify_upd_manager =
- utils::MakeShared<utils::CallNothing>();
- ON_CALL(mock_policy_handler_, AddApplication(_, _))
- .WillByDefault(Return(notify_upd_manager));
-
- EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::Buttons_OnButtonSubscription)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, am::commands::Command::ORIGIN_SDL))
- .Times(2);
- command_->Run();
-}
-
-MATCHER_P(CheckHMIInterfacesRealtedData, expected_data, "") {
- const bool is_result_id_correct =
- mobile_apis::Result::SUCCESS ==
- static_cast<mobile_apis::Result::eType>(
- (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
-
- const bool are_ui_related_data_exist =
- (*arg)[am::strings::msg_params].keyExists(
- am::hmi_response::display_capabilities);
-
- const bool are_vi_related_data_exist =
- (*arg)[am::strings::msg_params][am::hmi_response::vehicle_type] ==
- (*expected_data)[am::hmi_response::vehicle_type];
-
- const bool are_vr_related_data_exist =
- (*arg)[am::strings::msg_params][am::strings::vr_capabilities] ==
- (*expected_data)[am::strings::vr_capabilities];
-
- return is_result_id_correct && are_ui_related_data_exist &&
- are_vi_related_data_exist && are_vr_related_data_exist;
-}
-
-TEST_F(RegisterAppInterfaceRequestTest,
- Run_HmiInterfacesStateAvailable_SUCCESS) {
- InitBasicMessage();
-
- EXPECT_CALL(app_mngr_, IsStopping())
- .WillOnce(Return(false))
- .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));
-
- MockAppPtr mock_app = CreateBasicMockedApp();
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()))
- .WillRepeatedly(Return(mock_app));
-
- MessageSharedPtr expected_message =
- CreateMessage(smart_objects::SmartType_Map);
-
- (*expected_message)[am::hmi_response::vehicle_type] = "test_vehicle_type";
- (*expected_message)[am::strings::vr_capabilities] = "test_vr_capabilities";
- (*expected_message)[am::hmi_response::display_capabilities] = 0;
- SmartObject& display_capabilities =
- (*expected_message)[am::hmi_response::display_capabilities];
- display_capabilities[am::hmi_response::display_type] = "test_display_type";
- display_capabilities[am::hmi_response::text_fields] = "test_text_fields";
- display_capabilities[am::hmi_response::image_fields] = "test_image_fields";
- display_capabilities[am::hmi_response::media_clock_formats] =
- "test_media_clock_formats";
- display_capabilities[am::hmi_response::num_custom_presets_available] =
- "test_num_custom_presets_available";
- display_capabilities[am::hmi_response::graphic_supported] =
- "test_graphic_supported";
- display_capabilities[am::hmi_response::templates_available] =
- "test_templates_available";
- display_capabilities[am::hmi_response::screen_params] = "test_screen_params";
-
- ON_CALL(mock_hmi_capabilities_, vehicle_type())
- .WillByDefault(
- Return(&(*expected_message)[am::hmi_response::vehicle_type]));
- ON_CALL(mock_hmi_capabilities_, vr_capabilities())
- .WillByDefault(
- Return(&(*expected_message)[am::strings::vr_capabilities]));
- ON_CALL(mock_hmi_capabilities_, display_capabilities())
- .WillByDefault(
- Return(&(*expected_message)[am::hmi_response::display_capabilities]));
-
- ON_CALL(app_mngr_, applications())
- .WillByDefault(Return(DataAccessor<am::ApplicationSet>(app_set_, lock_)));
- ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
- ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId, _, _))
- .WillByDefault(Return(true));
- policy::StatusNotifier notify_upd_manager =
- utils::MakeShared<utils::CallNothing>();
- ON_CALL(mock_policy_handler_, AddApplication(_, _))
- .WillByDefault(Return(notify_upd_manager));
-
- EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app));
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::Buttons_OnButtonSubscription)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::VR_ChangeRegistration)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::TTS_ChangeRegistration)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::UI_ChangeRegistration)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, am::commands::Command::ORIGIN_SDL))
- .Times(2);
-
- command_->Run();
-}
-
-TEST_F(RegisterAppInterfaceRequestTest,
- SwitchApplication_CorrectHash_ExpectNoCleanupSuccess) {
- InitBasicMessage();
-
- const std::string request_hash_id = "abc123";
- (*msg_)[am::strings::msg_params][am::strings::hash_id] = request_hash_id;
-
- MockAppPtr mock_app = CreateBasicMockedApp();
- EXPECT_CALL(app_mngr_, application_by_policy_id(kAppId))
- .WillRepeatedly(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, IsAppInReconnectMode(kAppId)).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, ProcessReconnection(_, kConnectionKey));
-
- EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
-
- EXPECT_CALL(
- mock_resume_crt_,
- CheckApplicationHash(
- MockAppPtr::static_pointer_cast<application_manager::Application>(
- mock_app),
- request_hash_id)).WillOnce(Return(true));
-
- EXPECT_CALL(mock_resume_crt_, RemoveApplicationFromSaved(_)).Times(0);
-
- EXPECT_CALL(mock_application_helper_, RecallApplicationData(_, _)).Times(0);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
-
- SetCommonExpectionsOnSwitchedApplication(mock_app,
- mobile_apis::Result::SUCCESS);
-
- command_->Run();
-}
-
-TEST_F(RegisterAppInterfaceRequestTest,
- SwitchApplication_WrongHash_ExpectCleanupResumeFailed) {
- InitBasicMessage();
-
- const std::string request_hash_id = "abc123";
- (*msg_)[am::strings::msg_params][am::strings::hash_id] = request_hash_id;
-
- MockAppPtr mock_app = CreateBasicMockedApp();
- EXPECT_CALL(app_mngr_, application_by_policy_id(kAppId))
- .WillRepeatedly(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, IsAppInReconnectMode(kAppId)).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, ProcessReconnection(_, kConnectionKey));
-
- EXPECT_CALL(
- mock_resume_crt_,
- CheckApplicationHash(
- MockAppPtr::static_pointer_cast<application_manager::Application>(
- mock_app),
- request_hash_id)).WillOnce(Return(false));
-
- EXPECT_CALL(
- mock_application_helper_,
- RecallApplicationData(
- MockAppPtr::static_pointer_cast<application_manager::Application>(
- mock_app),
- _));
-
- EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
-
- SetCommonExpectionsOnSwitchedApplication(mock_app,
- mobile_apis::Result::RESUME_FAILED);
-
- command_->Run();
-}
-
-TEST_F(RegisterAppInterfaceRequestTest,
- SwitchApplication_NoHash_ExpectCleanupResumeFailed) {
- InitBasicMessage();
-
- MockAppPtr mock_app = CreateBasicMockedApp();
- EXPECT_CALL(app_mngr_, application_by_policy_id(kAppId))
- .WillRepeatedly(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, IsAppInReconnectMode(kAppId)).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, ProcessReconnection(_, kConnectionKey));
-
- EXPECT_CALL(
- mock_application_helper_,
- RecallApplicationData(
- MockAppPtr::static_pointer_cast<application_manager::Application>(
- mock_app),
- _));
-
- EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
-
- SetCommonExpectionsOnSwitchedApplication(mock_app,
- mobile_apis::Result::RESUME_FAILED);
-
- command_->Run();
-}
-
-} // namespace register_app_interface_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc b/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc
deleted file mode 100644
index 69fee02262..0000000000
--- a/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc
+++ /dev/null
@@ -1,565 +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 <string>
-#include <vector>
-
-#include "mobile/reset_global_properties_request.h"
-#include "mobile/reset_global_properties_response.h"
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace reset_global_properties {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-namespace am = ::application_manager;
-
-using am::commands::ResetGlobalPropertiesRequest;
-using am::commands::ResetGlobalPropertiesResponse;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using am::MockMessageHelper;
-
-typedef SharedPtr<ResetGlobalPropertiesRequest> ResetGlobalPropertiesRequestPtr;
-typedef SharedPtr<ResetGlobalPropertiesResponse>
- ResetGlobalPropertiesResponsePtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 10u;
-} // namespace
-
-class ResetGlobalPropertiesRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- protected:
- ResetGlobalPropertiesRequestTest()
- : msg_(CreateMessage()), mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg_)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
-
- command_ = CreateCommand<ResetGlobalPropertiesRequest>(msg_);
-
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillByDefault(Return(kCorrelationId));
- }
-
- MessageSharedPtr msg_;
- MockAppPtr mock_app_;
- ResetGlobalPropertiesRequestPtr command_;
-};
-
-class ResetGlobalPropertiesResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(ResetGlobalPropertiesRequestTest, Run_InvalidApp_UNSUCCESS) {
- MockAppPtr invalid_app;
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(invalid_app));
-
- MessageSharedPtr command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
-
- command_->Run();
- EXPECT_EQ(
- (*command_result)[am::strings::msg_params][am::strings::success].asBool(),
- false);
- EXPECT_EQ(
- (*command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(mobile_apis::Result::APPLICATION_NOT_REGISTERED));
-}
-
-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));
-
- 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);
-
- 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());
-
- 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(app_mngr_, ManageHMICommand(_)).Times(0);
-
- 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);
-
- 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());
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- smart_objects::SmartObjectSPtr vr_help =
- ::utils::MakeShared<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 =
- ::utils::MakeShared<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(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::UI_SetGlobalProperties)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::TTS_SetGlobalProperties)))
- .WillOnce(Return(true));
-
- command_->Run();
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command_->on_event(event);
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest,
- OnEvent_UI_SetGlobalProperties_SUCCESS) {
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- const hmi_apis::Common_Result::eType result_code =
- 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;
-
- 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 =
- ::utils::MakeShared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
- .WillOnce(Return(vr_help));
-
- command_->Run();
-
- event.set_smart_object(*msg_);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::eType::SUCCESS),
- am::commands::Command::ORIGIN_SDL));
-
- command_->on_event(event);
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest,
- OnEvent_TTS_SetGlobalProperties_SUCCESS) {
- Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
-
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::TIMEOUTPROMPT;
- (*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));
-
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
-
- smart_objects::SmartObjectSPtr prompt =
- utils::MakeShared<smart_objects::SmartObject>();
- *prompt = "prompt";
-
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- MessageSharedPtr ui_msg = CreateMessage();
- (*ui_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
- (*ui_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
-
- Event ui_event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- ui_event.set_smart_object(*ui_msg);
-
- command_->Run();
- command_->on_event(ui_event);
- event.set_smart_object(*msg_);
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::WARNINGS),
- am::commands::Command::ORIGIN_SDL));
-
- command_->on_event(event);
-}
-
-TEST_F(ResetGlobalPropertiesResponseTest, Run_Sendmsg_SUCCESS) {
- MessageSharedPtr message(CreateMessage());
- ResetGlobalPropertiesResponsePtr command(
- CreateCommand<ResetGlobalPropertiesResponse>(message));
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(message, _));
- command->Run();
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidApp_NoHashUpdate) {
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
-
- (*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());
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- smart_objects::SmartObjectSPtr vr_help =
- ::utils::MakeShared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
- .WillOnce(Return(vr_help));
-
- EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
-
- ResetGlobalPropertiesRequestPtr command =
- CreateCommand<ResetGlobalPropertiesRequest>(msg_);
- command->Run();
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::eType::SUCCESS),
- am::commands::Command::ORIGIN_SDL));
-
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest,
- Run_WaitTTS_Timeout_GENERIC_ERROR_TTSNotRespond) {
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
-
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::TIMEOUTPROMPT;
- (*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));
-
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
-
- smart_objects::SmartObjectSPtr prompt =
- utils::MakeShared<smart_objects::SmartObject>();
- *prompt = "prompt";
-
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::UI_SetGlobalProperties)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::TTS_SetGlobalProperties)))
- .WillOnce(Return(true));
-
- ResetGlobalPropertiesRequestPtr command =
- CreateCommand<ResetGlobalPropertiesRequest>(msg_);
- command->Run();
-
- // Received response only from UI
- MessageSharedPtr ui_msg = CreateMessage();
- (*ui_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
- (*ui_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
- (*ui_msg)[am::strings::msg_params] =
- SmartObject(smart_objects::SmartType_Map);
- Event ui_event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- ui_event.set_smart_object(*ui_msg);
- command->on_event(ui_event);
-
- // TTS doesn't respond, so timeout should send generic error
- smart_objects::SmartObjectSPtr response =
- utils::MakeShared<smart_objects::SmartObject>();
- (*response)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::GENERIC_ERROR;
- EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
- .WillOnce(Return(response));
- const std::string info = "TTS component does not respond";
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResponseIs(mobile_apis::Result::GENERIC_ERROR, info, false),
- am::commands::Command::ORIGIN_SDL));
- command->onTimeOut();
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest,
- Run_WaitUI_Timeout_GENERIC_ERROR_UINotRespond) {
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
-
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::TIMEOUTPROMPT;
- (*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));
-
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
-
- smart_objects::SmartObjectSPtr prompt =
- utils::MakeShared<smart_objects::SmartObject>();
- *prompt = "prompt";
-
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::UI_SetGlobalProperties)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::TTS_SetGlobalProperties)))
- .WillOnce(Return(true));
-
- command_->Run();
-
- // Received response only from TTS
- MessageSharedPtr tts_msg = CreateMessage();
- (*tts_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
- (*tts_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
-
- Event tts_event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- tts_event.set_smart_object(*tts_msg);
- command_->on_event(tts_event);
-
- // UI doesn't respond, so timeout should send generic error
- smart_objects::SmartObjectSPtr response =
- utils::MakeShared<smart_objects::SmartObject>();
- (*response)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::GENERIC_ERROR;
- EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
- .WillOnce(Return(response));
-
- const std::string info = "UI component does not respond";
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResponseIs(mobile_apis::Result::GENERIC_ERROR, info, false),
- am::commands::Command::ORIGIN_SDL));
- command_->onTimeOut();
-}
-
-TEST_F(ResetGlobalPropertiesRequestTest,
- Run_WaitUIAndTTS_Timeout_GENERIC_ERROR_TTSAndUINotRespond) {
- Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::UNSUPPORTED_RESOURCE;
-
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::TIMEOUTPROMPT;
- (*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));
-
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
-
- smart_objects::SmartObjectSPtr prompt =
- utils::MakeShared<smart_objects::SmartObject>();
- *prompt = "prompt";
-
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::UI_SetGlobalProperties)))
- .WillOnce(Return(true));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::TTS_SetGlobalProperties)))
- .WillOnce(Return(true));
-
- command_->Run();
- // TTS and UI don't respond, so timeout should send generic error
- std::string info = "TTS, UI component does not respond";
- smart_objects::SmartObjectSPtr response =
- utils::MakeShared<smart_objects::SmartObject>();
- (*response)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::GENERIC_ERROR;
- EXPECT_CALL(mock_message_helper_, CreateNegativeResponse(_, _, _, _))
- .WillOnce(Return(response));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResponseIs(mobile_apis::Result::GENERIC_ERROR, info, false),
- am::commands::Command::ORIGIN_SDL));
- command_->onTimeOut();
-}
-
-} // namespace reset_global_properties
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/scrollable_message_test.cc b/src/components/application_manager/test/commands/mobile/scrollable_message_test.cc
deleted file mode 100644
index 4520e1b120..0000000000
--- a/src/components/application_manager/test/commands/mobile/scrollable_message_test.cc
+++ /dev/null
@@ -1,289 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/scrollable_message_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace scrollable_message_request {
-
-namespace am = application_manager;
-namespace hmi_response = am::hmi_response;
-namespace mobile_result = mobile_apis::Result;
-namespace am = ::application_manager;
-
-using am::commands::ScrollableMessageRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Eq;
-using ::testing::Ref;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-using namespace am::strings;
-using test::components::policy_test::MockPolicyHandlerInterface;
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kTimeOut = 30000u;
-const uint32_t kCorrelationId = 10u;
-const uint32_t kFunctionID = 3u;
-} // namespace
-
-class ScrollableMessageRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- typedef TypeIf<kMocksAreNice,
- NiceMock<application_manager_test::MockHMICapabilities>,
- application_manager_test::MockHMICapabilities>::Result
- MockHMICapabilities;
- sync_primitives::Lock lock_;
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void SetUp() OVERRIDE {
- mock_app_ = CreateMockApp();
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
- command_ = CreateCommand<ScrollableMessageRequest>(msg_);
- }
-
- MockPolicyHandlerInterface mock_policy_handler_;
- MockAppPtr mock_app_;
- MessageSharedPtr msg_;
- SharedPtr<ScrollableMessageRequest> command_;
-};
-
-typedef ScrollableMessageRequestTest::MockHMICapabilities MockHMICapabilities;
-
-TEST_F(ScrollableMessageRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_ui = CreateFullParamsUISO();
- (*msg_ui)[am::strings::params][am::strings::connection_key] = kConnectionKey;
-
- utils::SharedPtr<ScrollableMessageRequest> command =
- CreateCommand<ScrollableMessageRequest>(msg_ui);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
-
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
-
- MockHMICapabilities hmi_capabilities;
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities));
- ON_CALL(hmi_capabilities, is_ui_cooperating()).WillByDefault(Return(true));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::info] = "info1";
-
- Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
- event.set_smart_object(*msg);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*ui_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*ui_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_SUCCESS) {
- (*msg_)[msg_params][timeout] = kTimeOut;
- (*msg_)[msg_params][interaction_mode] =
- mobile_apis::InteractionMode::MANUAL_ONLY;
- EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
- command_->Init();
- EXPECT_EQ(kTimeOut, command_->default_timeout());
-}
-
-TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_UNSUCCESS) {
- (*msg_)[msg_params][interaction_mode] =
- mobile_apis::InteractionMode::MANUAL_ONLY;
- EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
- command_->Init();
- EXPECT_EQ(kTimeOut, command_->default_timeout());
-}
-
-TEST_F(ScrollableMessageRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
- command_->Run();
-}
-
-TEST_F(ScrollableMessageRequestTest,
- Run_SoftButtonProcessingResultWrogParameters_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
- const mobile_apis::Result::eType processing_result =
- mobile_apis::Result::ABORTED;
- smart_objects::SmartObject& msg_params = (*msg_)[am::strings::msg_params];
- EXPECT_CALL(
- mock_message_helper_,
- ProcessSoftButtons(
- msg_params, Eq(mock_app_), Ref(mock_policy_handler_), Ref(app_mngr_)))
- .WillOnce(Return(processing_result));
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command_)));
- EXPECT_EQ(processing_result,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][result_code].asInt()));
-}
-
-TEST_F(ScrollableMessageRequestTest, Run_SoftButtonProcessingResult_SUCCESS) {
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
- smart_objects::SmartObject& msg_params = (*msg_)[am::strings::msg_params];
- (*msg_)[am::strings::params][am::strings::function_id] = kFunctionID;
- (*msg_)[am::strings::msg_params][am::strings::soft_buttons][0]
- [am::strings::soft_button_id] = 0;
- EXPECT_CALL(
- mock_message_helper_,
- ProcessSoftButtons(
- msg_params, Eq(mock_app_), Ref(mock_policy_handler_), Ref(app_mngr_)))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
- EXPECT_CALL(mock_message_helper_, SubscribeApplicationToSoftButton(_, _, _));
-
- MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command_)));
- EXPECT_EQ(hmi_apis::FunctionID::UI_ScrollableMessage,
- static_cast<hmi_apis::FunctionID::eType>(
- (*result_msg)[params][function_id].asInt()));
-}
-
-TEST_F(ScrollableMessageRequestTest, OnEvent_ReceivedUnknownEvent_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
- command_->on_event(event);
-}
-
-TEST_F(ScrollableMessageRequestTest,
- OnEvent_ReceivedUIOnResetTimeoutEvent_SUCCESS) {
- (*msg_)[params][connection_key] = kConnectionKey;
- (*msg_)[params][correlation_id] = kCorrelationId;
- EXPECT_CALL(
- app_mngr_,
- updateRequestTimeout(kConnectionKey, kCorrelationId, kDefaultTimeout_));
- Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
- event.set_smart_object(*msg_);
- command_->on_event(event);
-}
-
-TEST_F(ScrollableMessageRequestTest,
- DISABLED_OnEvent_ReceivedUIScrollableMessage_SUCCESS) {
- (*msg_)[params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
- Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
- event.set_smart_object(*msg_);
- command_->on_event(event);
-}
-
-TEST_F(ScrollableMessageRequestTest,
- DISABLED_OnEvent_UnsupportedRCAndUICoop_SUCCESS) {
- (*msg_)[params][hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _));
- Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
- event.set_smart_object(*msg_);
- command_->on_event(event);
-}
-
-} // namespace scrollable_message_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc b/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc
deleted file mode 100644
index 2a3b5d922a..0000000000
--- a/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2017 Xevo Inc.
- * 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 Xevo Inc. 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 "commands/commands_test.h"
-#include "commands/command_request_test.h"
-
-#include "mobile/send_haptic_data_request.h"
-#include "mobile/send_haptic_data_response.h"
-
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace send_haptic_data {
-
-using ::testing::_;
-using ::testing::Return;
-
-namespace am = ::application_manager;
-
-using am::commands::SendHapticDataRequest;
-using am::commands::SendHapticDataResponse;
-using am::commands::MessageSharedPtr;
-
-typedef SharedPtr<SendHapticDataRequest> SendHapticDataRequestPtr;
-typedef SharedPtr<SendHapticDataResponse> SendHapticDataResponsePtr;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-}
-
-class SendHapticDataRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SendHapticDataRequestTest()
- : msg_(CreateMessage(::smart_objects::SmartType_Map))
- , mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- }
-
- MessageSharedPtr msg_;
- MockAppPtr mock_app_;
-};
-
-class SendHapticDataResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- SendHapticDataResponseTest() : message_(CreateMessage()) {}
-
- void SetUp() OVERRIDE {
- command_sptr_ = CreateCommand<SendHapticDataResponse>(message_);
- }
-
- MessageSharedPtr message_;
- SharedPtr<SendHapticDataResponse> command_sptr_;
-};
-
-TEST_F(SendHapticDataRequestTest, Run_SUCCESS) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- EXPECT_CALL(*mock_app_, is_navi()).WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(
- HMIResultCodeIs(hmi_apis::FunctionID::UI_SendHapticData)))
- .WillOnce(Return(true));
-
- SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
-
- command->Init();
- command->Run();
-}
-
-TEST_F(SendHapticDataRequestTest, Run_DISALLOWED) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- EXPECT_CALL(*mock_app_, is_navi()).WillOnce(Return(false));
-
- EXPECT_CALL(*mock_app_, mobile_projection_enabled()).WillOnce(Return(false));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).WillOnce(Return(true));
-
- SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
-
- command->Init();
- command->Run();
-}
-
-TEST_F(SendHapticDataRequestTest, OnEvent_SUCCESS) {
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS),
- am::commands::Command::ORIGIN_SDL));
-
- (*msg_)[am::strings::msg_params] = 0;
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
- Event event(hmi_apis::FunctionID::UI_SendHapticData);
- event.set_smart_object(*msg_);
- SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
-
- command->Init();
- command->on_event(event);
-}
-
-TEST_F(SendHapticDataResponseTest, Run_Success) {
- ::smart_objects::SmartObject& message_ref = *message_;
- message_ref[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::SUCCESS;
-
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
- command_sptr_->Init();
- command_sptr_->Run();
-}
-
-} // namespace send_haptic_data
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/send_location_request_test.cc b/src/components/application_manager/test/commands/mobile/send_location_request_test.cc
deleted file mode 100644
index c5786675d6..0000000000
--- a/src/components/application_manager/test/commands/mobile/send_location_request_test.cc
+++ /dev/null
@@ -1,396 +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 <string>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/send_location_request.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "utils/shared_ptr.h"
-#include "commands/command_request_test.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace send_location_request {
-
-using application_manager::commands::MessageSharedPtr;
-using application_manager::commands::SendLocationRequest;
-using application_manager::MockMessageHelper;
-using test::components::application_manager_test::MockHMICapabilities;
-using smart_objects::SmartObject;
-using utils::SharedPtr;
-using testing::_;
-using testing::Return;
-using testing::ReturnRef;
-
-namespace strings = application_manager::strings;
-namespace hmi_response = application_manager::hmi_response;
-namespace Common_TextFieldName = hmi_apis::Common_TextFieldName;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const uint32_t kFunctionID = 2u;
-const uint32_t kAppID = 3u;
-const double kLongitudeDegrees = 13.4;
-const std::string kLocationDescription = "Location_Description";
-const std::string kNewLine = "\\n";
-const std::string kAddressLine = "Address_Line";
-const std::string kPhoneNumber = "Phone_number";
-const std::string kCorrectAddress = "Correct address";
-const std::string kEmptyAddress = "";
-const std::string kAddressWithWrongSyntax = "Wrong Syntax\\n";
-} // namespace
-
-class SendLocationRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- class UnwrappedSendLocationRequest : public SendLocationRequest {
- public:
- UnwrappedSendLocationRequest(
- const MessageSharedPtr& message,
- application_manager::ApplicationManager& application_manager)
- : SendLocationRequest(message, application_manager) {}
-
- ::application_manager::CommandParametersPermissions&
- get_parameters_permissions() {
- return parameters_permissions_;
- }
- };
-
- typedef SharedPtr<UnwrappedSendLocationRequest> CommandSPrt;
-
- SendLocationRequestTest() {
- mock_app_ = CreateMockApp();
- disp_cap_ = utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
- message_ = CreateMessage();
- command_ = CreateCommand<UnwrappedSendLocationRequest>(message_);
- }
-
- void InitialSetup(MessageSharedPtr message_) {
- (*message_)[strings::params][strings::connection_key] = kConnectionKey;
- (*message_)[strings::params][strings::function_id] = kFunctionID;
- (*message_)[strings::msg_params] =
- SmartObject(smart_objects::SmartType_Map);
- (*message_)[strings::msg_params][strings::address] = kCorrectAddress;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- AllowMandatoryFields();
- }
-
- void HMICapabilitiesSetupHelper() {
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
- .WillOnce(Return(true));
- }
-
- void HMICapabilitiesSetupWithArguments(
- Common_TextFieldName::eType field_name) {
- HMICapabilitiesSetupHelper();
- (*disp_cap_)[hmi_response::text_fields] =
- SmartObject(smart_objects::SmartType_Array);
- (*disp_cap_)[hmi_response::text_fields][0] =
- SmartObject(smart_objects::SmartType_Map);
- (*disp_cap_)[hmi_response::text_fields][0][strings::name] = field_name;
- EXPECT_CALL(mock_hmi_capabilities_, display_capabilities())
- .Times(2)
- .WillRepeatedly(Return(disp_cap_.get()));
- }
-
- void FinishSetup() {
- EXPECT_CALL(*mock_app_, hmi_app_id()).WillOnce(Return(kAppID));
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::Navigation_SendLocation)));
- }
-
- void FinishSetupCancelled(mobile_apis::Result::eType result) {
- EXPECT_CALL(*mock_app_, hmi_app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(MobileResultCodeIs(result), _));
- }
-
- void AllowMandatoryFields() {
- application_manager::CommandParametersPermissions& permissions =
- command_->get_parameters_permissions();
- permissions.allowed_params.insert(strings::longitude_degrees);
- permissions.allowed_params.insert(strings::latitude_degrees);
- }
-
- MockAppPtr mock_app_;
- MockHMICapabilities mock_hmi_capabilities_;
- SharedPtr<SmartObject> disp_cap_;
- MessageSharedPtr message_;
- CommandSPrt command_;
-};
-
-TEST_F(SendLocationRequestTest, Run_InvalidApp_Success) {
- (*message_)[strings::params][strings::connection_key] = kConnectionKey;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
- FinishSetupCancelled(mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_DeliveryMode_Success) {
- InitialSetup(message_);
- SmartObject msg_params = (*message_)[strings::msg_params];
- msg_params[strings::delivery_mode] = SmartObject();
- (*message_)[strings::msg_params] = msg_params;
- msg_params.erase(strings::delivery_mode);
- FinishSetup();
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationNameIsAllowed_Success) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_name] = "Location_Name";
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationName);
- FinishSetup();
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationNameIsNotAllowed_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_name] = "Location_Name";
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
- FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationNameWrongSyntax_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_name] = "Location_Name\\n";
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationName);
- FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationDescriptionIsAllowed_Success) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_description] =
- kLocationDescription;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationDescription);
- FinishSetup();
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationDescriptionIsNotAllowed_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_description] =
- kLocationDescription;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
- FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationDescriptionWrongSyntax_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_description] =
- kLocationDescription + kNewLine;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::locationDescription);
- FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_AddressLinesAreAllowed_Success) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::address_lines] =
- SmartObject(smart_objects::SmartType_Array);
- (*message_)[strings::msg_params][strings::address_lines][0] = kAddressLine;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::addressLines);
- FinishSetup();
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_AddressLinesAreNotAllowed_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::address_lines] =
- SmartObject(smart_objects::SmartType_Array);
- (*message_)[strings::msg_params][strings::address_lines][0] = kAddressLine;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
- FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_AddressLinesWrongSyntax_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::address_lines] =
- SmartObject(smart_objects::SmartType_Array);
- (*message_)[strings::msg_params][strings::address_lines][0] =
- kAddressLine + kNewLine;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::addressLines);
- FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_PhoneNumberIsAllowed_Success) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::phone_number] = kPhoneNumber;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::phoneNumber);
- FinishSetup();
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_PhoneNumberIsNotAllowed_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::phone_number] = kPhoneNumber;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::INVALID_ENUM);
- FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_PhoneNumberWrongSyntax_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::phone_number] =
- kPhoneNumber + kNewLine;
- HMICapabilitiesSetupWithArguments(Common_TextFieldName::phoneNumber);
- FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_AddressesContainWrongSyntax_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::address] =
- SmartObject(smart_objects::SmartType_Array);
- (*message_)[strings::msg_params][strings::address]["Address 1"] =
- kCorrectAddress;
- (*message_)[strings::msg_params][strings::address]["Address 2"] =
- kAddressWithWrongSyntax;
- FinishSetupCancelled(mobile_apis::Result::INVALID_DATA);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationImageValid_Success) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_image] =
- SmartObject(smart_objects::SmartType_Map);
- (*message_)[strings::msg_params][strings::location_image][strings::value] =
- "1";
- EXPECT_CALL(
- mock_message_helper_,
- VerifyImage(
- (*message_)[strings::msg_params][strings::location_image], _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- FinishSetup();
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_LocationImageInvalid_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::location_image] =
- SmartObject(smart_objects::SmartType_Map);
- (*message_)[strings::msg_params][strings::location_image][strings::value] =
- "1";
- EXPECT_CALL(
- mock_message_helper_,
- VerifyImage(
- (*message_)[strings::msg_params][strings::location_image], _, _))
- .WillOnce(Return(mobile_apis::Result::ABORTED));
- FinishSetupCancelled(mobile_apis::Result::ABORTED);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, Run_HMIUINotCoop_Cancelled) {
- InitialSetup(message_);
- (*message_)[strings::msg_params][strings::phone_number] = kPhoneNumber;
- (*disp_cap_)[hmi_response::text_fields] =
- SmartObject(smart_objects::SmartType_Array);
- (*disp_cap_)[hmi_response::text_fields][0] =
- SmartObject(smart_objects::SmartType_Map);
- (*disp_cap_)[hmi_response::text_fields][0][strings::name] =
- Common_TextFieldName::phoneNumber;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(mock_hmi_capabilities_));
- EXPECT_CALL(mock_hmi_capabilities_, is_ui_cooperating())
- .WillOnce(Return(false));
- FinishSetupCancelled(mobile_apis::Result::UNSUPPORTED_RESOURCE);
- command_->Run();
-}
-
-TEST_F(SendLocationRequestTest, OnEvent_Success) {
- mobile_apis::Result::eType response_code = mobile_apis::Result::SUCCESS;
- (*message_)[strings::params][hmi_response::code] = response_code;
- (*message_)[strings::params][strings::connection_key] = kConnectionKey;
-
- Event event(hmi_apis::FunctionID::Navigation_SendLocation);
- event.set_smart_object(*message_);
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(app));
-
- command_->on_event(event);
-}
-
-TEST_F(SendLocationRequestTest, OnEvent_Cancelled) {
- (*message_)[strings::params][hmi_response::code] =
- mobile_apis::Result::SUCCESS;
- Event event(hmi_apis::FunctionID::Navigation_OnWayPointChange);
- event.set_smart_object(*message_);
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _))
- .Times(0);
- command_->on_event(event);
-}
-
-TEST_F(SendLocationRequestTest, Run_MandatoryParamsDisallowed_InvalidData) {
- (*message_)[strings::params][strings::connection_key] = kConnectionKey;
- (*message_)[strings::params][strings::function_id] = kFunctionID;
- (*message_)[strings::msg_params] = SmartObject(smart_objects::SmartType_Map);
- (*message_)[strings::msg_params][strings::address] = kCorrectAddress;
- (*message_)[strings::msg_params][strings::longitude_degrees] =
- kLongitudeDegrees;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- application_manager::CommandParametersPermissions& permissions =
- command_->get_parameters_permissions();
- // 1st one allowed
- permissions.allowed_params.insert(strings::longitude_degrees);
- // 2nd one disallowed
- permissions.disallowed_params.insert(strings::latitude_degrees);
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA), _));
- command_->Run();
-}
-
-} // namespace send_location_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/set_app_icon_test.cc b/src/components/application_manager/test/commands/mobile/set_app_icon_test.cc
deleted file mode 100644
index b278479df8..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_app_icon_test.cc
+++ /dev/null
@@ -1,151 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/set_app_icon_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace set_app_icon_request {
-
-namespace am = application_manager;
-using am::commands::SetAppIconRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-} // namespace
-
-class SetAppIconRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-};
-
-TEST_F(SetAppIconRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
- const std::string file_path = "file_path";
- MessageSharedPtr msg_vr = CreateFullParamsUISO();
- (*msg_vr)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg_vr)[am::strings::msg_params][am::strings::sync_file_name]
- [am::strings::value] = file_path;
-
- const std::string dir_path = "./";
- ON_CALL(app_mngr_settings_, app_icons_folder())
- .WillByDefault(ReturnRef(dir_path));
-
- utils::SharedPtr<SetAppIconRequest> req_vr =
- CreateCommand<SetAppIconRequest>(msg_vr);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
-
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(*mock_app, set_app_icon_path(_)).WillByDefault(Return(true));
- ON_CALL(*mock_app, app_icon_path()).WillByDefault(ReturnRef(file_path));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::info] = "info1";
-
- Event event(hmi_apis::FunctionID::UI_SetAppIcon);
- event.set_smart_object(*msg);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- req_vr->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*ui_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*ui_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-} // namespace set_app_icon_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/set_display_layout_test.cc b/src/components/application_manager/test/commands/mobile/set_display_layout_test.cc
deleted file mode 100644
index 8444b88d63..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_display_layout_test.cc
+++ /dev/null
@@ -1,254 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/set_display_layout_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_hmi_capabilities.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace set_display_layout_request {
-
-namespace am = application_manager;
-namespace mobile_result = mobile_apis::Result;
-using am::commands::SetDisplayLayoutRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-typedef ::utils::SharedPtr<SetDisplayLayoutRequest> CommandPtr;
-
-namespace {
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationKey = 2u;
-} // namespace
-
-MATCHER_P(CheckMshCorrId, corr_id, "") {
- return (*arg)[am::strings::params][am::strings::correlation_id].asUInt() ==
- corr_id;
-}
-
-class SetDisplayLayoutRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SetDisplayLayoutRequestTest() : mock_app_(CreateMockApp()) {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- }
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
- typedef TypeIf<kMocksAreNice,
- NiceMock<application_manager_test::MockHMICapabilities>,
- application_manager_test::MockHMICapabilities>::Result
- MockHMICapabilities;
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- false);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- sync_primitives::Lock lock_;
- MockAppPtr mock_app_;
-};
-
-typedef SetDisplayLayoutRequestTest::MockHMICapabilities MockHMICapabilities;
-
-TEST_F(SetDisplayLayoutRequestTest,
- OnEvent_UIHmiUnsupportedResource_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_ui = CreateFullParamsUISO();
- (*msg_ui)[am::strings::params][am::strings::connection_key] = kConnectionKey;
-
- utils::SharedPtr<SetDisplayLayoutRequest> command =
- CreateCommand<SetDisplayLayoutRequest>(msg_ui);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
-
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*msg)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
-
- Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
- event.set_smart_object(*msg);
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- ResultCommandExpectations(ui_command_result, "UI is not supported by system");
-}
-
-TEST_F(SetDisplayLayoutRequestTest, Run_InvalidApp_UNSUCCESS) {
- MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- CommandPtr command(CreateCommand<SetDisplayLayoutRequest>(msg));
-
- MockAppPtr invalid_mock_app;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(invalid_mock_app));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- command->Run();
-}
-
-TEST_F(SetDisplayLayoutRequestTest, Run_SUCCESS) {
- MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- CommandPtr command(CreateCommand<SetDisplayLayoutRequest>(msg));
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(kCorrelationKey));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetDisplayLayout))
- .WillRepeatedly(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(CheckMshCorrId(kCorrelationKey)))
- .WillOnce(Return(true));
-
- command->Run();
-}
-
-TEST_F(SetDisplayLayoutRequestTest, OnEvent_InvalidEventId_UNSUCCESS) {
- CommandPtr command(CreateCommand<SetDisplayLayoutRequest>());
- am::event_engine::Event event(hmi_apis::FunctionID::INVALID_ENUM);
- SmartObject msg(smart_objects::SmartType_Map);
-
- event.set_smart_object(msg);
-
- EXPECT_CALL(app_mngr_, hmi_capabilities()).Times(0);
- command->on_event(event);
-}
-
-TEST_F(SetDisplayLayoutRequestTest, OnEvent_SUCCESS) {
- am::event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
- MessageSharedPtr msg = CreateMessage();
-
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*msg)[am::strings::msg_params][am::hmi_response::display_capabilities] = 0;
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- event.set_smart_object(*msg);
-
- MockHMICapabilities hmi_capabilities;
- MessageSharedPtr dispaly_capabilities_msg = CreateMessage();
- (*dispaly_capabilities_msg)[am::hmi_response::templates_available] =
- "templates_available";
-
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(hmi_capabilities));
-
- EXPECT_CALL(hmi_capabilities, display_capabilities())
- .WillOnce(Return(dispaly_capabilities_msg.get()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
-
- CommandPtr command(CreateCommand<SetDisplayLayoutRequest>(msg));
- command->on_event(event);
-}
-
-} // namespace set_display_layout_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/set_global_properties_test.cc b/src/components/application_manager/test/commands/mobile/set_global_properties_test.cc
deleted file mode 100644
index a406e65bd2..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_global_properties_test.cc
+++ /dev/null
@@ -1,1153 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/set_global_properties_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_help_prompt_manager.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace set_global_properties_request {
-
-namespace am = application_manager;
-using am::commands::SetGlobalPropertiesRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using am::CommandsMap;
-using utils::custom_string::CustomString;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 1u;
-const std::string kText = "one";
-const uint32_t kPosition = 1u;
-} // namespace
-
-class SetGlobalPropertiesRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SetGlobalPropertiesRequestTest() : mock_app_(CreateMockApp()) {
- mock_help_prompt_manager_ =
- utils::SharedPtr<application_manager_test::MockHelpPromptManager>(
- new application_manager_test::MockHelpPromptManager());
- }
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- msg_params[am::strings::vr_help_title] = "vr_help_title";
- msg_params[am::strings::vr_help][0][am::strings::text] = "vr_help";
- msg_params[am::strings::vr_help][0][am::strings::position] = 1u;
- msg_params[am::strings::help_prompt][0][am::strings::text] = "help_promt";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- MessageSharedPtr CreateMsgParams() {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- return msg;
- }
-
- void VRArraySetupHelper(MessageSharedPtr msg,
- SmartObject& vr_help_title,
- SmartObject& vr_help_array) {
- (*msg)[am::strings::msg_params][am::strings::vr_help_title] = vr_help_title;
- vr_help_array[0] = SmartObject(smart_objects::SmartType_Map);
- vr_help_array[0][am::strings::text] = kText;
- vr_help_array[0][am::strings::position] = kPosition;
- (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- }
-
- void OnEventUISetupHelper(MessageSharedPtr msg,
- SharedPtr<SetGlobalPropertiesRequest> command) {
- SmartObject vr_help_title("yes");
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- VRArraySetupHelper(msg, vr_help_title, vr_help_array);
- EXPECT_CALL(mock_message_helper_,
- VerifyImageVrHelpItems(vr_help_array, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(app_mngr_,
- RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_vr_help_title(vr_help_title));
- EXPECT_CALL(*mock_app_, set_vr_help(vr_help_array));
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- EXPECT_CALL(*mock_app_, vr_help()).WillOnce(Return(&vr_help_array));
- EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_keyboard_props(_)).Times(0);
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
-
- command->Run();
- }
-
- void OnEventTTSSetupHelper(MessageSharedPtr msg,
- SharedPtr<SetGlobalPropertiesRequest> command) {
- SmartObject help_prompt(smart_objects::SmartType_Array);
- help_prompt[0][am::strings::text] = "Help_Prompt_One";
- (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
- SmartObject timeout_prompt(smart_objects::SmartType_Array);
- timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One";
- (*msg)[am::strings::msg_params][am::strings::timeout_prompt] =
- timeout_prompt;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_,
- RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_help_prompt(help_prompt));
- EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(&help_prompt));
- EXPECT_CALL(*mock_app_, set_timeout_prompt(timeout_prompt));
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(&timeout_prompt));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
-
- command->Run();
- }
-
- void EmptyExpectationsSetupHelper() {
- EXPECT_CALL(*mock_app_, set_vr_help_title(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_vr_help(_)).Times(0);
- EXPECT_CALL(*mock_app_, vr_help_title()).Times(0);
- EXPECT_CALL(*mock_app_, vr_help()).Times(0);
- EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_keyboard_props(_)).Times(0);
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
- }
-
- void ExpectInvalidData() {
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::INVALID_DATA),
- am::commands::Command::ORIGIN_SDL));
- }
-
- void ExpectVerifyImageVrHelpSuccess(SmartObject& smart_obj) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(smart_obj, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
- }
-
- void ExpectVerifyImageVrHelpUnsuccess() {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
- }
-
- void ExpectVerifyImageSuccess(SmartObject& smart_obj) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(smart_obj, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
- }
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- void ExpectationsHmiInterface_Run() {
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- }
- sync_primitives::Lock lock_;
- MockAppPtr mock_app_;
- utils::SharedPtr<application_manager_test::MockHelpPromptManager>
- mock_help_prompt_manager_;
-};
-
-TEST_F(SetGlobalPropertiesRequestTest,
- OnEvent_UIHmiSendSuccess_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_vr = CreateFullParamsUISO();
- (*msg_vr)[am::strings::msg_params][am::strings::vr_commands][0] =
- "vr_command";
-
- utils::SharedPtr<SetGlobalPropertiesRequest> command =
- CreateCommand<SetGlobalPropertiesRequest>(msg_vr);
-
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- const smart_objects::SmartObject* vr_help_title =
- &((*msg_vr)[am::strings::msg_params][am::strings::vr_help_title]);
- const smart_objects::SmartObject* vr_help =
- &((*msg_vr)[am::strings::msg_params][am::strings::vr_help]);
- const smart_objects::SmartObject* vr_help_prompt =
- &((*msg_vr)[am::strings::msg_params][am::strings::help_prompt]);
- ON_CALL(*mock_app_, vr_help_title()).WillByDefault(Return(vr_help_title));
- ON_CALL(*mock_app_, vr_help()).WillByDefault(Return(vr_help));
- ON_CALL(*mock_app_, help_prompt()).WillByDefault(Return(vr_help_prompt));
-
- ExpectationsHmiInterface_Run();
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
- (*msg)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
-
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- ON_CALL(mock_message_helper_,
- VerifyImageVrHelpItems(
- (*msg_vr)[am::strings::msg_params][am::strings::vr_help], _, _))
- .WillByDefault(Return(mobile_apis::Result::SUCCESS));
-
- ON_CALL(mock_message_helper_, VerifyImage(_, _, _))
- .WillByDefault(Return(mobile_apis::Result::SUCCESS));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
-
- (*msg_vr)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- Event event_vr(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event_vr.set_smart_object(*msg_vr);
-
- command->Run();
- command->on_event(event_vr);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- ResultCommandExpectations(ui_command_result, "UI is not supported by system");
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, OnEvent_SUCCESS_Expect_MessageNotSend) {
- MessageSharedPtr response = CreateMessage(smart_objects::SmartType_Map);
- (*response)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*response)[am::strings::msg_params][am::strings::info] = "test";
-
- am::event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event.set_smart_object(*response);
-
- utils::SharedPtr<SetGlobalPropertiesRequest> command =
- CreateCommand<SetGlobalPropertiesRequest>(response);
-
- MockAppPtr mock_app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
-
- EXPECT_CALL(*mock_app, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .Times(0);
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest,
- OnEvent_UNSUPPORTED_RESOURCE_Expect_false) {
- MessageSharedPtr response = CreateMessage(smart_objects::SmartType_Map);
- (*response)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*response)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*response)[am::strings::msg_params][am::strings::info] = "qwe";
-
- am::event_engine::Event event_tts(
- hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event_tts.set_smart_object(*response);
- am::event_engine::Event event_ui(
- hmi_apis::FunctionID::UI_SetGlobalProperties);
- event_tts.set_smart_object(*response);
- utils::SharedPtr<SetGlobalPropertiesRequest> command =
- CreateCommand<SetGlobalPropertiesRequest>(response);
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillRepeatedly(ReturnRef(*mock_help_prompt_manager_.get()));
-
- MessageSharedPtr response_to_mobile;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->Run();
- command->on_event(event_ui);
- command->on_event(event_tts);
-
- EXPECT_EQ((*response_to_mobile)[am::strings::msg_params][am::strings::success]
- .asBool(),
- false);
- EXPECT_EQ(
- (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(mobile_apis::Result::INVALID_DATA));
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRNoMenuAndKeyboard_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- OnEventUISetupHelper(msg, command);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRWithMenuAndKeyboard_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help_title("yes");
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- VRArraySetupHelper(msg, vr_help_title, vr_help_array);
- (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
- SmartObject menu_title("Menu_Title");
- (*msg)[am::strings::msg_params][am::hmi_request::menu_title] = menu_title;
- SmartObject menu_icon(smart_objects::SmartType_Map);
- menu_icon[am::strings::value] = "1";
- (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
- SmartObject keyboard_properties(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
- keyboard_properties;
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_vr_help_title(vr_help_title));
- EXPECT_CALL(*mock_app_, set_vr_help(vr_help_array));
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- EXPECT_CALL(*mock_app_, vr_help()).WillOnce(Return(&vr_help_array));
- EXPECT_CALL(*mock_app_, set_menu_title(menu_title));
- EXPECT_CALL(*mock_app_, set_menu_icon(menu_icon));
- EXPECT_CALL(*mock_app_, set_keyboard_props(keyboard_properties));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
-
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRBrokenMenuIcon_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help_title("yes");
- (*msg)[am::strings::msg_params][am::strings::vr_help_title] = vr_help_title;
- SmartObject menu_icon(smart_objects::SmartType_Map);
- menu_icon[am::strings::value] = "1";
- (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
- .WillOnce((Return(mobile_apis::Result::ABORTED)));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRBrokenVRHelp_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help_title("yes");
- SmartObject menu_icon(smart_objects::SmartType_Map);
- menu_icon[am::strings::value] = "1";
- (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- VRArraySetupHelper(msg, vr_help_title, vr_help_array);
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
- .WillOnce((Return(mobile_apis::Result::ABORTED)));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRIncorrectSyntax_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::msg_params][am::strings::app_id] = kAppId;
- SmartObject vr_help_title("wrong syntax string\\n");
- SmartObject menu_icon(smart_objects::SmartType_Map);
- menu_icon[am::strings::value] = "1";
- (*msg)[am::strings::msg_params][am::hmi_request::menu_icon] = menu_icon;
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- VRArraySetupHelper(msg, vr_help_title, vr_help_array);
-
- EXPECT_CALL(mock_message_helper_, VerifyImage(menu_icon, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRMissingTitle_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- vr_help_array[0] = SmartObject(smart_objects::SmartType_Map);
- vr_help_array[0][am::strings::text] = kText;
- vr_help_array[0][am::strings::position] = kPosition;
- (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRMissingArray_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help_title("yes");
- (*msg)[am::strings::msg_params][am::strings::vr_help_title] = vr_help_title;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_VRWrongOrder_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help_title("yes");
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- VRArraySetupHelper(msg, vr_help_title, vr_help_array);
- vr_help_array[1] = SmartObject(smart_objects::SmartType_Map);
- vr_help_array[1][am::strings::text] = "two";
- vr_help_array[1][am::strings::position] = 3u;
- (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help_array;
-
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(vr_help_array, _, _))
- .WillOnce((Return(mobile_apis::Result::SUCCESS)));
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_NoVR_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject keyboard_properties(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
- keyboard_properties;
- SmartObject menu_title("Menu_Title");
- (*msg)[am::strings::msg_params][am::hmi_request::menu_title] = menu_title;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_menu_title(menu_title));
- EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_keyboard_props(keyboard_properties));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_NoVRNoDataNoDefault_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject keyboard_properties(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
- keyboard_properties;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_keyboard_props(_));
- EXPECT_CALL(*mock_app_, app_id());
-
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_NoVRNoDataDefaultCreated_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject keyboard_properties(smart_objects::SmartType_Map);
- (*msg)[am::strings::msg_params][am::hmi_request::keyboard_properties] =
- keyboard_properties;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_menu_icon(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_keyboard_props(keyboard_properties));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_TTSHelpAndTimeout_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject help_prompt(smart_objects::SmartType_Array);
- help_prompt[0][am::strings::text] = "Help_Prompt_One";
- (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
- SmartObject timeout_prompt(smart_objects::SmartType_Array);
- timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One";
- (*msg)[am::strings::msg_params][am::strings::timeout_prompt] = timeout_prompt;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_help_prompt(help_prompt));
- EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(&help_prompt));
- EXPECT_CALL(*mock_app_, set_timeout_prompt(timeout_prompt));
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(&timeout_prompt));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_TTSOnlyHelp_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject help_prompt(smart_objects::SmartType_Array);
- help_prompt[0][am::strings::text] = "Help_Prompt_One";
- (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_help_prompt(help_prompt));
- EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(&help_prompt));
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_)).Times(0);
- EXPECT_CALL(*mock_app_, timeout_prompt()).Times(0);
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_TTSOnlyTimeout_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject timeout_prompt(smart_objects::SmartType_Array);
- timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One";
- (*msg)[am::strings::msg_params][am::strings::timeout_prompt] = timeout_prompt;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- EXPECT_CALL(*mock_app_, set_help_prompt(_)).Times(0);
- EXPECT_CALL(*mock_app_, help_prompt()).Times(0);
- EXPECT_CALL(*mock_app_, set_timeout_prompt(timeout_prompt));
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(&timeout_prompt));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
- EXPECT_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
- .WillOnce(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_TTSIncorrectSyntax_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject timeout_prompt(smart_objects::SmartType_Array);
- timeout_prompt[0][am::strings::text] = "Timeout_Prompt_One\\n";
- (*msg)[am::strings::msg_params][am::strings::timeout_prompt] = timeout_prompt;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidHelpPromptText_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject help_prompt(smart_objects::SmartType_Array);
- help_prompt[0][am::strings::text] =
- "invalid help prompt text with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt;
-
- ExpectVerifyImageVrHelpUnsuccess();
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidVrHelpText_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help(smart_objects::SmartType_Array);
- vr_help[0][am::strings::text] =
- "invalid vr_help text with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help;
-
- ExpectVerifyImageVrHelpSuccess(vr_help);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidImageValue_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject vr_help(smart_objects::SmartType_Array);
- vr_help[0][am::strings::text] = "vr_help";
- vr_help[0][am::strings::image][am::strings::value] =
- "invalid value text with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::vr_help] = vr_help;
-
- ExpectVerifyImageVrHelpSuccess(vr_help);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidMenuIcon_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject menu_icon(smart_objects::SmartType_Array);
- menu_icon[am::strings::value] =
- "invalid menu icon text with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::menu_icon] = menu_icon;
-
- ExpectVerifyImageSuccess(menu_icon);
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidMenuTitle_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject menu_title(smart_objects::SmartType_Array);
- menu_title = "invalid menu title text with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::menu_title] = menu_title;
-
- ExpectVerifyImageVrHelpUnsuccess();
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest,
- Run_InvalidLimitedCharacterList_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject limited_character_list(smart_objects::SmartType_Array);
- limited_character_list[0] =
- "invalid limited character list text with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::keyboard_properties]
- [am::strings::limited_character_list] = limited_character_list;
-
- ExpectVerifyImageVrHelpUnsuccess();
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest,
- Run_InvalidAutoCompleteText_INVALID_DATA) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject auto_complete_text(smart_objects::SmartType_Array);
- auto_complete_text =
- "invalid auto completetext with empty line in the end\\n";
- (*msg)[am::strings::msg_params][am::strings::keyboard_properties]
- [am::strings::auto_complete_text] = auto_complete_text;
-
- ExpectVerifyImageVrHelpUnsuccess();
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- ExpectInvalidData();
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_NoData_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- ExpectVerifyImageVrHelpUnsuccess();
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidApp_Canceled) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
-
- ExpectVerifyImageVrHelpUnsuccess();
-
- EmptyExpectationsSetupHelper();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- command->Run();
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, OnEvent_PendingRequest_UNSUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- hmi_apis::Common_Result::eType response_code =
- hmi_apis::Common_Result::SUCCESS;
- (*msg)[am::strings::params][am::hmi_response::code] = response_code;
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
-
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, OnEvent_UIAndSuccessResultCode_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- hmi_apis::Common_Result::eType response_code =
- hmi_apis::Common_Result::SUCCESS;
- (*msg)[am::strings::params][am::hmi_response::code] = response_code;
-
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
- OnEventUISetupHelper(msg, command);
-
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, am::commands::Command::ORIGIN_SDL))
- .WillOnce(Return(true));
-
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, OnEvent_UIAndWarningResultCode_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- hmi_apis::Common_Result::eType response_code =
- hmi_apis::Common_Result::WARNINGS;
- (*msg)[am::strings::params][am::hmi_response::code] = response_code;
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- OnEventUISetupHelper(msg, command);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, am::commands::Command::ORIGIN_SDL))
- .WillOnce(Return(true));
-
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidApp_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- hmi_apis::Common_Result::eType response_code =
- hmi_apis::Common_Result::WARNINGS;
- (*msg)[am::strings::params][am::hmi_response::code] = response_code;
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetGlobalProperties))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- OnEventUISetupHelper(msg, command);
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(MockAppPtr()));
-
- EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
-
- Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidEventID_Canceled) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
-
- Event event(hmi_apis::FunctionID::TTS_Stopped);
- event.set_smart_object(*msg);
-
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest,
- OnEvent_TTSAndSuccessResultCode_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- hmi_apis::Common_Result::eType response_code =
- hmi_apis::Common_Result::SUCCESS;
- (*msg)[am::strings::params][am::hmi_response::code] = response_code;
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- OnEventTTSSetupHelper(msg, command);
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(_, am::commands::Command::ORIGIN_SDL))
- .WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- command->on_event(event);
-}
-
-TEST_F(SetGlobalPropertiesRequestTest,
- OnEvent_TTSAndWarningsResultCode_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- const hmi_apis::Common_Result::eType response_code =
- hmi_apis::Common_Result::WARNINGS;
- (*msg)[am::strings::params][am::hmi_response::code] = response_code;
- ON_CALL(
- mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::TTS_SetGlobalProperties))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_TTS));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
- .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- OnEventTTSSetupHelper(msg, command);
-
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
-
- EXPECT_CALL(*mock_app_, help_prompt_manager())
- .WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event.set_smart_object(*msg);
-
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::WARNINGS));
-}
-
-} // namespace set_global_properties_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/set_media_clock_timer_test.cc b/src/components/application_manager/test/commands/mobile/set_media_clock_timer_test.cc
deleted file mode 100644
index cf668c8b36..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_media_clock_timer_test.cc
+++ /dev/null
@@ -1,352 +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 <string>
-
-#include "application_manager/commands/mobile/set_media_clock_timer_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace set_media_clock_timer_request {
-
-namespace am = ::application_manager;
-using am::commands::SetMediaClockRequest;
-using am::commands::MessageSharedPtr;
-using am::event_engine::Event;
-using am::MockMessageHelper;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-namespace UpdateMode = mobile_apis::UpdateMode;
-
-typedef SharedPtr<SetMediaClockRequest> SetMediaClockRequestPtr;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const uint32_t kCorrelationId = 2u;
-const uint32_t kAppID = 2u;
-const uint32_t kHours = 2u;
-const uint32_t kMinutes = 26u;
-const uint32_t kSeconds = 1u;
-} // namespace
-
-class SetMediaClockRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SetMediaClockRequestTest() : mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- }
-
- void ResultCommandExpectations(MessageSharedPtr msg,
- const std::string& info) {
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*msg)[am::strings::msg_params][am::strings::result_code].asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- EXPECT_EQ((*msg)[am::strings::msg_params][am::strings::info].asString(),
- info);
- }
-
- MessageSharedPtr CreateMsgParams() {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- return msg;
- }
-
- void ExpectationsSetupHelper(bool is_media) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(is_media));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- }
-
- MockAppPtr mock_app_;
-};
-
-TEST_F(SetMediaClockRequestTest,
- OnEvent_UIHmiSendUnsupportedResource_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
-
- utils::SharedPtr<SetMediaClockRequest> command =
- CreateCommand<SetMediaClockRequest>(msg);
-
- MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
- (*ev_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*ev_msg)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*ev_msg)[am::strings::msg_params][am::strings::info] =
- "UI is not supported by system";
-
- Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
- event.set_smart_object(*ev_msg);
-
- EXPECT_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillRepeatedly(Return(am::HmiInterfaces::STATE_NOT_RESPONSE));
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- ResultCommandExpectations(ui_command_result, "UI is not supported by system");
-}
-
-TEST_F(SetMediaClockRequestTest, Run_UpdateCountUp_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[am::strings::msg_params][am::strings::update_mode] =
- UpdateMode::COUNTUP;
- (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::start_time]
- [am::strings::minutes] = kMinutes;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
- kMinutes;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::seconds] =
- kSeconds;
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(true));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppID));
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetMediaClockTimer))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_UpdateCountDown_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[am::strings::msg_params][am::strings::update_mode] =
- UpdateMode::COUNTDOWN;
- (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::start_time]
- [am::strings::minutes] = kMinutes;
- (*msg)[am::strings::msg_params][am::strings::start_time]
- [am::strings::seconds] = kSeconds;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
- kMinutes;
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(true));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppID));
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
- .WillOnce(Return(kCorrelationId));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceFromFunction(hmi_apis::FunctionID::UI_SetMediaClockTimer))
- .WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
- ON_CALL(mock_hmi_interfaces_,
- GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
- .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillOnce(Return(true));
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_UpdateCountUpWrongTime_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[am::strings::msg_params][am::strings::update_mode] =
- UpdateMode::COUNTUP;
- (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::start_time]
- [am::strings::minutes] = kMinutes;
- (*msg)[am::strings::msg_params][am::strings::start_time]
- [am::strings::seconds] = kSeconds;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
- kMinutes;
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- ExpectationsSetupHelper(true);
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_UpdateCountDownWrongTime_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[am::strings::msg_params][am::strings::update_mode] =
- UpdateMode::COUNTDOWN;
- (*msg)[am::strings::msg_params][am::strings::start_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::start_time]
- [am::strings::minutes] = kMinutes;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::hours] =
- kHours;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::minutes] =
- kMinutes;
- (*msg)[am::strings::msg_params][am::strings::end_time][am::strings::seconds] =
- kSeconds;
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, is_media_application()).WillOnce(Return(true));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_NoStartTime_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
- (*msg)[am::strings::msg_params][am::strings::update_mode] =
- UpdateMode::COUNTDOWN;
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- ExpectationsSetupHelper(true);
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_NoUpdateMode_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- ExpectationsSetupHelper(true);
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_NotMediaApp_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- ExpectationsSetupHelper(false);
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, Run_InvalidApp_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
- EXPECT_CALL(*mock_app_, is_media_application()).Times(0);
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
-
- command->Run();
-}
-
-TEST_F(SetMediaClockRequestTest, OnEvent_Success) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*msg)[am::strings::msg_params] = SmartObject(smart_objects::SmartType_Null);
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
-
- MockAppPtr app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
-
- Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
- event.set_smart_object(*msg);
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
- command->on_event(event);
-}
-
-TEST_F(SetMediaClockRequestTest, OnEvent_Canceled) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<SetMediaClockRequest> command(
- CreateCommand<SetMediaClockRequest>(msg));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- Event event(hmi_apis::FunctionID::UI_Slider);
- event.set_smart_object(*msg);
-
- command->on_event(event);
-}
-
-} // namespace set_media_clock_timer_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/show_test.cc b/src/components/application_manager/test/commands/mobile/show_test.cc
deleted file mode 100644
index 4752bac0fd..0000000000
--- a/src/components/application_manager/test/commands/mobile/show_test.cc
+++ /dev/null
@@ -1,937 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/show_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace show_request {
-
-namespace am = application_manager;
-using am::commands::ShowRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using test::components::policy_test::MockPolicyHandlerInterface;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kFunctionID = 3u;
-} // namespace
-
-class ShowRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- ShowRequestTest() {
- mock_app_ = CreateMockApp();
- }
- sync_primitives::Lock lock_;
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- MessageSharedPtr CreateMsgParams() {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::params][am::strings::function_id] = kFunctionID;
- return msg;
- }
-
- void TestSetupHelper(MessageSharedPtr msg,
- hmi_apis::Common_TextFieldName::eType field_name,
- const char* field) {
- SmartObject msg_params(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::params][am::strings::function_id] = kFunctionID;
- msg_params[field] = text_field_;
- (*msg)[am::strings::msg_params] = msg_params;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- msg_params.erase(field);
- msg_params[am::hmi_request::show_strings][0][am::hmi_request::field_name] =
- static_cast<int32_t>(field_name);
- msg_params[am::hmi_request::show_strings][0][am::hmi_request::field_text] =
- text_field_;
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
- }
-
- void TestSetupHelperWrongSyntax(
- MessageSharedPtr msg,
- hmi_apis::Common_TextFieldName::eType field_name,
- const char* field) {
- SmartObject msg_params(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- msg_params[field] = text_field_;
- (*msg)[am::strings::msg_params] = msg_params;
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
- }
-
- void TestSetupHelperWithMetadata(
- MessageSharedPtr msg,
- hmi_apis::Common_TextFieldName::eType field_name,
- const char* field,
- size_t num_tags,
- int32_t* field_tags,
- bool set_field_text = true) {
- SmartObject msg_params(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::params][am::strings::function_id] = kFunctionID;
- if (set_field_text) {
- msg_params[field] = text_field_;
- }
- msg_params[am::strings::metadata_tags][field] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (size_t i = 0; i < num_tags; ++i) {
- const int32_t current_tag = field_tags[i];
- msg_params[am::strings::metadata_tags][field][i] = current_tag;
- }
- (*msg)[am::strings::msg_params] = msg_params;
-
- EXPECT_EQ((*msg)[am::strings::msg_params], msg_params);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params.erase(field);
- msg_params.erase(am::strings::metadata_tags);
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- if (set_field_text) {
- msg_params[am::hmi_request::show_strings][0]
- [am::hmi_request::field_name] =
- static_cast<int32_t>(field_name);
- msg_params[am::hmi_request::show_strings][0]
- [am::hmi_request::field_text] = text_field_;
- msg_params[am::hmi_request::show_strings][0]
- [am::hmi_request::field_types] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (size_t i = 0; i < num_tags; ++i) {
- const int32_t current_tag = field_tags[i];
- msg_params[am::hmi_request::show_strings][0]
- [am::hmi_request::field_types][i] = current_tag;
- }
- }
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
- }
-
- MockAppPtr mock_app_;
- std::string text_field_;
-};
-
-TEST_F(ShowRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_vr = CreateFullParamsUISO();
- (*msg_vr)[am::strings::msg_params][am::strings::menu_params]
- [am::hmi_request::parent_id] = 10u;
- (*msg_vr)[am::strings::msg_params][am::strings::menu_params]
- [am::strings::menu_name] = "menu_name";
-
- utils::SharedPtr<ShowRequest> command = CreateCommand<ShowRequest>(msg_vr);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::cmd_id] = kCommandId;
-
- Event event(hmi_apis::FunctionID::UI_Show);
- event.set_smart_object(*msg);
-
- MessageSharedPtr vr_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
-
- command->on_event(event);
-
- EXPECT_EQ((*vr_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*vr_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*vr_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*vr_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-TEST_F(ShowRequestTest, Run_SoftButtonExists_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[am::strings::soft_buttons] = "Soft_Buttons";
- (*msg)[am::strings::msg_params] = msg_params;
- SmartObject creation_msg_params(msg_params);
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler));
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(msg_params, _, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- EXPECT_CALL(
- mock_message_helper_,
- SubscribeApplicationToSoftButton(creation_msg_params, _, kFunctionID));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_SoftButtonNotExists_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[am::strings::soft_buttons] = "";
- (*msg)[am::strings::msg_params] = msg_params;
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler()).Times(0);
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(_, _, _, _)).Times(0);
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- EXPECT_CALL(*mock_app_, UnsubscribeFromSoftButtons(kFunctionID));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_SoftButtonExists_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[am::strings::soft_buttons] = "Soft_Buttons";
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- MockPolicyHandlerInterface mock_policy_handler;
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler));
- EXPECT_CALL(mock_message_helper_, ProcessSoftButtons(msg_params, _, _, _))
- .WillOnce(Return(mobile_apis::Result::ABORTED));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
-
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(mock_message_helper_, SubscribeApplicationToSoftButton(_, _, _))
- .Times(0);
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_Graphic_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject graphic(smart_objects::SmartType_Map);
- graphic[am::strings::value] = "1";
- msg_params[am::strings::graphic] = graphic;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_Graphic_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject graphic(smart_objects::SmartType_Map);
- graphic[am::strings::value] = "1";
- msg_params[am::strings::graphic] = graphic;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
- .WillOnce(Return(mobile_apis::Result::ABORTED));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_Graphic_WrongSyntax) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject graphic(smart_objects::SmartType_Map);
- graphic[am::strings::value] = "\\n";
- msg_params[am::strings::graphic] = graphic;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_SecondaryGraphic_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject graphic(smart_objects::SmartType_Map);
- graphic[am::strings::value] = "1";
- msg_params[am::strings::secondary_graphic] = graphic;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_SecondaryGraphic_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject graphic(smart_objects::SmartType_Map);
- graphic[am::strings::value] = "1";
- msg_params[am::strings::secondary_graphic] = graphic;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _))
- .WillOnce(Return(mobile_apis::Result::ABORTED));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_SecondaryGraphic_WrongSyntax) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject graphic(smart_objects::SmartType_Map);
- graphic[am::strings::value] = "";
- msg_params[am::strings::secondary_graphic] = graphic;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(mock_message_helper_, VerifyImage(graphic, _, _)).Times(0);
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(msg_params)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField1_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_1";
- TestSetupHelper(msg,
- hmi_apis::Common_TextFieldName::mainField1,
- am::strings::main_field_1);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField1_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_1\\n";
- TestSetupHelperWrongSyntax(msg,
- hmi_apis::Common_TextFieldName::mainField1,
- am::strings::main_field_1);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField2_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_2";
- TestSetupHelper(msg,
- hmi_apis::Common_TextFieldName::mainField2,
- am::strings::main_field_2);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField2_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_2\\n";
- TestSetupHelperWrongSyntax(msg,
- hmi_apis::Common_TextFieldName::mainField2,
- am::strings::main_field_2);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField3_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_3";
- TestSetupHelper(msg,
- hmi_apis::Common_TextFieldName::mainField3,
- am::strings::main_field_3);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField3_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_3\\n";
- TestSetupHelperWrongSyntax(msg,
- hmi_apis::Common_TextFieldName::mainField3,
- am::strings::main_field_3);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField4_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_4";
- TestSetupHelper(msg,
- hmi_apis::Common_TextFieldName::mainField4,
- am::strings::main_field_4);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField4_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_4\\n";
- TestSetupHelperWrongSyntax(msg,
- hmi_apis::Common_TextFieldName::mainField4,
- am::strings::main_field_4);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField1_MetadataTag) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_1";
- const size_t num_tags = 1;
- int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
- TestSetupHelperWithMetadata(msg,
- hmi_apis::Common_TextFieldName::mainField1,
- am::strings::main_field_1,
- num_tags,
- tags);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField1_MultipleMetadataTags) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_1";
- const size_t num_tags = 5;
- int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaTitle,
- hmi_apis::Common_MetadataType::mediaArtist,
- hmi_apis::Common_MetadataType::rating,
- hmi_apis::Common_MetadataType::humidity,
- hmi_apis::Common_MetadataType::currentTemperature};
- TestSetupHelperWithMetadata(msg,
- hmi_apis::Common_TextFieldName::mainField1,
- am::strings::main_field_1,
- num_tags,
- tags);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField2_MetadataTag) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_2";
- const size_t num_tags = 1;
- int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
- TestSetupHelperWithMetadata(msg,
- hmi_apis::Common_TextFieldName::mainField2,
- am::strings::main_field_2,
- num_tags,
- tags);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField3_MetadataTag) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_3";
- const size_t num_tags = 1;
- int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
- TestSetupHelperWithMetadata(msg,
- hmi_apis::Common_TextFieldName::mainField3,
- am::strings::main_field_3,
- num_tags,
- tags);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField4_MetadataTag) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_4";
- const size_t num_tags = 1;
- int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
- TestSetupHelperWithMetadata(msg,
- hmi_apis::Common_TextFieldName::mainField4,
- am::strings::main_field_4,
- num_tags,
- tags);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MainField1_MetadataTagWithNoFieldData) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Main_Field_1";
- const size_t num_tags = 1;
- int32_t tags[num_tags] = {hmi_apis::Common_MetadataType::mediaArtist};
- TestSetupHelperWithMetadata(msg,
- hmi_apis::Common_TextFieldName::mainField1,
- am::strings::main_field_1,
- num_tags,
- tags,
- false);
- command->Run();
-
- MessageSharedPtr ev_msg = CreateMessage(smart_objects::SmartType_Map);
- (*ev_msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*ev_msg)[am::strings::msg_params][am::strings::app_id] = kConnectionKey;
- (*ev_msg)[am::strings::msg_params][am::strings::info] = "";
-
- Event event(hmi_apis::FunctionID::UI_Show);
- event.set_smart_object(*ev_msg);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(mobile_apis::Result::WARNINGS));
-}
-
-TEST_F(ShowRequestTest, Run_MediaClock_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Media_Clock";
- TestSetupHelper(msg,
- hmi_apis::Common_TextFieldName::mediaClock,
- am::strings::media_clock);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MediaClock_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Media_Clock\\n";
- TestSetupHelperWrongSyntax(msg,
- hmi_apis::Common_TextFieldName::mediaClock,
- am::strings::media_clock);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MediaTrack_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Media_Track";
- TestSetupHelper(msg,
- hmi_apis::Common_TextFieldName::mediaTrack,
- am::strings::media_track);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_MediaTrack_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Media_Track\\n";
- TestSetupHelperWrongSyntax(msg,
- hmi_apis::Common_TextFieldName::mediaTrack,
- am::strings::media_track);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_StatusBar_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Status_Bar";
- TestSetupHelper(
- msg, hmi_apis::Common_TextFieldName::statusBar, am::strings::status_bar);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_StatusBar_WrongSyntax) {
- MessageSharedPtr msg = CreateMessage();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- text_field_ = "Status_Bar\\n";
- TestSetupHelperWrongSyntax(
- msg, hmi_apis::Common_TextFieldName::statusBar, am::strings::status_bar);
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_Alignment_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[am::strings::alignment] = "Alignment";
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_CustomPresets_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject custom_presets(smart_objects::SmartType_Array);
- custom_presets[0] = "Custom_Presets";
- msg_params[am::strings::custom_presets] = custom_presets;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId));
-
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::hmi_request::show_strings] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_));
- EXPECT_CALL(*mock_app_, set_show_command(msg_params));
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_CustomPresets_WrongSyntax) {
- MessageSharedPtr msg = CreateMsgParams();
- SmartObject msg_params(smart_objects::SmartType_Map);
- SmartObject custom_presets(smart_objects::SmartType_Array);
- custom_presets[0] = "Custom_Presets\\t";
- msg_params[am::strings::custom_presets] = custom_presets;
- (*msg)[am::strings::msg_params] = msg_params;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
-
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_InvalidApp_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(MockAppPtr()));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, Run_EmptyParams_Canceled) {
- MessageSharedPtr msg = CreateMsgParams();
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*mock_app_, app_id()).Times(0);
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).Times(0);
- EXPECT_CALL(*mock_app_, set_show_command(_)).Times(0);
-
- command->Run();
-}
-
-TEST_F(ShowRequestTest, OnEvent_SuccessResultCode_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
- (*msg)[am::strings::msg_params] = SmartObject(smart_objects::SmartType_Map);
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::eType::SUCCESS), _));
-
- Event event(hmi_apis::FunctionID::UI_Show);
- event.set_smart_object(*msg);
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
-
- command->on_event(event);
-}
-
-TEST_F(ShowRequestTest, OnEvent_WarningsResultCode_SUCCESS) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::hmi_response::code] =
- mobile_apis::Result::WARNINGS;
- (*msg)[am::strings::params][am::hmi_response::message] = "Response Info";
- (*msg)[am::strings::msg_params] = SmartObject(smart_objects::SmartType_Map);
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
-
- Event event(hmi_apis::FunctionID::UI_Show);
- event.set_smart_object(*msg);
-
- EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
-
- command->on_event(event);
-}
-
-TEST_F(ShowRequestTest, OnEvent_WrongFunctionID_Canceled) {
- MessageSharedPtr msg = CreateMessage();
- (*msg)[am::strings::params][am::hmi_response::code] =
- mobile_apis::Result::SUCCESS;
-
- SharedPtr<ShowRequest> command(CreateCommand<ShowRequest>(msg));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- Event event(hmi_apis::FunctionID::UI_Alert);
- event.set_smart_object(*msg);
-
- command->on_event(event);
-}
-
-} // namespace show_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/simple_notification_commands_test.cc b/src/components/application_manager/test/commands/mobile/simple_notification_commands_test.cc
deleted file mode 100644
index 7ded373d29..0000000000
--- a/src/components/application_manager/test/commands/mobile/simple_notification_commands_test.cc
+++ /dev/null
@@ -1,99 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_message_helper.h"
-#include "command_impl.h"
-#include "commands/commands_test.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"
-#include "mobile/on_permissions_change_notification.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace simple_notification_commands_test {
-
-namespace am = ::application_manager;
-namespace commands = am::commands;
-
-using ::testing::_;
-using ::testing::Types;
-using ::testing::Return;
-
-template <class Command>
-class MobileNotificationCommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-typedef Types<commands::OnAppInterfaceUnregisteredNotification,
- commands::OnAudioPassThruNotification,
- commands::OnLanguageChangeNotification,
- commands::OnPermissionsChangeNotification,
- commands::mobile::OnDriverDistractionNotification>
- NotificationCommandsList;
-
-MATCHER(CheckNotificationMessage, "") {
- return (*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
- commands::CommandImpl::mobile_protocol_type_ &&
- (*arg)[am::strings::params][am::strings::protocol_version].asInt() ==
- commands::CommandImpl::protocol_version_ &&
- (*arg)[am::strings::params][am::strings::message_type].asInt() ==
- application_manager::MessageType::kNotification;
-}
-
-TYPED_TEST_CASE(MobileNotificationCommandsTest, NotificationCommandsList);
-
-TYPED_TEST(MobileNotificationCommandsTest, Run_SendMessageToMobile_SUCCESS) {
- ::utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- EXPECT_CALL(this->app_mngr_,
- SendMessageToMobile(CheckNotificationMessage(), _));
- command->Run();
-}
-
-} // namespace simple_notification_commands_test
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/simple_response_commands_test.cc b/src/components/application_manager/test/commands/mobile/simple_response_commands_test.cc
deleted file mode 100644
index d80a7e0551..0000000000
--- a/src/components/application_manager/test/commands/mobile/simple_response_commands_test.cc
+++ /dev/null
@@ -1,199 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/helpers.h"
-#include "utils/shared_ptr.h"
-#include "commands/commands_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "mobile/read_did_response.h"
-#include "mobile/delete_command_response.h"
-#include "mobile/alert_maneuver_response.h"
-#include "mobile/alert_response.h"
-#include "mobile/list_files_response.h"
-#include "mobile/subscribe_button_response.h"
-#include "mobile/add_sub_menu_response.h"
-#include "mobile/diagnostic_message_response.h"
-#include "mobile/dial_number_response.h"
-#include "mobile/end_audio_pass_thru_response.h"
-#include "mobile/get_dtcs_response.h"
-#include "mobile/get_vehicle_data_response.h"
-#include "mobile/unregister_app_interface_response.h"
-#include "mobile/unsubscribe_button_response.h"
-#include "mobile/unsubscribe_way_points_response.h"
-#include "mobile/update_turn_list_response.h"
-#include "mobile/slider_response.h"
-#include "mobile/speak_response.h"
-#include "mobile/subscribe_vehicle_data_response.h"
-#include "mobile/subscribe_way_points_response.h"
-#include "mobile/system_response.h"
-#include "mobile/get_way_points_response.h"
-#include "mobile/perform_interaction_response.h"
-#include "mobile/perform_audio_pass_thru_response.h"
-#include "mobile/set_global_properties_response.h"
-#include "mobile/set_media_clock_timer_response.h"
-#include "mobile/show_constant_tbt_response.h"
-#include "mobile/show_response.h"
-#include "mobile/add_command_response.h"
-#include "mobile/send_location_response.h"
-#include "mobile/set_app_icon_response.h"
-#include "mobile/set_display_layout_response.h"
-#include "mobile/generic_response.h"
-#include "mobile/set_app_icon_response.h"
-#include "mobile/scrollable_message_response.h"
-#include "mobile/change_registration_response.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace simple_response_commands_test {
-
-namespace commands = ::application_manager::commands;
-namespace am = ::application_manager;
-
-using ::testing::_;
-using ::testing::NotNull;
-using ::testing::Types;
-
-using commands::MessageSharedPtr;
-
-template <class Command>
-class MobileResponseCommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {
- public:
- typedef Command CommandType;
-};
-
-typedef Types<commands::ListFilesResponse,
- commands::ReadDIDResponse,
- commands::DeleteCommandResponse,
- commands::AlertManeuverResponse,
- commands::AlertResponse,
- commands::SubscribeButtonResponse,
- commands::AddSubMenuResponse,
- commands::DiagnosticMessageResponse,
- commands::DialNumberResponse,
- commands::EndAudioPassThruResponse,
- commands::GetDTCsResponse,
- commands::GetVehicleDataResponse,
- commands::UnregisterAppInterfaceResponse,
- commands::UnsubscribeWayPointsResponse,
- commands::UpdateTurnListResponse,
- commands::UnsubscribeButtonResponse,
- commands::SliderResponse,
- commands::SpeakResponse,
- commands::SubscribeVehicleDataResponse,
- commands::SubscribeWayPointsResponse,
- commands::SystemResponse,
- commands::GetWayPointsResponse,
- commands::PerformInteractionResponse,
- commands::PerformAudioPassThruResponse,
- commands::SetGlobalPropertiesResponse,
- commands::SetMediaClockTimerResponse,
- commands::ShowConstantTBTResponse,
- commands::ShowResponse,
- commands::SystemResponse,
- commands::AddCommandResponse,
- commands::SendLocationResponse,
- commands::SetAppIconResponse,
- commands::SetDisplayLayoutResponse,
- commands::ChangeRegistrationResponse> ResponseCommandsList;
-
-TYPED_TEST_CASE(MobileResponseCommandsTest, ResponseCommandsList);
-
-TYPED_TEST(MobileResponseCommandsTest, Run_SendResponseToMobile_SUCCESS) {
- ::utils::SharedPtr<typename TestFixture::CommandType> command =
- this->template CreateCommand<typename TestFixture::CommandType>();
- EXPECT_CALL(this->app_mngr_, SendMessageToMobile(NotNull(), _));
- command->Run();
-}
-
-class GenericResponseFromHMICommandsTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-MATCHER_P2(CheckMessageParams, success, result, "") {
- const bool is_msg_type_correct =
- (am::MessageType::kResponse) ==
- static_cast<int32_t>(
- (*arg)[am::strings::params][am::strings::message_type].asInt());
- const bool is_success_correct =
- success == (*arg)[am::strings::msg_params][am::strings::success].asBool();
- const bool is_result_code_correct =
- result ==
- static_cast<int32_t>(
- (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
-
- using namespace helpers;
- return Compare<bool, EQ, ALL>(
- true, is_msg_type_correct, is_success_correct, is_result_code_correct);
-}
-
-TEST_F(GenericResponseFromHMICommandsTest, Run_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
-
- SharedPtr<commands::GenericResponse> command(
- CreateCommand<commands::GenericResponse>(command_msg));
-
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(
- CheckMessageParams(false, mobile_apis::Result::INVALID_DATA), false));
-
- command->Run();
-}
-
-class ScrollableMessageResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(ScrollableMessageResponseTest, Run_SUCCESS) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::SUCCESS;
-
- MockAppPtr app(CreateMockApp());
-
- SharedPtr<am::commands::ScrollableMessageResponse> command(
- CreateCommand<am::commands::ScrollableMessageResponse>(message));
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app));
- EXPECT_CALL(*app, UnsubscribeFromSoftButtons(_));
- command->Run();
-}
-
-} // namespace simple_response_commands_test
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/slider_test.cc b/src/components/application_manager/test/commands/mobile/slider_test.cc
deleted file mode 100644
index 53764e3fcd..0000000000
--- a/src/components/application_manager/test/commands/mobile/slider_test.cc
+++ /dev/null
@@ -1,340 +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 <string>
-#include <set>
-
-#include "application_manager/commands/mobile/slider_request.h"
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace slider_request {
-
-namespace am = application_manager;
-using am::commands::SliderRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockMessageHelper;
-using policy_test::MockPolicyHandlerInterface;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-typedef SharedPtr<SliderRequest> CommandPtr;
-
-namespace {
-const int32_t kCommandId = 1;
-const uint32_t kAppId = 1u;
-const uint32_t kCmdId = 1u;
-const uint32_t kConnectionKey = 2u;
-const uint32_t kDefaultTimeout = 1000u;
-const uint32_t kCorrelationId = 2u;
-const uint32_t kFunctionId = 3u;
-const uint32_t kNumTicks = 2u;
-const uint32_t kPositionGreaterTicks = 3u;
-const uint32_t kPositionLessTicks = 1u;
-} // namespace
-
-class SliderRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SliderRequestTest()
- : mock_app_(CreateMockApp())
- , msg_(CreateMessage(smart_objects::SmartType_Map)) {}
-
- MessageSharedPtr CreateFullParamsUISO() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- smart_objects::SmartObject menu_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- menu_params[am::strings::position] = 10;
- menu_params[am::strings::menu_name] = "LG";
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::strings::cmd_id] = kCmdId;
- msg_params[am::strings::menu_params] = menu_params;
- msg_params[am::strings::app_id] = kAppId;
- msg_params[am::strings::cmd_icon] = 1;
- msg_params[am::strings::cmd_icon][am::strings::value] = "10";
- (*msg)[am::strings::msg_params] = msg_params;
-
- return msg;
- }
-
- void PreConditions() {
- (*msg_)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg_)[am::strings::msg_params][am::strings::num_ticks] = kNumTicks;
- (*msg_)[am::strings::msg_params][am::strings::position] =
- kPositionLessTicks;
- (*msg_)[am::strings::msg_params][am::strings::slider_footer][0] =
- "slider_footer1";
- (*msg_)[am::strings::msg_params][am::strings::slider_footer][1] =
- "slider_footer2";
- (*msg_)[am::strings::msg_params][am::strings::slider_header] =
- "slider_header";
-
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- }
-
- void ExpectManageMobileCommandWithResultCode(
- const mobile_apis::Result::eType code) {
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(code),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- }
-
- sync_primitives::Lock lock_;
-
- MockAppPtr mock_app_;
- MessageSharedPtr msg_;
- MockPolicyHandlerInterface mock_policy_handler_;
-};
-
-TEST_F(SliderRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
- MessageSharedPtr msg_ui = CreateFullParamsUISO();
- (*msg_ui)[am::strings::params][am::strings::connection_key] = kConnectionKey;
-
- utils::SharedPtr<SliderRequest> command =
- CreateCommand<SliderRequest>(msg_ui);
-
- MockAppPtr mock_app = CreateMockApp();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app));
-
- ON_CALL(*mock_app, app_id()).WillByDefault(Return(kConnectionKey));
-
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- (*msg)[am::strings::msg_params][am::strings::info] = "info";
-
- Event event(hmi_apis::FunctionID::UI_Slider);
- event.set_smart_object(*msg);
-
- MessageSharedPtr ui_command_result;
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true)));
-
- command->on_event(event);
-
- EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success]
- .asBool(),
- true);
- EXPECT_EQ(
- (*ui_command_result)[am::strings::msg_params][am::strings::result_code]
- .asInt(),
- static_cast<int32_t>(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE));
- if ((*ui_command_result)[am::strings::msg_params].keyExists(
- am::strings::info)) {
- EXPECT_FALSE(
- (*ui_command_result)[am::strings::msg_params][am::strings::info]
- .asString()
- .empty());
- }
-}
-
-class CallOnTimeOut {
- public:
- CallOnTimeOut(CommandRequestImpl& command) : command_(command) {}
-
- void operator()() {
- command_.onTimeOut();
- }
-
- CommandRequestImpl& command_;
-};
-
-TEST_F(SliderRequestTest, Init_SUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- EXPECT_TRUE(command->Init());
-}
-
-TEST_F(SliderRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- PreConditions();
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(ApplicationSharedPtr()));
- ExpectManageMobileCommandWithResultCode(
- mobile_apis::Result::APPLICATION_NOT_REGISTERED);
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->Run();
-}
-
-TEST_F(SliderRequestTest, Run_PositionGreaterTicks_UNSUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::position] =
- kPositionGreaterTicks;
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
- command->Run();
-}
-
-TEST_F(SliderRequestTest, Run_SliderFooterNotEqToNumticks_UNSUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::slider_footer][2] =
- "slider_footer3";
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
- command->Run();
-}
-
-TEST_F(SliderRequestTest, Run_InvalidSliderHeader_UNSUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::slider_header] =
- "invalid_test_with_empty_str\\n";
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->Run();
-}
-
-TEST_F(SliderRequestTest, Run_InvalidSliderFooter_UNSUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::slider_footer][0] =
- "invalid_test_with_empty_str\\n";
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app_));
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::INVALID_DATA);
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->Run();
-}
-
-TEST_F(SliderRequestTest, Run_SUCCESS) {
- PreConditions();
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_Slider)));
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->Run();
-}
-
-TEST_F(SliderRequestTest, OnEvent_UI_OnResetTimeout_UNSUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
- (*msg_)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- EXPECT_TRUE(command->Init());
-
- EXPECT_CALL(app_mngr_,
- updateRequestTimeout(kConnectionKey, kCorrelationId, _));
-
- Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
- event.set_smart_object(*msg_);
- command->on_event(event);
-}
-
-TEST_F(SliderRequestTest, OnEvent_UI_UnknownEventId_UNSUCCESS) {
- PreConditions();
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
- event.set_smart_object(*msg_);
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->on_event(event);
-}
-
-TEST_F(SliderRequestTest, OnEvent_UISliderPositionExists_SUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::TIMED_OUT;
- (*msg_)[am::strings::params][am::strings::data]
- [am::strings::slider_position] = "position";
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::TIMED_OUT);
-
- Event event(hmi_apis::FunctionID::UI_Slider);
- event.set_smart_object(*msg_);
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->on_event(event);
-}
-
-TEST_F(SliderRequestTest, OnEvent_UISliderAborted_SUCCESS) {
- PreConditions();
- (*msg_)[am::strings::msg_params][am::strings::timeout] = kDefaultTimeout;
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::ABORTED;
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::ABORTED);
-
- Event event(hmi_apis::FunctionID::UI_Slider);
- event.set_smart_object(*msg_);
-
- CommandPtr command(CreateCommand<SliderRequest>(msg_));
- command->on_event(event);
-}
-
-} // namespace slider_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace tests
diff --git a/src/components/application_manager/test/commands/mobile/speak_request_test.cc b/src/components/application_manager/test/commands/mobile/speak_request_test.cc
deleted file mode 100644
index f07012d315..0000000000
--- a/src/components/application_manager/test/commands/mobile/speak_request_test.cc
+++ /dev/null
@@ -1,398 +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 <string>
-#include "gtest/gtest.h"
-#include "mobile/speak_request.h"
-#include "utils/shared_ptr.h"
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/shared_ptr.h"
-#include "utils/helpers.h"
-#include "utils/make_shared.h"
-#include "smart_objects/smart_object.h"
-#include "utils/custom_string.h"
-#include "application_manager/application.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace speak_request {
-
-namespace am = application_manager;
-namespace mobile_result = mobile_apis::Result;
-namespace hmi_response = ::application_manager::hmi_response;
-namespace strings = ::application_manager::strings;
-using am::commands::CommandImpl;
-using am::ApplicationManager;
-using am::commands::MessageSharedPtr;
-using am::ApplicationSharedPtr;
-using am::MockMessageHelper;
-using ::testing::_;
-using ::utils::SharedPtr;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using am::commands::SpeakRequest;
-using ::test::components::application_manager_test::MockApplication;
-
-typedef SharedPtr<SpeakRequest> CommandPtr;
-
-namespace {
-const uint32_t kAppId = 10u;
-const uint32_t kConnectionKey = 5u;
-}
-
-class SpeakRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SpeakRequestTest()
- : request_(CreateMessage(smart_objects::SmartType_Map))
- , response_(CreateMessage(smart_objects::SmartType_Map))
- , app_(CreateMockApp()) {}
-
- void CheckExpectations(const hmi_apis::Common_Result::eType hmi_response,
- const mobile_apis::Result::eType mobile_response,
- const am::HmiInterfaces::InterfaceState state,
- const bool success) {
- utils::SharedPtr<SpeakRequest> command =
- CreateCommand<SpeakRequest>(request_);
-
- (*response_)[strings::params][hmi_response::code] = hmi_response;
- (*response_)[strings::msg_params] = 0;
-
- am::event_engine::Event event_tts(hmi_apis::FunctionID::TTS_Speak);
- event_tts.set_smart_object(*response_);
-
- MockAppPtr mock_app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
-
- MessageSharedPtr response_to_mobile;
- EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_))
- .WillRepeatedly(Return(state));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- _, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_tts);
-
- EXPECT_EQ(
- (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
- success);
- EXPECT_EQ((*response_to_mobile)[strings::msg_params][strings::result_code]
- .asInt(),
- static_cast<int32_t>(mobile_response));
- }
-
- MessageSharedPtr request_;
- MessageSharedPtr response_;
- MockAppPtr app_;
-};
-
-TEST_F(SpeakRequestTest, OnEvent_SUCCESS_Expect_true) {
- utils::SharedPtr<SpeakRequest> command =
- CreateCommand<SpeakRequest>(request_);
-
- (*response_)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
- (*response_)[strings::msg_params] = 0;
-
- am::event_engine::Event event_tts(hmi_apis::FunctionID::TTS_Speak);
- event_tts.set_smart_object(*response_);
-
- MockAppPtr mock_app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app));
-
- MessageSharedPtr response_to_mobile;
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))
- .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
-
- command->on_event(event_tts);
-
- EXPECT_EQ(
- (*response_to_mobile)[strings::msg_params][strings::success].asBool(),
- true);
- EXPECT_EQ(
- (*response_to_mobile)[strings::msg_params][strings::result_code].asInt(),
- static_cast<int32_t>(mobile_apis::Result::SUCCESS));
-}
-
-TEST_F(SpeakRequestTest,
- OnEvent_UNSUPPORTED_RESOURCE_STATE_AVAILABLE_Expect_true) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_AVAILABLE,
- true);
-}
-
-TEST_F(SpeakRequestTest,
- OnEvent_UNSUPPORTED_RESOURCE_STATE_NOT_AVAILABLE_Expect_false) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_NOT_AVAILABLE,
- false);
-}
-
-TEST_F(SpeakRequestTest,
- OnEvent_UNSUPPORTED_RESOURCE_STATE_NOT_RESPONSE_Expect_true) {
- CheckExpectations(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- am::HmiInterfaces::STATE_NOT_RESPONSE,
- true);
-}
-
-TEST_F(SpeakRequestTest, Run_ApplicationIsNotRegistered) {
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_))
- .WillByDefault(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithWhiteSpace_InvalidData) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = " ";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar1_InvalidData) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "sd\\t";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar2_InvalidData) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "sd\\n";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar3_InvalidData) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "sd\tdf";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithIncorrectChar4_InvalidData) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "sd\n rer";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithIncorrectCharInfirstPlace_InvalidData) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "\n";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgWithEmptyString_Success) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
- ON_CALL(*app_, app_id()).WillByDefault(Return(kAppId));
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, Run_MsgCorrect_Success) {
- (*request_)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "asda";
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
- ON_CALL(*app_, app_id()).WillByDefault(Return(kAppId));
-
- EXPECT_CALL(
- app_mngr_,
- ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::TTS_Speak)));
-
- command->Run();
-}
-
-TEST_F(SpeakRequestTest, OnEvent_WrongEventId_UNSUCCESS) {
- Event event(Event::EventID::INVALID_ENUM);
- CommandPtr command(CreateCommand<SpeakRequest>());
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
- command->on_event(event);
-}
-
-TEST_F(SpeakRequestTest, OnEvent_TTS_Speak_SUCCESS) {
- Event event(Event::EventID::TTS_Speak);
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- hmi_apis::Common_Result::eType hmi_result = hmi_apis::Common_Result::SUCCESS;
- (*event_msg)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "1234";
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_result;
- (*event_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- event.set_smart_object(*event_msg);
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
- command->on_event(event);
-}
-
-TEST_F(SpeakRequestTest, OnEvent_TTS_SpeakWithWarning_WarningWithSuccess) {
- Event event(Event::EventID::TTS_Speak);
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- hmi_apis::Common_Result::eType hmi_result = hmi_apis::Common_Result::WARNINGS;
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_result;
- (*event_msg)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "asda";
- event.set_smart_object(*event_msg);
- CommandPtr command(CreateCommand<SpeakRequest>());
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app_));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::WARNINGS), _));
- command->on_event(event);
-}
-
-TEST_F(SpeakRequestTest, OnEvent_TTS_OnResetTimeout_UpdateTimeout) {
- Event event(Event::EventID::TTS_OnResetTimeout);
- (*request_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*request_)[am::strings::params][am::strings::correlation_id] = kAppId;
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- EXPECT_CALL(app_mngr_, updateRequestTimeout(kConnectionKey, kAppId, _));
-
- command->on_event(event);
-}
-
-TEST_F(SpeakRequestTest, OnEvent_ApplicationIsNotRegistered_UNSUCCESS) {
- const hmi_apis::Common_Result::eType hmi_result =
- hmi_apis::Common_Result::SUCCESS;
-
- Event event(Event::EventID::TTS_Speak);
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::msg_params][am::strings::tts_chunks][0]
- [am::strings::text] = "text";
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_result;
- (*event_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- event.set_smart_object(*event_msg);
- CommandPtr command(CreateCommand<SpeakRequest>(request_));
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- command->on_event(event);
-}
-
-} // namespace speak_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace component
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/subscribe_button_request_test.cc b/src/components/application_manager/test/commands/mobile/subscribe_button_request_test.cc
deleted file mode 100644
index 8d31b67a53..0000000000
--- a/src/components/application_manager/test/commands/mobile/subscribe_button_request_test.cc
+++ /dev/null
@@ -1,204 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/include/application_manager/commands/mobile/subscribe_button_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace subscribe_button_request {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::DoAll;
-using ::testing::SaveArg;
-namespace am = ::application_manager;
-using am::commands::SubscribeButtonRequest;
-using am::commands::MessageSharedPtr;
-
-typedef SharedPtr<SubscribeButtonRequest> CommandPtr;
-
-class SubscribeButtonRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- typedef TypeIf<kMocksAreNice,
- NiceMock<application_manager_test::MockHMICapabilities>,
- application_manager_test::MockHMICapabilities>::Result
- MockHMICapabilities;
-};
-
-typedef SubscribeButtonRequestTest::MockHMICapabilities MockHMICapabilities;
-
-TEST_F(SubscribeButtonRequestTest, Run_AppNotRegistered_UNSUCCESS) {
- CommandPtr command(CreateCommand<SubscribeButtonRequest>());
-
- ON_CALL(app_mngr_, application(_))
- .WillByDefault(Return(SharedPtr<am::Application>()));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::APPLICATION_NOT_REGISTERED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(SubscribeButtonRequestTest, Run_SubscriptionNotAllowed_UNSUCCESS) {
- MessageSharedPtr msg(CreateMessage());
- (*msg)[am::strings::msg_params][am::strings::button_name] =
- mobile_apis::ButtonName::SEEKLEFT;
- CommandPtr command(CreateCommand<SubscribeButtonRequest>(msg));
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- ON_CALL(*app, is_media_application()).WillByDefault(Return(false));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::REJECTED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(SubscribeButtonRequestTest, Run_UiIsNotSupported_UNSUCCESS) {
- CommandPtr command(CreateCommand<SubscribeButtonRequest>());
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- MockHMICapabilities hmi_capabilities;
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities));
- ON_CALL(hmi_capabilities, is_ui_cooperating()).WillByDefault(Return(false));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::UNSUPPORTED_RESOURCE,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(SubscribeButtonRequestTest, Run_IsSubscribedToButton_UNSUCCESS) {
- const mobile_apis::ButtonName::eType kButtonName =
- mobile_apis::ButtonName::SEEKLEFT;
-
- MessageSharedPtr msg(CreateMessage());
- (*msg)[am::strings::msg_params][am::strings::button_name] = kButtonName;
- CommandPtr command(CreateCommand<SubscribeButtonRequest>(msg));
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- ON_CALL(*app, is_media_application()).WillByDefault(Return(true));
-
- MockHMICapabilities hmi_capabilities;
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities));
- ON_CALL(hmi_capabilities, is_ui_cooperating()).WillByDefault(Return(true));
-
- MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
- (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonName;
-
- ON_CALL(hmi_capabilities, button_capabilities())
- .WillByDefault(Return(button_caps_ptr.get()));
-
- ON_CALL(*app, IsSubscribedToButton(_)).WillByDefault(Return(true));
-
- MessageSharedPtr result_msg(CatchMobileCommandResult(CallRun(*command)));
- EXPECT_EQ(mobile_apis::Result::IGNORED,
- static_cast<mobile_apis::Result::eType>(
- (*result_msg)[am::strings::msg_params][am::strings::result_code]
- .asInt()));
-}
-
-TEST_F(SubscribeButtonRequestTest, Run_SUCCESS) {
- const mobile_apis::ButtonName::eType kButtonName =
- mobile_apis::ButtonName::SEEKLEFT;
-
- MessageSharedPtr msg(CreateMessage());
- (*msg)[am::strings::msg_params][am::strings::button_name] = kButtonName;
- CommandPtr command(CreateCommand<SubscribeButtonRequest>(msg));
-
- MockAppPtr app(CreateMockApp());
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- ON_CALL(*app, is_media_application()).WillByDefault(Return(true));
-
- MockHMICapabilities hmi_capabilities;
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(hmi_capabilities));
- ON_CALL(hmi_capabilities, is_ui_cooperating()).WillByDefault(Return(true));
-
- MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
- (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonName;
-
- ON_CALL(hmi_capabilities, button_capabilities())
- .WillByDefault(Return(button_caps_ptr.get()));
-
- ON_CALL(*app, IsSubscribedToButton(_)).WillByDefault(Return(false));
-
- MessageSharedPtr hmi_result_msg;
- EXPECT_CALL(app_mngr_, ManageHMICommand(_))
- .WillOnce(DoAll(SaveArg<0>(&hmi_result_msg), Return(true)));
-
- MessageSharedPtr mobile_result_msg(
- CatchMobileCommandResult(CallRun(*command)));
-
- EXPECT_EQ(hmi_apis::FunctionID::Buttons_OnButtonSubscription,
- static_cast<hmi_apis::FunctionID::eType>(
- (*hmi_result_msg)[am::strings::params][am::strings::function_id]
- .asInt()));
-
- EXPECT_EQ(mobile_apis::Result::SUCCESS,
- static_cast<mobile_apis::Result::eType>(
- (*mobile_result_msg)[am::strings::msg_params]
- [am::strings::result_code].asInt()));
-}
-
-} // namespace subscribe_button_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc b/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc
deleted file mode 100644
index 87127231be..0000000000
--- a/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc
+++ /dev/null
@@ -1,129 +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 "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/test/include/application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace subscribe_way_points_request {
-
-using ::testing::_;
-using ::testing::A;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::DoAll;
-using ::testing::SaveArg;
-using ::testing::InSequence;
-namespace am = ::application_manager;
-using am::commands::SubscribeWayPointsRequest;
-using am::commands::MessageSharedPtr;
-
-typedef SharedPtr<SubscribeWayPointsRequest> CommandPtr;
-
-class SubscribeWayPointsRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(SubscribeWayPointsRequestTest, Run_SUCCESS) {
- CommandPtr command(CreateCommand<SubscribeWayPointsRequest>());
- MockAppPtr app(CreateMockApp());
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- ON_CALL(app_mngr_, IsAppSubscribedForWayPoints(A<am::ApplicationSharedPtr>()))
- .WillByDefault(Return(false));
- ON_CALL(app_mngr_, IsAnyAppSubscribedForWayPoints())
- .WillByDefault(Return(true));
-
- {
- InSequence dummy;
- EXPECT_CALL(app_mngr_,
- SubscribeAppForWayPoints(A<am::ApplicationSharedPtr>()));
- EXPECT_CALL(*app, UpdateHash());
- }
-
- command->Init();
- MessageSharedPtr mobile_result_msg(
- CatchMobileCommandResult(CallRun(*command)));
-
- EXPECT_EQ(mobile_apis::Result::SUCCESS,
- static_cast<mobile_apis::Result::eType>(
- (*mobile_result_msg)[am::strings::msg_params]
- [am::strings::result_code].asInt()));
-}
-
-TEST_F(SubscribeWayPointsRequestTest, OnEvent_SUCCESS) {
- CommandPtr command(CreateCommand<SubscribeWayPointsRequest>());
- MockAppPtr app(CreateMockApp());
- Event event(hmi_apis::FunctionID::Navigation_SubscribeWayPoints);
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- const hmi_apis::Common_Result::eType result_code =
- hmi_apis::Common_Result::SUCCESS;
- (*event_msg)[am::strings::params][am::hmi_response::code] = result_code;
- (*event_msg)[am::strings::msg_params] = 0;
-
- event.set_smart_object(*event_msg);
-
- ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
-
- {
- InSequence dummy;
- EXPECT_CALL(app_mngr_,
- SubscribeAppForWayPoints(A<am::ApplicationSharedPtr>()));
- EXPECT_CALL(mock_message_helper_, HMIToMobileResult(result_code))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _));
- EXPECT_CALL(*app, UpdateHash());
- }
-
- command->Init();
- command->on_event(event);
-}
-
-} // namespace subscribe_way_points_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/system_request_test.cc b/src/components/application_manager/test/commands/mobile/system_request_test.cc
deleted file mode 100644
index 0e07889b4b..0000000000
--- a/src/components/application_manager/test/commands/mobile/system_request_test.cc
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2017, 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 <string>
-#include <set>
-
-#include "gtest/gtest.h"
-
-#include "application_manager/commands/mobile/system_request.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace system_request {
-
-namespace am = application_manager;
-using am::commands::SystemRequest;
-using am::commands::CommandImpl;
-using am::commands::MessageSharedPtr;
-using am::MockHmiInterfaces;
-using am::event_engine::Event;
-using policy_test::MockPolicyHandlerInterface;
-using ::utils::SharedPtr;
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-namespace {
-const uint32_t kConnectionKey = 2u;
-const std::string kAppPolicyId = "fake-app-id";
-const uint32_t kDefaultTimeout = 1000u;
-const std::string kAppFolderName = "fake-app-name";
-const std::string kAppStorageFolder = "fake-storage";
-const std::string kSystemFilesPath = "/fake/system/files";
-const std::string kFileName = "Filename";
-} // namespace
-
-class SystemRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- SystemRequestTest() : mock_app_(CreateMockApp()) {}
-
- protected:
- MessageSharedPtr CreateIVSUMessage() {
- MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- (*msg)[am::strings::params][am::strings::connection_key] = kConnectionKey;
- (*msg)[am::strings::msg_params][am::strings::request_type] =
- mobile_apis::RequestType::HTTP;
- (*msg)[am::strings::msg_params][am::strings::file_name] = kFileName;
- return msg;
- }
-
- void PreConditions() {
- ON_CALL(app_mngr_, application(kConnectionKey))
- .WillByDefault(Return(mock_app_));
- ON_CALL(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
-
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kAppPolicyId));
- ON_CALL(*mock_app_, folder_name()).WillByDefault(Return(kAppFolderName));
-
- ON_CALL(app_mngr_settings_, system_files_path())
- .WillByDefault(ReturnRef(kSystemFilesPath));
- ON_CALL(app_mngr_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
-
- ON_CALL(mock_policy_handler_, IsRequestTypeAllowed(kAppPolicyId, _))
- .WillByDefault(Return(true));
- }
-
- void ExpectManageMobileCommandWithResultCode(
- const mobile_apis::Result::eType code) {
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(code),
- am::commands::Command::CommandOrigin::ORIGIN_SDL));
- }
-
- MockAppPtr mock_app_;
- MockPolicyHandlerInterface mock_policy_handler_;
-};
-
-TEST_F(SystemRequestTest, Run_HTTP_FileName_no_binary_data_REJECTED) {
- PreConditions();
- MessageSharedPtr msg = CreateIVSUMessage();
-
- ExpectManageMobileCommandWithResultCode(mobile_apis::Result::REJECTED);
-
- SharedPtr<SystemRequest> command(CreateCommand<SystemRequest>(msg));
- command->Run();
-}
-
-} // namespace system_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/unregister_app_interface_request_test.cc b/src/components/application_manager/test/commands/mobile/unregister_app_interface_request_test.cc
deleted file mode 100644
index 3d083f5c45..0000000000
--- a/src/components/application_manager/test/commands/mobile/unregister_app_interface_request_test.cc
+++ /dev/null
@@ -1,118 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/commands/mobile/unregister_app_interface_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace unregister_app_interface_request {
-
-namespace am = ::application_manager;
-namespace mobile_result = mobile_apis::Result;
-
-using ::testing::_;
-
-using am::commands::UnregisterAppInterfaceRequest;
-using am::commands::MessageSharedPtr;
-
-typedef ::utils::SharedPtr<UnregisterAppInterfaceRequest> CommandPtr;
-
-class UnregisterAppInterfaceRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(UnregisterAppInterfaceRequestTest, Run_AppNotRegistered_UNSUCCESS) {
- CommandPtr command(CreateCommand<UnregisterAppInterfaceRequest>());
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(UnregisterAppInterfaceRequestTest, Run_SUCCESS) {
- const uint32_t kConnectionKey = 1u;
-
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- CommandPtr command(CreateCommand<UnregisterAppInterfaceRequest>(command_msg));
-
- 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(app_mngr_, ManageMobileCommand(dummy_msg, _));
-
- EXPECT_CALL(app_mngr_,
- UnregisterApplication(
- kConnectionKey, mobile_apis::Result::SUCCESS, _, _));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::SUCCESS), _));
- }
-
- command->Run();
-}
-
-} // namespace unregister_app_interface_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc
deleted file mode 100644
index 46a1ce02eb..0000000000
--- a/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc
+++ /dev/null
@@ -1,156 +0,0 @@
-#include <stdint.h>
-#include <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/commands/mobile/unsubscribe_button_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace unsubscribe_button_request {
-
-namespace am = ::application_manager;
-namespace mobile_result = mobile_apis::Result;
-
-using ::testing::_;
-
-using am::commands::UnsubscribeButtonRequest;
-using am::commands::MessageSharedPtr;
-
-typedef ::utils::SharedPtr<UnsubscribeButtonRequest> CommandPtr;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const mobile_apis::ButtonName::eType kButtonId = mobile_apis::ButtonName::OK;
-} // namespace
-
-class UnsubscribeButtonRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- typedef TypeIf<kMocksAreNice,
- NiceMock<application_manager_test::MockHMICapabilities>,
- application_manager_test::MockHMICapabilities>::Result
- MockHMICapabilities;
-};
-
-TEST_F(UnsubscribeButtonRequestTest, Run_AppNotRegistered_UNSUCCESS) {
- CommandPtr command(CreateCommand<UnsubscribeButtonRequest>());
-
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeButtonRequestTest,
- Run_UnsubscribeNotSubscribedButton_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] = kButtonId;
-
- CommandPtr command(CreateCommand<UnsubscribeButtonRequest>(command_msg));
-
- UnsubscribeButtonRequestTest::MockHMICapabilities hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(hmi_capabilities));
- EXPECT_CALL(hmi_capabilities, is_ui_cooperating()).WillOnce(Return(true));
-
- MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
- (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonId;
- EXPECT_CALL(hmi_capabilities, button_capabilities())
- .WillOnce(Return(button_caps_ptr.get()));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, UnsubscribeFromButton(kButtonId))
- .WillOnce(Return(false));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeButtonRequestTest,
- Run_UnsubscribeNotAllowedByHmiCapabilities_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] = kButtonId;
- CommandPtr command(CreateCommand<UnsubscribeButtonRequest>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- UnsubscribeButtonRequestTest::MockHMICapabilities hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(hmi_capabilities));
- EXPECT_CALL(hmi_capabilities, is_ui_cooperating()).WillOnce(Return(true));
-
- MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
- EXPECT_CALL(hmi_capabilities, button_capabilities())
- .WillOnce(Return(button_caps_ptr.get()));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::UNSUPPORTED_RESOURCE), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeButtonRequestTest, Run_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][am::strings::button_name] = kButtonId;
-
- CommandPtr command(CreateCommand<UnsubscribeButtonRequest>(command_msg));
-
- UnsubscribeButtonRequestTest::MockHMICapabilities hmi_capabilities;
- EXPECT_CALL(app_mngr_, hmi_capabilities())
- .WillOnce(ReturnRef(hmi_capabilities));
- EXPECT_CALL(hmi_capabilities, is_ui_cooperating()).WillOnce(Return(true));
-
- MessageSharedPtr button_caps_ptr(CreateMessage(smart_objects::SmartType_Map));
- (*button_caps_ptr)[0][am::hmi_response::button_name] = kButtonId;
- EXPECT_CALL(hmi_capabilities, button_capabilities())
- .WillOnce(Return(button_caps_ptr.get()));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
-
- EXPECT_CALL(*mock_app, UnsubscribeFromButton(kButtonId))
- .WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::Buttons_OnButtonSubscription)));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
-
- EXPECT_CALL(*mock_app, UpdateHash());
- command->Init();
- command->Run();
-}
-
-} // namespace unsubscribe_button_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc
deleted file mode 100644
index bb4824e8f7..0000000000
--- a/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc
+++ /dev/null
@@ -1,287 +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 <string>
-
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_request.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace unsubscribe_vehicle_data_request {
-
-namespace am = ::application_manager;
-namespace mobile_result = mobile_apis::Result;
-
-using ::testing::_;
-
-using am::commands::UnsubscribeVehicleDataRequest;
-using am::commands::MessageSharedPtr;
-
-typedef ::utils::SharedPtr<UnsubscribeVehicleDataRequest> CommandPtr;
-
-namespace {
-const uint32_t kConnectionKey = 1u;
-const std::string kMsgParamKey = "test_key";
-const mobile_apis::VehicleDataType::eType kVehicleType =
- mobile_apis::VehicleDataType::VEHICLEDATA_SPEED;
-} // namespace
-
-class UnsubscribeVehicleRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- protected:
- void UnsubscribeSuccessfully();
- sync_primitives::Lock app_set_lock_;
-};
-
-TEST_F(UnsubscribeVehicleRequestTest, Run_AppNotRegistered_UNSUCCESS) {
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>());
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleRequestTest,
- Run_DataToUnsubscribeIsNotExisted_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] =
- kVehicleType;
-
- am::VehicleData data;
- EXPECT_CALL(mock_message_helper_, vehicle_data()).WillOnce(ReturnRef(data));
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleRequestTest,
- Run_UnsubscribeNotSubscribedBeforeData_IGNORED) {
- 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] = kVehicleType;
-
- am::VehicleData vehicle_data;
- vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(vehicle_data));
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleRequestTest,
- Run_UnsubscribeNotSubscribedBeforeData_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][kMsgParamKey] = true;
-
- am::VehicleData vehicle_data;
- vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(vehicle_data));
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
-
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleRequestTest, Run_UnsubscribeDataDisabled_UNSUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
- am::VehicleData vehicle_data;
- vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(vehicle_data));
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command->Run();
-}
-
-void UnsubscribeVehicleRequestTest::UnsubscribeSuccessfully() {
- 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] = true;
-
- am::VehicleData vehicle_data;
- vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
-
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(vehicle_data));
-
- am::ApplicationSet application_set_;
- MockAppPtr mock_app(CreateMockApp());
- application_set_.insert(mock_app);
- DataAccessor<am::ApplicationSet> accessor(application_set_, app_set_lock_);
-
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
-
- EXPECT_CALL(*mock_app, IsSubscribedToIVI(kVehicleType))
- .WillRepeatedly(Return(true));
-
- EXPECT_CALL(*mock_app, UnsubscribeFromIVI(kVehicleType))
- .WillRepeatedly(Return(true));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
-
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleRequestTest, Run_UnsubscribeData_SUCCESS) {
- UnsubscribeSuccessfully();
-}
-
-TEST_F(UnsubscribeVehicleRequestTest, OnEvent_DataNotSubscribed_IGNORED) {
- 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] = true;
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
-
- am::VehicleData vehicle_data;
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
- vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
- EXPECT_CALL(mock_message_helper_, vehicle_data())
- .WillOnce(ReturnRef(vehicle_data));
- EXPECT_CALL(*mock_app, IsSubscribedToIVI(kVehicleType))
- .WillRepeatedly(Return(false));
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
- command->Init();
- command->Run();
-
- am::event_engine::Event test_event(
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
- 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][kMsgParamKey] = true;
- test_event.set_smart_object(message);
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
- EXPECT_CALL(*mock_app, UpdateHash());
-
- command->on_event(test_event);
-}
-
-TEST_F(UnsubscribeVehicleRequestTest, OnEvent_DataUnsubscribed_SUCCESS) {
- UnsubscribeSuccessfully();
- 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] = true;
- CommandPtr command(CreateCommand<UnsubscribeVehicleDataRequest>(command_msg));
- MockAppPtr mock_app(CreateMockApp());
-
- am::event_engine::Event test_event(
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
- 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][kMsgParamKey] = true;
- test_event.set_smart_object(message);
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
-
- command->on_event(test_event);
-}
-
-} // namespace unsubscribe_vehicle_data_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_response_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_response_test.cc
deleted file mode 100644
index 532948e5db..0000000000
--- a/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_response_test.cc
+++ /dev/null
@@ -1,111 +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 "application_manager/commands/mobile/unsubscribe_vehicle_data_response.h"
-#include <stdint.h>
-#include <string>
-#include "gtest/gtest.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/mock_application_manager.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace unsubscribe_vehicle_data_response {
-
-namespace commands = ::application_manager::commands;
-
-using ::testing::_;
-using ::testing::NotNull;
-using ::testing::Types;
-
-using commands::MessageSharedPtr;
-namespace am = ::application_manager;
-
-class UnsubscribeVehicleResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-MATCHER_P(ResultCodeIs, result_code, "") {
- return result_code ==
- static_cast<mobile_apis::Result::eType>(
- (*arg)[am::strings::msg_params][am::strings::result_code].asInt());
-}
-
-TEST_F(UnsubscribeVehicleResponseTest,
- Run_SendFalseResponseToMobile_SendInvalidEnum) {
- MessageSharedPtr command_msg =
- ::utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
- (*command_msg)[am::strings::msg_params][am::strings::success] = false;
-
- ::utils::SharedPtr<commands::UnsubscribeVehicleDataResponse> command =
- CreateCommand<commands::UnsubscribeVehicleDataResponse>(command_msg);
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(ResultCodeIs(mobile_apis::Result::INVALID_ENUM), _));
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleResponseTest,
- Run_SendSuccessfulResponseToMobile_SUCCESS) {
- MessageSharedPtr command_msg =
- ::utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
- (*command_msg)[am::strings::msg_params][am::strings::success] = true;
- ::utils::SharedPtr<commands::UnsubscribeVehicleDataResponse> command =
- CreateCommand<commands::UnsubscribeVehicleDataResponse>(command_msg);
- EXPECT_CALL(
- app_mngr_,
- SendMessageToMobile(ResultCodeIs(mobile_apis::Result::SUCCESS), _));
- command->Run();
-}
-
-TEST_F(UnsubscribeVehicleResponseTest,
- Run_SendResponseToMobile_SendCodeToMobile) {
- MessageSharedPtr command_msg =
- ::utils::MakeShared<SmartObject>(smart_objects::SmartType_Map);
- (*command_msg)[am::strings::msg_params][am::strings::success] = true;
-
- mobile_apis::Result::eType result_type = mobile_apis::Result::WARNINGS;
- (*command_msg)[am::strings::msg_params][am::strings::result_code] =
- result_type;
- ::utils::SharedPtr<commands::UnsubscribeVehicleDataResponse> command =
- CreateCommand<commands::UnsubscribeVehicleDataResponse>(command_msg);
- EXPECT_CALL(app_mngr_, SendMessageToMobile(ResultCodeIs(result_type), _));
- command->Run();
-}
-
-} // namespace unsubscribe_vehicle_data_response
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc
deleted file mode 100644
index 5615b0cabd..0000000000
--- a/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc
+++ /dev/null
@@ -1,172 +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 <string>
-
-#include "gtest/gtest.h"
-#include "mobile/unsubscribe_way_points_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "commands/commands_test.h"
-#include "commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace unsubscribe_way_points_request {
-
-namespace am = ::application_manager;
-namespace mobile_result = mobile_apis::Result;
-
-using ::testing::_;
-using ::testing::Return;
-
-using am::commands::UnSubscribeWayPointsRequest;
-using am::commands::MessageSharedPtr;
-
-namespace {
-const uint32_t kConnectionKey = 3u;
-const uint32_t kAppId = 5u;
-} // namespace
-
-class UnSubscribeWayPointsRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- UnSubscribeWayPointsRequestTest()
- : command_msg_(CreateMessage(smart_objects::SmartType_Map))
- , command_(CreateCommand<UnSubscribeWayPointsRequest>(command_msg_)) {
- (*command_msg_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- }
-
- MessageSharedPtr command_msg_;
- ::utils::SharedPtr<UnSubscribeWayPointsRequest> command_;
-};
-
-TEST_F(UnSubscribeWayPointsRequestTest,
- Run_ApplicationIsNotRegistered_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(_))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command_->Run();
-}
-
-TEST_F(UnSubscribeWayPointsRequestTest,
- Run_AppIsNotSubscribedForWayPoints_UNSUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_,
- IsAppSubscribedForWayPoints(
- ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
- .WillOnce(Return(false));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _));
-
- command_->Run();
-}
-
-TEST_F(UnSubscribeWayPointsRequestTest, Run_AppSubscribedForWayPoints_SUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_,
- IsAppSubscribedForWayPoints(
- ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
- .WillOnce(Return(true));
-
- EXPECT_CALL(app_mngr_,
- ManageHMICommand(HMIResultCodeIs(
- hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints)));
-
- command_->Run();
-}
-
-TEST_F(UnSubscribeWayPointsRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- command_->on_event(event);
-}
-
-TEST_F(UnSubscribeWayPointsRequestTest,
- OnEvent_ReceivedNavigationUnSubscribeWayPointsEvent_SUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::msg_params] = 0;
- (*event_msg)[am::strings::params][am::hmi_response::code] =
- mobile_result::SUCCESS;
- Event event(hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(app_mngr_,
- UnsubscribeAppFromWayPoints(
- ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
-
- command_->on_event(event);
-}
-
-} // namespace unsubscribe_way_points_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc b/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc
deleted file mode 100644
index dacabba5fd..0000000000
--- a/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc
+++ /dev/null
@@ -1,305 +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 <string>
-
-#include "gtest/gtest.h"
-#include "application_manager/commands/mobile/update_turn_list_request.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_test.h"
-#include "application_manager/application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/event_engine/event.h"
-
-namespace test {
-namespace components {
-namespace commands_test {
-namespace mobile_commands_test {
-namespace update_turn_list_request {
-
-namespace am = ::application_manager;
-namespace mobile_result = mobile_apis::Result;
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::Ref;
-using ::testing::Eq;
-
-using am::commands::UpdateTurnListRequest;
-using am::commands::MessageSharedPtr;
-using application_manager_test::MockHMICapabilities;
-
-namespace {
-const uint32_t kConnectionKey = 3u;
-const hmi_apis::FunctionID::eType kFunctionId =
- hmi_apis::FunctionID::Buttons_OnButtonEvent;
-const uint32_t kAppId = 5u;
-} // namespace
-
-class UpdateTurnListRequestTest
- : public CommandRequestTest<CommandsTestMocks::kIsNice> {
- public:
- UpdateTurnListRequestTest()
- : command_msg_(CreateMessage(smart_objects::SmartType_Map))
- , command_(CreateCommand<UpdateTurnListRequest>(command_msg_)) {
- (*command_msg_)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
- (*command_msg_)[am::strings::params][am::strings::function_id] =
- kFunctionId;
- }
-
- MessageSharedPtr command_msg_;
- ::utils::SharedPtr<UpdateTurnListRequest> command_;
- TypeIf<kMocksAreNice,
- NiceMock<policy_test::MockPolicyHandlerInterface>,
- policy_test::MockPolicyHandlerInterface>::Result mock_policy_handler_;
-};
-
-TEST_F(UpdateTurnListRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
-
- command_->Run();
-}
-
-TEST_F(UpdateTurnListRequestTest, Run_InvalidNavigationText_UNSUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::navigation_text] = "invalid_navigation_text\t\n";
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command_->Run();
-}
-
-TEST_F(UpdateTurnListRequestTest, Run_InvalidTurnIcon_UNSUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::navigation_text] = "valid_navigation_text";
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::turn_icon][am::strings::value] =
- "invalid_turn_icon\t\n";
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command_->Run();
-}
-
-TEST_F(UpdateTurnListRequestTest,
- Run_ProcessSoftButtonsNotSucceeded_UNSUCCESS) {
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::navigation_text] = "valid_navigation_text";
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::turn_icon][am::strings::value] =
- "valid_turn_icon";
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_));
-
- const mobile_result::eType kExpectedResult = mobile_result::INVALID_ENUM;
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*command_msg_)[am::strings::msg_params],
- Eq(mock_app),
- Ref(mock_policy_handler_),
- Ref(app_mngr_)))
- .WillOnce(Return(kExpectedResult));
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(kExpectedResult), _));
-
- command_->Run();
-}
-
-TEST_F(UpdateTurnListRequestTest, Run_NoTurnList_UNSUCCESS) {
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_));
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*command_msg_)[am::strings::msg_params],
- Eq(mock_app),
- Ref(mock_policy_handler_),
- Ref(app_mngr_)))
- .WillOnce(Return(mobile_result::SUCCESS));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
-
- command_->Run();
-}
-
-TEST_F(UpdateTurnListRequestTest, Run_ValidTurnList_SUCCESS) {
- const std::string kNavigationText = "valid_navigation_text";
-
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::navigation_text] = kNavigationText;
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::turn_icon][am::strings::value] =
- "valid_turn_icon";
- (*command_msg_)[am::strings::msg_params][am::strings::soft_buttons] = 0;
-
- MockAppPtr mock_app(CreateMockApp());
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
-
- EXPECT_CALL(app_mngr_, GetPolicyHandler())
- .WillOnce(ReturnRef(mock_policy_handler_));
-
- EXPECT_CALL(mock_message_helper_,
- ProcessSoftButtons((*command_msg_)[am::strings::msg_params],
- Eq(mock_app),
- Ref(mock_policy_handler_),
- Ref(app_mngr_)))
- .WillOnce(Return(mobile_result::SUCCESS));
-
- EXPECT_CALL(
- mock_message_helper_,
- VerifyImage(
- (*command_msg_)[am::strings::msg_params][am::strings::turn_list][0]
- [am::strings::turn_icon],
- Eq(mock_app),
- Ref(app_mngr_))).WillOnce(Return(mobile_result::SUCCESS));
-
- EXPECT_CALL(mock_message_helper_,
- SubscribeApplicationToSoftButton(_, _, kFunctionId));
-
- MessageSharedPtr result_msg(CatchHMICommandResult(CallRun(*command_)));
- ASSERT_TRUE(result_msg);
- EXPECT_EQ(
- hmi_apis::FunctionID::Navigation_UpdateTurnList,
- (*result_msg)[am::strings::params][am::strings::function_id].asInt());
-
- ASSERT_TRUE((*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
- .keyExists(am::hmi_request::navi_text));
-
- EXPECT_TRUE((*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
- [am::hmi_request::navi_text].keyExists(
- am::hmi_request::field_name));
- EXPECT_EQ(
- hmi_apis::Common_TextFieldName::turnText,
- (*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
- [am::hmi_request::navi_text][am::hmi_request::field_name]
- .asInt());
-
- EXPECT_TRUE((*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
- [am::hmi_request::navi_text].keyExists(
- am::hmi_request::field_text));
- EXPECT_EQ(
- kNavigationText,
- (*result_msg)[am::strings::msg_params][am::strings::turn_list][0]
- [am::hmi_request::navi_text][am::hmi_request::field_text]
- .asString());
-}
-
-TEST_F(UpdateTurnListRequestTest, OnEvent_UnknownEvent_UNSUCCESS) {
- Event event(hmi_apis::FunctionID::INVALID_ENUM);
-
- EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)).Times(0);
-
- command_->on_event(event);
-}
-
-TEST_F(UpdateTurnListRequestTest, OnEvent_UnsupportedResource_SUCCESS) {
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- const hmi_apis::Common_Result::eType hmi_response_code =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- const mobile_result::eType mobile_response_code =
- mobile_result::UNSUPPORTED_RESOURCE;
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
- (*event_msg)[am::strings::msg_params] = 0;
-
- Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
-
- command_->on_event(event);
-}
-
-TEST_F(UpdateTurnListRequestTest,
- OnEvent_ReceivedNavigationUpdateTurnListEvent_SUCCESS) {
- const hmi_apis::Common_Result::eType hmi_response_code =
- hmi_apis::Common_Result::SUCCESS;
- const mobile_result::eType mobile_response_code = mobile_result::SUCCESS;
-
- MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map));
- (*event_msg)[am::strings::params][am::hmi_response::code] = hmi_response_code;
- (*event_msg)[am::strings::msg_params] = 0;
-
- Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
- event.set_smart_object(*event_msg);
-
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _));
-
- command_->on_event(event);
-}
-
-} // namespace update_turn_list_request
-} // namespace mobile_commands_test
-} // namespace commands_test
-} // namespace components
-} // namespace test
diff --git a/src/components/application_manager/test/hmi_capabilities.json b/src/components/application_manager/test/hmi_capabilities.json
index 9db6ee78ae..1c024f2669 100644
--- a/src/components/application_manager/test/hmi_capabilities.json
+++ b/src/components/application_manager/test/hmi_capabilities.json
@@ -42,6 +42,7 @@
],
"displayCapabilities": {
"displayType": "GEN2_8_DMA",
+ "displayName": "GENERIC_DISPLAY",
"textFields": [
{
"name": "mainField1",
@@ -215,7 +216,9 @@
"imageFields": [
{
"name": "softButtonImage",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -223,7 +226,9 @@
},
{
"name": "choiceImage",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -231,7 +236,9 @@
},
{
"name": "choiceSecondaryImage",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -239,7 +246,9 @@
},
{
"name": "menuIcon",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -247,7 +256,9 @@
},
{
"name": "cmdIcon",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -255,7 +266,9 @@
},
{
"name": "appIcon",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -263,7 +276,19 @@
},
{
"name": "graphic",
- "imageTypeSupported": [],
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
+ "imageResolution": {
+ "resolutionWidth": 35,
+ "resolutionHeight": 35
+ }
+ },
+ {
+ "name": "secondaryGraphic",
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
diff --git a/src/components/application_manager/test/hmi_capabilities_test.cc b/src/components/application_manager/test/hmi_capabilities_test.cc
index b8369528aa..e1d2eeb402 100644
--- a/src/components/application_manager/test/hmi_capabilities_test.cc
+++ b/src/components/application_manager/test/hmi_capabilities_test.cc
@@ -47,6 +47,7 @@
#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/state_controller.h"
#include "resumption/last_state_impl.h"
#include "application_manager/resumption/resume_ctrl.h"
@@ -101,6 +102,7 @@ class HMICapabilitiesTest : public ::testing::Test {
MockApplicationManagerSettings mock_application_manager_settings_;
utils::SharedPtr<HMICapabilitiesForTesting> hmi_capabilities_test;
const std::string file_name_;
+ application_manager_test::MockRPCService mock_rpc_service_;
};
const char* const cstring_values_[] = {
@@ -186,6 +188,8 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
if (file_system::FileExists("./app_info_data")) {
EXPECT_TRUE(::file_system::DeleteFile("./app_info_data"));
}
+ EXPECT_CALL(app_mngr_, IsSOStructValid(_, _)).WillOnce(Return(true));
+
EXPECT_TRUE(hmi_capabilities_test->LoadCapabilitiesFromFile());
// Check active languages
@@ -269,6 +273,9 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
static_cast<hmi_apis::Common_DisplayType::eType>(
display_capabilities_so[hmi_response::display_type].asInt()));
+ EXPECT_EQ("GENERIC_DISPLAY",
+ display_capabilities_so[hmi_response::display_name].asString());
+
EXPECT_TRUE(display_capabilities_so["graphicSupported"].asBool());
// Check text fields
@@ -562,6 +569,7 @@ TEST_F(HMICapabilitiesTest,
TEST_F(HMICapabilitiesTest, VerifyImageType) {
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);
@@ -575,7 +583,8 @@ void HMICapabilitiesTest::SetCooperating() {
smart_objects::SmartObjectSPtr test_so;
EXPECT_CALL(*(MockMessageHelper::message_helper_mock()),
CreateModuleInfoSO(_, _)).WillRepeatedly(Return(test_so));
- EXPECT_CALL(app_mngr_, ManageHMICommand(_)).WillRepeatedly(Return(true));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
+ .WillRepeatedly(Return(true));
}
TEST_F(HMICapabilitiesTest, SetVRCooperating) {
diff --git a/src/components/application_manager/test/hmi_language_handler_test.cc b/src/components/application_manager/test/hmi_language_handler_test.cc
index 2020da5052..9b8bddc6bc 100644
--- a/src/components/application_manager/test/hmi_language_handler_test.cc
+++ b/src/components/application_manager/test/hmi_language_handler_test.cc
@@ -42,6 +42,7 @@
#include "application_manager/resumption/resume_ctrl_impl.h"
#include "application_manager/mock_hmi_capabilities.h"
#include "application_manager/mock_application.h"
+#include "application_manager/mock_rpc_service.h"
#include "application_manager/smart_object_keys.h"
#include "test/resumption/mock_last_state.h"
#include "utils/shared_ptr.h"
@@ -72,6 +73,7 @@ typedef NiceMock<
typedef NiceMock< ::test::components::event_engine_test::MockEventDispatcher>
MockEventDispatcher;
typedef NiceMock<application_manager_test::MockApplication> MockApp;
+typedef NiceMock<application_manager_test::MockRPCService> MockRPCService;
typedef SharedPtr<MockApp> ApplicationSharedPtr;
typedef am::HMILanguageHandler::Apps Apps;
@@ -82,7 +84,8 @@ const uint32_t kDefaultAppsSize = 0u;
class HmiLanguageHandlerTest : public ::testing::Test {
public:
- HmiLanguageHandlerTest() {
+ HmiLanguageHandlerTest()
+ : app_set_lock_(std::make_shared<sync_primitives::Lock>()) {
EXPECT_CALL(app_manager_, event_dispatcher())
.WillOnce(ReturnRef(event_dispatcher_));
hmi_language_handler_ =
@@ -133,8 +136,9 @@ class HmiLanguageHandlerTest : public ::testing::Test {
MockHMICapabilities hmi_capabilities_;
MockEventDispatcher event_dispatcher_;
SharedPtr<am::HMILanguageHandler> hmi_language_handler_;
- ::sync_primitives::Lock app_set_lock_;
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_;
resumption_test::MockLastState last_state_;
+ MockRPCService mock_rpc_service_;
};
TEST_F(HmiLanguageHandlerTest, OnEvent_AllLanguageIsReceivedAndSame_SUCCESS) {
@@ -164,7 +168,8 @@ TEST_F(HmiLanguageHandlerTest, OnEvent_AllLanguageIsReceivedAndSame_SUCCESS) {
// So if they same app_manager_'s method `applications`
// will never be called.
EXPECT_CALL(app_manager_, applications()).Times(0);
- EXPECT_CALL(app_manager_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_manager_, GetRPCService()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
EXPECT_CALL(app_manager_, UnregisterApplication(_, _, _, _)).Times(0);
Event tts_event(hmi_apis::FunctionID::TTS_GetLanguage);
hmi_language_handler_->on_event(tts_event);
@@ -201,7 +206,8 @@ TEST_F(HmiLanguageHandlerTest, OnEvent_AllReceivedLanguagesMismatch_SUCCESS) {
// the `applications` will be called and
// app data will checked by `CheckApplication` method
ON_CALL(app_manager_, applications()).WillByDefault(Return(data_accessor));
- EXPECT_CALL(app_manager_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_manager_, GetRPCService()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
EXPECT_CALL(app_manager_, UnregisterApplication(_, _, _, _)).Times(0);
Event tts_event(hmi_apis::FunctionID::TTS_GetLanguage);
@@ -316,7 +322,9 @@ TEST_F(HmiLanguageHandlerTest,
// Wait for `ManageMobileCommand` call twice.
// First time in `SendOnLanguageChangeToMobile`
// method, second time in `HandleWrongLanguageApp`.
- EXPECT_CALL(app_manager_, ManageMobileCommand(_, _)).Times(2);
+ EXPECT_CALL(app_manager_, GetRPCService())
+ .WillRepeatedly(ReturnRef(mock_rpc_service_));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(2);
EXPECT_CALL(app_manager_, UnregisterApplication(_, _, _, _)).Times(1);
hmi_language_handler_->on_event(event);
}
@@ -344,7 +352,8 @@ TEST_F(HmiLanguageHandlerTest, OnUnregisterApp_SUCCESS) {
InitHMIActiveLanguages(hmi_apis::Common_Language::eType::RU_RU,
hmi_apis::Common_Language::eType::RU_RU,
hmi_apis::Common_Language::eType::RU_RU);
- EXPECT_CALL(app_manager_, ManageMobileCommand(_, _)).Times(0);
+ EXPECT_CALL(app_manager_, GetRPCService()).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
EXPECT_CALL(app_manager_, UnregisterApplication(_, _, _, _)).Times(0);
hmi_language_handler_->on_event(event);
}
diff --git a/src/components/application_manager/test/include/application_manager/commands/command_request_test.h b/src/components/application_manager/test/include/application_manager/commands/command_request_test.h
index e5a45c1549..05cb80c989 100644
--- a/src/components/application_manager/test/include/application_manager/commands/command_request_test.h
+++ b/src/components/application_manager/test/include/application_manager/commands/command_request_test.h
@@ -39,9 +39,10 @@
#include "utils/shared_ptr.h"
#include "smart_objects/smart_object.h"
#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
+#include "application_manager/test/include/application_manager/commands/commands_test.h"
#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/test/include/application_manager/mock_event_dispatcher.h"
+
#include "application_manager/event_engine/event.h"
namespace test {
@@ -94,7 +95,7 @@ class CommandRequestTest : public CommandsTest<kIsNice> {
MessageSharedPtr CatchMobileCommandResult(CallableT delegate,
bool call_return = true) {
MessageSharedPtr result_msg;
- EXPECT_CALL(this->app_mngr_, ManageMobileCommand(_, _))
+ EXPECT_CALL(this->mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result_msg), Return(call_return)));
delegate();
return result_msg;
@@ -104,7 +105,7 @@ class CommandRequestTest : public CommandsTest<kIsNice> {
MessageSharedPtr CatchHMICommandResult(CallableT delegate,
bool call_return = true) {
MessageSharedPtr result_msg;
- EXPECT_CALL(this->app_mngr_, ManageHMICommand(_))
+ EXPECT_CALL(this->mock_rpc_service_, ManageHMICommand(_))
.WillOnce(DoAll(SaveArg<0>(&result_msg), Return(call_return)));
delegate();
return result_msg;
diff --git a/src/components/application_manager/test/include/application_manager/commands/commands_test.h b/src/components/application_manager/test/include/application_manager/commands/commands_test.h
index 553126091f..ab392c5ba0 100644
--- a/src/components/application_manager/test/include/application_manager/commands/commands_test.h
+++ b/src/components/application_manager/test/include/application_manager/commands/commands_test.h
@@ -42,9 +42,12 @@
#include "utils/make_shared.h"
#include "application_manager/mock_application_manager.h"
#include "test/application_manager/mock_application_manager_settings.h"
-#include "application_manager/mock_hmi_interface.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_message_helper.h"
+#include "application_manager/test/include/application_manager/mock_hmi_interface.h"
+#include "application_manager/test/include/application_manager/mock_application.h"
+#include "application_manager/test/include/application_manager/mock_message_helper.h"
+#include "application_manager/mock_rpc_service.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
namespace test {
namespace components {
namespace commands_test {
@@ -94,6 +97,7 @@ class CommandsTest : public ::testing::Test {
enum { kMocksAreNice = kIsNice };
typedef NiceMock<MockApplicationManagerSettings> MockAppManagerSettings;
+ typedef NiceMock<application_manager_test::MockRPCService> MockRPCService;
typedef typename TypeIf<kIsNice,
NiceMock<MockApplicationManager>,
MockApplicationManager>::Result MockAppManager;
@@ -120,7 +124,10 @@ class CommandsTest : public ::testing::Test {
MessageSharedPtr& msg) {
InitCommand(timeout);
return ::utils::MakeShared<Command>((msg ? msg : msg = CreateMessage()),
- app_mngr_);
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_);
}
template <class Command>
@@ -132,12 +139,19 @@ class CommandsTest : public ::testing::Test {
SharedPtr<Command> CreateCommand(const uint32_t timeout = kDefaultTimeout_) {
InitCommand(timeout);
MessageSharedPtr msg = CreateMessage();
- return ::utils::MakeShared<Command>(msg, app_mngr_);
+ return ::utils::MakeShared<Command>(msg,
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_);
}
enum { kDefaultTimeout_ = 100 };
MockAppManager app_mngr_;
+ MockRPCService mock_rpc_service_;
+ application_manager_test::MockHMICapabilities mock_hmi_capabilities_;
+ policy_test::MockPolicyHandlerInterface mock_policy_handler_;
MockAppManagerSettings app_mngr_settings_;
MOCK(am::MockHmiInterfaces) mock_hmi_interfaces_;
am::MockMessageHelper& mock_message_helper_;
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 818a93fe6c..9b6f84ba52 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
@@ -106,6 +106,8 @@ class MockApplication : public ::application_manager::Application {
MOCK_CONST_METHOD0(system_context, const mobile_apis::SystemContext::eType());
MOCK_CONST_METHOD0(audio_streaming_state,
const mobile_apis::AudioStreamingState::eType());
+ MOCK_CONST_METHOD0(video_streaming_state,
+ const mobile_apis::VideoStreamingState::eType());
MOCK_CONST_METHOD0(app_icon_path, const std::string&());
MOCK_CONST_METHOD0(device, connection_handler::DeviceHandle());
MOCK_CONST_METHOD0(CurrentHmiState, const application_manager::HmiStatePtr());
@@ -148,9 +150,6 @@ class MockApplication : public ::application_manager::Application {
bool(mobile_apis::ButtonName::eType btn_name));
MOCK_METHOD1(UnsubscribeFromButton,
bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(SubscribeToIVI, bool(uint32_t vehicle_info_type));
- MOCK_CONST_METHOD1(IsSubscribedToIVI, bool(uint32_t vehicle_info_type));
- MOCK_METHOD1(UnsubscribeFromIVI, bool(uint32_t vehicle_info_type));
MOCK_METHOD0(ResetDataInNone, void());
MOCK_METHOD2(AreCommandLimitsExceeded,
bool(mobile_apis::FunctionID::eType cmd_id,
@@ -172,6 +171,7 @@ class MockApplication : public ::application_manager::Application {
MOCK_METHOD1(IsSubscribedToSoftButton, bool(const uint32_t softbutton_id));
MOCK_METHOD1(UnsubscribeFromSoftButtons, void(int32_t cmd_id));
MOCK_CONST_METHOD0(IsAudioApplication, bool());
+ MOCK_CONST_METHOD0(IsVideoApplication, bool());
MOCK_METHOD0(LoadPersistentFiles, void());
// InitialApplicationData methods
MOCK_CONST_METHOD0(app_types, const smart_objects::SmartObject*());
@@ -205,12 +205,12 @@ class MockApplication : public ::application_manager::Application {
MOCK_CONST_METHOD0(
SubscribedButtons,
DataAccessor< ::application_manager::ButtonSubscriptions>());
- MOCK_CONST_METHOD0(
- SubscribedIVI,
- DataAccessor< ::application_manager::VehicleInfoSubscriptions>());
MOCK_CONST_METHOD0(keyboard_props, const smart_objects::SmartObject*());
MOCK_CONST_METHOD0(menu_title, const smart_objects::SmartObject*());
MOCK_CONST_METHOD0(menu_icon, const smart_objects::SmartObject*());
+ MOCK_CONST_METHOD0(day_color_scheme, const smart_objects::SmartObject*());
+ MOCK_CONST_METHOD0(night_color_scheme, const smart_objects::SmartObject*());
+ MOCK_CONST_METHOD0(display_layout, const std::string&());
MOCK_METHOD1(load_global_properties,
void(const smart_objects::SmartObject& so));
MOCK_METHOD1(set_help_prompt,
@@ -234,6 +234,11 @@ class MockApplication : public ::application_manager::Application {
void(const smart_objects::SmartObject& menu_title));
MOCK_METHOD1(set_menu_icon,
void(const smart_objects::SmartObject& menu_icon));
+ MOCK_METHOD1(set_day_color_scheme,
+ void(const smart_objects::SmartObject& color_scheme));
+ MOCK_METHOD1(set_night_color_scheme,
+ void(const smart_objects::SmartObject& color_scheme));
+ MOCK_METHOD1(set_display_layout, void(const std::string& layout));
MOCK_CONST_METHOD0(audio_stream_retry_number, uint32_t());
MOCK_METHOD1(set_audio_stream_retry_number,
void(const uint32_t& audio_stream_retry_number));
@@ -299,7 +304,6 @@ class MockApplication : public ::application_manager::Application {
SwapMobileMessageQueue,
void(::application_manager::MobileMessageQueue& mobile_messages));
-#ifdef SDL_REMOTE_CONTROL
MOCK_METHOD1(
set_system_context,
void(const application_manager::mobile_api::SystemContext::eType&));
@@ -322,11 +326,10 @@ class MockApplication : public ::application_manager::Application {
MOCK_METHOD1(AddExtension,
bool(application_manager::AppExtensionPtr extention));
MOCK_METHOD1(RemoveExtension, bool(application_manager::AppExtensionUID uid));
- MOCK_METHOD0(RemoveExtensions, void());
- MOCK_CONST_METHOD0(SubscribesIVI,
- const application_manager::VehicleInfoSubscriptions&());
-
-#endif // SDL_REMOTE_CONTROL
+ MOCK_CONST_METHOD0(Extensions,
+ const std::list<application_manager::AppExtensionPtr>&());
+ MOCK_CONST_METHOD0(is_remote_control_supported, bool());
+ MOCK_METHOD1(set_remote_control_supported, void(const bool allow));
};
} // namespace application_manager_test
diff --git a/src/components/application_manager/test/include/application_manager/mock_command_factory.h b/src/components/application_manager/test/include/application_manager/mock_command_factory.h
new file mode 100644
index 0000000000..a55183e341
--- /dev/null
+++ b/src/components/application_manager/test/include/application_manager/mock_command_factory.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2017, 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_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HMI_COMMAND_FACTORY_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HMI_COMMAND_FACTORY_H_
+
+#include <gmock/gmock.h>
+#include "application_manager/command_factory.h"
+#include "application_manager/commands/command.h"
+#include "smart_objects/smart_object.h"
+#include "utils/shared_ptr.h"
+
+namespace test {
+namespace components {
+namespace application_manager_test {
+
+class MockCommandFactory : public application_manager::CommandFactory {
+ public:
+ MOCK_METHOD2(CreateCommand,
+ application_manager::CommandSharedPtr(
+ const application_manager::commands::MessageSharedPtr&,
+ application_manager::commands::Command::CommandSource));
+ MOCK_CONST_METHOD2(
+ IsAbleToProcess,
+ bool(const int32_t,
+ const application_manager::commands::Command::CommandSource));
+
+ // const commands::MessageSharedPtr& message,
+ // application_manager::commands::Command::CommandSource));
+};
+
+} // namespace application_manager_test
+} // namespace components
+} // namespace test
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HMI_COMMAND_FACTORY_H_
diff --git a/src/components/application_manager/test/include/application_manager/mock_hmi_command_factory.h b/src/components/application_manager/test/include/application_manager/mock_hmi_command_factory.h
deleted file mode 100644
index cf40d7b98b..0000000000
--- a/src/components/application_manager/test/include/application_manager/mock_hmi_command_factory.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Copyright (c) 2017, 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_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HMI_COMMAND_FACTORY_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HMI_COMMAND_FACTORY_H_
-
-#include <gmock/gmock.h>
-#include "application_manager/application_manager.h"
-#include "application_manager/commands/command.h"
-#include "smart_objects/smart_object.h"
-#include "utils/shared_ptr.h"
-
-namespace test {
-namespace components {
-namespace application_manager_test {
-
-class MockHMICommandFactory {
- public:
- MOCK_METHOD2(CreateCommand,
- utils::SharedPtr<application_manager::commands::Command>(
- const utils::SharedPtr<smart_objects::SmartObject>&,
- application_manager::ApplicationManager&));
-
- static MockHMICommandFactory* mock_hmi_command_factory();
-};
-
-} // namespace application_manager_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HMI_COMMAND_FACTORY_H_
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 93db0d9795..fe17eb6788 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
@@ -119,6 +119,9 @@ class MockMessageHelper {
ApplicationManager& application_manager,
hmi_apis::Common_HMILevel::eType level,
bool send_policy_priority));
+ MOCK_METHOD2(CreateMessageForHMI,
+ smart_objects::SmartObjectSPtr(hmi_apis::messageType::eType,
+ const uint32_t));
MOCK_METHOD2(SendHMIStatusNotification,
void(const Application& application_impl,
ApplicationManager& application_manager));
@@ -174,8 +177,10 @@ class MockMessageHelper {
MOCK_METHOD1(CreateAddVRCommandRequestFromChoiceToHMI,
smart_objects::SmartObjectList(ApplicationConstSharedPtr app));
MOCK_METHOD1(SendGlobalPropertiesToHMI, void(ApplicationConstSharedPtr app));
- MOCK_METHOD1(GetIVISubscriptionRequests,
- smart_objects::SmartObjectList(ApplicationSharedPtr app));
+ MOCK_METHOD3(VerifyTtsFiles,
+ mobile_apis::Result::eType(smart_objects::SmartObject& message,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr));
MOCK_METHOD3(VerifyImageFiles,
mobile_apis::Result::eType(smart_objects::SmartObject& message,
ApplicationConstSharedPtr app,
@@ -288,10 +293,6 @@ class MockMessageHelper {
void(mobile_apis::ButtonName::eType button,
ApplicationSharedPtr application,
ApplicationManager& app_mngr));
- MOCK_METHOD3(SendUnsubscribeIVIRequest,
- void(int32_t ivi_id,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr));
static MockMessageHelper* message_helper_mock();
};
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 436c8c165e..0d34c113b2 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
@@ -39,6 +39,7 @@
#include "application_manager/usage_statistics.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_app_extension.h"
#include "utils/data_accessor.h"
#include "config_profile/profile.h"
#include "application_manager/policies/policy_handler.h"
@@ -68,7 +69,12 @@ class ResumptionDataTest : public ::testing::Test {
, kCountOfSubmenues_(3u)
, kCountOfFiles_(8u)
, kCountOfVrhelptitle_(2u)
- , kMacAddress_("12345") {}
+ , kMacAddress_("12345")
+ , sublock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , comlock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , setlock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , btnlock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , ivilock_ptr_(std::make_shared<sync_primitives::Lock>()) {}
// Check structure in saved application
void CheckSavedApp(sm::SmartObject& saved_data);
// Set data for resumption
@@ -137,16 +143,18 @@ class ResumptionDataTest : public ::testing::Test {
am::AppFilesMap app_files_map_;
am::ButtonSubscriptions btn_subscr;
- am::VehicleInfoSubscriptions ivi;
- sync_primitives::Lock sublock_;
- sync_primitives::Lock comlock_;
- sync_primitives::Lock setlock_;
- sync_primitives::Lock btnlock_;
- sync_primitives::Lock ivilock_;
+ std::shared_ptr<sync_primitives::Lock> sublock_ptr_;
+ std::shared_ptr<sync_primitives::Lock> comlock_ptr_;
+ std::shared_ptr<sync_primitives::Lock> setlock_ptr_;
+ std::shared_ptr<sync_primitives::Lock> btnlock_ptr_;
+ std::shared_ptr<sync_primitives::Lock> ivilock_ptr_;
application_manager_test::MockApplicationManagerSettings
mock_application_manager_settings_;
application_manager_test::MockApplicationManager mock_application_manager_;
+ utils::SharedPtr<NiceMock<application_manager_test::MockAppExtension> >
+ mock_app_extension_;
+ std::list<application_manager::AppExtensionPtr> extensions_;
};
} // namespace resumption_test
diff --git a/src/components/application_manager/test/message_helper/CMakeLists.txt b/src/components/application_manager/test/message_helper/CMakeLists.txt
index 8ebb2dea0e..d115ad8b40 100755
--- a/src/components/application_manager/test/message_helper/CMakeLists.txt
+++ b/src/components/application_manager/test/message_helper/CMakeLists.txt
@@ -47,13 +47,6 @@ set(LIBRARIES
Utils
)
-if(REMOTE_CONTROL)
- SET (LIBRARIES
- FunctionalModule
- ${LIBRARIES}
- )
-endif(REMOTE_CONTROL)
-
set(SOURCES
${COMPONENTS_DIR}/application_manager/test/message_helper/message_helper_test.cc
)
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 289e4f5d05..e43348cc80 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
@@ -39,9 +39,11 @@
#include "application_manager/policies/policy_handler.h"
#include "application_manager/mock_application.h"
#include "utils/custom_string.h"
+#include "utils/lock.h"
#include "policy/mock_policy_settings.h"
#include "application_manager/policies/policy_handler.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_rpc_service.h"
#include "application_manager/event_engine/event_dispatcher.h"
#include "application_manager/state_controller.h"
#include "application_manager/resumption/resume_ctrl.h"
@@ -236,7 +238,8 @@ TEST(MessageHelperTestCreate,
CreateAddCommandRequestToHMI_SendSmartObject_Empty) {
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
::application_manager::CommandsMap vis;
- DataAccessor<application_manager::CommandsMap> data_accessor(vis, true);
+ DataAccessor<application_manager::CommandsMap> data_accessor(
+ vis, std::make_shared<sync_primitives::Lock>(true));
EXPECT_CALL(*appSharedMock, commands_map()).WillOnce(Return(data_accessor));
application_manager_test::MockApplicationManager mock_application_manager;
@@ -251,7 +254,8 @@ TEST(MessageHelperTestCreate,
CreateAddCommandRequestToHMI_SendSmartObject_Equal) {
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
CommandsMap vis;
- DataAccessor<CommandsMap> data_accessor(vis, true);
+ DataAccessor<CommandsMap> data_accessor(
+ vis, std::make_shared<sync_primitives::Lock>(true));
smart_objects::SmartObjectSPtr smartObjectPtr =
utils::MakeShared<smart_objects::SmartObject>();
@@ -292,7 +296,8 @@ TEST(MessageHelperTestCreate,
CreateAddVRCommandRequestFromChoiceToHMI_SendEmptyData_EmptyList) {
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
application_manager::ChoiceSetMap vis;
- DataAccessor< ::application_manager::ChoiceSetMap> data_accessor(vis, true);
+ DataAccessor< ::application_manager::ChoiceSetMap> data_accessor(
+ vis, std::make_shared<sync_primitives::Lock>(true));
EXPECT_CALL(*appSharedMock, choice_set_map()).WillOnce(Return(data_accessor));
application_manager_test::MockApplicationManager mock_application_manager;
@@ -307,7 +312,8 @@ TEST(MessageHelperTestCreate,
CreateAddVRCommandRequestFromChoiceToHMI_SendObject_EqualList) {
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
application_manager::ChoiceSetMap vis;
- DataAccessor< ::application_manager::ChoiceSetMap> data_accessor(vis, true);
+ DataAccessor< ::application_manager::ChoiceSetMap> data_accessor(
+ vis, std::make_shared<sync_primitives::Lock>(true));
smart_objects::SmartObjectSPtr smartObjectPtr =
utils::MakeShared<smart_objects::SmartObject>();
@@ -353,7 +359,8 @@ TEST(MessageHelperTestCreate,
TEST(MessageHelperTestCreate, CreateAddSubMenuRequestToHMI_SendObject_Equal) {
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
application_manager::SubMenuMap vis;
- DataAccessor< ::application_manager::SubMenuMap> data_accessor(vis, true);
+ DataAccessor< ::application_manager::SubMenuMap> data_accessor(
+ vis, std::make_shared<sync_primitives::Lock>(true));
smart_objects::SmartObjectSPtr smartObjectPtr =
utils::MakeShared<smart_objects::SmartObject>();
@@ -392,7 +399,8 @@ TEST(MessageHelperTestCreate,
CreateAddSubMenuRequestToHMI_SendEmptyMap_EmptySmartObjectList) {
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
application_manager::SubMenuMap vis;
- DataAccessor< ::application_manager::SubMenuMap> data_accessor(vis, true);
+ DataAccessor< ::application_manager::SubMenuMap> data_accessor(
+ vis, std::make_shared<sync_primitives::Lock>(true));
EXPECT_CALL(*appSharedMock, sub_menu_map()).WillOnce(Return(data_accessor));
@@ -571,6 +579,7 @@ class MessageHelperTest : public ::testing::Test {
protected:
application_manager_test::MockApplicationManager mock_application_manager;
+ application_manager_test::MockRPCService mock_rpc_service_;
const StringArray language_strings;
const StringArray hmi_result_strings;
const StringArray mobile_result_strings;
@@ -707,25 +716,6 @@ TEST_F(MessageHelperTest, VerifySoftButtonString_CorrectStrings_True) {
}
TEST_F(MessageHelperTest,
- GetIVISubscriptionRequests_ValidApplication_HmiRequestNotEmpty) {
- // Creating sharedPtr to MockApplication
- MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
- // Creating data acessor
- application_manager::VehicleInfoSubscriptions vis;
- DataAccessor<application_manager::VehicleInfoSubscriptions> data_accessor(
- vis, true);
- // Calls for ApplicationManager
- EXPECT_CALL(*appSharedMock, app_id()).WillOnce(Return(1u));
- EXPECT_CALL(*appSharedMock, SubscribedIVI()).WillOnce(Return(data_accessor));
-
- smart_objects::SmartObjectList outList =
- MessageHelper::GetIVISubscriptionRequests(appSharedMock,
- mock_application_manager);
- // Expect not empty request
- EXPECT_FALSE(outList.empty());
-}
-
-TEST_F(MessageHelperTest,
ProcessSoftButtons_SmartObjectWithoutButtonsKey_Success) {
// Creating sharedPtr to MockApplication
MockApplicationSharedPtr appSharedMock = utils::MakeShared<MockApplication>();
@@ -950,7 +940,10 @@ TEST_F(MessageHelperTest, SendGetListOfPermissionsResponse_SUCCESS) {
permissions.push_back(permission);
smart_objects::SmartObjectSPtr result;
- EXPECT_CALL(mock_application_manager, ManageHMICommand(_))
+
+ ON_CALL(mock_application_manager, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
const uint32_t correlation_id = 0u;
@@ -987,7 +980,10 @@ TEST_F(MessageHelperTest,
entity_type_2, entity_id_2, entity_status_2));
smart_objects::SmartObjectSPtr result;
- EXPECT_CALL(mock_application_manager, ManageHMICommand(_))
+
+ ON_CALL(mock_application_manager, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
const uint32_t correlation_id = 0u;
@@ -1031,7 +1027,9 @@ TEST_F(MessageHelperTest,
TEST_F(MessageHelperTest, SendNaviSetVideoConfigRequest) {
smart_objects::SmartObjectSPtr result;
- EXPECT_CALL(mock_application_manager, ManageHMICommand(_))
+ ON_CALL(mock_application_manager, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
int32_t app_id = 123;
diff --git a/src/components/application_manager/test/mock_hmi_command_factory.cc b/src/components/application_manager/test/mock_hmi_command_factory.cc
index c2b4644f86..375da26067 100644
--- a/src/components/application_manager/test/mock_hmi_command_factory.cc
+++ b/src/components/application_manager/test/mock_hmi_command_factory.cc
@@ -31,7 +31,7 @@
*/
#include <gmock/gmock.h>
-#include "application_manager/hmi_command_factory.h"
+#include "application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/hmi_command_factory.h"
#include "application_manager/mock_hmi_command_factory.h"
namespace test {
@@ -47,10 +47,11 @@ MockHMICommandFactory* MockHMICommandFactory::mock_hmi_command_factory() {
} // components
} // test
-namespace application_manager {
-CommandSharedPtr HMICommandFactory::CreateCommand(
- const commands::MessageSharedPtr& message,
- ApplicationManager& application_manager) {
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+app_mngr::CommandSharedPtr HMICommandFactory::CreateCommand(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager) {
return test::components::application_manager_test::MockHMICommandFactory::
mock_hmi_command_factory()->CreateCommand(message, application_manager);
}
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index 24bba63e71..fc2136cdd8 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -230,7 +230,6 @@ void MessageHelper::SendPolicyUpdate(const std::string& file_path,
file_path, timeout, retries, app_mngr);
}
-#ifdef SDL_REMOTE_CONTROL
void MessageHelper::SendActivateAppToHMI(
uint32_t const app_id,
ApplicationManager& application_manager,
@@ -240,6 +239,12 @@ void MessageHelper::SendActivateAppToHMI(
app_id, application_manager, level, send_policy_priority);
}
+smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
+ hmi_apis::messageType::eType message_type, const uint32_t correlation_id) {
+ return MockMessageHelper::message_helper_mock()->CreateMessageForHMI(
+ message_type, correlation_id);
+}
+
void MessageHelper::SendHMIStatusNotification(
const Application& application_impl,
ApplicationManager& application_manager) {
@@ -247,8 +252,6 @@ void MessageHelper::SendHMIStatusNotification(
application_impl, application_manager);
}
-#endif // SDL_REMOTE_CONTROL
-
void MessageHelper::SendUpdateSDLResponse(const std::string& result,
uint32_t correlation_id,
ApplicationManager& app_mngr) {
@@ -309,10 +312,12 @@ void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
app);
}
-smart_objects::SmartObjectList MessageHelper::GetIVISubscriptionRequests(
- ApplicationSharedPtr app, ApplicationManager& app_mngr) {
- return MockMessageHelper::message_helper_mock()->GetIVISubscriptionRequests(
- app);
+mobile_apis::Result::eType MessageHelper::VerifyTtsFiles(
+ smart_objects::SmartObject& message,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
+ return MockMessageHelper::message_helper_mock()->VerifyTtsFiles(
+ message, app, app_mngr);
}
mobile_apis::Result::eType MessageHelper::VerifyImage(
@@ -538,11 +543,4 @@ void MessageHelper::SendUnsubscribeButtonNotification(
->SendUnsubscribeButtonNotification(button, application, app_mngr);
}
-void MessageHelper::SendUnsubscribeIVIRequest(int32_t ivi_id,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr) {
- return MockMessageHelper::message_helper_mock()->SendUnsubscribeIVIRequest(
- ivi_id, application, app_mngr);
-}
-
} // 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 d9e1cefa01..57fa67bf0a 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -69,6 +69,7 @@
#include "application_manager/mock_event_dispatcher.h"
#include "application_manager/mock_state_controller.h"
#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_rpc_service.h"
#include "policy/mock_policy_manager.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
@@ -90,6 +91,8 @@ using ::testing::DoAll;
using ::testing::SetArgReferee;
using ::testing::Mock;
+typedef NiceMock<application_manager_test::MockRPCService> MockRPCService;
+
const std::string kDummyData = "some_data";
class PolicyHandlerTest : public ::testing::Test {
@@ -105,7 +108,8 @@ class PolicyHandlerTest : public ::testing::Test {
, default_hmi_("fake_hmi")
, kPreloadPTFile_("sdl_preloaded_pt.json")
, kAppStorageFolder_("storage")
- , app_set(test_app, app_lock)
+ , app_lock_(std::make_shared<sync_primitives::Lock>())
+ , app_set(test_app, app_lock_)
, kAppId1_(10u)
, kAppId2_(11u)
, kConnectionKey_(1u)
@@ -149,7 +153,7 @@ class PolicyHandlerTest : public ::testing::Test {
const std::string kPreloadPTFile_;
const std::string kAppStorageFolder_;
ApplicationSet test_app;
- sync_primitives::Lock app_lock;
+ std::shared_ptr<sync_primitives::Lock> app_lock_;
DataAccessor<ApplicationSet> app_set;
const uint32_t kAppId1_;
const uint32_t kAppId2_;
@@ -164,6 +168,7 @@ class PolicyHandlerTest : public ::testing::Test {
const uint32_t kCallsCount_;
const uint32_t kTimeout_;
application_manager::MockMessageHelper& mock_message_helper_;
+ MockRPCService mock_rpc_service_;
virtual void SetUp() OVERRIDE {
Mock::VerifyAndClearExpectations(&mock_message_helper_);
@@ -297,7 +302,7 @@ class WaitAsync {
const uint32_t timeout_;
sync_primitives::ConditionalVariable cond_var_;
};
-}
+} // namespace
TEST_F(PolicyHandlerTest, LoadPolicyLibrary_Method_ExpectLibraryLoaded) {
// Check before policy enabled from ini file
@@ -954,6 +959,7 @@ TEST_F(PolicyHandlerTest, OnPendingPermissionChange_AppLimitedAndRevoked) {
SetRegularState(_,
mobile_apis::HMILevel::HMI_NONE,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
true));
EXPECT_CALL(*mock_policy_manager_, GetAppPermissionsChanges(_))
@@ -1005,8 +1011,10 @@ TEST_F(PolicyHandlerTest,
kAppId1_,
mobile_api::AppInterfaceUnregisteredReason::APP_UNAUTHORIZED))
.WillOnce(Return(message));
- EXPECT_CALL(app_manager_,
- ManageMobileCommand(_, commands::Command::ORIGIN_SDL));
+ ON_CALL(app_manager_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, commands::Command::SOURCE_SDL));
EXPECT_CALL(*mock_policy_manager_,
RemovePendingPermissionChanges(kPolicyAppId_));
@@ -1057,8 +1065,10 @@ TEST_F(PolicyHandlerTest,
kAppId1_,
mobile_api::AppInterfaceUnregisteredReason::APP_UNAUTHORIZED))
.WillOnce(Return(message));
- EXPECT_CALL(app_manager_,
- ManageMobileCommand(_, commands::Command::ORIGIN_SDL));
+ ON_CALL(app_manager_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, commands::Command::SOURCE_SDL));
EXPECT_CALL(*mock_policy_manager_,
RemovePendingPermissionChanges(kPolicyAppId_));
@@ -1377,10 +1387,30 @@ TEST_F(PolicyHandlerTest, IsRequestTypeAllowed) {
mobile_apis::RequestType::eType type =
mobile_apis::RequestType::eType::EMERGENCY;
+
+ EXPECT_CALL(*mock_policy_manager_, GetAppRequestTypesState(kPolicyAppId_))
+ .WillOnce(Return(policy::RequestType::State::AVAILABLE));
+
EXPECT_CALL(*mock_policy_manager_, GetAppRequestTypes(kPolicyAppId_))
- .WillOnce(Return(std::vector<std::string>()));
+ .WillOnce(Return(std::vector<std::string>({"HTTP"})));
+ // Act
+ EXPECT_FALSE(policy_handler_.IsRequestTypeAllowed(kPolicyAppId_, type));
+}
+
+TEST_F(PolicyHandlerTest, IsRequestSubTypeAllowed) {
+ // Arrange
+ EnablePolicyAndPolicyManagerMock();
+
+ // Check expectations
+ EXPECT_CALL(*mock_policy_manager_, GetAppRequestSubTypesState(kPolicyAppId_))
+ .WillOnce(Return(policy::RequestSubType::State::AVAILABLE));
+ EXPECT_CALL(*mock_policy_manager_, GetAppRequestSubTypes(kPolicyAppId_))
+ .WillOnce(
+ Return(std::vector<std::string>({"fakeSubType", "fakeSubType2"})));
+
// Act
- policy_handler_.IsRequestTypeAllowed(kPolicyAppId_, type);
+ const std::string subtype = "fakeSubType";
+ EXPECT_TRUE(policy_handler_.IsRequestSubTypeAllowed(kPolicyAppId_, subtype));
}
TEST_F(PolicyHandlerTest, GetVehicleInfo) {
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 7faf3e36cb..0d9cbfe6aa 100644
--- a/src/components/application_manager/test/rc_policy_handler_test.cc
+++ b/src/components/application_manager/test/rc_policy_handler_test.cc
@@ -67,11 +67,11 @@ using namespace application_manager;
using namespace policy;
using namespace utils::custom_string;
using testing::_;
+using ::testing::DoAll;
using ::testing::Mock;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::NiceMock;
-using ::testing::DoAll;
using ::testing::SetArgPointee;
class RCPolicyHandlerTest : public ::testing::Test {
@@ -83,7 +83,8 @@ class RCPolicyHandlerTest : public ::testing::Test {
, kDeviceId_("fake_device_id")
, kHmiLevel_("NONE")
, default_hmi_("fake_hmi")
- , app_set(test_app, app_lock)
+ , app_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , app_set(test_app, app_lock_ptr_)
, kAppId1_(10u)
, kAppId2_(11u)
, kConnectionKey_(1u)
@@ -107,7 +108,7 @@ class RCPolicyHandlerTest : public ::testing::Test {
const std::string kHmiLevel_;
std::string default_hmi_;
ApplicationSet test_app;
- sync_primitives::Lock app_lock;
+ std::shared_ptr<sync_primitives::Lock> app_lock_ptr_;
DataAccessor<ApplicationSet> app_set;
const uint32_t kAppId1_;
const uint32_t kAppId2_;
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 2c2f69af95..26a44826be 100644
--- a/src/components/application_manager/test/resumption/resume_ctrl_test.cc
+++ b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
@@ -37,6 +37,7 @@
#include "application_manager/resumption/resume_ctrl_impl.h"
#include "application_manager/usage_statistics.h"
#include "application_manager/mock_application.h"
+#include "application_manager/mock_app_extension.h"
#include "application_manager/mock_help_prompt_manager.h"
#include "application_manager/mock_resumption_data.h"
#include "interfaces/MOBILE_API.h"
@@ -56,14 +57,14 @@ namespace resumption_test {
using ::testing::_;
using ::testing::A;
-using ::testing::Return;
-using ::testing::ReturnRef;
+using ::testing::AtLeast;
using ::testing::DoAll;
-using ::testing::SetArgReferee;
+using ::testing::Eq;
using ::testing::Mock;
using ::testing::NiceMock;
-using ::testing::AtLeast;
-using ::testing::Eq;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SetArgReferee;
using namespace application_manager_test;
using namespace resumption;
@@ -81,26 +82,29 @@ class ResumeCtrlTest : public ::testing::Test {
, kTestGrammarId_(10)
, kHash_("saved_hash")
, kAppResumingTimeout_(30000u) // miliseconds
- , kTestTimeStamp_(1452074434u) {}
+ , kTestTimeStamp_(1452074434u)
+ , app_set_lock_ptr_(std::make_shared<sync_primitives::Lock>()) {}
virtual void SetUp() OVERRIDE {
- Mock::VerifyAndClearExpectations(&app_mngr_);
- ON_CALL(app_mngr_, event_dispatcher())
+ Mock::VerifyAndClearExpectations(&mock_app_mngr_);
+ ON_CALL(mock_app_mngr_, event_dispatcher())
.WillByDefault(ReturnRef(mock_event_dispatcher_));
mock_storage_ =
::utils::MakeShared<NiceMock<resumption_test::MockResumptionData> >(
- app_mngr_);
- app_mock_ = utils::MakeShared<NiceMock<MockApplication> >();
+ mock_app_mngr_);
+ mock_app_ = utils::MakeShared<NiceMock<MockApplication> >();
mock_help_prompt_manager_ =
- utils::SharedPtr<MockHelpPromptManager>(new MockHelpPromptManager());
+ std::shared_ptr<MockHelpPromptManager>(new MockHelpPromptManager());
+ mock_app_extension_ = utils::MakeShared<
+ NiceMock<application_manager_test::MockAppExtension> >();
const_app_ =
- static_cast<application_manager::ApplicationConstSharedPtr>(app_mock_);
- res_ctrl_ = utils::MakeShared<ResumeCtrlImpl>(app_mngr_);
+ static_cast<application_manager::ApplicationConstSharedPtr>(mock_app_);
+ res_ctrl_ = utils::MakeShared<ResumeCtrlImpl>(mock_app_mngr_);
res_ctrl_->set_resumption_storage(mock_storage_);
- ON_CALL(app_mngr_, state_controller())
- .WillByDefault(ReturnRef(state_controller_));
- ON_CALL(app_mngr_, get_settings())
+ ON_CALL(mock_app_mngr_, state_controller())
+ .WillByDefault(ReturnRef(mock_state_controller_));
+ ON_CALL(mock_app_mngr_, get_settings())
.WillByDefault(ReturnRef(mock_application_manager_settings_));
ON_CALL(mock_application_manager_settings_, use_db_for_resumption())
@@ -109,26 +113,28 @@ class ResumeCtrlTest : public ::testing::Test {
.WillByDefault(ReturnRef(kAppResumingTimeout_));
}
void TearDown() OVERRIDE {
- Mock::VerifyAndClearExpectations(&app_mngr_);
+ Mock::VerifyAndClearExpectations(&mock_app_mngr_);
}
void GetInfoFromApp() {
- ON_CALL(*app_mock_, policy_app_id())
+ ON_CALL(*mock_app_, policy_app_id())
.WillByDefault(Return(kTestPolicyAppId_));
- ON_CALL(*app_mock_, mac_address()).WillByDefault(ReturnRef(kMacAddress_));
- ON_CALL(*app_mock_, device()).WillByDefault(Return(kTestDevId_));
- ON_CALL(*app_mock_, app_id()).WillByDefault(Return(kTestAppId_));
+ ON_CALL(*mock_app_, mac_address()).WillByDefault(ReturnRef(kMacAddress_));
+ ON_CALL(*mock_app_, device()).WillByDefault(Return(kTestDevId_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kTestAppId_));
}
NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
application_manager_test::MockApplicationManagerSettings
mock_application_manager_settings_;
- application_manager_test::MockApplicationManager app_mngr_;
- MockStateController state_controller_;
+ application_manager_test::MockApplicationManager mock_app_mngr_;
+ utils::SharedPtr<NiceMock<application_manager_test::MockAppExtension> >
+ mock_app_extension_;
+ MockStateController mock_state_controller_;
utils::SharedPtr<ResumeCtrl> res_ctrl_;
utils::SharedPtr<NiceMock<resumption_test::MockResumptionData> >
mock_storage_;
- utils::SharedPtr<NiceMock<MockApplication> > app_mock_;
- utils::SharedPtr<MockHelpPromptManager> mock_help_prompt_manager_;
+ utils::SharedPtr<NiceMock<MockApplication> > mock_app_;
+ std::shared_ptr<MockHelpPromptManager> mock_help_prompt_manager_;
application_manager::ApplicationConstSharedPtr const_app_;
const uint32_t kTestAppId_;
const std::string kTestPolicyAppId_;
@@ -140,7 +146,7 @@ class ResumeCtrlTest : public ::testing::Test {
const std::string kHash_;
const uint32_t kAppResumingTimeout_;
const uint32_t kTestTimeStamp_;
- sync_primitives::Lock app_set_lock_;
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_ptr_;
};
/**
@@ -155,15 +161,15 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithGrammarId) {
// Check RestoreApplicationData
GetInfoFromApp();
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ 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(*app_mock_, UpdateHash());
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -179,16 +185,16 @@ TEST_F(ResumeCtrlTest, StartResumption_WithoutGrammarId) {
saved_app[application_manager::strings::hash_id] = kHash_;
GetInfoFromApp();
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
// Check RestoreApplicationData
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, UpdateHash());
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_)).Times(0);
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_)).Times(0);
- bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_FALSE(res);
}
@@ -227,15 +233,15 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithFiles) {
test_application_files;
// Check RestoreApplicationData
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ 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(*app_mock_, UpdateHash());
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_files; ++i) {
- EXPECT_CALL(*app_mock_,
+ EXPECT_CALL(*mock_app_,
AddFile(CheckAppFile(
true,
true,
@@ -243,7 +249,7 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithFiles) {
static_cast<mobile_apis::FileType::eType>(file_types[i]))));
}
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -265,27 +271,27 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubmenues) {
test_application_submenues;
// Check RestoreApplicationData
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ 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(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_submenues; ++i) {
- EXPECT_CALL(*app_mock_, AddSubMenu(i, test_application_submenues[i]));
+ EXPECT_CALL(*mock_app_, AddSubMenu(i, test_application_submenues[i]));
}
smart_objects::SmartObjectList requests;
- EXPECT_CALL(app_mngr_, GetNextHMICorrelationID())
+ EXPECT_CALL(mock_app_mngr_, GetNextHMICorrelationID())
.WillRepeatedly(Return(kCorId_));
EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
CreateAddSubMenuRequestToHMI(_, kCorId_))
.WillRepeatedly(Return(requests));
- EXPECT_CALL(*app_mock_, UpdateHash());
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -306,17 +312,17 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithCommands) {
saved_app[application_manager::strings::application_commands] =
test_application_commands;
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
// Check RestoreApplicationData
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, UpdateHash());
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_commands; ++i) {
- EXPECT_CALL(*app_mock_, AddCommand(i, test_application_commands[i]));
+ EXPECT_CALL(*mock_app_, AddCommand(i, test_application_commands[i]));
}
smart_objects::SmartObjectList requests;
@@ -324,7 +330,7 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithCommands) {
CreateAddCommandRequestToHMI(_, _))
.WillRepeatedly(Return(requests));
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -358,17 +364,17 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithChoiceSet) {
application_choice_sets;
// Check RestoreApplicationData
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, UpdateHash());
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_choice_sets; ++i) {
- EXPECT_CALL(*app_mock_, AddChoiceSet(i, application_choice_sets[i]));
+ EXPECT_CALL(*mock_app_, AddChoiceSet(i, application_choice_sets[i]));
}
smart_objects::SmartObjectList requests;
@@ -376,7 +382,7 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithChoiceSet) {
CreateAddVRCommandRequestFromChoiceToHMI(_))
.WillRepeatedly(Return(requests));
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -390,22 +396,22 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithGlobalProperties) {
test_global_properties;
// Check RestoreApplicationData
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
SendGlobalPropertiesToHMI(_));
- EXPECT_CALL(*app_mock_, load_global_properties(test_global_properties));
+ EXPECT_CALL(*mock_app_, load_global_properties(test_global_properties));
- EXPECT_CALL(*app_mock_, UpdateHash());
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -414,7 +420,7 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscribeOnButtons) {
smart_objects::SmartObject test_subscriptions;
smart_objects::SmartObject app_buttons;
- uint32_t count_of_buttons = 17;
+ const uint32_t count_of_buttons = 17;
for (uint32_t i = 0; i < count_of_buttons; ++i) {
app_buttons[i] = i;
}
@@ -429,26 +435,33 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscribeOnButtons) {
test_subscriptions;
// Check RestoreApplicationData
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_buttons; ++i) {
EXPECT_CALL(
- *app_mock_,
+ *mock_app_,
SubscribeToButton(static_cast<mobile_apis::ButtonName::eType>(i)));
}
- EXPECT_CALL(*app_mock_, UpdateHash());
+ 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(*application_manager::MockMessageHelper::message_helper_mock(),
SendAllOnButtonSubscriptionNotificationsForApp(_, _)).Times(2);
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
}
@@ -474,27 +487,26 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscriptionToIVI) {
test_subscriptions;
// Check RestoreApplicationData
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
-
- for (size_t i = 0; i < app_vi.length(); ++i) {
- EXPECT_CALL(
- *app_mock_,
- SubscribeToIVI(static_cast<mobile_apis::VehicleDataType::eType>(i)));
- }
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
smart_objects::SmartObjectList requests;
- EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- GetIVISubscriptionRequests(_)).WillRepeatedly(Return(requests));
- EXPECT_CALL(*app_mock_, UpdateHash());
- const bool res = res_ctrl_->StartResumption(app_mock_, kHash_);
+ 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_TRUE(res);
}
@@ -509,30 +521,30 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscriptionToWayPoints) {
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*app_mock_, set_grammar_id(kTestGrammarId_));
+ EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
EXPECT_CALL(
- app_mngr_,
+ mock_app_mngr_,
SubscribeAppForWayPoints(A<application_manager::ApplicationSharedPtr>()));
const mobile_apis::HMILevel::eType hmi_test_level =
mobile_apis::HMILevel::HMI_FULL;
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(hmi_test_level));
- EXPECT_CALL(state_controller_, SetRegularState(_, hmi_test_level));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, hmi_test_level));
- const bool result = res_ctrl_->StartResumption(app_mock_, kHash_);
+ const bool result = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(result);
}
TEST_F(ResumeCtrlTest, StartResumptionOnlyHMILevel) {
smart_objects::SmartObject saved_app;
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- const bool res = res_ctrl_->StartResumptionOnlyHMILevel(app_mock_);
+ const bool res = res_ctrl_->StartResumptionOnlyHMILevel(mock_app_);
EXPECT_TRUE(res);
}
@@ -543,16 +555,16 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInFull) {
saved_app[application_manager::strings::ign_off_count] = ign_off_count;
saved_app[application_manager::strings::hmi_level] = restored_test_type;
- ::application_manager::CommandsMap command;
+ application_manager::CommandsMap command;
DataAccessor<application_manager::CommandsMap> data_accessor(command,
app_set_lock_);
- EXPECT_CALL(state_controller_, SetRegularState(_, restored_test_type))
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, restored_test_type))
.Times(AtLeast(1));
GetInfoFromApp();
- EXPECT_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ EXPECT_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillRepeatedly(Return(kDefaultTestLevel_));
- EXPECT_CALL(*app_mock_, commands_map()).WillRepeatedly(Return(data_accessor));
+ EXPECT_CALL(*mock_app_, commands_map()).WillRepeatedly(Return(data_accessor));
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
@@ -561,11 +573,11 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInFull) {
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
- ON_CALL(app_mngr_, GetUserConsentForDevice("12345"))
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceAllowed));
- EXPECT_CALL(*app_mock_, help_prompt_manager())
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
.WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
- res_ctrl_->StartAppHmiStateResumption(app_mock_);
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
}
TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInBackground) {
@@ -576,13 +588,13 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInBackground) {
saved_app[application_manager::strings::ign_off_count] = ign_off_count;
saved_app[application_manager::strings::hmi_level] = restored_test_type;
- EXPECT_CALL(app_mngr_, state_controller()).Times(0);
+ EXPECT_CALL(mock_app_mngr_, state_controller()).Times(0);
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- res_ctrl_->StartAppHmiStateResumption(app_mock_);
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
}
/**
@@ -601,22 +613,23 @@ TEST_F(ResumeCtrlTest, RestoreAppHMIState_RestoreHMILevelFull) {
saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
saved_app[application_manager::strings::hmi_level] = restored_test_type;
- EXPECT_CALL(state_controller_, SetRegularState(_, restored_test_type))
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, restored_test_type))
.Times(AtLeast(1));
GetInfoFromApp();
- EXPECT_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ EXPECT_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillRepeatedly(Return(kDefaultTestLevel_));
- EXPECT_CALL(*app_mock_, commands_map()).WillRepeatedly(Return(data_accessor));
+ EXPECT_CALL(*mock_app_, commands_map()).WillRepeatedly(Return(data_accessor));
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- ON_CALL(app_mngr_, GetUserConsentForDevice("12345"))
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceAllowed));
- EXPECT_CALL(*app_mock_, set_is_resuming(true));
- EXPECT_CALL(*app_mock_, help_prompt_manager())
+ EXPECT_CALL(*mock_app_, set_is_resuming(true));
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
.WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
- const bool res = res_ctrl_->RestoreAppHMIState(app_mock_);
+
+ const bool res = res_ctrl_->RestoreAppHMIState(mock_app_);
EXPECT_TRUE(res);
}
@@ -625,22 +638,23 @@ TEST_F(ResumeCtrlTest, SetupDefaultHMILevel) {
saved_app[application_manager::strings::hmi_level] = kDefaultTestLevel_;
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
GetInfoFromApp();
- EXPECT_CALL(app_mngr_, GetUserConsentForDevice("12345")).Times(0);
+ EXPECT_CALL(mock_app_mngr_, GetUserConsentForDevice("12345")).Times(0);
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
- EXPECT_CALL(state_controller_, SetRegularState(_, kDefaultTestLevel_))
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, kDefaultTestLevel_))
.Times(AtLeast(1));
- res_ctrl_->SetupDefaultHMILevel(app_mock_);
+ res_ctrl_->SetupDefaultHMILevel(mock_app_);
}
TEST_F(ResumeCtrlTest, ApplicationResumptiOnTimer_AppInFull) {
- ON_CALL(app_mngr_, application(kTestAppId_)).WillByDefault(Return(app_mock_));
+ ON_CALL(mock_app_mngr_, application(kTestAppId_))
+ .WillByDefault(Return(mock_app_));
::application_manager::CommandsMap command;
DataAccessor<application_manager::CommandsMap> data_accessor(command,
@@ -653,7 +667,7 @@ TEST_F(ResumeCtrlTest, ApplicationResumptiOnTimer_AppInFull) {
saved_app[application_manager::strings::hmi_level] = restored_test_type;
MockStateController state_controller;
- EXPECT_CALL(app_mngr_, state_controller())
+ EXPECT_CALL(mock_app_mngr_, state_controller())
.WillOnce(ReturnRef(state_controller));
EXPECT_CALL(state_controller, SetRegularState(_, restored_test_type))
.Times(AtLeast(1));
@@ -669,39 +683,39 @@ TEST_F(ResumeCtrlTest, ApplicationResumptiOnTimer_AppInFull) {
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
- ON_CALL(app_mngr_, GetUserConsentForDevice(kMacAddress_))
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice(kMacAddress_))
.WillByDefault(Return(policy::kDeviceAllowed));
- EXPECT_CALL(*app_mock_, help_prompt_manager())
+ EXPECT_CALL(*mock_app_, help_prompt_manager())
.WillOnce(ReturnRef(*mock_help_prompt_manager_.get()));
- res_ctrl_->StartAppHmiStateResumption(app_mock_);
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
}
/**
* @brief group of tests which check correct SetAppHMIState
-*/
+ */
TEST_F(ResumeCtrlTest, SetAppHMIState_HMINone_WithoutCheckPolicy) {
GetInfoFromApp();
- EXPECT_CALL(app_mngr_, GetUserConsentForDevice("12345")).Times(0);
+ EXPECT_CALL(mock_app_mngr_, GetUserConsentForDevice("12345")).Times(0);
- EXPECT_CALL(*app_mock_, set_is_resuming(true));
- EXPECT_CALL(state_controller_, SetRegularState(_, kDefaultTestLevel_))
+ EXPECT_CALL(*mock_app_, set_is_resuming(true));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, kDefaultTestLevel_))
.Times(AtLeast(1));
const bool res =
- res_ctrl_->SetAppHMIState(app_mock_, kDefaultTestLevel_, false);
+ res_ctrl_->SetAppHMIState(mock_app_, kDefaultTestLevel_, false);
EXPECT_TRUE(res);
}
TEST_F(ResumeCtrlTest, SetAppHMIState_HMILimited_WithoutCheckPolicy) {
mobile_apis::HMILevel::eType test_type = eType::HMI_LIMITED;
GetInfoFromApp();
- EXPECT_CALL(app_mngr_, GetUserConsentForDevice("12345")).Times(0);
+ EXPECT_CALL(mock_app_mngr_, GetUserConsentForDevice("12345")).Times(0);
- EXPECT_CALL(*app_mock_, set_is_resuming(true));
- EXPECT_CALL(state_controller_, SetRegularState(_, test_type))
+ EXPECT_CALL(*mock_app_, set_is_resuming(true));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, test_type))
.Times(AtLeast(1));
- const bool res = res_ctrl_->SetAppHMIState(app_mock_, test_type, false);
+ const bool res = res_ctrl_->SetAppHMIState(mock_app_, test_type, false);
EXPECT_TRUE(res);
}
@@ -709,14 +723,14 @@ TEST_F(ResumeCtrlTest, SetAppHMIState_HMIFull_WithoutCheckPolicy) {
mobile_apis::HMILevel::eType test_type = eType::HMI_FULL;
GetInfoFromApp();
// GetDefaultHmiLevel should not be called
- EXPECT_CALL(app_mngr_, GetDefaultHmiLevel(const_app_)).Times(0);
- EXPECT_CALL(app_mngr_, GetUserConsentForDevice("12345")).Times(0);
+ EXPECT_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_)).Times(0);
+ EXPECT_CALL(mock_app_mngr_, GetUserConsentForDevice("12345")).Times(0);
- EXPECT_CALL(*app_mock_, set_is_resuming(true));
- EXPECT_CALL(state_controller_, SetRegularState(_, test_type))
+ EXPECT_CALL(*mock_app_, set_is_resuming(true));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, test_type))
.Times(AtLeast(1));
- const bool res = res_ctrl_->SetAppHMIState(app_mock_, test_type, false);
+ const bool res = res_ctrl_->SetAppHMIState(mock_app_, test_type, false);
EXPECT_TRUE(res);
}
@@ -724,14 +738,14 @@ TEST_F(ResumeCtrlTest, SetAppHMIState_HMIFull_WithPolicy_DevAllowed) {
mobile_apis::HMILevel::eType test_type = eType::HMI_FULL;
GetInfoFromApp();
- ON_CALL(app_mngr_, GetUserConsentForDevice("12345"))
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceAllowed));
- EXPECT_CALL(*app_mock_, set_is_resuming(true));
- EXPECT_CALL(state_controller_, SetRegularState(_, test_type))
+ EXPECT_CALL(*mock_app_, set_is_resuming(true));
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, test_type))
.Times(AtLeast(1));
- const bool res = res_ctrl_->SetAppHMIState(app_mock_, test_type, true);
+ const bool res = res_ctrl_->SetAppHMIState(mock_app_, test_type, true);
EXPECT_TRUE(res);
}
@@ -739,15 +753,15 @@ TEST_F(ResumeCtrlTest, SetAppHMIState_HMIFull_WithPolicy_DevDisallowed) {
mobile_apis::HMILevel::eType test_type = eType::HMI_FULL;
GetInfoFromApp();
- ON_CALL(app_mngr_, GetUserConsentForDevice("12345"))
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceDisallowed));
- EXPECT_CALL(*app_mock_, set_is_resuming(true));
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ EXPECT_CALL(*mock_app_, set_is_resuming(true));
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
.WillByDefault(Return(kDefaultTestLevel_));
- EXPECT_CALL(state_controller_, SetRegularState(_, kDefaultTestLevel_))
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, kDefaultTestLevel_))
.Times(AtLeast(1));
- const bool res = res_ctrl_->SetAppHMIState(app_mock_, test_type, true);
+ const bool res = res_ctrl_->SetAppHMIState(mock_app_, test_type, true);
EXPECT_FALSE(res);
}
@@ -760,9 +774,9 @@ TEST_F(ResumeCtrlTest, SaveAllApplications) {
app_set.insert(test_app);
DataAccessor<application_manager::ApplicationSet> accessor(app_set,
- app_set_lock_);
+ app_set_lock_ptr_);
- ON_CALL(app_mngr_, applications()).WillByDefault(Return(accessor));
+ ON_CALL(mock_app_mngr_, applications()).WillByDefault(Return(accessor));
EXPECT_CALL(*mock_storage_, SaveApplication(Eq(test_app)));
res_ctrl_->SaveAllApplications();
}
@@ -774,9 +788,9 @@ TEST_F(ResumeCtrlTest, SaveAllApplications_EmptyApplicationlist) {
application_manager::ApplicationSet app_set;
DataAccessor<application_manager::ApplicationSet> accessor(app_set,
- app_set_lock_);
+ app_set_lock_ptr_);
- ON_CALL(app_mngr_, applications()).WillByDefault(Return(accessor));
+ ON_CALL(mock_app_mngr_, applications()).WillByDefault(Return(accessor));
EXPECT_CALL(*mock_storage_, SaveApplication(mock_app)).Times(0);
res_ctrl_->SaveAllApplications();
}
@@ -793,14 +807,14 @@ TEST_F(ResumeCtrlTest, OnAppActivated_ResumptionHasStarted) {
smart_objects::SmartObject saved_app;
GetInfoFromApp();
- ON_CALL(app_mngr_, GetDefaultHmiLevel(const_app_))
+ 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)));
- ON_CALL(*app_mock_, app_id()).WillByDefault(Return(kTestAppId_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kTestAppId_));
- const bool res = res_ctrl_->StartResumptionOnlyHMILevel(app_mock_);
+ const bool res = res_ctrl_->StartResumptionOnlyHMILevel(mock_app_);
EXPECT_TRUE(res);
utils::SharedPtr<application_manager_test::MockApplication> app_sh_mock =
@@ -870,7 +884,7 @@ TEST_F(ResumeCtrlTest, CheckPersistenceFiles_WithoutCommandAndChoiceSets) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_TRUE(res_ctrl_->CheckPersistenceFilesForResumption(app_mock_));
+ EXPECT_TRUE(res_ctrl_->CheckPersistenceFilesForResumption(mock_app_));
}
TEST_F(ResumeCtrlTest, CheckPersistenceFilesForResumption_WithCommands) {
@@ -891,7 +905,7 @@ TEST_F(ResumeCtrlTest, CheckPersistenceFilesForResumption_WithCommands) {
VerifyImageFiles(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- EXPECT_TRUE(res_ctrl_->CheckPersistenceFilesForResumption(app_mock_));
+ EXPECT_TRUE(res_ctrl_->CheckPersistenceFilesForResumption(mock_app_));
}
TEST_F(ResumeCtrlTest, CheckPersistenceFilesForResumption_WithChoiceSet) {
@@ -908,7 +922,7 @@ TEST_F(ResumeCtrlTest, CheckPersistenceFilesForResumption_WithChoiceSet) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_TRUE(res_ctrl_->CheckPersistenceFilesForResumption(app_mock_));
+ EXPECT_TRUE(res_ctrl_->CheckPersistenceFilesForResumption(mock_app_));
}
// TODO (VVeremjova) APPLINK-16718
@@ -924,9 +938,9 @@ TEST_F(ResumeCtrlTest, OnSuspend_EmptyApplicationlist) {
application_manager::ApplicationSet app_set;
DataAccessor<application_manager::ApplicationSet> accessor(app_set,
- app_set_lock_);
+ app_set_lock_ptr_);
- ON_CALL(app_mngr_, applications()).WillByDefault(Return(accessor));
+ ON_CALL(mock_app_mngr_, applications()).WillByDefault(Return(accessor));
EXPECT_CALL(*mock_storage_, SaveApplication(mock_app)).Times(0);
EXPECT_CALL(*mock_storage_, IncrementIgnOffCount()).Times(0);
@@ -948,7 +962,7 @@ TEST_F(ResumeCtrlTest, RemoveApplicationFromSaved) {
EXPECT_CALL(*mock_storage_,
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
- EXPECT_TRUE(res_ctrl_->RemoveApplicationFromSaved(app_mock_));
+ EXPECT_TRUE(res_ctrl_->RemoveApplicationFromSaved(mock_app_));
}
TEST_F(ResumeCtrlTest, CheckApplicationkHash_) {
@@ -959,7 +973,7 @@ TEST_F(ResumeCtrlTest, CheckApplicationkHash_) {
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_TRUE(res_ctrl_->CheckApplicationHash(app_mock_, kHash_));
+ EXPECT_TRUE(res_ctrl_->CheckApplicationHash(mock_app_, kHash_));
}
TEST_F(ResumeCtrlTest, GetSavedAppHmiLevel_NoAskedApp_INVALID_ENUM) {
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 001e06ca58..a75ba23bfb 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
@@ -52,6 +52,7 @@ namespace resumption_test {
using ::testing::NiceMock;
using ::testing::ReturnRef;
+using ::testing::_;
using application_manager_test::MockApplication;
namespace am = application_manager;
@@ -271,6 +272,10 @@ void ResumptionDataDBTest::CheckGlobalProportiesData() {
select_image.GetInteger(0));
EXPECT_EQ((*menu_icon_)[am::strings::value].asString(),
select_image.GetString(1));
+ if ((*menu_icon_).keyExists(am::strings::is_template)) {
+ EXPECT_EQ((*menu_icon_)[am::strings::is_template].asBool(),
+ select_image.GetBoolean(2));
+ }
}
if (!select_globalproperties.IsNull(8)) {
utils::dbms::SQLQuery select_tts_chunk(test_db());
@@ -559,6 +564,7 @@ TEST_F(ResumptionDataDBTest, Init) {
TEST_F(ResumptionDataDBTest, SaveApplication) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
}
@@ -566,6 +572,7 @@ TEST_F(ResumptionDataDBTest, SaveApplication) {
TEST_F(ResumptionDataDBTest, RemoveApplicationFromSaved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
EXPECT_TRUE(
@@ -580,6 +587,7 @@ TEST_F(ResumptionDataDBTest, RemoveApplicationFromSaved) {
TEST_F(ResumptionDataDBTest, RemoveApplicationFromSaved_AppNotSaved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
sm::SmartObject saved_app;
@@ -591,6 +599,7 @@ TEST_F(ResumptionDataDBTest, RemoveApplicationFromSaved_AppNotSaved) {
TEST_F(ResumptionDataDBTest, SavedApplicationTwice) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_)).Times(2);
res_db()->SaveApplication(app_mock);
CheckSavedDB();
res_db()->SaveApplication(app_mock);
@@ -600,6 +609,7 @@ TEST_F(ResumptionDataDBTest, SavedApplicationTwice) {
TEST_F(ResumptionDataDBTest, SavedApplicationTwice_UpdateApp) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_)).Times(2);
res_db()->SaveApplication(app_mock);
CheckSavedDB();
(*vr_help_)[0][am::strings::position] = 2;
@@ -611,6 +621,7 @@ TEST_F(ResumptionDataDBTest, SavedApplicationTwice_UpdateApp) {
TEST_F(ResumptionDataDBTest, IsApplicationSaved_ApplicationSaved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
ssize_t result = res_db()->IsApplicationSaved(policy_app_id_, kMacAddress_);
EXPECT_EQ(0, result);
@@ -619,6 +630,7 @@ TEST_F(ResumptionDataDBTest, IsApplicationSaved_ApplicationSaved) {
TEST_F(ResumptionDataDBTest, IsApplicationSaved_ApplicationRemoved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
EXPECT_TRUE(
res_db()->RemoveApplicationFromSaved(policy_app_id_, kMacAddress_));
@@ -629,6 +641,7 @@ TEST_F(ResumptionDataDBTest, IsApplicationSaved_ApplicationRemoved) {
TEST_F(ResumptionDataDBTest, GetSavedApplication) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
@@ -650,6 +663,7 @@ TEST_F(ResumptionDataDBTest, GetSavedApplication_AppNotSaved) {
TEST_F(ResumptionDataDBTest, GetDataForLoadResumeData) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
sm::SmartObject saved_app;
@@ -668,6 +682,7 @@ TEST_F(ResumptionDataDBTest, GetDataForLoadResumeData_AppRemove) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
EXPECT_TRUE(
@@ -679,6 +694,7 @@ TEST_F(ResumptionDataDBTest, GetDataForLoadResumeData_AppRemove) {
TEST_F(ResumptionDataDBTest, UpdateHmiLevel) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
HMILevel::eType new_hmi_level = HMILevel::HMI_LIMITED;
@@ -690,6 +706,7 @@ TEST_F(ResumptionDataDBTest, UpdateHmiLevel) {
TEST_F(ResumptionDataDBTest, IsHMIApplicationIdExist_AppIsSaved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
EXPECT_TRUE(res_db()->IsHMIApplicationIdExist(hmi_app_id_));
@@ -698,6 +715,7 @@ TEST_F(ResumptionDataDBTest, IsHMIApplicationIdExist_AppIsSaved) {
TEST_F(ResumptionDataDBTest, IsHMIApplicationIdExist_AppNotSaved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
uint32_t new_hmi_app_id_ = hmi_app_id_ + 10;
@@ -707,6 +725,7 @@ TEST_F(ResumptionDataDBTest, IsHMIApplicationIdExist_AppNotSaved) {
TEST_F(ResumptionDataDBTest, GetHMIApplicationID) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
EXPECT_EQ(hmi_app_id_,
@@ -716,6 +735,7 @@ TEST_F(ResumptionDataDBTest, GetHMIApplicationID) {
TEST_F(ResumptionDataDBTest, GetHMIApplicationID_AppNotSaved) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
EXPECT_EQ(0u, res_db()->GetHMIApplicationID(policy_app_id_, "other_dev_id"));
@@ -725,6 +745,7 @@ TEST_F(ResumptionDataDBTest, OnSuspend) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
SetZeroIgnOffTime();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
@@ -737,6 +758,7 @@ TEST_F(ResumptionDataDBTest, OnSuspendFourTimes) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
SetZeroIgnOffTime();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
@@ -762,6 +784,7 @@ TEST_F(ResumptionDataDBTest, OnSuspendOnAwake) {
EXPECT_TRUE(res_db()->Init());
SetZeroIgnOffTime();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
@@ -779,6 +802,7 @@ TEST_F(ResumptionDataDBTest, Awake_AppNotSuspended) {
EXPECT_TRUE(res_db()->Init());
SetZeroIgnOffTime();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
@@ -792,6 +816,7 @@ TEST_F(ResumptionDataDBTest, TwiceAwake_AppNotSuspended) {
EXPECT_TRUE(res_db()->Init());
SetZeroIgnOffTime();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
CheckSavedDB();
@@ -808,6 +833,7 @@ TEST_F(ResumptionDataDBTest, GetHashId) {
PrepareData();
EXPECT_TRUE(res_db()->Init());
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
std::string test_hash;
@@ -821,6 +847,7 @@ TEST_F(ResumptionDataDBTest, GetIgnOffTime_AfterSuspendAndAwake) {
SetZeroIgnOffTime();
uint32_t last_ign_off_time;
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
last_ign_off_time = res_db()->GetIgnOffTime();
@@ -844,6 +871,7 @@ TEST_F(ResumptionDataDBTest, DropAppResumptionData) {
EXPECT_TRUE(res_db()->Init());
SetZeroIgnOffTime();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_db()->SaveApplication(app_mock);
EXPECT_TRUE(res_db()->DropAppDataResumption(kMacAddress_, policy_app_id_));
diff --git a/src/components/application_manager/test/resumption/resumption_data_json_test.cc b/src/components/application_manager/test/resumption/resumption_data_json_test.cc
index a38afd8bdf..ea257b902c 100644
--- a/src/components/application_manager/test/resumption/resumption_data_json_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_json_test.cc
@@ -52,6 +52,7 @@ namespace resumption_test {
using ::testing::_;
using ::testing::Return;
+using ::testing::ReturnRef;
using ::testing::NiceMock;
namespace am = application_manager;
@@ -109,12 +110,14 @@ class ResumptionDataJsonTest : public ResumptionDataTest {
TEST_F(ResumptionDataJsonTest, SaveApplication) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
}
TEST_F(ResumptionDataJsonTest, SavedApplicationTwice) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_)).Times(2);
res_json.SaveApplication(app_mock);
CheckSavedJson();
res_json.SaveApplication(app_mock);
@@ -123,6 +126,7 @@ TEST_F(ResumptionDataJsonTest, SavedApplicationTwice) {
TEST_F(ResumptionDataJsonTest, SavedApplicationTwice_UpdateApp) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_)).Times(2);
res_json.SaveApplication(app_mock);
CheckSavedJson();
(*vr_help_)[0][am::strings::position] = 2;
@@ -133,6 +137,7 @@ TEST_F(ResumptionDataJsonTest, SavedApplicationTwice_UpdateApp) {
TEST_F(ResumptionDataJsonTest, RemoveApplicationFromSaved) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
EXPECT_TRUE(
res_json.RemoveApplicationFromSaved(policy_app_id_, kMacAddress_));
@@ -150,6 +155,7 @@ TEST_F(ResumptionDataJsonTest, RemoveApplicationFromSaved_AppNotSaved) {
TEST_F(ResumptionDataJsonTest, IsApplicationSaved_ApplicationSaved) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
ssize_t result = res_json.IsApplicationSaved(policy_app_id_, kMacAddress_);
@@ -158,6 +164,7 @@ TEST_F(ResumptionDataJsonTest, IsApplicationSaved_ApplicationSaved) {
TEST_F(ResumptionDataJsonTest, IsApplicationSaved_ApplicationRemoved) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
EXPECT_TRUE(
@@ -168,6 +175,7 @@ TEST_F(ResumptionDataJsonTest, IsApplicationSaved_ApplicationRemoved) {
TEST_F(ResumptionDataJsonTest, GetSavedApplication) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
smart_objects::SmartObject saved_app;
EXPECT_TRUE(
@@ -184,6 +192,7 @@ TEST_F(ResumptionDataJsonTest, GetSavedApplication_AppNotSaved) {
TEST_F(ResumptionDataJsonTest, GetDataForLoadResumeData) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
smart_objects::SmartObject saved_app;
@@ -201,6 +210,7 @@ TEST_F(ResumptionDataJsonTest, GetDataForLoadResumeData_AppRemove) {
smart_objects::SmartObject saved_app;
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
EXPECT_TRUE(
@@ -211,6 +221,7 @@ TEST_F(ResumptionDataJsonTest, GetDataForLoadResumeData_AppRemove) {
TEST_F(ResumptionDataJsonTest, UpdateHmiLevel) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
HMILevel::eType new_hmi_level = HMILevel::HMI_LIMITED;
@@ -222,6 +233,7 @@ TEST_F(ResumptionDataJsonTest, UpdateHmiLevel) {
TEST_F(ResumptionDataJsonTest, IsHMIApplicationIdExist_AppIsSaved) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
EXPECT_TRUE(res_json.IsHMIApplicationIdExist(hmi_app_id_));
@@ -229,6 +241,7 @@ TEST_F(ResumptionDataJsonTest, IsHMIApplicationIdExist_AppIsSaved) {
TEST_F(ResumptionDataJsonTest, IsHMIApplicationIdExist_AppNotSaved) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -238,6 +251,7 @@ TEST_F(ResumptionDataJsonTest, IsHMIApplicationIdExist_AppNotSaved) {
TEST_F(ResumptionDataJsonTest, GetHMIApplicationID) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
EXPECT_EQ(hmi_app_id_,
@@ -246,6 +260,7 @@ TEST_F(ResumptionDataJsonTest, GetHMIApplicationID) {
TEST_F(ResumptionDataJsonTest, GetHMIApplicationID_AppNotSaved) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
EXPECT_EQ(0u, res_json.GetHMIApplicationID(policy_app_id_, "other_dev_id"));
}
@@ -253,7 +268,7 @@ TEST_F(ResumptionDataJsonTest, GetHMIApplicationID_AppNotSaved) {
TEST_F(ResumptionDataJsonTest, OnSuspend) {
SetZeroIgnOff();
PrepareData();
-
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -265,6 +280,7 @@ TEST_F(ResumptionDataJsonTest, OnSuspend) {
TEST_F(ResumptionDataJsonTest, OnSuspendFourTimes) {
PrepareData();
SetZeroIgnOff();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -282,6 +298,7 @@ TEST_F(ResumptionDataJsonTest, OnSuspendFourTimes) {
TEST_F(ResumptionDataJsonTest, OnSuspendOnAwake) {
PrepareData();
SetZeroIgnOff();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -297,6 +314,7 @@ TEST_F(ResumptionDataJsonTest, OnSuspendOnAwake) {
TEST_F(ResumptionDataJsonTest, Awake_AppNotSuspended) {
SetZeroIgnOff();
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -308,6 +326,7 @@ TEST_F(ResumptionDataJsonTest, Awake_AppNotSuspended) {
TEST_F(ResumptionDataJsonTest, TwiceAwake_AppNotSuspended) {
SetZeroIgnOff();
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -322,6 +341,7 @@ TEST_F(ResumptionDataJsonTest, TwiceAwake_AppNotSuspended) {
TEST_F(ResumptionDataJsonTest, GetHashId) {
PrepareData();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
@@ -334,6 +354,7 @@ TEST_F(ResumptionDataJsonTest, GetIgnOffTime_AfterSuspendAndAwake) {
uint32_t last_ign_off_time;
PrepareData();
SetZeroIgnOff();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
last_ign_off_time = res_json.GetIgnOffTime();
@@ -355,6 +376,7 @@ TEST_F(ResumptionDataJsonTest, GetIgnOffTime_AfterSuspendAndAwake) {
TEST_F(ResumptionDataJsonTest, DropAppDataResumption) {
PrepareData();
SetZeroIgnOff();
+ EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_));
res_json.SaveApplication(app_mock);
CheckSavedJson();
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 65e01b6119..e80349dd47 100644
--- a/src/components/application_manager/test/resumption/resumption_data_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_test.cc
@@ -40,6 +40,7 @@
#include "application_manager/application.h"
#include "utils/data_accessor.h"
#include "application_manager/message_helper.h"
+#include "utils/make_shared.h"
#include "application_manager/resumption_data_test.h"
@@ -50,6 +51,7 @@ namespace custom_str = utils::custom_string;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::ReturnPointee;
+using ::testing::_;
void ResumptionDataTest::CheckSavedApp(sm::SmartObject& resume_app_list) {
EXPECT_EQ(policy_app_id_, resume_app_list[am::strings::app_id].asString());
@@ -137,8 +139,6 @@ void ResumptionDataTest::CheckSubscriptions(sm::SmartObject& res_list) {
res_list[am::strings::application_buttons][0].asUInt());
EXPECT_EQ(static_cast<uint32_t>(ButtonName::eType::CUSTOM_BUTTON),
res_list[am::strings::application_buttons][1].asUInt());
- EXPECT_EQ(0u, res_list[am::strings::application_vehicle_info][0].asUInt());
- EXPECT_EQ(5u, res_list[am::strings::application_vehicle_info][1].asUInt());
}
void ResumptionDataTest::CheckChoiceSet(sm::SmartObject& res_list) {
@@ -322,19 +322,22 @@ void ResumptionDataTest::CheckVRTitle(
}
void ResumptionDataTest::PrepareData() {
+ mock_app_extension_ = utils::MakeShared<
+ NiceMock<application_manager_test::MockAppExtension> >();
+ extensions_.insert(extensions_.begin(), mock_app_extension_);
+ ON_CALL(*app_mock, Extensions()).WillByDefault(ReturnRef(extensions_));
SetGlobalProporties();
SetCommands();
SetSubmenues();
SetChoiceSet();
SetAppFiles();
- DataAccessor<am::SubMenuMap> sub_menu_m(test_submenu_map, sublock_);
- DataAccessor<am::CommandsMap> commands_m(test_commands_map, comlock_);
- DataAccessor<am::ChoiceSetMap> choice_set_m(test_choiceset_map, setlock_);
+ DataAccessor<am::SubMenuMap> sub_menu_m(test_submenu_map, sublock_ptr_);
+ DataAccessor<am::CommandsMap> commands_m(test_commands_map, comlock_ptr_);
+ DataAccessor<am::ChoiceSetMap> choice_set_m(test_choiceset_map, setlock_ptr_);
SetSubscriptions();
- DataAccessor<am::ButtonSubscriptions> btn_sub(btn_subscr, btnlock_);
- DataAccessor<am::VehicleInfoSubscriptions> ivi_access(ivi, ivilock_);
+ DataAccessor<am::ButtonSubscriptions> btn_sub(btn_subscr, btnlock_ptr_);
ON_CALL(*app_mock, is_application_data_changed()).WillByDefault(Return(true));
@@ -364,7 +367,6 @@ void ResumptionDataTest::PrepareData() {
ON_CALL(*app_mock, menu_icon()).WillByDefault(ReturnPointee(&menu_icon_));
ON_CALL(*app_mock, SubscribedButtons()).WillByDefault(Return(btn_sub));
- ON_CALL(*app_mock, SubscribedIVI()).WillByDefault(Return(ivi_access));
ON_CALL(*app_mock, getAppFiles()).WillByDefault(ReturnRef(app_files_map_));
}
@@ -381,6 +383,7 @@ void ResumptionDataTest::SetMenuTitleAndIcon() {
sm::SmartObject sm_icon;
sm_icon[am::strings::value] = "test icon";
sm_icon[am::strings::image_type] = ImageType::STATIC;
+ sm_icon[am::strings::is_template] = false;
sm::SmartObject sm_title;
sm_title = "test title";
@@ -539,8 +542,6 @@ void ResumptionDataTest::SetKeyboardProperties() {
void ResumptionDataTest::SetSubscriptions() {
btn_subscr.insert(ButtonName::eType::CUSTOM_BUTTON);
btn_subscr.insert(ButtonName::eType::OK);
- ivi.insert(static_cast<mobile_apis::VehicleDataType::eType>(0));
- ivi.insert(static_cast<mobile_apis::VehicleDataType::eType>(5));
}
} // namespace resumption_test
diff --git a/src/components/application_manager/test/resumption_sql_queries_test.cc b/src/components/application_manager/test/resumption_sql_queries_test.cc
index 28a3383086..0ec902085f 100644
--- a/src/components/application_manager/test/resumption_sql_queries_test.cc
+++ b/src/components/application_manager/test/resumption_sql_queries_test.cc
@@ -197,8 +197,9 @@ class ResumptionSqlQueriesTest : public ::testing::Test {
const int64_t glob_prop_key);
SQLQuery& FillImageTable(SQLQuery& query,
- const int imageType,
- const string& value);
+ const int image_type,
+ const string& value,
+ const bool is_template);
SQLQuery& FillTableLimitedCharacterListTable(
SQLQuery& query, const string& limitedCharacterList);
@@ -456,11 +457,13 @@ void ResumptionSqlQueriesTest::CheckSelectQuery(const string& query_to_check,
}
SQLQuery& ResumptionSqlQueriesTest::FillImageTable(SQLQuery& query,
- const int imageType,
- const string& value) {
+ const int image_type,
+ const string& value,
+ const bool is_template) {
EXPECT_TRUE(query.Prepare(kInsertImage));
- query.Bind(0, imageType);
+ query.Bind(0, image_type);
query.Bind(1, value);
+ query.Bind(2, is_template);
EXPECT_TRUE(query.Exec());
return query;
}
@@ -802,7 +805,10 @@ TEST_F(ResumptionSqlQueriesTest, kChecksResumptionData_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectCountHMILevel_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -829,7 +835,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountHMILevel_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectHMILevel_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -854,7 +863,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectHMILevel_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kCheckHMIId_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -879,7 +891,10 @@ TEST_F(ResumptionSqlQueriesTest, kCheckHMIId_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectHMIId_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -904,7 +919,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectHMIId_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectCountHMIId_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -930,7 +948,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountHMIId_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kCountHashId_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -956,7 +977,10 @@ TEST_F(ResumptionSqlQueriesTest, kCountHashId_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectHashId_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -990,7 +1014,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectIgnOffTime_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kCheckApplication_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1015,7 +1042,10 @@ TEST_F(ResumptionSqlQueriesTest, kCheckApplication_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kCountApplications_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1032,7 +1062,9 @@ TEST_F(ResumptionSqlQueriesTest, kCountApplications_ExpectDataCorrect) {
device_id,
key);
- key = FillImageTable(temp_query, 1, "tst_img2").LastInsertId();
+ key = FillImageTable(
+ temp_query, 1 /* image_type */, "tst_img2", true /* is_template */)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1056,7 +1088,10 @@ TEST_F(ResumptionSqlQueriesTest,
kSelectDataForLoadResumeData_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1084,7 +1119,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kUpdateHMILevel_ExpectDataUpdated) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1117,7 +1155,10 @@ TEST_F(ResumptionSqlQueriesTest, kUpdateHMILevel_ExpectDataUpdated) {
TEST_F(ResumptionSqlQueriesTest, kUpdateIgnOffCount_ExpectDataUpdated) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1148,7 +1189,10 @@ TEST_F(ResumptionSqlQueriesTest, kUpdateIgnOffCount_ExpectDataUpdated) {
TEST_F(ResumptionSqlQueriesTest, kCountApplicationsIgnOff_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1189,7 +1233,10 @@ TEST_F(ResumptionSqlQueriesTest,
kSelectApplicationsIgnOffCount_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1229,7 +1276,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kUpdateSuspendData_ExpectDataUpdated) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1258,7 +1308,10 @@ TEST_F(ResumptionSqlQueriesTest, kUpdateSuspendData_ExpectDataUpdated) {
TEST_F(ResumptionSqlQueriesTest, kDeleteFile_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key1 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1288,7 +1341,10 @@ TEST_F(ResumptionSqlQueriesTest,
kDeleteApplicationFilesArray_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key1 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1324,7 +1380,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kDeleteSubMenu_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1355,7 +1414,10 @@ TEST_F(ResumptionSqlQueriesTest,
kDeleteApplicationSubMenuArray_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1389,7 +1451,10 @@ TEST_F(ResumptionSqlQueriesTest,
kDeleteApplicationSubscriptionsArray_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
key1 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1426,7 +1491,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromCommands_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
key1 = FillGlobalPropertiesTable(
@@ -1456,7 +1524,10 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromCommands_ExpectDataDeleted) {
TEST_F(ResumptionSqlQueriesTest, kDeleteVrCommands_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
key1 = FillGlobalPropertiesTable(
@@ -1490,7 +1561,10 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteVrCommands_ExpectDataDeleted) {
TEST_F(ResumptionSqlQueriesTest, kDeleteCommands_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
@@ -1522,7 +1596,10 @@ TEST_F(ResumptionSqlQueriesTest,
kDeleteApplicationCommandsArray_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
@@ -1560,7 +1637,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromChoiceSet_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillChoiceTable(temp_query,
2,
"tst_menu_name",
@@ -1595,7 +1675,10 @@ TEST_F(ResumptionSqlQueriesTest,
kDeleteVrCommandsFromChoiceSet_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 =
FillChoiceTable(
temp_query, 1, "tst_menu_name", "second_text", "tert_txt", key1)
@@ -1638,7 +1721,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kDeleteChoice_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 =
FillChoiceTable(
temp_query, 1, "tst_menu_name", "second_text", "tert_txt", key1)
@@ -1775,7 +1861,10 @@ TEST_F(ResumptionSqlQueriesTest,
kDeleteImageFromGlobalProperties_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1804,7 +1893,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kDeletevrHelpItem_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1834,7 +1926,10 @@ TEST_F(ResumptionSqlQueriesTest, kDeletevrHelpItem_ExpectDataDeleted) {
TEST_F(ResumptionSqlQueriesTest, kDeletevrHelpItemArray_ExpectDataDeleted) {
// Arrange
SQLQuery temp_query(db());
- int64_t key1 = FillImageTable(temp_query, 1, test_image).LastInsertId();
+ int64_t key1 = FillImageTable(temp_query,
+ /*image_type=*/1,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t key2 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -2051,7 +2146,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteGlobalProperties_ExpectDataDeleted) {
TEST_F(ResumptionSqlQueriesTest, kSelectCountImage_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- FillImageTable(temp_query, 2, "tst_image");
+ FillImageTable(
+ temp_query, /*image_type=*/2, "tst_image", /*is_template=*/true);
ValToPosPair p1(0, "tst_image");
ValToPosPair p2(1, "");
// Check
@@ -2061,7 +2157,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountImage_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectPrimaryKeyImage_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
ValToPosPair p1(0, "tst_image");
ValToPosPair p2(1, "");
// Check
@@ -2071,7 +2170,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectPrimaryKeyImage_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kInsertImage_ExpectDataInserted) {
// Arrange
SQLQuery temp_query(db());
- FillImageTable(temp_query, 2, "tst_image");
+ FillImageTable(
+ temp_query, /*image_type=*/2, "tst_image", /*is_template=*/true);
const std::string select_count_image = "SELECT COUNT(*) FROM image;";
// Check
CheckSelectQuery(select_count_image, 1, 0);
@@ -2616,7 +2716,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCommandsFromCommand_ExpectDataCorrect) {
app_id1,
device_id,
9).LastInsertId();
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
FillChoiceTable(
temp_query, 1, "menu_name", "sec_text", "tert_text", image_key)
@@ -2656,7 +2759,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCommandsFromChoice_ExpectDataCorrect) {
app_id1,
device_id,
9).LastInsertId();
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
int64_t choice_key =
FillChoiceTable(
@@ -2776,7 +2882,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectChoiceSets_ExpectDataCorrect) {
app_id1,
device_id,
9).LastInsertId();
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
int64_t choice_key =
FillChoiceTable(
temp_query, 1, "menu_name", "sec_text", "tert_text", image_key)
@@ -2808,7 +2917,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectChoiceSets_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectImage_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
// Check
ValToPosPair p1(0, IntToString(image_key));
ValToPosPair p2(1, "");
@@ -2846,7 +2958,10 @@ TEST_F(ResumptionSqlQueriesTest,
TEST_F(ResumptionSqlQueriesTest, kSelectGlobalProperties_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ test_image,
+ /*is_template=*/true).LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", image_key)
@@ -2883,7 +2998,10 @@ TEST_F(ResumptionSqlQueriesTest, kSelectGlobalProperties_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kChecksVrHelpItem_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", image_key)
@@ -2900,7 +3018,10 @@ TEST_F(ResumptionSqlQueriesTest, kChecksVrHelpItem_ExpectDataCorrect) {
TEST_F(ResumptionSqlQueriesTest, kSelectVrHelpItem_ExpectDataCorrect) {
// Arrange
SQLQuery temp_query(db());
- int64_t image_key = FillImageTable(temp_query, 2, "tst_image").LastInsertId();
+ int64_t image_key = FillImageTable(temp_query,
+ /*image_type=*/2,
+ "tst_image",
+ /*is_template=*/true).LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", image_key)
diff --git a/src/components/application_manager/test/sdl_preloaded_pt.json b/src/components/application_manager/test/sdl_preloaded_pt.json
index 10894516cf..7f5436b5b6 100644
--- a/src/components/application_manager/test/sdl_preloaded_pt.json
+++ b/src/components/application_manager/test/sdl_preloaded_pt.json
@@ -20,6 +20,7 @@
"notifications_per_minute_by_priority": {
"EMERGENCY": 60,
"NAVIGATION": 15,
+ "PROJECTION": 15,
"COMMUNICATION": 6,
"NORMAL": 4,
"NONE": 0
@@ -349,12 +350,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +370,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +390,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +409,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
diff --git a/src/components/application_manager/test/sdl_pt_update.json b/src/components/application_manager/test/sdl_pt_update.json
index f890e8e5ae..e5fdb33a93 100644
--- a/src/components/application_manager/test/sdl_pt_update.json
+++ b/src/components/application_manager/test/sdl_pt_update.json
@@ -1587,12 +1587,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1602,12 +1605,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1617,12 +1623,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1631,12 +1640,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1708,6 +1720,7 @@
"COMMUNICATION" : 6,
"EMERGENCY" : 60,
"NAVIGATION" : 15,
+ "PROJECTION": 15,
"NONE" : 0,
"NORMAL" : 4,
"VOICECOMM" : 10
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 fe4d1d2ee8..bbd7220bc9 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
@@ -54,6 +54,7 @@
#include "application_manager/mock_event_dispatcher.h"
#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_rpc_service.h"
namespace am = application_manager;
using am::HmiState;
@@ -76,29 +77,34 @@ namespace state_controller_test {
namespace constants {
const uint32_t kCorrID = 314u;
const uint32_t kHMIAppID = 2718u;
-}
+} // namespace constants
struct HmiStatesComparator {
mobile_apis::HMILevel::eType hmi_level_;
mobile_apis::AudioStreamingState::eType audio_streaming_state_;
+ mobile_apis::VideoStreamingState::eType video_streaming_state_;
mobile_apis::SystemContext::eType system_context_;
HmiStatesComparator(
mobile_apis::HMILevel::eType hmi_level,
mobile_apis::AudioStreamingState::eType audio_streaming_state,
+ mobile_apis::VideoStreamingState::eType video_streaming_state,
mobile_apis::SystemContext::eType system_context)
: hmi_level_(hmi_level)
, audio_streaming_state_(audio_streaming_state)
+ , video_streaming_state_(video_streaming_state)
, system_context_(system_context) {}
HmiStatesComparator(am::HmiStatePtr state_ptr)
: hmi_level_(state_ptr->hmi_level())
, audio_streaming_state_(state_ptr->audio_streaming_state())
+ , video_streaming_state_(state_ptr->video_streaming_state())
, system_context_(state_ptr->system_context()) {}
bool operator()(am::HmiStatePtr state_ptr) const {
return state_ptr->hmi_level() == hmi_level_ &&
state_ptr->audio_streaming_state() == audio_streaming_state_ &&
+ state_ptr->video_streaming_state() == video_streaming_state_ &&
state_ptr->system_context() == system_context_;
}
};
@@ -134,7 +140,8 @@ class StateControllerImplTest : public ::testing::Test {
, usage_stat("0",
utils::SharedPtr<usage_statistics::StatisticsManager>(
new usage_statistics_test::MockStatisticsManager))
- , applications_(application_set_, applications_lock_)
+ , applications_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , applications_(application_set_, applications_lock_ptr_)
, message_helper_mock_(
*application_manager::MockMessageHelper::message_helper_mock()) {
Mock::VerifyAndClearExpectations(&message_helper_mock_);
@@ -145,6 +152,7 @@ class StateControllerImplTest : public ::testing::Test {
}
NiceMock<application_manager_test::MockApplicationManager> app_manager_mock_;
+ NiceMock<application_manager_test::MockRPCService> mock_rpc_service_;
NiceMock<policy_test::MockPolicyHandlerInterface> policy_interface_;
NiceMock<connection_handler_test::MockConnectionHandler>
mock_connection_handler_;
@@ -154,7 +162,7 @@ class StateControllerImplTest : public ::testing::Test {
NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
am::ApplicationSet application_set_;
- mutable sync_primitives::Lock applications_lock_;
+ mutable std::shared_ptr<sync_primitives::Lock> applications_lock_ptr_;
DataAccessor<am::ApplicationSet> applications_;
utils::SharedPtr<am::StateControllerImpl> state_ctrl_;
@@ -206,7 +214,8 @@ class StateControllerImplTest : public ::testing::Test {
am::HmiStatePtr createHmiState(
mobile_apis::HMILevel::eType hmi_level,
- mobile_apis::AudioStreamingState::eType aidio_ss,
+ mobile_apis::AudioStreamingState::eType audio_ss,
+ mobile_apis::VideoStreamingState::eType video_ss,
mobile_apis::SystemContext::eType system_context) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
@@ -215,7 +224,8 @@ class StateControllerImplTest : public ::testing::Test {
am::HmiStatePtr state =
utils::MakeShared<am::HmiState>(simple_app_, app_manager_mock_);
state->set_hmi_level(hmi_level);
- state->set_audio_streaming_state(aidio_ss);
+ state->set_audio_streaming_state(audio_ss);
+ state->set_video_streaming_state(video_ss);
state->set_system_context(system_context);
return state;
}
@@ -228,6 +238,7 @@ class StateControllerImplTest : public ::testing::Test {
am::HmiStatePtr CreateHmiStateByHmiStateType(
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_ss,
+ const mobile_apis::VideoStreamingState::eType video_ss,
const mobile_apis::SystemContext::eType system_context,
const am::ApplicationSharedPtr app) {
am::HmiStatePtr new_state =
@@ -235,6 +246,7 @@ class StateControllerImplTest : public ::testing::Test {
new_state->set_hmi_level(hmi_level);
new_state->set_audio_streaming_state(audio_ss);
+ new_state->set_video_streaming_state(video_ss);
new_state->set_system_context(system_context);
return new_state;
@@ -248,27 +260,38 @@ class StateControllerImplTest : public ::testing::Test {
std::vector<am::HmiStatePtr>& result_hmi_state) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_NONE,
- AudioStreamingState::NOT_AUDIBLE,
- SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_NONE,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_VRSESSION));
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_NONE,
- AudioStreamingState::NOT_AUDIBLE,
- SystemContext::SYSCTXT_MENU));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MENU));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_NONE,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_HMI_OBSCURED));
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_NONE,
- AudioStreamingState::NOT_AUDIBLE,
- SystemContext::SYSCTXT_ALERT));
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_BACKGROUND,
- AudioStreamingState::NOT_AUDIBLE,
- SystemContext::SYSCTXT_MAIN));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_NONE,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_ALERT));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_BACKGROUND,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN));
}
/**
@@ -280,20 +303,29 @@ class StateControllerImplTest : public ::testing::Test {
std::vector<am::HmiStatePtr>& result_hmi_state) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
PrepareCommonStateResults(result_hmi_state);
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_LIMITED,
- AudioStreamingState::ATTENUATED,
- SystemContext::SYSCTXT_MAIN));
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_LIMITED,
- AudioStreamingState::ATTENUATED,
- SystemContext::SYSCTXT_MAIN));
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_FULL,
- AudioStreamingState::NOT_AUDIBLE,
- SystemContext::SYSCTXT_MAIN));
- result_hmi_state.push_back(createHmiState(HMILevel::HMI_FULL,
- AudioStreamingState::ATTENUATED,
- SystemContext::SYSCTXT_MAIN));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_LIMITED,
+ AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_LIMITED,
+ AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_FULL,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN));
+ result_hmi_state.push_back(
+ createHmiState(HMILevel::HMI_FULL,
+ AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN));
}
/**
@@ -305,6 +337,7 @@ class StateControllerImplTest : public ::testing::Test {
std::vector<am::HmiStatePtr>& result_hmi_state, ApplicationType app_t) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
switch (app_t) {
@@ -313,6 +346,7 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -321,18 +355,22 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -341,18 +379,22 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -369,6 +411,7 @@ class StateControllerImplTest : public ::testing::Test {
std::vector<am::HmiStatePtr>& result_hmi_state, ApplicationType app_t) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
switch (app_t) {
case APP_TYPE_NON_MEDIA: {
@@ -376,6 +419,7 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -385,18 +429,22 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -417,6 +465,7 @@ class StateControllerImplTest : public ::testing::Test {
std::vector<am::HmiStatePtr>& result_hmi_state, ApplicationType app_t) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
switch (app_t) {
case APP_TYPE_NON_MEDIA: {
@@ -424,6 +473,7 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -432,18 +482,22 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -465,6 +519,7 @@ class StateControllerImplTest : public ::testing::Test {
std::vector<am::HmiStatePtr>& result_hmi_state, ApplicationType app_t) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
switch (app_t) {
case APP_TYPE_NON_MEDIA: {
@@ -472,6 +527,7 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
break;
}
@@ -630,146 +686,180 @@ class StateControllerImplTest : public ::testing::Test {
void FillStatesLists() {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
// Valid states for not audio app
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_VRSESSION));
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MENU));
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_HMI_OBSCURED));
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_ALERT));
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_not_audio_app_.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
// Valid states audio app
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_VRSESSION));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MENU));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_HMI_OBSCURED));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_ALERT));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
valid_states_for_audio_app_.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
// Common Invalid States
common_invalid_states_.push_back(
createHmiState(HMILevel::INVALID_ENUM,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
common_invalid_states_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
common_invalid_states_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::INVALID_ENUM));
common_invalid_states_.push_back(
createHmiState(HMILevel::INVALID_ENUM,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
common_invalid_states_.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::INVALID_ENUM));
common_invalid_states_.push_back(
createHmiState(HMILevel::INVALID_ENUM,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::INVALID_ENUM));
// Invalid States for audio apps
invalid_states_for_audio_app.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_audio_app.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_audio_app.push_back(
createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_audio_app.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_audio_app.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_audio_app.push_back(
createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
// Invalid States for not audio apps
invalid_states_for_not_audio_app.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_not_audio_app.push_back(
createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_not_audio_app.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::ATTENUATED,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
invalid_states_for_not_audio_app.push_back(
createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
// Valid state ids
@@ -900,8 +990,9 @@ class StateControllerImplTest : public ::testing::Test {
ON_CALL(message_helper_mock_,
GetBCActivateAppRequestToHMI(_, _, _, hmi_lvl, _, _))
.WillByDefault(Return(bc_activate_app_request));
-
- ON_CALL(app_manager_mock_, ManageHMICommand(bc_activate_app_request))
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(bc_activate_app_request))
.WillByDefault(Return(true));
}
@@ -939,7 +1030,7 @@ class StateControllerImplTest : public ::testing::Test {
am::ApplicationSharedPtr app,
NiceMock<application_manager_test::MockApplication>* app_mock,
am::HmiStatePtr state) {
- EXPECT_CALL(*app_mock, RegularHmiState()).WillOnce(Return(state));
+ ON_CALL(*app_mock, RegularHmiState()).WillByDefault(Return(state));
EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(app)).Times(0);
EXPECT_CALL(app_manager_mock_, OnHMILevelChanged(app->app_id(), _, _))
.Times(0);
@@ -954,46 +1045,52 @@ class StateControllerImplTest : public ::testing::Test {
am::HmiStatePtr NoneNotAudibleState() {
return createHmiState(mobile_apis::HMILevel::HMI_NONE,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
}
am::HmiStatePtr FullAudibleState() {
return createHmiState(mobile_apis::HMILevel::HMI_FULL,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
}
am::HmiStatePtr FullNotAudibleState() {
return createHmiState(mobile_apis::HMILevel::HMI_FULL,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
}
am::HmiStatePtr LimitedState() {
return createHmiState(mobile_apis::HMILevel::HMI_LIMITED,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
}
am::HmiStatePtr BackgroundState() {
return createHmiState(mobile_apis::HMILevel::HMI_BACKGROUND,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
}
void ApplyTempStatesForApplication(
- NiceMock<application_manager_test::MockApplication>& application,
+ am::ApplicationSharedPtr app,
+ NiceMock<application_manager_test::MockApplication>& app_mock,
std::vector<am::HmiState::StateID>& state_ids) {
- using smart_objects::SmartObject;
using am::event_engine::Event;
+ using smart_objects::SmartObject;
namespace FunctionID = hmi_apis::FunctionID;
- EXPECT_CALL(application, CurrentHmiState())
+ EXPECT_CALL(app_mock, CurrentHmiState())
.WillRepeatedly(Return(NoneNotAudibleState()));
for (size_t i = 0; i < state_ids.size(); ++i) {
am::HmiState::StateID state_id = state_ids[i];
- EXPECT_CALL(application,
+ EXPECT_CALL(app_mock,
AddHMIState(Truly(HmiStatesIDComparator(state_id))));
switch (state_id) {
case am::HmiState::StateID::STATE_ID_VR_SESSION: {
@@ -1029,30 +1126,31 @@ class StateControllerImplTest : public ::testing::Test {
break;
}
case am::HmiState::StateID::STATE_ID_NAVI_STREAMING: {
- state_ctrl_->OnNaviStreamingStarted();
+ state_ctrl_->OnVideoStreamingStarted(app);
break;
}
default:
break;
}
- EXPECT_CALL(application, AddHMIState(_)).Times(0);
+ EXPECT_CALL(app_mock, AddHMIState(_)).Times(0);
}
}
void CheckStateApplyingForApplication(
- NiceMock<application_manager_test::MockApplication>& application,
+ am::ApplicationSharedPtr app,
+ NiceMock<application_manager_test::MockApplication>& app_mock,
std::vector<am::HmiState::StateID>& state_ids) {
- using smart_objects::SmartObject;
using am::event_engine::Event;
+ using smart_objects::SmartObject;
namespace FunctionID = hmi_apis::FunctionID;
- EXPECT_CALL(application, CurrentHmiState())
+ EXPECT_CALL(app_mock, CurrentHmiState())
.WillRepeatedly(Return(NoneNotAudibleState()));
for (uint32_t i = 0; i < state_ids.size(); ++i) {
am::HmiState::StateID state_id = state_ids[i];
- EXPECT_CALL(application,
- AddHMIState(Truly(HmiStatesIDComparator(state_id)))).Times(1);
+ EXPECT_CALL(app_mock, AddHMIState(Truly(HmiStatesIDComparator(state_id))))
+ .Times(1);
switch (state_id) {
case am::HmiState::StateID::STATE_ID_VR_SESSION: {
@@ -1088,23 +1186,23 @@ class StateControllerImplTest : public ::testing::Test {
break;
}
case am::HmiState::StateID::STATE_ID_NAVI_STREAMING: {
- state_ctrl_->OnNaviStreamingStarted();
+ state_ctrl_->OnVideoStreamingStarted(app);
break;
}
default:
break;
}
- EXPECT_CALL(application, AddHMIState(_)).Times(0);
+ EXPECT_CALL(app_mock, AddHMIState(_)).Times(0);
}
for (uint32_t i = 0; i < state_ids.size(); ++i) {
am::HmiState::StateID state_id = state_ids[i];
- EXPECT_CALL(application, RemoveHMIState(state_id)).Times(1);
+ EXPECT_CALL(app_mock, RemoveHMIState(state_id)).Times(1);
- EXPECT_CALL(application, PostponedHmiState())
+ EXPECT_CALL(app_mock, PostponedHmiState())
.WillOnce(Return(NoneNotAudibleState()));
- EXPECT_CALL(application, RemovePostponedState());
+ EXPECT_CALL(app_mock, RemovePostponedState());
switch (state_id) {
case am::HmiState::StateID::STATE_ID_VR_SESSION: {
@@ -1140,14 +1238,14 @@ class StateControllerImplTest : public ::testing::Test {
break;
}
case am::HmiState::StateID::STATE_ID_NAVI_STREAMING: {
- state_ctrl_->OnNaviStreamingStopped();
+ state_ctrl_->OnVideoStreamingStopped(app);
break;
}
default:
break;
}
- EXPECT_CALL(application, RemoveHMIState(_)).Times(0);
+ EXPECT_CALL(app_mock, RemoveHMIState(_)).Times(0);
}
}
};
@@ -1199,10 +1297,13 @@ TEST_F(StateControllerImplTest, OnStateChangedToNone) {
HmiStatePtr none_state = createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN);
- HmiStatePtr not_none_state = createHmiState(HMILevel::HMI_FULL,
- AudioStreamingState::NOT_AUDIBLE,
- SystemContext::SYSCTXT_MAIN);
+ HmiStatePtr not_none_state =
+ createHmiState(HMILevel::HMI_FULL,
+ AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
+ SystemContext::SYSCTXT_MAIN);
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(0);
state_ctrl_->OnStateChanged(simple_app_, none_state, not_none_state);
@@ -1214,9 +1315,11 @@ TEST_F(StateControllerImplTest, OnStateChangedToNone) {
TEST_F(StateControllerImplTest, MoveSimpleAppToValidStates) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
HmiStatePtr initial_state = createHmiState(HMILevel::INVALID_ENUM,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::INVALID_ENUM,
SystemContext::INVALID_ENUM);
for (std::vector<HmiStatePtr>::iterator it =
@@ -1243,6 +1346,7 @@ TEST_F(StateControllerImplTest, MoveSimpleAppToValidStates) {
TEST_F(StateControllerImplTest, MoveAudioNotResumeAppToValidStates) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
am::ApplicationSharedPtr audio_app = media_navi_vc_app_;
@@ -1251,6 +1355,7 @@ TEST_F(StateControllerImplTest, MoveAudioNotResumeAppToValidStates) {
HmiStatePtr initial_state = createHmiState(HMILevel::INVALID_ENUM,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::INVALID_ENUM,
SystemContext::INVALID_ENUM);
for (std::vector<HmiStatePtr>::iterator it =
@@ -1277,6 +1382,7 @@ TEST_F(StateControllerImplTest, MoveAudioNotResumeAppToValidStates) {
TEST_F(StateControllerImplTest, MoveAudioResumeAppToValidStates) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
+ namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
am::ApplicationSharedPtr audio_app = media_navi_vc_app_;
@@ -1285,6 +1391,7 @@ TEST_F(StateControllerImplTest, MoveAudioResumeAppToValidStates) {
HmiStatePtr initial_state = createHmiState(HMILevel::INVALID_ENUM,
AudioStreamingState::INVALID_ENUM,
+ VideoStreamingState::INVALID_ENUM,
SystemContext::INVALID_ENUM);
// Set all valid states for audio app
@@ -1360,7 +1467,6 @@ TEST_F(StateControllerImplTest, MoveAppFromValidStateToInvalid) {
TEST_F(StateControllerImplTest,
SetFullToSimpleAppWhileAnotherSimpleAppIsInFull) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
am::ApplicationSharedPtr app_in_full;
NiceMock<application_manager_test::MockApplication>* app_in_full_mock;
@@ -1389,7 +1495,6 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest, SetFullToSimpleAppWhileAudioAppAppIsInFull) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
am::ApplicationSharedPtr app_in_full = media_navi_vc_app_;
NiceMock<application_manager_test::MockApplication>* app_in_full_mock =
@@ -1415,7 +1520,6 @@ TEST_F(StateControllerImplTest, SetFullToSimpleAppWhileAudioAppAppIsInFull) {
TEST_F(StateControllerImplTest,
SetFullToAudioAppAppWhileAnotherTypeAudioAppAppIsInFull) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
am::ApplicationSharedPtr app_in_full = media_app_;
@@ -1442,7 +1546,6 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest,
SetFullToAudioAppAppWhileSameTypeAudioAppAppIsInFull) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_in_full_mock;
am::ApplicationSharedPtr app_in_full =
@@ -1468,7 +1571,6 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest,
SetFullToAudioAppAppWhileSameTypeAudioAppAppIsInLimited) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_in_limited_mock;
@@ -1495,7 +1597,6 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest,
SetLimitedToAudioAppAppWhileSameTypeAudioAppAppIsInLimited) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_in_limited_mock;
am::ApplicationSharedPtr app_in_limited =
@@ -1523,7 +1624,6 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest,
SetLimitedToAudioAppAppWhileOtherTypeAudioAppAppIsInLimited) {
namespace HMILevel = mobile_apis::HMILevel;
- namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
am::ApplicationSharedPtr app_in_limited = navi_app_;
@@ -1542,11 +1642,12 @@ TEST_F(StateControllerImplTest,
LimitedState());
ExpectAppWontChangeHmiStateDueToConflictResolving(
app_in_limited, app_in_limited_mock, LimitedState());
+
state_ctrl_->SetRegularState(app_moved_to_limited, LimitedState(), false);
}
TEST_F(StateControllerImplTest,
- SetLimitedToAudioAppAppWhileOtherTypeAudioAppAppIsInFull) {
+ DISABLED_SetLimitedToAudioAppAppWhileOtherTypeAudioAppAppIsInFull) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
@@ -1765,8 +1866,10 @@ TEST_F(StateControllerImplTest,
media_navi_vc_app_ptr_,
BackgroundState(),
FullAudibleState());
- ExpectAppChangeHmiStateDueToConflictResolving(
- media_app_, media_app_ptr_, LimitedState(), BackgroundState());
+
+ EXPECT_CALL(*media_app_ptr_, RegularHmiState())
+ .WillOnce(Return(LimitedState()));
+
ExpectAppChangeHmiStateDueToConflictResolving(
navi_app_, navi_app_ptr_, LimitedState(), BackgroundState());
ExpectAppChangeHmiStateDueToConflictResolving(
@@ -1788,8 +1891,10 @@ TEST_F(StateControllerImplTest,
media_navi_vc_app_ptr_,
BackgroundState(),
FullAudibleState());
- ExpectAppChangeHmiStateDueToConflictResolving(
- media_app_, media_app_ptr_, LimitedState(), BackgroundState());
+
+ EXPECT_CALL(*media_app_ptr_, RegularHmiState())
+ .WillOnce(Return(LimitedState()));
+
ExpectAppChangeHmiStateDueToConflictResolving(
navi_app_, navi_app_ptr_, LimitedState(), BackgroundState());
ExpectAppChangeHmiStateDueToConflictResolving(
@@ -1817,6 +1922,7 @@ TEST_F(StateControllerImplTest, DISABLED_ActivateAppSuccessReceivedFromHMI) {
hmi_states.push_back(
StateLevelPair(createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::NOT_AUDIBLE,
+ VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN),
Common_HMILevel::NONE));
std::vector<StateLevelPair> initial_hmi_states = hmi_states;
@@ -1833,7 +1939,9 @@ TEST_F(StateControllerImplTest, DISABLED_ActivateAppSuccessReceivedFromHMI) {
Common_HMILevel::eType hmi_level = it->second;
SetBCActivateAppRequestToHMI(hmi_level, corr_id);
- ON_CALL(app_manager_mock_, ManageHMICommand(bc_activate_app_request))
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(bc_activate_app_request))
.WillByDefault(Return(true));
EXPECT_CALL(app_manager_mock_, application_id(corr_id))
@@ -1940,44 +2048,50 @@ TEST_F(StateControllerImplTest, ActivateAppInvalidCorrelationId) {
state_ctrl_->on_event(event);
}
-TEST_F(StateControllerImplTest, ApplyTempStatesForSimpleApp) {
+TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForSimpleApp) {
InsertApplication(simple_app_);
- CheckStateApplyingForApplication(*simple_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ simple_app_, *simple_app_ptr_, valid_state_ids_);
}
-TEST_F(StateControllerImplTest, ApplyTempStatesForMediaApp) {
+TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForMediaApp) {
InsertApplication(media_app_);
- CheckStateApplyingForApplication(*media_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ media_app_, *media_app_ptr_, valid_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForNaviApp) {
InsertApplication(navi_app_);
- CheckStateApplyingForApplication(*navi_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(navi_app_, *navi_app_ptr_, valid_state_ids_);
}
-TEST_F(StateControllerImplTest, ApplyTempStatesForVCApp) {
+TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForVCApp) {
InsertApplication(vc_app_);
- CheckStateApplyingForApplication(*vc_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(vc_app_, *vc_app_ptr_, valid_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForMediaNaviApp) {
InsertApplication(media_navi_app_);
- CheckStateApplyingForApplication(*media_navi_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ media_navi_app_, *media_navi_app_ptr_, valid_state_ids_);
}
-TEST_F(StateControllerImplTest, ApplyTempStatesForMediaVCApp) {
+TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForMediaVCApp) {
InsertApplication(media_vc_app_);
- CheckStateApplyingForApplication(*media_vc_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ media_vc_app_, *media_vc_app_ptr_, valid_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForNaviVCApp) {
InsertApplication(navi_vc_app_);
- CheckStateApplyingForApplication(*navi_vc_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ navi_vc_app_, *navi_vc_app_ptr_, valid_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForMediaNaviVCApp) {
InsertApplication(media_navi_vc_app_);
- CheckStateApplyingForApplication(*media_navi_vc_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ media_navi_vc_app_, *media_navi_vc_app_ptr_, valid_state_ids_);
}
TEST_F(StateControllerImplTest, SetStatePhoneCallForNonMediaApplication) {
@@ -2108,8 +2222,8 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest, SetNaviStreamingStateForNonMediaApplication) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(simple_app_,
- app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(simple_app_,
+ app_manager_mock_);
TestSetState(simple_app_,
state_navi_streming,
APP_TYPE_NON_MEDIA,
@@ -2117,10 +2231,10 @@ TEST_F(StateControllerImplTest, SetNaviStreamingStateForNonMediaApplication) {
}
TEST_F(StateControllerImplTest,
- SetNaviStreamingStateMediaApplicationAttenuatedNotSupported) {
+ DISABLED_SetNaviStreamingStateMediaApplicationAttenuatedNotSupported) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(media_app_,
- app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(media_app_,
+ app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
TestSetState(media_app_,
@@ -2130,10 +2244,10 @@ TEST_F(StateControllerImplTest,
}
TEST_F(StateControllerImplTest,
- SetNaviStreamingStateMediaApplicationAttenuatedSupported) {
+ DISABLED_SetNaviStreamingStateMediaApplicationAttenuatedSupported) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(media_app_,
- app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(media_app_,
+ app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
TestSetState(media_app_,
@@ -2143,9 +2257,9 @@ TEST_F(StateControllerImplTest,
}
TEST_F(StateControllerImplTest,
- SetNaviStreamingStateVCApplicationAttenuatedNotSupported) {
+ DISABLED_SetNaviStreamingStateVCApplicationAttenuatedNotSupported) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(vc_app_, app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(vc_app_, app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
TestSetState(vc_app_,
@@ -2155,9 +2269,9 @@ TEST_F(StateControllerImplTest,
}
TEST_F(StateControllerImplTest,
- SetNaviStreamingStateVCApplicationAttenuatedSupported) {
+ DISABLED_SetNaviStreamingStateVCApplicationAttenuatedSupported) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(vc_app_, app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(vc_app_, app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
TestSetState(vc_app_,
@@ -2166,20 +2280,21 @@ TEST_F(StateControllerImplTest,
&StateControllerImplTest::PrepareVRTTSHMIStateResults);
}
-TEST_F(StateControllerImplTest, SetNaviStreamingStateNaviApplication) {
+TEST_F(StateControllerImplTest, DISABLED_SetNaviStreamingStateNaviApplication) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(navi_app_,
- app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(navi_app_,
+ app_manager_mock_);
TestSetState(navi_app_,
state_navi_streming,
APP_TYPE_NAVI,
&StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
-TEST_F(StateControllerImplTest, SetNaviStreamingStateMediaNaviApplication) {
+TEST_F(StateControllerImplTest,
+ DISABLED_SetNaviStreamingStateMediaNaviApplication) {
am::HmiStatePtr state_navi_streming =
- utils::MakeShared<am::NaviStreamingHmiState>(media_navi_app_,
- app_manager_mock_);
+ utils::MakeShared<am::VideoStreamingHmiState>(media_navi_app_,
+ app_manager_mock_);
TestSetState(media_navi_app_,
state_navi_streming,
APP_TYPE_NAVI,
@@ -2240,7 +2355,7 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
- TestMixState<am::PhoneCallHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::PhoneCallHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PreparePhoneCallHMIStateResults);
}
@@ -2249,7 +2364,7 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
- TestMixState<am::PhoneCallHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::PhoneCallHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PreparePhoneCallHMIStateResults);
}
@@ -2278,7 +2393,7 @@ TEST_F(StateControllerImplTest, MixNaviStreamingWithVRAttenuatedNotSupported) {
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
- TestMixState<am::VRHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::VRHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PrepareVRTTSHMIStateResults);
}
@@ -2286,7 +2401,7 @@ TEST_F(StateControllerImplTest, MixNaviStreamingWithVRAttenuatedSupported) {
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
- TestMixState<am::VRHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::VRHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PrepareVRTTSHMIStateResults);
}
@@ -2300,7 +2415,7 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
- TestMixState<am::TTSHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::TTSHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PrepareVRTTSHMIStateResults);
}
@@ -2308,7 +2423,7 @@ TEST_F(StateControllerImplTest, MixNaviStreamingWithTTSAttenueatedSupported) {
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
- TestMixState<am::TTSHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::TTSHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PrepareNaviStreamTTSStateResult);
}
@@ -2333,7 +2448,7 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
- TestMixState<am::SafetyModeHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::SafetyModeHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PrepareVRTTSHMIStateResults);
}
@@ -2342,7 +2457,7 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
- TestMixState<am::SafetyModeHmiState, am::NaviStreamingHmiState>(
+ TestMixState<am::SafetyModeHmiState, am::VideoStreamingHmiState>(
&StateControllerImplTest::PrepareVRTTSHMIStateResults);
}
@@ -2394,6 +2509,7 @@ TEST_F(StateControllerImplTest, SetRegularStateWithAudioStateAudible) {
HmiStatePtr check_state = createHmiState(HMILevel::HMI_BACKGROUND,
AudioStreamingState::AUDIBLE,
+ VideoStreamingState::STREAMABLE,
SystemContext::SYSCTXT_MAIN);
EXPECT_CALL(*simple_app_ptr_, RegularHmiState())
.WillRepeatedly(Return(BackgroundState()));
@@ -2404,7 +2520,9 @@ TEST_F(StateControllerImplTest, SetRegularStateWithAudioStateAudible) {
EXPECT_CALL(*simple_app_ptr_,
SetRegularState(Truly(HmiStatesComparator(check_state))));
- state_ctrl_->SetRegularState(simple_app_, AudioStreamingState::AUDIBLE);
+ state_ctrl_->SetRegularState(simple_app_,
+ AudioStreamingState::AUDIBLE,
+ VideoStreamingState::STREAMABLE);
}
TEST_F(StateControllerImplTest,
@@ -2753,6 +2871,7 @@ TEST_F(StateControllerImplTest, OnEventOnAppDeactivatedAudioApplication) {
const HmiStatePtr state =
createHmiState(mobile_apis::HMILevel::HMI_LIMITED,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
// OnAppDeactivated
EXPECT_CALL(app_manager_mock_, application(app_id))
@@ -2781,6 +2900,7 @@ TEST_F(StateControllerImplTest, OnEventOnAppDeactivatedNotAudioApplication) {
const HmiStatePtr state =
createHmiState(mobile_apis::HMILevel::HMI_BACKGROUND,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN);
// OnAppDeactivated
EXPECT_CALL(app_manager_mock_, application(app_id))
@@ -2844,9 +2964,11 @@ TEST_F(StateControllerImplTest, OnEventOnAppActivated) {
}
TEST_F(StateControllerImplTest, IsStateActive) {
- HmiStatePtr state = createHmiState(mobile_apis::HMILevel::HMI_FULL,
- mobile_apis::AudioStreamingState::AUDIBLE,
- mobile_apis::SystemContext::SYSCTXT_MAIN);
+ HmiStatePtr state =
+ createHmiState(mobile_apis::HMILevel::HMI_FULL,
+ mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
+ mobile_apis::SystemContext::SYSCTXT_MAIN);
state->set_state_id(HmiState::STATE_ID_CURRENT);
EXPECT_TRUE(state_ctrl_->IsStateActive(state->state_id()));
state->set_state_id(HmiState::STATE_ID_REGULAR);
@@ -2855,9 +2977,10 @@ TEST_F(StateControllerImplTest, IsStateActive) {
EXPECT_FALSE(state_ctrl_->IsStateActive(state->state_id()));
}
-TEST_F(StateControllerImplTest, IsStateActiveApplyCorrectTempStates) {
+TEST_F(StateControllerImplTest, DISABLED_IsStateActiveApplyCorrectTempStates) {
InsertApplication(simple_app_);
- ApplyTempStatesForApplication(*simple_app_ptr_, valid_state_ids_);
+ ApplyTempStatesForApplication(
+ simple_app_, *simple_app_ptr_, valid_state_ids_);
std::vector<am::HmiState::StateID>::const_iterator it =
valid_state_ids_.begin();
for (; it != valid_state_ids_.end(); ++it) {
@@ -2906,6 +3029,7 @@ TEST_F(StateControllerImplTest, OnApplicationRegisteredDifferentStates) {
const am::HmiStatePtr old_state = CreateHmiStateByHmiStateType<am::HmiState>(
mobile_apis::HMILevel::HMI_FULL,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN,
simple_app_);
@@ -2918,6 +3042,7 @@ TEST_F(StateControllerImplTest, OnApplicationRegisteredDifferentStates) {
CreateHmiStateByHmiStateType<am::HmiState>(
mobile_apis::HMILevel::HMI_BACKGROUND,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN,
simple_app_);
@@ -2955,6 +3080,7 @@ TEST_F(StateControllerImplTest, OnApplicationRegisteredEqualStates) {
const am::HmiStatePtr old_state = CreateHmiStateByHmiStateType<am::HmiState>(
mobile_apis::HMILevel::HMI_FULL,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN,
simple_app_);
@@ -2967,6 +3093,7 @@ TEST_F(StateControllerImplTest, OnApplicationRegisteredEqualStates) {
CreateHmiStateByHmiStateType<am::HmiState>(
mobile_apis::HMILevel::HMI_BACKGROUND,
mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
mobile_apis::SystemContext::SYSCTXT_MAIN,
simple_app_);
EXPECT_CALL(*simple_app_ptr_, RegularHmiState())
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 66b2d7cf16..e270d9faeb 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
@@ -503,20 +503,6 @@ class ConnectionHandlerImpl
std::list<int32_t>* sessions_list,
connection_handler::DeviceHandle* device_id) const OVERRIDE;
- /**
- * DEPRECATED
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- int32_t GetDataOnSessionKey(uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id) const OVERRIDE;
-
const ConnectionHandlerSettings& get_settings() const OVERRIDE;
const protocol_handler::SessionObserver& get_session_observer();
diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc
index 16b88c4164..614120312a 100644
--- a/src/components/connection_handler/src/connection.cc
+++ b/src/components/connection_handler/src/connection.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Ford Motor Company
+ * Copyright (c) 2018, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index 5b26304302..83d80d9696 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -316,6 +316,7 @@ void ConnectionHandlerImpl::RemoveConnection(
bool AllowProtection(const ConnectionHandlerSettings& settings,
const protocol_handler::ServiceType& service_type,
const bool is_protected) {
+ LOG4CXX_AUTO_TRACE(logger_);
const std::vector<int>& force_unprotected_list =
is_protected ? settings.force_unprotected_service()
: settings.force_protected_service();
@@ -466,14 +467,6 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
const uint32_t session_key =
KeyFromPair(connection_handle, context.new_session_id_);
- uint32_t app_id = 0;
- GetDataOnSessionKey(
- session_key, &app_id, NULL, static_cast<DeviceHandle*>(NULL));
- if (app_id > 0) {
- context.is_ptu_required_ =
- !connection_handler_observer_->CheckAppIsNavi(app_id);
- }
-
{
sync_primitives::AutoLock auto_lock(start_service_context_map_lock_);
start_service_context_map_[session_key] = context;
@@ -716,18 +709,6 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
return 0;
}
-int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
- uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- DeviceHandle handle;
- int32_t result = GetDataOnSessionKey(key, app_id, sessions_list, &handle);
- *device_id = static_cast<uint32_t>(handle);
- return result;
-}
-
const ConnectionHandlerSettings& ConnectionHandlerImpl::get_settings() const {
return settings_;
}
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 d0b9ce4ae4..56dbf6b9de 100644
--- a/src/components/connection_handler/test/connection_handler_impl_test.cc
+++ b/src/components/connection_handler/test/connection_handler_impl_test.cc
@@ -1273,9 +1273,6 @@ TEST_F(ConnectionHandlerTest, SessionStarted_WithRpc) {
true,
ByRef(empty)));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .WillOnce(Return(true));
-
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
.WillOnce(SaveArg<0>(&out_context_));
@@ -1312,8 +1309,6 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_SUCCESS) {
session_key,
true,
ByRef(empty)));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .WillOnce(Return(true));
// confirm that NotifySessionStarted() is called
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
@@ -1354,8 +1349,6 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_FAILURE) {
session_key,
false,
ByRef(empty)));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .WillOnce(Return(true));
// confirm that NotifySessionStarted() is called
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
@@ -1446,9 +1439,6 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_Multiple) {
session_key1,
true,
ByRef(empty))));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .Times(2)
- .WillRepeatedly(Return(true));
// verify that connection handler will not mix up the two results
SessionContext new_context_first, new_context_second;
diff --git a/src/components/functional_module/CMakeLists.txt b/src/components/functional_module/CMakeLists.txt
deleted file mode 100644
index 07db91fc38..0000000000
--- a/src/components/functional_module/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-if (ENABLE_GCOV)
- set(GCOV_FLAGS "-ftest-coverage -fprofile-arcs")
-else()
- set(GCOV_FLAGS "")
-endif()
-
-set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++0x -Wno-deprecated-declarations -Wall -Werror ${GCOV_FLAGS}")
-
-if (CMAKE_BUILD_TYPE)
- if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
- set(CMAKE_CXX_FLAGS_DEBUG "")
- else ()
- set(CMAKE_CXX_FLAGS_RELEASE "")
- set(CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG")
- endif()
-endif()
-
-set(GCOV gcov)
-
-include_directories (
- ${COMPONENTS_DIR}/functional_module/include/
- ${COMPONENTS_DIR}/remote_control/include/
- ${COMPONENTS_DIR}/include/
- ${COMPONENTS_DIR}/application_manager/include
- ${COMPONENTS_DIR}/connection_handler/include/
- ${COMPONENTS_DIR}/utils/include
- ${POLICY_PATH}/include/
- ${POLICY_GLOBAL_INCLUDE_PATH}/
- ${COMPONENTS_DIR}/config_profile/include
- ${COMPONENTS_DIR}/smart_objects/include
- ${JSONCPP_INCLUDE_DIRECTORY}
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${CMAKE_BINARY_DIR}/src/components/
-
- ${COMPONENTS_DIR}/application_manager/test/include/
-)
-
-set (SOURCES
- ./src/generic_module.cc
- ./src/plugin_manager.cc
- ./src/timer/timer_director.cc
-)
-set (LIBRARIES
- ApplicationManager
- jsoncpp
-)
-
-add_library("FunctionalModule" ${SOURCES})
-target_link_libraries("FunctionalModule" ${LIBRARIES} )
-
-if(ENABLE_LOG)
- target_link_libraries("FunctionalModule" log4cxx -L${LOG4CXX_LIBS_DIRECTORY} ${GCOV})
-endif()
-
-if(BUILD_TESTS)
- add_subdirectory(test)
-endif()
diff --git a/src/components/functional_module/include/functional_module/function_ids.h b/src/components/functional_module/include/functional_module/function_ids.h
deleted file mode 100644
index 1a504df6c9..0000000000
--- a/src/components/functional_module/include/functional_module/function_ids.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2017, 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_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_FUNCTION_IDS_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_FUNCTION_IDS_H_
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace functional_modules {
-
-enum RCFunctionID {
- // Remote SDL functions ids
- BUTTON_PRESS = mobile_apis::FunctionID::ButtonPressID,
- GET_INTERIOR_VEHICLE_DATA = mobile_apis::FunctionID::GetInteriorVehicleDataID,
- SET_INTERIOR_VEHICLE_DATA = mobile_apis::FunctionID::SetInteriorVehicleDataID,
- ON_INTERIOR_VEHICLE_DATA = mobile_apis::FunctionID::OnInteriorVehicleDataID,
- ON_REMOTE_CONTROL_SETTINGS = hmi_apis::FunctionID::RC_OnRemoteControlSettings,
-};
-
-namespace hmi_api {
-const char get_interior_vehicle_data[] = "RC.GetInteriorVehicleData";
-const char set_interior_vehicle_data[] = "RC.SetInteriorVehicleData";
-const char on_interior_vehicle_data[] = "RC.OnInteriorVehicleData";
-const char button_press[] = "Buttons.ButtonPress";
-const char on_remote_control_settings[] = "RC.OnRemoteControlSettings";
-
-const char get_user_consent[] = "RC.GetInteriorVehicleDataConsent";
-const char on_app_deactivated[] = "BasicCommunication.OnAppDeactivated";
-const char sdl_activate_app[] = "SDL.ActivateApp";
-}
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_FUNCTION_IDS_H_
diff --git a/src/components/functional_module/include/functional_module/generic_module.h b/src/components/functional_module/include/functional_module/generic_module.h
deleted file mode 100644
index 15d572be6d..0000000000
--- a/src/components/functional_module/include/functional_module/generic_module.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2017, 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_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_GENERIC_MODULE_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_GENERIC_MODULE_H_
-
-#include <deque>
-#include <string>
-#include "functional_module/module_observer.h"
-#include "functional_module/function_ids.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/service.h"
-
-namespace functional_modules {
-
-/**
- * @brief The PolicyEvent enum defines events related to policy
- */
-enum PolicyEvent { kApplicationPolicyUpdated = 0, kApplicationsDisabled };
-
-/**
- * @brief The ApplicationEvent enum defines events related to single application
- */
-enum ApplicationEvent { kApplicationExit = 0, kApplicationUnregistered };
-
-enum ProcessResult {
- NONE = -1,
- PROCESSED,
- PARTIALLY_PROCESSED,
- CANNOT_PROCESS,
- FAILED
-};
-
-enum ServiceState { IDLE = 0, SUSPENDED, LOWVOLTAGE, HMI_ADAPTER_INITIALIZED };
-
-typedef std::string HMIFunctionID;
-
-class GenericModule;
-typedef utils::SharedPtr<GenericModule> ModulePtr;
-
-struct PluginInfo {
- std::string name;
- int version;
- std::deque<RCFunctionID> rc_function_list;
- std::deque<HMIFunctionID> hmi_function_list;
-};
-
-class GenericModule {
- public:
- typedef std::deque<ModuleObserver*> Observers;
-
- virtual ~GenericModule();
- ModuleID GetModuleID() const {
- return kModuleId_;
- }
- virtual PluginInfo GetPluginInfo() const = 0;
-
- /**
- * @brief Setter for service (interface for plugin t access SDL functionality)
- * @param service pointer to new service instance
- */
- virtual void set_service(application_manager::ServicePtr service);
-
- /**
- * @brief Returns pointer to SDL core service interface
- * @return pointer to core service interface
- */
- virtual application_manager::ServicePtr service();
-
- virtual ProcessResult ProcessMessage(application_manager::MessagePtr msg) = 0;
- virtual ProcessResult ProcessHMIMessage(
- application_manager::MessagePtr msg) = 0;
- virtual void OnServiceStateChanged(ServiceState state);
-
- /**
- * @brief Adds pointer to observer of module to be notified about
- * exceptional sutiations in module.
- * Raw pointer is passed to avoid circular dependencies.
- * Module is not responsible for freeing observer's memory.
- */
- void AddObserver(ModuleObserver* const observer);
-
- /**
- * @brief Removes pointer to observer of module when it's no loger
- * wants to be notified about exceptional sutiations in module.
- * Raw pointer is passed to avoid circular dependencies.
- * Module is not responsible for freeing observer's memory.
- */
- void RemoveObserver(ModuleObserver* const observer);
-
- /**
- * @brief Remove extension created for specified application
- * @param app_id application id
- */
- virtual void RemoveAppExtension(uint32_t app_id) = 0;
-
- /**
- * @brief Check registering app can be handled by plugin
- * @param msg Registration message
- * @param app Application basis already create by Core
- */
- virtual bool IsAppForPlugin(
- application_manager::ApplicationSharedPtr app) = 0;
-
- /**
- * @brief Notify about change of HMILevel of plugin's app
- * @param app App with new HMILevel
- * @param old_level Old HMILevel of app
- */
- virtual void OnAppHMILevelChanged(
- application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level) = 0;
-
- /**
- * @brief OnApplicationEvent Processes application related events
- * @param event Event
- * @param application Pointer to application struct
- */
- virtual void OnApplicationEvent(
- ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) = 0;
-
- /**
- * @brief OnPolicyEvent Processes policy related events
- * @param event Policy event
- */
- virtual void OnPolicyEvent(PolicyEvent event) = 0;
-
- protected:
- explicit GenericModule(ModuleID module_id);
- void NotifyObservers(ModuleObserver::Errors error);
-
- /**
- * @brief Remove extension for all applications
- */
- virtual void RemoveAppExtensions() = 0;
-
- private:
- application_manager::ServicePtr service_;
- const ModuleID kModuleId_;
-
- Observers observers_;
- ServiceState state_;
-
- friend class DriverGenericModuleTest;
- DISALLOW_COPY_AND_ASSIGN(GenericModule);
-};
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_GENERIC_MODULE_H_
diff --git a/src/components/functional_module/include/functional_module/module_observer.h b/src/components/functional_module/include/functional_module/module_observer.h
deleted file mode 100644
index a5e34db040..0000000000
--- a/src/components/functional_module/include/functional_module/module_observer.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2017, 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_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_MODULE_OBSERVER_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_MODULE_OBSERVER_H_
-
-namespace functional_modules {
-
-typedef int ModuleID;
-
-class ModuleObserver {
- public:
- enum Errors { NONE = -1, OUT_OF_MEMORY, FS_FAILURE };
- virtual ~ModuleObserver() {}
-
- /**
- * @brief OnError callback for module to notify SDL about internal error
- * @param error error type
- * @param module_id module that triggered error
- */
- virtual void OnError(Errors error, ModuleID module_id) = 0;
-};
-} // namespace functional_modules {
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_MODULE_OBSERVER_H_
diff --git a/src/components/functional_module/include/functional_module/plugin_manager.h b/src/components/functional_module/include/functional_module/plugin_manager.h
deleted file mode 100644
index c573d843b2..0000000000
--- a/src/components/functional_module/include/functional_module/plugin_manager.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2017, 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_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_PLUGIN_MANAGER_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_PLUGIN_MANAGER_H_
-
-#include <map>
-#include <string>
-#include "functional_module/generic_module.h"
-#include "application_manager/service.h"
-#include "application_manager/message.h"
-
-namespace functional_modules {
-
-class PluginManager : public ModuleObserver {
- public:
- PluginManager();
- ~PluginManager();
- typedef std::map<ModuleID, ModulePtr> Modules;
-
- /**
- * @brief LoadPlugins initialize loading plugins
- * @param plugin_path path to search to plugin shared libraries
- * @return count of loaded plugins
- */
- int LoadPlugins(const std::string& plugin_path);
-
- /**
- * @brief UnloadPlugins unload from memory all plugins
- */
- void UnloadPlugins();
-
- /**
- * @brief IsMessageForPlugin Verifies whether mobile message will be processed
- * by plugins
- * @param msg Mobile message
- * @return True if any of plugins will process the message, otherwise - false
- */
- bool IsMessageForPlugin(application_manager::MessagePtr msg);
-
- /**
- * @brief IsHMIMessageForPlugin Verifies whether HMI message will be processed
- * by plugins
- * @param msg HMI message
- * @return True if any of plugins will process the message, otherwise - false
- */
- bool IsHMIMessageForPlugin(application_manager::MessagePtr msg);
-
- /**
- * @brief ProcessMessage forwards mobile message to modules if any is
- * subsribed for the message.
- * @param msg Mobile message to process
- * @return Result of processing
- */
- ProcessResult ProcessMessage(application_manager::MessagePtr msg);
-
- /**
- * @brief ProcessHMIMessage forwards HMI message to modules if any is
- * subscribed for the message
- * @param msg HMI message to process
- * @return Result of processing
- */
- ProcessResult ProcessHMIMessage(application_manager::MessagePtr msg);
- void SetServiceHandler(application_manager::ServicePtr service) {
- service_ = service;
- }
- void OnServiceStateChanged(ServiceState state);
- void OnError(ModuleObserver::Errors error, ModuleID module_id) FINAL;
-
- /**
- * @brief Remove extension created for specified application
- * @param app_id application id
- */
- void RemoveAppExtension(uint32_t app_id);
-
- /**
- * @brief Check if app cooperates with one or more plugins, init it
- * inside plugin accordingly if needed.
- * @param app Application in question.
- */
- bool IsAppForPlugins(application_manager::ApplicationSharedPtr app);
-
- /**
- * Check if app cooperates with plugin
- * @param app application
- * @param module_id unique identifier of plugin
- * @return true if application cooperates with this plugin
- */
- bool IsAppForPlugin(application_manager::ApplicationSharedPtr app,
- ModuleID module_id) const;
-
- /**
- * @brief Notify plugins about change of HMILevel of app
- * if app is related to plugin
- * @param app App with new HMILevel
- * @param old_level Old HMILevel of app
- */
- void OnAppHMILevelChanged(application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level);
-
- /**
- * @brief OnApplicationEvent Notifies modules on certain application events
- * @param event Event
- * @param application Pointer to application struct
- */
- void OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application);
-
- /**
- * @brief OnPolicyEvent Notifies modules on certain events from policy
- * @param event Policy event
- */
- void OnPolicyEvent(functional_modules::PolicyEvent event);
-
- Modules& plugins();
-
- private:
- Modules plugins_;
- std::map<ModuleID, void*> dlls_;
- std::map<RCFunctionID, ModulePtr> mobile_subscribers_;
- std::map<HMIFunctionID, ModulePtr> hmi_subscribers_;
- application_manager::ServicePtr service_;
-
- DISALLOW_COPY_AND_ASSIGN(PluginManager);
-};
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_PLUGIN_MANAGER_H_
diff --git a/src/components/functional_module/include/functional_module/timer/module_timer.h b/src/components/functional_module/include/functional_module/timer/module_timer.h
deleted file mode 100644
index e24259241b..0000000000
--- a/src/components/functional_module/include/functional_module/timer/module_timer.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2017, 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_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_TIMER_MODULE_TIMER_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_TIMER_MODULE_TIMER_H_
-
-#include <list>
-#include <deque>
-#include <algorithm>
-#include <time.h>
-#include "utils/lock.h"
-
-namespace functional_modules {
-
-typedef unsigned int TimeUnit; // seconds
-
-class Trackable {
- public:
- Trackable() : start_time_(0) {}
- virtual ~Trackable() {}
-
- /**
- * @brief custom_interval getter for custom interval
- * @return return timer interval for trackable message
- */
- virtual TimeUnit custom_interval() const {
- return 0;
- }
-
- /**
- * @brief start_time getter for start time of message
- * @return start time of message
- */
- virtual TimeUnit start_time() const {
- return start_time_;
- }
-
- /**
- * @brief set_start_time setting start time of message
- * @param start_time start time
- */
- virtual void set_start_time(TimeUnit start_time) {
- start_time_ = start_time;
- }
-
- private:
- TimeUnit start_time_;
-};
-
-template <class Trackable>
-class TimerObserver {
- public:
- virtual ~TimerObserver() {}
- virtual void OnTimeoutTriggered(const Trackable& expired) = 0;
-};
-
-template <class Trackable>
-class ModuleTimer {
- public:
- ModuleTimer();
- ~ModuleTimer();
- void set_period(TimeUnit period) {
- period_ = period;
- }
- TimeUnit period() const {
- return period_;
- }
- void AddObserver(TimerObserver<Trackable>* observer);
- void RemoveObserver(TimerObserver<Trackable>* observer);
-
- void CheckTimeout();
- /**
- * @brief Gets time in seconds when the nearest request timeout will be
- * triggered
- * @return time in seconds when the nearest request timeout will be triggered
- */
- TimeUnit GetSecondsToNearestTimeout();
-
- /*
- * @brief Adds object to be tracked by timer.
- If same object is already added replaces it with new one
- correspondingly updating start time of tracking.
- */
- void AddTrackable(const Trackable& object);
- void RemoveTrackable(const Trackable& object);
-
- protected:
- void Notify(const Trackable& object);
- void OnTimeout(const Trackable& object);
- TimeUnit CurrentTime() const;
- typename std::list<Trackable> trackables_;
- volatile TimeUnit period_;
-
- private:
- std::deque<TimerObserver<Trackable>*> observers_;
- mutable sync_primitives::Lock trackables_lock_;
- friend class ModuleTimerTest;
-};
-
-template <class Trackable>
-ModuleTimer<Trackable>::ModuleTimer()
- : period_(10) {}
-
-template <class Trackable>
-ModuleTimer<Trackable>::~ModuleTimer() {
- observers_.clear();
- sync_primitives::AutoLock auto_lock(trackables_lock_);
- trackables_.clear();
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::AddObserver(TimerObserver<Trackable>* observer) {
- DCHECK(observer);
- if (!observer) {
- return;
- }
- observers_.push_back(observer);
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::RemoveObserver(
- TimerObserver<Trackable>* observer) {
- DCHECK(observer);
- if (!observer) {
- return;
- }
- for (typename std::deque<TimerObserver<Trackable>*>::iterator it =
- observers_.begin();
- observers_.end() != it;
- ++it) {
- if (*it == observer) {
- observers_.erase(it);
- return;
- }
- }
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::CheckTimeout() {
- sync_primitives::AutoLock trackables_lock(trackables_lock_);
- for (typename std::list<Trackable>::iterator it = trackables_.begin();
- trackables_.end() != it;
- ++it) {
- TimeUnit period = it->custom_interval();
- if (!period) {
- period = period_;
- }
- if (CurrentTime() - it->start_time() >= period) {
- OnTimeout(*it);
- it = trackables_.erase(it);
- }
- }
-}
-
-template <class Trackable>
-TimeUnit ModuleTimer<Trackable>::GetSecondsToNearestTimeout() {
- sync_primitives::AutoLock trackables_lock(trackables_lock_);
- TimeUnit result = period_;
- for (typename std::list<Trackable>::iterator it = trackables_.begin();
- trackables_.end() != it;
- ++it) {
- TimeUnit period = it->custom_interval();
- if (!period) {
- period = period_;
- }
- const TimeUnit current_secs_to_timeout =
- period - (CurrentTime() - it->start_time());
- if (result > current_secs_to_timeout) {
- result = current_secs_to_timeout;
- }
- }
- return result;
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::AddTrackable(const Trackable& object) {
- sync_primitives::AutoLock trackables_lock(trackables_lock_);
- trackables_.remove(object);
- trackables_.push_back(object);
- trackables_.back().set_start_time(CurrentTime());
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::RemoveTrackable(const Trackable& object) {
- sync_primitives::AutoLock trackables_lock(trackables_lock_);
- trackables_.remove(object);
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::Notify(const Trackable& object) {
- for (typename std::deque<TimerObserver<Trackable>*>::const_iterator it =
- observers_.begin();
- observers_.end() != it;
- ++it) {
- (*it)->OnTimeoutTriggered(object);
- }
-}
-
-template <class Trackable>
-void ModuleTimer<Trackable>::OnTimeout(const Trackable& object) {
- Notify(object);
-}
-
-template <class Trackable>
-TimeUnit ModuleTimer<Trackable>::CurrentTime() const {
- // TODO(PV): move outside to platform-dependant parts
- struct timespec current_time;
- if (0 == clock_gettime(CLOCK_MONOTONIC, &current_time)) {
- return current_time.tv_sec;
- } else {
- return 0;
- }
-}
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_TIMER_MODULE_TIMER_H_
diff --git a/src/components/functional_module/include/functional_module/timer/timer_director.h b/src/components/functional_module/include/functional_module/timer/timer_director.h
deleted file mode 100644
index fb67b9b5de..0000000000
--- a/src/components/functional_module/include/functional_module/timer/timer_director.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2017, 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_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_TIMER_TIMER_DIRECTOR_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_TIMER_TIMER_DIRECTOR_H_
-
-#include <map>
-#include "utils/threads/thread.h"
-#include "utils/conditional_variable.h"
-#include "functional_module/timer/module_timer.h"
-
-namespace functional_modules {
-
-template <class T>
-class TimerThreadDelegate : public threads::ThreadDelegate {
- public:
- explicit TimerThreadDelegate(ModuleTimer<T>& timer);
- void threadMain();
- void exitThreadMain();
-
- /**
- * @brief Reset awaiting timer by notifying cond var
- */
- void ResetTimer();
-
- private:
- ModuleTimer<T>& timer_;
- volatile bool keep_running_;
- mutable sync_primitives::Lock keep_running_lock_;
- mutable sync_primitives::ConditionalVariable keep_running_cond_;
- friend class TimerThreadDelegateTest;
-};
-
-class TimerDirector {
- public:
- TimerDirector();
- ~TimerDirector();
-
- /**
- * @brief Register timer for execution in separate thread.
- Registers only one timer of a type. Attempt to register timer
- of already existing type will fail.
- */
- template <class T>
- void RegisterTimer(ModuleTimer<T>& timer);
- template <class T>
- void UnregisterTimer(const ModuleTimer<T>& timer);
- void UnregisterAllTimers();
- /**
- * @brief Reset awaiting timeout for specified module timer
- * @param timer timer to reset awaiting timeout
- */
- template <class T>
- void ResetTimer(ModuleTimer<T>& timer);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TimerDirector);
- std::map<std::string, threads::Thread*> timer_threads_;
-};
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_INCLUDE_FUNCTIONAL_MODULE_TIMER_TIMER_DIRECTOR_H_
diff --git a/src/components/functional_module/src/generic_module.cc b/src/components/functional_module/src/generic_module.cc
deleted file mode 100644
index 142b1ef58c..0000000000
--- a/src/components/functional_module/src/generic_module.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "functional_module/generic_module.h"
-namespace functional_modules {
-
-typedef std::deque<ModuleObserver*>::iterator ModuleObserverIterator;
-
-GenericModule::GenericModule(ModuleID module_id)
- : kModuleId_(module_id), state_(ServiceState::IDLE) {}
-
-GenericModule::~GenericModule() {
- observers_.clear();
-}
-
-void GenericModule::AddObserver(ModuleObserver* const observer) {
- DCHECK(observer);
- if (!observer) {
- return;
- }
- observers_.push_back(observer);
-}
-
-void GenericModule::RemoveObserver(ModuleObserver* const observer) {
- DCHECK(observer);
- if (!observer) {
- return;
- }
- for (ModuleObserverIterator it = observers_.begin(); observers_.end() != it;
- ++it) {
- if (*it == observer) {
- observers_.erase(it);
- return;
- }
- }
-}
-
-void GenericModule::NotifyObservers(ModuleObserver::Errors error) {
- for (ModuleObserverIterator it = observers_.begin(); observers_.end() != it;
- ++it) {
- (*it)->OnError(error, kModuleId_);
- }
-}
-
-void GenericModule::set_service(application_manager::ServicePtr service) {
- service_ = service;
-}
-
-void GenericModule::OnServiceStateChanged(ServiceState state) {
- state_ = state;
-}
-
-application_manager::ServicePtr GenericModule::service() {
- return service_;
-}
-
-} // namespace functional_modules
diff --git a/src/components/functional_module/src/plugin_manager.cc b/src/components/functional_module/src/plugin_manager.cc
deleted file mode 100644
index a32fdbf773..0000000000
--- a/src/components/functional_module/src/plugin_manager.cc
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * Copyright (c) 2017, 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 <dlfcn.h>
-#include <algorithm>
-#include "functional_module/plugin_manager.h"
-#include "functional_module/function_ids.h"
-#include "protocol/common.h"
-#include "utils/file_system.h"
-#include "utils/logger.h"
-#include "json/json.h"
-
-namespace functional_modules {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "PluginManager")
-
-namespace {
-const std::string ExtractMethodName(application_manager::MessagePtr msg) {
- DCHECK_OR_RETURN(msg, "");
- Json::Value value;
- Json::Reader reader;
- reader.parse(msg->json_message(), value);
-
- const char* kMethod = "method";
- const char* kResult = "result";
- const char* kError = "error";
- const char* kData = "data";
-
- if (value.isMember(kMethod)) {
- return value.get(kMethod, "").asCString();
- }
- if (value.isMember(kResult)) {
- const Json::Value& result = value.get(kResult, Json::Value());
- return result.get(kMethod, "").asCString();
- }
- if (value.isMember(kError)) {
- const Json::Value& error = value.get(kError, Json::Value());
- const Json::Value& data = error.get(kData, Json::Value());
- return data.get(kMethod, "").asCString();
- }
-
- return std::string();
-}
-} // namespace
-
-typedef std::map<ModuleID, ModulePtr>::iterator PluginsIterator;
-typedef std::map<RCFunctionID, ModulePtr>::iterator PluginFunctionsIterator;
-typedef std::map<HMIFunctionID, ModulePtr>::iterator PluginHMIFunctionsIterator;
-
-PluginManager::PluginManager() : service_() {
- LOG4CXX_DEBUG(logger_, "Creating plugin mgr");
-}
-
-PluginManager::~PluginManager() {
- mobile_subscribers_.clear();
- hmi_subscribers_.clear();
- UnloadPlugins();
-}
-
-int PluginManager::LoadPlugins(const std::string& plugin_path) {
- LOG4CXX_INFO(logger_, "Loading plugins from " << plugin_path);
- std::vector<std::string> plugin_files = file_system::ListFiles(plugin_path);
- for (size_t i = 0; i < plugin_files.size(); ++i) {
- size_t pos = plugin_files[i].find_last_of(".");
- if (std::string::npos != pos) {
- if (plugin_files[i].substr(pos + 1).compare("so") != 0) {
- continue;
- }
- } else {
- continue;
- }
- std::string full_name = plugin_path + '/' + plugin_files[i];
- void* generic_plugin_dll = dlopen(full_name.c_str(), RTLD_LAZY);
- if (NULL == generic_plugin_dll) {
- LOG4CXX_ERROR(logger_,
- "Failed to open dll " << plugin_files[i] << "\n"
- << dlerror());
- continue;
- }
- typedef GenericModule* (*Create)();
- Create create_manager =
- reinterpret_cast<Create>(dlsym(generic_plugin_dll, "Create"));
- char* error_string = dlerror();
- if (NULL != error_string) {
- LOG4CXX_ERROR(logger_,
- "Failed to export dll's " << plugin_files[i] << " symbols\n"
- << error_string);
- dlclose(generic_plugin_dll);
- continue;
- }
- ModulePtr module = create_manager();
- if (!module) {
- LOG4CXX_ERROR(logger_,
- "Failed to create plugin main class " << plugin_files[i]);
- dlclose(generic_plugin_dll);
- continue;
- } else {
- LOG4CXX_DEBUG(logger_,
- "Opened and working plugin from " << plugin_files[i]
- << " with id "
- << module->GetModuleID());
- dlls_.insert(std::pair<ModuleID, void*>(module->GetModuleID(),
- generic_plugin_dll));
- plugins_.insert(
- std::pair<ModuleID, ModulePtr>(module->GetModuleID(), module));
- std::deque<RCFunctionID> subscribers =
- module->GetPluginInfo().rc_function_list;
- for (size_t i = 0; i < subscribers.size(); ++i) {
- mobile_subscribers_.insert(
- std::pair<RCFunctionID, ModulePtr>(subscribers[i], module));
- }
-
- std::deque<HMIFunctionID> hmi_subscribers =
- module->GetPluginInfo().hmi_function_list;
- for (size_t i = 0; i < hmi_subscribers.size(); ++i) {
- hmi_subscribers_.insert(
- std::pair<HMIFunctionID, ModulePtr>(hmi_subscribers[i], module));
- }
- module->set_service(service_);
- module->AddObserver(this);
- }
- }
- return plugins_.size();
-}
-
-void PluginManager::UnloadPlugins() {
- for (Modules::iterator it = plugins_.begin(); plugins_.end() != it; ++it) {
- it->second->RemoveObserver(this);
- }
- plugins_.clear();
-
- for (std::map<ModuleID, void*>::iterator it = dlls_.begin();
- dlls_.end() != it;
- ++it) {
- dlclose(it->second);
- }
- dlls_.clear();
-}
-
-bool PluginManager::IsMessageForPlugin(application_manager::MessagePtr msg) {
- DCHECK(msg);
- if (!msg) {
- LOG4CXX_ERROR(logger_, "Null pointer message was received.");
- return false;
- }
- if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN !=
- msg->protocol_version() &&
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI !=
- msg->protocol_version()) {
- RCFunctionID id = static_cast<RCFunctionID>(msg->function_id());
- return (mobile_subscribers_.find(id) != mobile_subscribers_.end());
- } else {
- return false;
- }
-}
-
-bool PluginManager::IsHMIMessageForPlugin(application_manager::MessagePtr msg) {
- DCHECK(msg);
- if (!msg) {
- LOG4CXX_ERROR(logger_, "Null pointer message was received.");
- return false;
- }
-
- Json::Value value;
- Json::Reader reader;
- reader.parse(msg->json_message(), value);
- if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI ==
- msg->protocol_version()) {
- std::string msg_method;
- // Request or notification from HMI
- if (value.isMember("method") && value["method"].isString()) {
- msg_method = value["method"].asCString();
- // Response from HMI
- } else if (value.isMember("result") && value["result"].isMember("method") &&
- value["result"]["method"].isString()) {
- msg_method = value["result"]["method"].asCString();
- // Error response from HMI
- } else if (value.isMember("error") && value["error"].isMember("data") &&
- value["error"]["data"].isMember("method") &&
- value["error"]["data"]["method"].isString()) {
- msg_method = value["error"]["data"]["method"].asCString();
- } else {
- LOG4CXX_WARN(logger_,
- "Message with HMI protocol version can not be handled by "
- "plugin manager, because required 'method' field was not "
- "found, or was containing an invalid string.");
- return false;
- }
-
- return (hmi_subscribers_.find(msg_method) != hmi_subscribers_.end());
- }
-
- return false;
-}
-
-ProcessResult PluginManager::ProcessMessage(
- application_manager::MessagePtr msg) {
- DCHECK(msg);
- if (!msg) {
- LOG4CXX_ERROR(logger_, "Null pointer message was received.");
- return ProcessResult::CANNOT_PROCESS;
- }
-
- protocol_handler::MajorProtocolVersion version = msg->protocol_version();
- if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN ==
- version ||
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI == version) {
- return ProcessResult::CANNOT_PROCESS;
- }
-
- ProcessResult result = ProcessResult::CANNOT_PROCESS;
- PluginFunctionsIterator subscribed_plugin_itr =
- mobile_subscribers_.find(static_cast<RCFunctionID>(msg->function_id()));
- if (mobile_subscribers_.end() != subscribed_plugin_itr) {
- result = subscribed_plugin_itr->second->ProcessMessage(msg);
- if (ProcessResult::PROCESSED != result) {
- LOG4CXX_ERROR(logger_, "Plugin failed to process message.");
- }
- }
-
- return result;
-}
-
-ProcessResult PluginManager::ProcessHMIMessage(
- application_manager::MessagePtr msg) {
- DCHECK_OR_RETURN(msg, ProcessResult::CANNOT_PROCESS);
-
- if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI !=
- msg->protocol_version()) {
- return ProcessResult::CANNOT_PROCESS;
- }
-
- const std::string& msg_method = ExtractMethodName(msg);
- if (msg_method.empty()) {
- LOG4CXX_WARN(logger_,
- "Message with HMI protocol version can not be handled by "
- "plugin manager, because required 'method' field was not "
- "found, or was containing an invalid string.");
- return ProcessResult::CANNOT_PROCESS;
- }
-
- LOG4CXX_DEBUG(logger_, "Parsed method name is " << msg_method);
-
- ProcessResult result = ProcessResult::CANNOT_PROCESS;
- PluginHMIFunctionsIterator subscribed_plugin_itr =
- hmi_subscribers_.find(msg_method);
- if (hmi_subscribers_.end() != subscribed_plugin_itr) {
- result = subscribed_plugin_itr->second->ProcessHMIMessage(msg);
- }
-
- return result;
-}
-
-void PluginManager::OnServiceStateChanged(ServiceState state) {
- for (PluginsIterator it = plugins_.begin(); plugins_.end() != it; ++it) {
- it->second->OnServiceStateChanged(state);
- }
-}
-
-void PluginManager::OnError(ModuleObserver::Errors error, ModuleID module_id) {
- std::string error_string;
- switch (error) {
- case ModuleObserver::Errors::OUT_OF_MEMORY:
- error_string = "Module run out of memory.";
- break;
- case ModuleObserver::Errors::FS_FAILURE:
- error_string = "Plugin failed to run file system operation.";
- break;
- default: {
- LOG4CXX_ERROR(logger_,
- "Error " << error_string << " was received from module "
- << module_id);
- } break;
- }
-}
-
-void PluginManager::RemoveAppExtension(uint32_t app_id) {
- for (PluginsIterator it = plugins_.begin(); plugins_.end() != it; ++it) {
- it->second->RemoveAppExtension(app_id);
- }
-}
-
-bool PluginManager::IsAppForPlugins(
- application_manager::ApplicationSharedPtr app) {
- DCHECK(app);
- if (!app) {
- return false;
- }
-
- bool res = false;
- for (PluginsIterator it = plugins_.begin(); plugins_.end() != it; ++it) {
- res = res || it->second->IsAppForPlugin(app);
- }
- return res;
-}
-
-bool PluginManager::IsAppForPlugin(
- application_manager::ApplicationSharedPtr app, ModuleID module_id) const {
- DCHECK_OR_RETURN(app, false);
- Modules::const_iterator i = plugins_.find(module_id);
- return i != plugins_.end() ? i->second->IsAppForPlugin(app) : false;
-}
-
-void PluginManager::OnAppHMILevelChanged(
- application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level) {
- DCHECK_OR_RETURN_VOID(app);
- for (PluginsIterator it = plugins_.begin(); plugins_.end() != it; ++it) {
- if (it->second->IsAppForPlugin(app)) {
- LOG4CXX_DEBUG(logger_,
- "Application " << app->name().AsMBString() << " of plugin "
- << it->second->GetModuleID()
- << " has changed level from " << old_level
- << " to " << app->hmi_level());
- it->second->OnAppHMILevelChanged(app, old_level);
- }
- }
-}
-
-typedef std::map<ModuleID, ModulePtr>::value_type PluginsValueType;
-
-struct HandleApplicationEvent {
- private:
- const functional_modules::ApplicationEvent event_;
- application_manager::ApplicationSharedPtr application_;
-
- public:
- HandleApplicationEvent(functional_modules::ApplicationEvent e,
- application_manager::ApplicationSharedPtr application)
- : event_(e), application_(application) {}
- void operator()(PluginsValueType& p) {
- p.second->OnApplicationEvent(event_, application_);
- }
-};
-
-struct HandlePolicyEvent {
- private:
- const functional_modules::PolicyEvent event_;
-
- public:
- HandlePolicyEvent(functional_modules::PolicyEvent e) : event_(e) {}
- void operator()(PluginsValueType& p) {
- p.second->OnPolicyEvent(event_);
- }
-};
-
-void PluginManager::OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (application) {
- std::for_each(plugins_.begin(),
- plugins_.end(),
- HandleApplicationEvent(event, application));
- }
-}
-
-void PluginManager::OnPolicyEvent(PolicyEvent event) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::for_each(plugins_.begin(), plugins_.end(), HandlePolicyEvent(event));
-}
-
-PluginManager::Modules& PluginManager::plugins() {
- return plugins_;
-}
-
-} // namespace functional_modules
diff --git a/src/components/functional_module/src/timer/timer_director.cc b/src/components/functional_module/src/timer/timer_director.cc
deleted file mode 100644
index 81ce117851..0000000000
--- a/src/components/functional_module/src/timer/timer_director.cc
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2017, 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 <typeinfo>
-#include "functional_module/timer/timer_director.h"
-#include "remote_control/rc_module_timer.h"
-#include "utils/logger.h"
-
-namespace functional_modules {
-
-template <class T>
-TimerThreadDelegate<T>::TimerThreadDelegate(ModuleTimer<T>& timer)
- : timer_(timer), keep_running_(false) {}
-
-template <class T>
-void TimerThreadDelegate<T>::threadMain() {
- if (keep_running_) {
- this->exitThreadMain();
- }
- {
- sync_primitives::AutoLock run_lock(keep_running_lock_);
- keep_running_ = true;
- }
- sync_primitives::AutoLock run_lock(keep_running_lock_);
- while (keep_running_) {
- const TimeUnit msecs_to_wait = timer_.GetSecondsToNearestTimeout() * 1000;
- sync_primitives::ConditionalVariable::WaitStatus wait_status =
- keep_running_cond_.WaitFor(run_lock, msecs_to_wait);
- if (sync_primitives::ConditionalVariable::kTimeout == wait_status &&
- keep_running_) {
- timer_.CheckTimeout();
- }
- }
-}
-
-template <class T>
-void TimerThreadDelegate<T>::exitThreadMain() {
- if (keep_running_) {
- sync_primitives::AutoLock run_lock(keep_running_lock_);
- keep_running_ = false;
- keep_running_cond_.NotifyOne();
- }
-}
-
-template <class T>
-void TimerThreadDelegate<T>::ResetTimer() {
- if (keep_running_) {
- sync_primitives::AutoLock run_lock(keep_running_lock_);
- keep_running_cond_.NotifyOne();
- }
-}
-
-TimerDirector::TimerDirector() {}
-
-TimerDirector::~TimerDirector() {
- UnregisterAllTimers();
-}
-
-template <class T>
-void TimerDirector::RegisterTimer(ModuleTimer<T>& timer) {
- std::string type_name = typeid(timer).name();
- std::map<std::string, threads::Thread*>::iterator it =
- timer_threads_.find(type_name);
- if (timer_threads_.end() != it) {
- // Attempt to register timer of already existing type fail.
- return;
- }
- TimerThreadDelegate<T>* delegate = new TimerThreadDelegate<T>(timer);
- threads::Thread* thread = threads::CreateThread(type_name.c_str(), delegate);
-
- const size_t kStackSize = 16384;
- if (thread->start(threads::ThreadOptions(kStackSize))) {
- timer_threads_.insert(std::make_pair(type_name, thread));
- } else {
- // Failed to start timer thread for
- }
-}
-
-template void TimerDirector::RegisterTimer<remote_control::TrackableMessage>(
- ModuleTimer<remote_control::TrackableMessage>& timer);
-
-template <class T>
-void TimerDirector::UnregisterTimer(const ModuleTimer<T>& timer) {
- std::string type_name = typeid(timer).name();
- std::map<std::string, threads::Thread*>::iterator it =
- timer_threads_.find(type_name);
- if (timer_threads_.end() == it) {
- /// Failed to unregister timer that was not registered
- return;
- }
- threads::ThreadDelegate* delegate = it->second->delegate();
- DeleteThread(it->second);
- delete delegate;
- timer_threads_.erase(it);
-}
-
-template void TimerDirector::UnregisterTimer<remote_control::TrackableMessage>(
- const ModuleTimer<remote_control::TrackableMessage>& timer);
-
-template <class T>
-void TimerDirector::ResetTimer(ModuleTimer<T>& timer) {
- const std::string type_name = typeid(timer).name();
- std::map<std::string, threads::Thread*>::iterator it =
- timer_threads_.find(type_name);
- if (timer_threads_.end() == it) {
- return;
- }
- TimerThreadDelegate<T>* delegate =
- static_cast<TimerThreadDelegate<T>*>(it->second->delegate());
- delegate->ResetTimer();
-}
-
-template void TimerDirector::ResetTimer<remote_control::TrackableMessage>(
- ModuleTimer<remote_control::TrackableMessage>& timer);
-
-void TimerDirector::UnregisterAllTimers() {
- for (std::map<std::string, threads::Thread*>::iterator it =
- timer_threads_.begin();
- timer_threads_.end() != it;
- ++it) {
- threads::ThreadDelegate* delegate = it->second->delegate();
- DeleteThread(it->second);
- delete delegate;
- }
- timer_threads_.clear();
-}
-
-} // namespace functional_modules
diff --git a/src/components/functional_module/test/CMakeLists.txt b/src/components/functional_module/test/CMakeLists.txt
deleted file mode 100644
index c4e966c84e..0000000000
--- a/src/components/functional_module/test/CMakeLists.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-include_directories (
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${GMOCK_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/components/functional_module/include/
- ${CMAKE_SOURCE_DIR}/src/components/include/
- ${CMAKE_SOURCE_DIR}/src/components/application_manager/include
- ${CMAKE_SOURCE_DIR}/src/components/connection_handler/include
- ${CMAKE_SOURCE_DIR}/src/components/utils/include
- ${CMAKE_SOURCE_DIR}/src/components/policy/include
- ${CMAKE_SOURCE_DIR}/src/components/smart_objects/include
- ${JSONCPP_INCLUDE_DIRECTORY}
- ${CMAKE_BINARY_DIR}/src/components/
- include
- plugins
-)
-
-set (LIBRARIES
- gtest
- gmock
- gmock_main
- FunctionalModule
- dl
- ApplicationManager
- jsoncpp
- Utils
- ConfigProfile
- gcov
-)
-
-set(SOURCES
- ./src/generic_module_test.cc
- ./src/plugin_manager_test.cc
- ./src/module_timer_test.cc
-)
-
-# use, i.e. don't skip the full RPATH for the build tree
-SET(CMAKE_SKIP_BUILD_RPATH FALSE)
-
-# when building, don't use the install RPATH already
-# (but later on when installing)
-SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-
-SET(RPATH_DIRECTORIES
- /usr/local/lib
- /usr/local
- ${CMAKE_BINARY_DIR}/src/components/utils
-)
-
-SET(CMAKE_INSTALL_RPATH "${RPATH_DIRECTORIES}")
-
-add_subdirectory(plugins)
-
-create_test("function_module_test" "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/functional_module/test/include/driver_generic_module_test.h b/src/components/functional_module/test/include/driver_generic_module_test.h
deleted file mode 100644
index 23751f51c2..0000000000
--- a/src/components/functional_module/test/include/driver_generic_module_test.h
+++ /dev/null
@@ -1,80 +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.
- */
-#ifndef SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_DRIVER_GENERIC_MODULE_TEST_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_DRIVER_GENERIC_MODULE_TEST_H_
-
-#include "functional_module/generic_module.h"
-
-namespace functional_modules {
-
-class DriverGenericModuleTest : public GenericModule {
- public:
- explicit DriverGenericModuleTest(ModuleID module_id)
- : GenericModule(module_id) {}
- virtual ~DriverGenericModuleTest() {}
- virtual PluginInfo GetPluginInfo() const {
- PluginInfo info;
- info.name = "DriverGenericModuleTest";
- info.version = 1;
- return info;
- }
- virtual ProcessResult ProcessMessage(application_manager::MessagePtr msg) {
- NotifyObservers(ModuleObserver::FS_FAILURE);
- return ProcessResult::FAILED;
- }
- virtual ProcessResult ProcessHMIMessage(application_manager::MessagePtr msg) {
- return ProcessResult::PROCESSED;
- }
- virtual void RemoveAppExtension(uint32_t app_id) {}
- virtual void RemoveAppExtensions() {}
- bool IsAppForPlugin(application_manager::ApplicationSharedPtr app) {
- return true;
- }
-
- void OnAppHMILevelChanged(application_manager::ApplicationSharedPtr,
- mobile_apis::HMILevel::eType) {}
-
- const Observers& observers() {
- return observers_;
- }
-
- void OnApplicationEvent(functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr app) {}
-
- void OnPolicyEvent(functional_modules::PolicyEvent event) {}
-
- void OnUnregisterApplication(const uint32_t app_id) {}
-};
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_DRIVER_GENERIC_MODULE_TEST_H_
diff --git a/src/components/functional_module/test/include/mock_application.h b/src/components/functional_module/test/include/mock_application.h
deleted file mode 100644
index 8ab91b0eed..0000000000
--- a/src/components/functional_module/test/include/mock_application.h
+++ /dev/null
@@ -1,251 +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.
- */
-#ifndef SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_APPLICATION_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_APPLICATION_H_
-
-#include "gmock/gmock.h"
-#include "application_manager/application.h"
-#include "application_manager/usage_statistics.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-class MockApplication : public Application {
- public:
- MOCK_CONST_METHOD0(active_message, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(curHash, const std::string&());
- MOCK_METHOD0(UpdateHash, void());
- MOCK_METHOD0(CloseActiveMessage, void());
- MOCK_CONST_METHOD0(IsFullscreen, bool());
- MOCK_METHOD0(MakeFullscreen, bool());
- MOCK_CONST_METHOD0(IsAudible, bool());
- MOCK_METHOD0(MakeNotAudible, void());
- MOCK_CONST_METHOD0(allowed_support_navigation, bool());
- MOCK_METHOD1(set_allowed_support_navigation, void(bool allow));
- MOCK_CONST_METHOD0(hmi_supports_navi_streaming, bool());
- MOCK_METHOD1(set_hmi_supports_navi_streaming, void(const bool& supports));
- MOCK_CONST_METHOD0(app_allowed, bool());
- MOCK_CONST_METHOD0(has_been_activated, bool());
- MOCK_CONST_METHOD0(version, const Version&());
- MOCK_METHOD1(set_hmi_application_id, void(uint32_t hmi_app_id));
- MOCK_CONST_METHOD0(hmi_app_id, uint32_t());
- MOCK_CONST_METHOD0(app_id, uint32_t());
- MOCK_CONST_METHOD0(name, const std::string&());
- MOCK_CONST_METHOD0(folder_name, const std::string());
- MOCK_CONST_METHOD0(is_media_application, bool());
- MOCK_CONST_METHOD0(hmi_level, const mobile_api::HMILevel::eType&());
- MOCK_CONST_METHOD0(put_file_in_none_count, const uint32_t());
- MOCK_CONST_METHOD0(delete_file_in_none_count, const uint32_t());
- MOCK_CONST_METHOD0(list_files_in_none_count, const uint32_t());
- MOCK_CONST_METHOD0(system_context, const mobile_api::SystemContext::eType&());
- MOCK_CONST_METHOD0(audio_streaming_state,
- const mobile_api::AudioStreamingState::eType&());
- MOCK_CONST_METHOD0(app_icon_path, const std::string&());
- MOCK_CONST_METHOD0(device, connection_handler::DeviceHandle());
- MOCK_METHOD1(set_tts_speak_state, void(bool state_tts_speak));
- MOCK_METHOD0(tts_speak_state, bool());
- MOCK_METHOD1(set_tts_properties_in_none, void(bool active));
- MOCK_METHOD0(tts_properties_in_none, bool());
- MOCK_METHOD1(set_tts_properties_in_full, void(bool active));
- MOCK_METHOD0(tts_properties_in_full, bool());
- MOCK_METHOD1(set_version, void(const Version& version));
- MOCK_METHOD1(set_name, void(const std::string& name));
- MOCK_METHOD1(set_is_media_application, void(bool is_media));
- MOCK_METHOD1(set_hmi_level,
- void(const mobile_api::HMILevel::eType& hmi_level));
- MOCK_METHOD0(increment_put_file_in_none_count, void());
- MOCK_METHOD0(increment_delete_file_in_none_count, void());
- MOCK_METHOD0(increment_list_files_in_none_count, void());
- MOCK_METHOD1(set_system_context,
- void(const mobile_api::SystemContext::eType& system_context));
- MOCK_METHOD1(set_audio_streaming_state,
- void(const mobile_api::AudioStreamingState::eType& state));
- MOCK_METHOD1(set_app_icon_path, bool(const std::string& file_name));
- MOCK_METHOD1(set_app_allowed, void(const bool& allowed));
- MOCK_METHOD1(set_device, void(connection_handler::DeviceHandle device));
- MOCK_CONST_METHOD0(get_grammar_id, uint32_t());
- MOCK_METHOD1(set_grammar_id, void(uint32_t value));
- MOCK_METHOD1(set_protocol_version,
- void(const ProtocolVersion& protocol_version));
- MOCK_CONST_METHOD0(protocol_version, ProtocolVersion());
- MOCK_METHOD1(AddFile, bool(AppFile& file));
- MOCK_CONST_METHOD0(getAppFiles, const AppFilesMap&());
- MOCK_METHOD1(UpdateFile, bool(AppFile& file));
- MOCK_METHOD1(DeleteFile, bool(const std::string& file_name));
- MOCK_METHOD1(GetFile, const AppFile*(const std::string& file_name));
- MOCK_METHOD1(SubscribeToButton,
- bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(IsSubscribedToButton,
- bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(UnsubscribeFromButton,
- bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(SubscribeToIVI, bool(uint32_t vehicle_info_type_));
- MOCK_METHOD1(IsSubscribedToIVI, bool(uint32_t vehicle_info_type_));
- MOCK_METHOD1(UnsubscribeFromIVI, bool(uint32_t vehicle_info_type_));
- MOCK_METHOD2(IsCommandLimitsExceeded,
- bool(mobile_apis::FunctionID::eType cmd_id,
- TLimitSource source));
- MOCK_METHOD0(usage_report, UsageStatistics&());
- MOCK_METHOD0(help_prompt_manager, HelpPromptManager&());
- MOCK_METHOD1(SetInitialState, void(HmiStatePtr state));
- MOCK_METHOD2(SubscribeToSoftButtons,
- void(int32_t cmd_id, const SoftButtonID& softbuttons_id));
- MOCK_METHOD1(IsSubscribedToSoftButton, bool(const uint32_t softbutton_id));
- MOCK_METHOD1(UnsubscribeFromSoftButtons, void(int32_t cmd_id));
- MOCK_METHOD1(QueryInterface, AppExtensionPtr(AppExtensionUID uid));
- MOCK_METHOD1(AddExtension, bool(AppExtensionPtr extention));
- MOCK_METHOD1(RemoveExtension, bool(AppExtensionUID uid));
- MOCK_METHOD0(RemoveExtensions, void());
- MOCK_CONST_METHOD0(help_prompt, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(timeout_prompt, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(vr_help_title, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(vr_help, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(tbt_state, const mobile_api::TBTState::eType&());
- MOCK_CONST_METHOD0(show_command, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(tbt_show_command, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(SubscribedButtons,
- const std::set<mobile_apis::ButtonName::eType>&());
- MOCK_CONST_METHOD0(SubscribesIVI,
- const application_manager::VehicleInfoSubscriptions&());
- MOCK_CONST_METHOD0(keyboard_props, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(menu_title, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(menu_icon, const smart_objects::SmartObject*());
- MOCK_METHOD1(set_help_prompt,
- void(const smart_objects::SmartObject& help_prompt));
- MOCK_METHOD1(set_timeout_prompt,
- void(const smart_objects::SmartObject& timeout_prompt));
- MOCK_METHOD1(set_vr_help_title,
- void(const smart_objects::SmartObject& vr_help_title));
- MOCK_METHOD0(reset_vr_help_title, void());
- MOCK_METHOD1(set_vr_help, void(const smart_objects::SmartObject& vr_help));
- MOCK_METHOD0(reset_vr_help, void());
- MOCK_METHOD1(set_tbt_state,
- void(const mobile_api::TBTState::eType& tbt_state));
- MOCK_METHOD1(set_show_command,
- void(const smart_objects::SmartObject& show_command));
- MOCK_METHOD1(set_tbt_show_command,
- void(const smart_objects::SmartObject& tbt_show));
- MOCK_METHOD1(set_keyboard_props,
- void(const smart_objects::SmartObject& keyboard_props));
- MOCK_METHOD1(set_menu_title,
- void(const smart_objects::SmartObject& menu_title));
- MOCK_METHOD1(set_menu_icon,
- void(const smart_objects::SmartObject& menu_icon));
- MOCK_METHOD2(AddCommand,
- 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_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_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));
- MOCK_METHOD2(AddPerformInteractionChoiceSet,
- void(uint32_t choice_set_id,
- const smart_objects::SmartObject& choice_set));
- MOCK_METHOD0(DeletePerformInteractionChoiceSetMap, void());
- MOCK_CONST_METHOD0(performinteraction_choice_set_map,
- DataAccessor<PerformChoiceSetMap>());
- MOCK_CONST_METHOD1(FindPerformInteractionChoiceSet,
- smart_objects::SmartObject*(uint32_t choice_set_id));
- MOCK_CONST_METHOD0(commands_map, DataAccessor<CommandsMap>());
- MOCK_CONST_METHOD0(sub_menu_map, DataAccessor<SubMenuMap>());
- MOCK_CONST_METHOD0(choice_set_map, DataAccessor<ChoiceSetMap>());
- MOCK_METHOD1(set_perform_interaction_active, void(uint32_t active));
- MOCK_CONST_METHOD0(is_perform_interaction_active, uint32_t());
- MOCK_METHOD1(set_perform_interaction_ui_corrid, void(uint32_t choice));
- MOCK_CONST_METHOD0(perform_interaction_ui_corrid, uint32_t());
- MOCK_METHOD1(set_perform_interaction_mode, void(int32_t mode));
- MOCK_CONST_METHOD0(perform_interaction_mode, int32_t());
- MOCK_METHOD1(set_reset_global_properties_active, void(bool active));
- MOCK_CONST_METHOD0(is_reset_global_properties_active, bool());
- MOCK_CONST_METHOD0(app_types, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(vr_synonyms, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(mobile_app_id, std::string());
- MOCK_CONST_METHOD0(tts_name, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(ngn_media_screen_name,
- const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(language, const mobile_api::Language::eType&());
- MOCK_CONST_METHOD0(ui_language, const mobile_api::Language::eType&());
- MOCK_METHOD1(set_app_types,
- void(const smart_objects::SmartObject& app_types));
- MOCK_METHOD1(set_vr_synonyms,
- void(const smart_objects::SmartObject& vr_synonyms));
- MOCK_METHOD1(set_mobile_app_id,
- void(const smart_objects::SmartObject& mobile_app_id));
- MOCK_METHOD1(set_tts_name, void(const smart_objects::SmartObject& tts_name));
- MOCK_METHOD1(set_ngn_media_screen_name,
- void(const smart_objects::SmartObject& ngn_name));
- MOCK_METHOD1(set_language, void(const mobile_api::Language::eType& language));
- MOCK_METHOD1(set_ui_language,
- void(const mobile_api::Language::eType& ui_language));
- MOCK_METHOD1(load_global_properties,
- void(const smart_objects::SmartObject& so));
- MOCK_METHOD1(set_mobile_app_id, void(const std::string& mobile_app_id));
- MOCK_METHOD0(ChangeSupportingAppHMIType, void());
- MOCK_CONST_METHOD0(is_navi, bool());
- MOCK_METHOD1(set_is_navi, void(bool allow));
- MOCK_CONST_METHOD0(hmi_supports_navi_video_streaming, bool());
- MOCK_METHOD1(set_hmi_supports_navi_video_streaming, void(bool supports));
- MOCK_CONST_METHOD0(hmi_supports_navi_audio_streaming, bool());
- MOCK_METHOD1(set_hmi_supports_navi_audio_streaming, void(bool supports));
- MOCK_CONST_METHOD0(is_voice_communication_supported, bool());
- MOCK_METHOD1(set_voice_communication_supported, void(bool));
- MOCK_METHOD1(set_activated, bool(bool is_active));
- MOCK_CONST_METHOD0(is_foreground, bool());
- MOCK_METHOD1(set_foreground, void(bool is_foreground));
- MOCK_CONST_METHOD0(IsAudioApplication, bool());
- MOCK_CONST_METHOD0(video_stream_retry_active, bool());
- MOCK_METHOD1(set_video_stream_retry_active, void(bool active));
- MOCK_CONST_METHOD0(audio_stream_retry_active, bool());
- MOCK_METHOD1(set_audio_stream_retry_active, void(bool active));
- MOCK_METHOD0(OnVideoStreamRetry, void());
- MOCK_METHOD0(OnAudioStreamRetry, void());
- MOCK_METHOD1(SubscribeToInteriorVehicleData,
- bool(smart_objects::SmartObject module));
- MOCK_METHOD1(IsSubscribedToInteriorVehicleData,
- bool(smart_objects::SmartObject module));
- MOCK_METHOD1(UnsubscribeFromInteriorVehicleData,
- bool(smart_objects::SmartObject module));
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_APPLICATION_H_
diff --git a/src/components/functional_module/test/include/mock_module_observer.h b/src/components/functional_module/test/include/mock_module_observer.h
deleted file mode 100644
index bfa5117b29..0000000000
--- a/src/components/functional_module/test/include/mock_module_observer.h
+++ /dev/null
@@ -1,50 +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.
- */
-#ifndef SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_MODULE_OBSERVER_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_MODULE_OBSERVER_H_
-
-#include "gmock/gmock.h"
-#include "functional_module/module_observer.h"
-
-namespace functional_modules {
-
-class MockModuleObserver : public ModuleObserver {
- public:
- MOCK_METHOD2(OnError, void(Errors error, ModuleID module_id));
- int ObserverMethod() {
- return 13;
- }
-};
-
-} // namespace functional_modules
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_MODULE_OBSERVER_H_
diff --git a/src/components/functional_module/test/include/mock_service.h b/src/components/functional_module/test/include/mock_service.h
deleted file mode 100644
index d1fa7f2747..0000000000
--- a/src/components/functional_module/test/include/mock_service.h
+++ /dev/null
@@ -1,76 +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.
- */
-#ifndef SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_SERVICE_H_
-#define SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_SERVICE_H_
-
-#include "gmock/gmock.h"
-#include "application_manager/service.h"
-
-namespace application_manager {
-
-class MockService : public Service {
- public:
- MOCK_METHOD1(CheckPolicyPermissions,
- mobile_apis::Result::eType(MessagePtr msg));
- MOCK_METHOD1(GetApplication, ApplicationSharedPtr(ApplicationId app_id));
- MOCK_METHOD1(SendMessageToHMI, void(const MessagePtr& message));
- MOCK_METHOD1(SendMessageToMobile, void(const MessagePtr& message));
- MOCK_METHOD0(GetNextCorrelationID, uint32_t());
- MOCK_METHOD1(GetApplications,
- std::vector<ApplicationSharedPtr>(AppExtensionUID));
- MOCK_METHOD2(ChangeNotifyHMILevel,
- void(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level));
- MOCK_METHOD2(NotifyHMIAboutHMILevel,
- void(ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType level));
- MOCK_CONST_METHOD0(GetRCCapabilities, const smart_objects::SmartObject*());
- MOCK_METHOD2(CheckModule,
- bool(const ApplicationId& app_id, const std::string& module));
- MOCK_METHOD1(RemoveHMIFakeParameters,
- void(application_manager::MessagePtr& message));
- MOCK_CONST_METHOD1(IsRemoteControlApplication,
- bool(ApplicationSharedPtr app));
- MOCK_CONST_METHOD1(IsInterfaceAvailable,
- bool(const HmiInterfaces::InterfaceID interface));
- MOCK_CONST_METHOD2(GetModuleTypes,
- bool(const std::string& application_id,
- std::vector<std::string>* modules));
- MOCK_METHOD1(ValidateMessageBySchema,
- application_manager::MessageValidationResult(
- const application_manager::Message& message));
- MOCK_CONST_METHOD0(GetSettings, const ApplicationManagerSettings&());
-};
-}
-// namespace application_manager
-
-#endif // SRC_COMPONENTS_FUNCTIONAL_MODULE_TEST_INCLUDE_MOCK_SERVICE_H_
diff --git a/src/components/functional_module/test/include/module_timer_test.h b/src/components/functional_module/test/include/module_timer_test.h
deleted file mode 100644
index 456346b544..0000000000
--- a/src/components/functional_module/test/include/module_timer_test.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "utils/macro.h"
-#include "functional_module/timer/module_timer.h"
-
-namespace functional_modules {
-
-class TestTrackable : public Trackable {
- public:
- explicit TestTrackable(TimeUnit interval = 0)
- : Trackable(), custom_interval_(interval) {}
-
- virtual TimeUnit custom_interval() const {
- return custom_interval_;
- }
-
- bool operator==(const TestTrackable& other) const {
- return custom_interval_ == other.custom_interval_;
- }
-
- private:
- TimeUnit custom_interval_;
-};
-
-class ModuleTimerTest {
- public:
- ModuleTimerTest(ModuleTimer<TestTrackable>& timer) : timer_(timer) {}
-
- TimeUnit period() const {
- return timer_.period_;
- }
-
- int observers_size() const {
- return timer_.observers_.size();
- }
-
- int trackables_size() const {
- return timer_.trackables_.size();
- }
-
- TestTrackable trackable(const TestTrackable& track) const {
- return *std::find(
- timer_.trackables_.begin(), timer_.trackables_.end(), track);
- }
-
- TimeUnit current_time() const {
- return timer_.CurrentTime();
- }
-
- private:
- ModuleTimer<TestTrackable>& timer_;
-};
-
-class MockTimerObserver : public TimerObserver<TestTrackable> {
- public:
- MOCK_METHOD1(OnTimeoutTriggered, void(const TestTrackable& expired));
-};
-} // namespace functional_modules
diff --git a/src/components/functional_module/test/plugins/CMakeLists.txt b/src/components/functional_module/test/plugins/CMakeLists.txt
deleted file mode 100644
index 7afe8387b8..0000000000
--- a/src/components/functional_module/test/plugins/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-set(target PluginMock)
-
-include_directories (
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${GMOCK_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/components/functional_module/include/
- ${CMAKE_SOURCE_DIR}/src/components/include/
- ${JSONCPP_INCLUDE_DIRECTORY}
-)
-
-set(SOURCES
- ./mock_generic_module.cc
-)
-
-add_library(${target} SHARED ${SOURCES})
-target_link_libraries(${target})
-add_dependencies(${target} MOBILE_API HMI_API)
diff --git a/src/components/functional_module/test/plugins/mock_generic_module.cc b/src/components/functional_module/test/plugins/mock_generic_module.cc
deleted file mode 100644
index dcf6d7d4fe..0000000000
--- a/src/components/functional_module/test/plugins/mock_generic_module.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "mock_generic_module.h"
-
-using functional_modules::GenericModule;
-using functional_modules::RCFunctionID;
-using functional_modules::PluginInfo;
-
-using ::testing::_;
-using ::testing::Return;
-
-MockGenericModule::MockGenericModule() : GenericModule(19) {
- PluginInfo info;
- info.name = "MockGenericModule";
- info.version = 1;
- info.rc_function_list.push_back(static_cast<RCFunctionID>(101));
- info.hmi_function_list.push_back("HMI-Func-1");
-
- EXPECT_CALL(*this, GetPluginInfo()).Times(2).WillRepeatedly(Return(info));
- EXPECT_CALL(*this, set_service(_)).Times(1);
-}
-
-extern "C" GenericModule* Create() {
- return new MockGenericModule();
-}
diff --git a/src/components/functional_module/test/plugins/mock_generic_module.h b/src/components/functional_module/test/plugins/mock_generic_module.h
deleted file mode 100644
index faea0f135d..0000000000
--- a/src/components/functional_module/test/plugins/mock_generic_module.h
+++ /dev/null
@@ -1,71 +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.
- */
-#ifndef TEST_COMPONENTS_FUNCTIONAL_MODULE_PLUGINS_MOCK_GENERIC_MODULE_H_
-#define TEST_COMPONENTS_FUNCTIONAL_MODULE_PLUGINS_MOCK_GENERIC_MODULE_H_
-
-#include "gmock/gmock.h"
-#include "functional_module/generic_module.h"
-
-using functional_modules::GenericModule;
-using functional_modules::PluginInfo;
-using functional_modules::ProcessResult;
-using functional_modules::ServiceState;
-
-using ::testing::_;
-using ::testing::Return;
-
-class MockGenericModule : public GenericModule {
- public:
- MockGenericModule();
- MOCK_CONST_METHOD0(GetPluginInfo, PluginInfo());
- MOCK_METHOD1(set_service, void(application_manager::ServicePtr service));
- MOCK_METHOD0(service, application_manager::ServicePtr());
- MOCK_METHOD1(ProcessMessage,
- ProcessResult(application_manager::MessagePtr msg));
- MOCK_METHOD1(ProcessHMIMessage,
- ProcessResult(application_manager::MessagePtr msg));
- MOCK_METHOD1(OnServiceStateChanged, void(ServiceState state));
- MOCK_METHOD1(RemoveAppExtension, void(uint32_t app_id));
- MOCK_METHOD1(IsAppForPlugin,
- bool(application_manager::ApplicationSharedPtr app));
- MOCK_METHOD2(OnAppHMILevelChanged,
- void(application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level));
- MOCK_METHOD1(OnUnregisterApplication, void(const uint32_t app_id));
- MOCK_METHOD2(OnApplicationEvent,
- void(functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application));
- MOCK_METHOD1(OnPolicyEvent, void(functional_modules::PolicyEvent event));
- MOCK_METHOD0(RemoveAppExtensions, void());
-};
-
-#endif // TEST_COMPONENTS_FUNCTIONAL_MODULE_PLUGINS_MOCK_GENERIC_MODULE_H_
diff --git a/src/components/functional_module/test/src/generic_module_test.cc b/src/components/functional_module/test/src/generic_module_test.cc
deleted file mode 100644
index 71d8325f6d..0000000000
--- a/src/components/functional_module/test/src/generic_module_test.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
-
-#include "driver_generic_module_test.h"
-
-#include "mock_module_observer.h"
-#include "mock_service.h"
-
-using application_manager::ServicePtr;
-using application_manager::MockService;
-
-using ::testing::_;
-
-namespace functional_modules {
-
-TEST(GenericModuleTest, SetService) {
- DriverGenericModuleTest module(18);
- MockService* mock_service = new MockService();
- ServicePtr exp_service(mock_service);
-
- module.set_service(exp_service);
- ServicePtr out_service = module.service();
-
- EXPECT_EQ(exp_service.get(), out_service.get());
-}
-
-TEST(GenericModuleTest, RemoveObserver) {
- DriverGenericModuleTest module(18);
- MockModuleObserver* observer = new MockModuleObserver();
- module.AddObserver(observer);
-
- module.RemoveObserver(observer);
- const DriverGenericModuleTest::Observers& empty = module.observers();
- ASSERT_TRUE(empty.empty());
- delete observer;
-}
-
-TEST(GenericModuleTest, EmptyRemoveObserver) {
- DriverGenericModuleTest module(18);
- MockModuleObserver* observer = new MockModuleObserver();
- module.RemoveObserver(observer);
- const DriverGenericModuleTest::Observers& empty = module.observers();
- ASSERT_TRUE(empty.empty());
- delete observer;
-}
-
-TEST(GenericModuleTest, WrongRemoveObserver) {
- DriverGenericModuleTest module(18);
- MockModuleObserver observer;
- module.AddObserver(&observer);
-
- MockModuleObserver* wrong_observer = new MockModuleObserver();
- module.RemoveObserver(wrong_observer);
- const DriverGenericModuleTest::Observers& empty = module.observers();
- ASSERT_EQ(1u, empty.size());
- EXPECT_EQ(&observer, empty[0]);
- delete wrong_observer;
-}
-
-TEST(GenericModuleTest, CrashRemovedObserver) {
- DriverGenericModuleTest module(18);
- MockModuleObserver* observer = new MockModuleObserver();
- module.AddObserver(observer);
- EXPECT_EQ(13, observer->ObserverMethod());
- module.RemoveObserver(observer);
- EXPECT_EQ(13, observer->ObserverMethod());
- delete observer;
- MockModuleObserver second_observer;
- module.AddObserver(&second_observer);
- EXPECT_EQ(13, second_observer.ObserverMethod());
- module.RemoveObserver(&second_observer);
- EXPECT_EQ(13, second_observer.ObserverMethod());
-}
-
-TEST(GenericModuleTest, NotifyObservers) {
- DriverGenericModuleTest module(3);
- MockModuleObserver observer;
- module.AddObserver(&observer);
-
- EXPECT_CALL(observer, OnError(ModuleObserver::FS_FAILURE, 3)).Times(1);
-
- application_manager::MessagePtr message;
- module.ProcessMessage(message);
-}
-
-TEST(GenericModuleTest, NotifyObserversComplex) {
- DriverGenericModuleTest module(3);
- MockModuleObserver observer_1;
- module.AddObserver(&observer_1);
- MockModuleObserver observer_2;
- module.AddObserver(&observer_2);
-
- EXPECT_CALL(observer_1, OnError(ModuleObserver::FS_FAILURE, 3)).Times(1);
- EXPECT_CALL(observer_2, OnError(ModuleObserver::FS_FAILURE, 3)).Times(1);
-
- application_manager::MessagePtr message;
- module.ProcessMessage(message);
-
- module.RemoveObserver(&observer_1);
- EXPECT_CALL(observer_1, OnError(ModuleObserver::FS_FAILURE, 3)).Times(0);
- EXPECT_CALL(observer_2, OnError(ModuleObserver::FS_FAILURE, 3)).Times(1);
-
- module.ProcessMessage(message);
-}
-
-} // namespace functional_modules
diff --git a/src/components/functional_module/test/src/module_timer_test.cc b/src/components/functional_module/test/src/module_timer_test.cc
deleted file mode 100644
index 668c3e2955..0000000000
--- a/src/components/functional_module/test/src/module_timer_test.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
-#include "module_timer_test.h"
-
-namespace functional_modules {
-
-TEST(ModuleTimerTest, set_period) {
- ModuleTimer<TestTrackable> timer;
- timer.set_period(10000);
- ModuleTimerTest test(timer);
- EXPECT_EQ(10000u, test.period());
-}
-
-TEST(ModuleTimerTest, add_observer) {
- ModuleTimer<TestTrackable> timer;
- ModuleTimerTest test(timer);
- for (size_t i = 0; i < 5; ++i) {
- MockTimerObserver observer;
- timer.AddObserver(&observer);
- }
- EXPECT_EQ(5, test.observers_size());
-}
-
-TEST(ModuleTimerTest, remove_observer) {
- ModuleTimer<TestTrackable> timer;
- ModuleTimerTest test(timer);
-
- MockTimerObserver observer;
- timer.AddObserver(&observer);
- MockTimerObserver observer2;
- timer.AddObserver(&observer2);
- timer.RemoveObserver(&observer);
- EXPECT_EQ(1, test.observers_size());
- MockTimerObserver observer3;
- timer.RemoveObserver(&observer3);
- EXPECT_EQ(1, test.observers_size());
- timer.RemoveObserver(&observer2);
- EXPECT_EQ(0, test.observers_size());
-}
-
-TEST(ModuleTimerTest, start) {
- ModuleTimer<TestTrackable> timer;
- ModuleTimerTest test(timer);
- timer.set_period(1);
- MockTimerObserver observer;
- timer.AddObserver(&observer);
- TestTrackable track;
- timer.AddTrackable(track);
- sleep(2);
- EXPECT_CALL(observer, OnTimeoutTriggered(track)).Times(1);
- timer.CheckTimeout();
- EXPECT_EQ(0, test.trackables_size());
- timer.set_period(4);
- timer.AddTrackable(track);
- sleep(2);
- EXPECT_CALL(observer, OnTimeoutTriggered(track)).Times(0);
- timer.CheckTimeout();
- EXPECT_EQ(1, test.trackables_size());
- TestTrackable track2(1);
- timer.AddTrackable(track2);
- timer.AddTrackable(track);
- sleep(2);
- EXPECT_CALL(observer, OnTimeoutTriggered(track2)).Times(1);
- EXPECT_CALL(observer, OnTimeoutTriggered(track)).Times(0);
- timer.CheckTimeout();
- EXPECT_EQ(1, test.trackables_size());
-}
-
-TEST(ModuleTimerTest, add_trackable) {
- ModuleTimer<TestTrackable> timer;
- ModuleTimerTest test(timer);
- timer.AddTrackable(TestTrackable());
- ASSERT_EQ(1, test.trackables_size());
- // adding the same object twice
- timer.AddTrackable(TestTrackable());
- EXPECT_EQ(1, test.trackables_size());
- // adding another object
- TestTrackable track(3);
- timer.AddTrackable(track);
- ASSERT_EQ(2, test.trackables_size());
- EXPECT_TRUE(test.trackable(track).start_time() - test.current_time() < 1);
- timer.AddTrackable(track);
- sleep(3);
- EXPECT_TRUE(test.current_time() - test.trackable(track).start_time() < 4 &&
- test.current_time() - test.trackable(track).start_time() > 2);
-}
-
-TEST(ModuleTimerTest, remove_trackable) {
- ModuleTimer<TestTrackable> timer;
- ModuleTimerTest test(timer);
- EXPECT_EQ(0, test.trackables_size());
- TestTrackable track1;
- TestTrackable track2(1);
- timer.AddTrackable(track1);
- timer.AddTrackable(track2);
- EXPECT_EQ(2, test.trackables_size());
- timer.RemoveTrackable(track2);
- ASSERT_EQ(1, test.trackables_size());
- TestTrackable track3(2);
- timer.RemoveTrackable(track3);
- ASSERT_EQ(1, test.trackables_size());
- timer.RemoveTrackable(track1);
- ASSERT_EQ(0, test.trackables_size());
-}
-
-TEST(ModuleTimerTest, notify) {
- ModuleTimer<TestTrackable> timer;
- ModuleTimerTest test(timer);
- timer.set_period(1);
- MockTimerObserver observer;
- timer.AddObserver(&observer);
- TestTrackable track;
- timer.AddTrackable(track);
- TestTrackable track2(2);
- timer.AddTrackable(track2);
- sleep(2);
- EXPECT_CALL(observer, OnTimeoutTriggered(track)).Times(1);
- EXPECT_CALL(observer, OnTimeoutTriggered(track2)).Times(0);
- timer.CheckTimeout();
- EXPECT_EQ(1, test.trackables_size());
-}
-
-} // namespace functional_modules
diff --git a/src/components/functional_module/test/src/plugin_manager_test.cc b/src/components/functional_module/test/src/plugin_manager_test.cc
deleted file mode 100644
index f99b8b798e..0000000000
--- a/src/components/functional_module/test/src/plugin_manager_test.cc
+++ /dev/null
@@ -1,148 +0,0 @@
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
-#include "functional_module/plugin_manager.h"
-#include "mock_generic_module.h"
-#include "mock_service.h"
-#include "application_manager/mock_application.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-
-using application_manager::Message;
-using protocol_handler::MajorProtocolVersion;
-using application_manager::MockService;
-using test::components::application_manager_test::MockApplication;
-using ::testing::NiceMock;
-using ::testing::Expectation;
-using ::testing::ReturnRef;
-
-namespace functional_modules {
-
-class PluginManagerTest : public ::testing::Test {
- public:
- PluginManagerTest()
- : manager(utils::MakeShared<PluginManager>())
- , service(utils::MakeShared<MockService>()) {}
-
- protected:
- utils::SharedPtr<PluginManager> manager;
- utils::SharedPtr<MockService> service;
- MockGenericModule* module;
-
- void SetUp() OVERRIDE {
- manager->SetServiceHandler(service);
-
- ASSERT_EQ(1, manager->LoadPlugins("./plugins/"));
- const PluginManager::Modules& plugins = manager->plugins();
- PluginManager::Modules::const_iterator i = plugins.begin();
- module = static_cast<MockGenericModule*>(i->second.get());
- }
-};
-
-TEST_F(PluginManagerTest, ChangePluginsState) {
- ServiceState kState = ServiceState::SUSPENDED;
- EXPECT_CALL(*module, OnServiceStateChanged(kState));
- manager->OnServiceStateChanged(kState);
-}
-
-TEST_F(PluginManagerTest, RemoveAppExtension) {
- const uint32_t kAppId = 2;
- EXPECT_CALL(*module, RemoveAppExtension(kAppId)).Times(1);
- manager->RemoveAppExtension(kAppId);
-}
-
-TEST_F(PluginManagerTest, ProcessMessageFail) {
- Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType(
- protocol_handler::ServiceType::kRpc));
- application_manager::MessagePtr message(msg);
- msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN);
- EXPECT_CALL(*module, ProcessMessage(message)).Times(0);
- manager->ProcessMessage(message);
-}
-
-TEST_F(PluginManagerTest, ProcessMessagePass) {
- Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType(
- protocol_handler::ServiceType::kRpc));
- application_manager::MessagePtr message(msg);
- msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_3);
- msg->set_function_id(101); // see MockGenericModule
- EXPECT_CALL(*module, ProcessMessage(message))
- .Times(1)
- .WillOnce(Return(ProcessResult::PROCESSED));
- manager->ProcessMessage(message);
-}
-
-TEST_F(PluginManagerTest, SDL_events_triggers_module) {
- using namespace functional_modules;
- std::vector<ApplicationEvent> app_events;
- app_events.push_back(ApplicationEvent::kApplicationExit);
- app_events.push_back(ApplicationEvent::kApplicationUnregistered);
-
- application_manager::ApplicationSharedPtr dummy_ptr =
- utils::MakeShared<MockApplication>();
- std::vector<ApplicationEvent>::const_iterator ev = app_events.begin();
- for (; app_events.end() != ev; ++ev) {
- EXPECT_CALL(*module, OnApplicationEvent(*ev, dummy_ptr));
- manager->OnApplicationEvent(*ev, dummy_ptr);
- }
-
- std::vector<PolicyEvent> policy_events;
- policy_events.push_back(PolicyEvent::kApplicationPolicyUpdated);
- policy_events.push_back(PolicyEvent::kApplicationsDisabled);
-
- std::vector<PolicyEvent>::const_iterator ev_policy = policy_events.begin();
- for (; policy_events.end() != ev_policy; ++ev_policy) {
- EXPECT_CALL(*module, OnPolicyEvent(*ev_policy));
- manager->OnPolicyEvent(*ev_policy);
- }
-}
-
-TEST_F(PluginManagerTest, ProcessHMIMessageFail) {
- Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType(
- protocol_handler::ServiceType::kRpc));
- application_manager::MessagePtr message(msg);
- message->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN);
- EXPECT_CALL(*module, ProcessHMIMessage(message)).Times(0);
- manager->ProcessHMIMessage(message);
-}
-
-TEST_F(PluginManagerTest, ProcessHMIMessagePass) {
- Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType(
- protocol_handler::ServiceType::kRpc));
- application_manager::MessagePtr message(msg);
- message->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_HMI);
- std::string json = "{\"method\": \"HMI-Func-1\"}"; // see MockGenericModule
- message->set_json_message(json);
- EXPECT_CALL(*module, ProcessHMIMessage(message))
- .Times(1)
- .WillOnce(Return(ProcessResult::PROCESSED));
- manager->ProcessHMIMessage(message);
-}
-
-TEST_F(PluginManagerTest, IsAppForPlugins) {
- using test::components::application_manager_test::MockApplication;
- MockApplication* app = new MockApplication();
- application_manager::ApplicationSharedPtr app_ptr(app);
- EXPECT_CALL(*module, IsAppForPlugin(app_ptr)).Times(1);
- manager->IsAppForPlugins(app_ptr);
-}
-
-TEST_F(PluginManagerTest, OnAppHMILevelChanged) {
- using test::components::application_manager_test::MockApplication;
- NiceMock<MockApplication>* app = new NiceMock<MockApplication>();
- application_manager::ApplicationSharedPtr app_ptr(app);
-
- const application_manager::custom_str::CustomString name("name");
- ON_CALL(*app, name()).WillByDefault(ReturnRef(name));
- mobile_apis::HMILevel::eType level = mobile_apis::HMILevel::eType::HMI_NONE;
- ON_CALL(*app, hmi_level()).WillByDefault(Return(level));
-
- Expectation is_for_plugin =
- EXPECT_CALL(*module, IsAppForPlugin(app_ptr)).WillOnce(Return(true));
- EXPECT_CALL(*module, OnAppHMILevelChanged(app_ptr, _))
- .Times(1)
- .After(is_for_plugin);
- manager->OnAppHMILevelChanged(app_ptr,
- mobile_apis::HMILevel::eType::HMI_FULL);
-}
-
-} // namespace functional_modules
diff --git a/src/components/hmi_message_handler/src/websocket_session.cc b/src/components/hmi_message_handler/src/websocket_session.cc
index 26f15695c9..a148f48661 100644
--- a/src/components/hmi_message_handler/src/websocket_session.cc
+++ b/src/components/hmi_message_handler/src/websocket_session.cc
@@ -319,4 +319,4 @@ void WebsocketSession::LoopThreadDelegate::SetShutdown() {
message_queue_.Shutdown();
}
}
-} \ No newline at end of file
+}
diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h
index c7a50199b1..0888e1fc90 100644
--- a/src/components/include/application_manager/application_manager.h
+++ b/src/components/include/application_manager/application_manager.h
@@ -39,6 +39,7 @@
#include "application_manager/application.h"
#include "application_manager/hmi_capabilities.h"
#include "application_manager/commands/command.h"
+#include "application_manager/command_factory.h"
#include "connection_handler/connection_handler.h"
#include "utils/data_accessor.h"
#include "utils/shared_ptr.h"
@@ -48,10 +49,7 @@
#include "application_manager/state_controller.h"
#include "application_manager/hmi_interfaces.h"
#include "policy/policy_types.h"
-#ifdef SDL_REMOTE_CONTROL
-#include "functional_module/plugin_manager.h"
-#endif
-
+#include "application_manager/plugin_manager/rpc_plugin_manager.h"
namespace resumption {
class LastState;
}
@@ -82,6 +80,12 @@ namespace application_manager {
namespace event_engine {
class EventDispatcher;
}
+namespace rpc_service {
+class RPCService;
+}
+namespace rpc_handler {
+class RPCHandler;
+}
class Application;
class StateControllerImpl;
@@ -94,7 +98,6 @@ struct ApplicationsAppIdSorter {
return lhs->app_id() < rhs->app_id();
}
};
-
struct ApplicationsPolicyAppIdSorter {
bool operator()(const ApplicationSharedPtr lhs,
const ApplicationSharedPtr rhs) {
@@ -135,8 +138,15 @@ class ApplicationManager {
virtual void set_hmi_message_handler(
hmi_message_handler::HMIMessageHandler* handler) = 0;
+
+ /**
+ * @brief set_protocol_handler
+ * @param handler
+ * set protocol handler
+ */
virtual void set_protocol_handler(
protocol_handler::ProtocolHandler* handler) = 0;
+
virtual void set_connection_handler(
connection_handler::ConnectionHandler* handler) = 0;
@@ -159,7 +169,6 @@ class ApplicationManager {
virtual AppSharedPtrs applications_by_button(uint32_t button) = 0;
virtual AppSharedPtrs applications_with_navi() = 0;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief application find application by device and policy identifier
* @param device_id device id
@@ -176,12 +185,12 @@ class ApplicationManager {
virtual std::vector<std::string> devices(
const std::string& policy_app_id) const = 0;
- virtual void SendPostMessageToMobile(const MessagePtr& message) = 0;
+ virtual plugin_manager::RPCPluginManager& GetPluginManager() = 0;
- virtual void SendPostMessageToHMI(const MessagePtr& message) = 0;
-
- virtual functional_modules::PluginManager& GetPluginManager() = 0;
-#endif // SDL_REMOTE_CONTROL
+#ifdef BUILD_TESTS
+ virtual void SetPluginManager(
+ std::unique_ptr<plugin_manager::RPCPluginManager>& plugin_manager) = 0;
+#endif
virtual std::vector<ApplicationSharedPtr>
applications_with_mobile_projection() = 0;
@@ -308,20 +317,8 @@ class ApplicationManager {
*/
virtual const std::set<int32_t> GetAppsSubscribedForWayPoints() const = 0;
- virtual void SendMessageToMobile(const commands::MessageSharedPtr message,
- bool final_message = false) = 0;
-
- virtual void SendMessageToHMI(const commands::MessageSharedPtr message) = 0;
-
virtual void RemoveHMIFakeParameters(
- application_manager::MessagePtr& message) = 0;
-
- virtual bool ManageHMICommand(const commands::MessageSharedPtr message) = 0;
- virtual bool ManageMobileCommand(const commands::MessageSharedPtr message,
- commands::Command::CommandOrigin origin) = 0;
-
- virtual MessageValidationResult ValidateMessageBySchema(
- const Message& message) = 0;
+ application_manager::commands::MessageSharedPtr& message) = 0;
virtual mobile_api::HMILevel::eType GetDefaultHmiLevel(
ApplicationConstSharedPtr application) const = 0;
@@ -380,6 +377,11 @@ class ApplicationManager {
virtual policy::PolicyHandlerInterface& GetPolicyHandler() = 0;
virtual const policy::PolicyHandlerInterface& GetPolicyHandler() const = 0;
+ virtual rpc_service::RPCService& GetRPCService() const = 0;
+ virtual rpc_handler::RPCHandler& GetRPCHandler() const = 0;
+ virtual bool is_stopping() const = 0;
+ virtual bool is_audio_pass_thru_active() const = 0;
+
virtual uint32_t GetNextHMICorrelationID() = 0;
virtual uint32_t GenerateNewHMIAppID() = 0;
@@ -431,8 +433,8 @@ class ApplicationManager {
* @param vehicle_info Enum value of type of vehicle data
* @param new value (for integer values currently) of vehicle data
*/
- virtual AppSharedPtrs IviInfoUpdated(
- mobile_apis::VehicleDataType::eType vehicle_info, int value) = 0;
+ virtual void IviInfoUpdated(mobile_apis::VehicleDataType::eType vehicle_info,
+ int value) = 0;
virtual ApplicationSharedPtr RegisterApplication(const utils::SharedPtr<
smart_objects::SmartObject>& request_for_registration) = 0;
@@ -463,6 +465,8 @@ class ApplicationManager {
virtual bool IsStopping() const = 0;
+ virtual bool IsLowVoltage() = 0;
+
virtual void RemoveAppFromTTSGlobalPropertiesList(const uint32_t app_id) = 0;
virtual mobile_apis::Result::eType SaveBinary(
@@ -613,6 +617,9 @@ class ApplicationManager {
virtual app_launch::AppLaunchCtrl& app_launch_ctrl() = 0;
+ virtual protocol_handler::MajorProtocolVersion SupportedSDLVersion()
+ const = 0;
+
/*
* @brief Converts connection string transport type representation
* to HMI Common_TransportType
@@ -672,6 +679,7 @@ class ApplicationManager {
utils::SharedPtr<Application> app,
mobile_apis::HMILevel::eType hmi_level,
mobile_apis::AudioStreamingState::eType audio_state,
+ mobile_apis::VideoStreamingState::eType video_state,
mobile_apis::SystemContext::eType system_context) const = 0;
/**
@@ -689,9 +697,6 @@ class ApplicationManager {
mobile_apis::AudioStreamingState::eType audio_state,
mobile_apis::SystemContext::eType system_context) const = 0;
- virtual void SendAudioPassThroughNotification(
- uint32_t session_key, std::vector<uint8_t>& binary_data) = 0;
-
/**
* @brief Checks if application can stream (streaming service is started and
* streaming is enabled in application)
@@ -730,6 +735,10 @@ class ApplicationManager {
virtual void OnTimerSendTTSGlobalProperties() = 0;
virtual void OnLowVoltage() = 0;
virtual void OnWakeUp() = 0;
+
+ virtual bool IsSOStructValid(
+ const hmi_apis::StructIdentifiers::eType struct_id,
+ const smart_objects::SmartObject& display_capabilities) = 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 f0859ece38..b8946a63f4 100644
--- a/src/components/include/application_manager/policies/policy_handler_interface.h
+++ b/src/components/include/application_manager/policies/policy_handler_interface.h
@@ -40,7 +40,6 @@
#include <queue>
#include "interfaces/MOBILE_API.h"
#include "application_manager/policies/policy_handler_observer.h"
-#include "application_manager/core_service.h"
#include "application_manager/application.h"
#include "policy/usage_statistics/statistics_manager.h"
#include "utils/custom_string.h"
@@ -49,6 +48,7 @@
#include "smart_objects/smart_object.h"
#include "policy/policy_types.h"
#include "policy/policy_table/types.h"
+#include "policy/cache_manager_interface.h"
using namespace ::rpc::policy_table_interface_base;
namespace policy {
@@ -391,6 +391,32 @@ class PolicyHandlerInterface {
mobile_apis::RequestType::eType type) const = 0;
/**
+ * @brief Checks if certain request subtype is allowed for application
+ * @param policy_app_id Unique applicaion id
+ * @param request_subtype Request subtype
+ * @return true, if allowed, otherwise - false
+ */
+ virtual bool IsRequestSubTypeAllowed(
+ const std::string& policy_app_id,
+ const std::string& request_subtype) const = 0;
+
+ /**
+ * @brief Gets application request types state
+ * @param policy_app_id Unique application id
+ * @return request types state
+ */
+ virtual RequestType::State GetAppRequestTypeState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
+ * @brief Gets application request subtypes state
+ * @param policy_app_id Unique application id
+ * @return request subtypes state
+ */
+ virtual RequestSubType::State GetAppRequestSubTypeState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Gets application request types
* @param policy_app_id Unique application id
* @return request types
@@ -399,6 +425,14 @@ class PolicyHandlerInterface {
const std::string& policy_app_id) const = 0;
/**
+ * @brief Gets application request subtypes
+ * @param policy_app_id Unique application id
+ * @return app request subtypes
+ */
+ virtual const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Gets vehicle information
* @return Structure with vehicle information
*/
@@ -436,7 +470,6 @@ class PolicyHandlerInterface {
virtual void OnDeviceSwitching(const std::string& device_id_from,
const std::string& device_id_to) = 0;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Sets HMI default type for specified application
* @param application_id ID application
@@ -501,7 +534,6 @@ class PolicyHandlerInterface {
*/
virtual bool GetModuleTypes(const std::string& policy_app_id,
std::vector<std::string>* modules) const = 0;
-#endif // SDL_REMOTE_CONTROL
private:
/**
diff --git a/src/components/include/application_manager/rpc_handler.h b/src/components/include/application_manager/rpc_handler.h
new file mode 100644
index 0000000000..9b6428f32d
--- /dev/null
+++ b/src/components/include/application_manager/rpc_handler.h
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_RPC_HANDLER_H
+#define SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_RPC_HANDLER_H
+
+#include "protocol_handler/protocol_observer.h"
+#include "hmi_message_handler/hmi_message_handler.h"
+
+#ifdef TELEMETRY_MONITOR
+#include "application_manager/telemetry_observer.h"
+#endif // TELEMETRY_MONITOR
+
+namespace application_manager {
+namespace rpc_handler {
+
+class RPCHandler
+ : public hmi_message_handler::HMIMessageObserver,
+ public protocol_handler::ProtocolObserver
+#ifdef TELEMETRY_MONITOR
+ ,
+ public telemetry_monitor::TelemetryObservable<AMTelemetryObserver>
+#endif // TELEMETRY_MONITOR
+ {
+ public:
+ virtual ~RPCHandler() {}
+};
+
+} // namespace rpc_handler
+} // namespace application_manager
+#endif // SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_RPC_HANDLER_H
diff --git a/src/components/include/application_manager/rpc_service.h b/src/components/include/application_manager/rpc_service.h
new file mode 100644
index 0000000000..79b4007f71
--- /dev/null
+++ b/src/components/include/application_manager/rpc_service.h
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_RPC_SERVICE_H
+#define SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_RPC_SERVICE_H
+
+#include "application_manager/commands/command.h"
+#include "application_manager/message.h"
+#include "protocol_handler/protocol_handler.h"
+#include "hmi_message_handler/hmi_message_handler.h"
+
+namespace application_manager {
+namespace rpc_service {
+
+class RPCService {
+ public:
+ virtual ~RPCService() {}
+
+ /**
+ * @brief ManageMobileCommand convert message to mobile command and execute it
+ * @param message pointer to received message
+ * @param origin origin of command
+ * @return true if command is executed, otherwise return false
+ */
+ virtual bool ManageMobileCommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source) = 0;
+ /**
+ * @brief ManageHMICommand convert message to HMI command and execute it
+ * @param message pointer to received message
+ * @return true if command is executed, otherwise return false
+ */
+ virtual bool ManageHMICommand(const commands::MessageSharedPtr message) = 0;
+
+ /**
+ * @brief SendMessageToMobile Put message to the queue to be sent to mobile.
+ * @param message pointer to message to send
+ * @param final_message if true - connection to mobile will be closed
+ * after processing this message
+ */
+ virtual void SendMessageToMobile(const commands::MessageSharedPtr message,
+ bool final_message = false) = 0;
+ /**
+ * @brief SendMessageToHMI Put message to the queue to be sent to HMI.
+ * @param message pointer to message to send
+ */
+ virtual void SendMessageToHMI(const commands::MessageSharedPtr message) = 0;
+
+ /**
+ * @brief set_protocol_handler
+ * @param handler
+ * set protocol handler
+ */
+ virtual void set_protocol_handler(
+ protocol_handler::ProtocolHandler* handler) = 0;
+ virtual void set_hmi_message_handler(
+ hmi_message_handler::HMIMessageHandler* handler) = 0;
+};
+} // namespace rpc_service
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_RPC_SERVICE_H
diff --git a/src/components/include/application_manager/state_controller.h b/src/components/include/application_manager/state_controller.h
index 2fe0492b42..8f608488e9 100644
--- a/src/components/include/application_manager/state_controller.h
+++ b/src/components/include/application_manager/state_controller.h
@@ -49,6 +49,7 @@ class StateController {
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const bool SendActivateApp) = 0;
virtual void SetRegularState(ApplicationSharedPtr app,
@@ -58,6 +59,7 @@ class StateController {
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const mobile_apis::SystemContext::eType system_context,
const bool SendActivateApp) = 0;
@@ -67,7 +69,8 @@ class StateController {
virtual void SetRegularState(
ApplicationSharedPtr app,
- const mobile_apis::AudioStreamingState::eType audio_state) = 0;
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state) = 0;
virtual void SetRegularState(
ApplicationSharedPtr app,
@@ -82,9 +85,17 @@ class StateController {
virtual int64_t SendBCActivateApp(ApplicationConstSharedPtr app,
hmi_apis::Common_HMILevel::eType level,
bool send_policy_priority) = 0;
+ /**
+ * @brief OnVideoStreamingStarted process video streaming started
+ * @param app projection or navigation application starting streaming
+ */
+ virtual void OnVideoStreamingStarted(ApplicationConstSharedPtr app) = 0;
- virtual void OnNaviStreamingStarted() = 0;
- virtual void OnNaviStreamingStopped() = 0;
+ /**
+ * @brief OnVideoStreamingStopped process video streaming stopped
+ * @param app projection or navigation application stopping streaming
+ */
+ virtual void OnVideoStreamingStopped(ApplicationConstSharedPtr app) = 0;
virtual void OnStateChanged(ApplicationSharedPtr app,
HmiStatePtr old_state,
HmiStatePtr new_state) = 0;
diff --git a/src/components/include/connection_handler/connection_handler.h b/src/components/include/connection_handler/connection_handler.h
index 1fcf5e4477..352f886aed 100644
--- a/src/components/include/connection_handler/connection_handler.h
+++ b/src/components/include/connection_handler/connection_handler.h
@@ -183,21 +183,6 @@ class ConnectionHandler {
connection_handler::DeviceHandle* device_id) const = 0;
/**
- * DEPRECATED
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- DEPRECATED virtual int32_t GetDataOnSessionKey(
- uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id) const = 0;
-
- /**
* @brief GetConnectedDevicesMAC allows to obtain MAC adresses for all
* currently connected devices.
*
diff --git a/src/components/include/policy/policy_external/policy/policy_listener.h b/src/components/include/policy/policy_external/policy/policy_listener.h
index e850a3fa2b..c023f3c7fc 100644
--- a/src/components/include/policy/policy_external/policy/policy_listener.h
+++ b/src/components/include/policy/policy_external/policy/policy_listener.h
@@ -137,7 +137,6 @@ class PolicyListener {
virtual void GetRegisteredLinks(
std::map<std::string, std::string>& out_links) const = 0;
-#ifdef SDL_REMOTE_CONTROL
/**
* Gets devices ids by policy application id
* @param policy_app_id
@@ -173,8 +172,6 @@ class PolicyListener {
virtual void OnUpdateHMIStatus(const std::string& device_id,
const std::string& policy_app_id,
const std::string& hmi_level) = 0;
-
-#endif // SDL_REMOTE_CONTROL
};
} // namespace policy
#endif // SRC_COMPONENTS_INCLUDE_POLICY_POLICY_EXTERNAL_POLICY_POLICY_LISTENER_H_
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 24905671fa..83038472cd 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -41,10 +41,8 @@
#include "policy/policy_table/types.h"
#include "policy/policy_listener.h"
#include "policy/usage_statistics/statistics_manager.h"
-
-#ifdef SDL_REMOTE_CONTROL
+#include "policy/cache_manager_interface.h"
#include "policy/access_remote.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy {
class PolicySettings;
@@ -487,6 +485,22 @@ class PolicyManager : public usage_statistics::StatisticsManager {
const std::string& device_id_to) = 0;
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ virtual RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ virtual RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Gets request types for application
* @param policy_app_id Unique application id
* @return request types of application
@@ -495,6 +509,14 @@ class PolicyManager : public usage_statistics::StatisticsManager {
const std::string policy_app_id) const = 0;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @return request subtypes of application
+ */
+ virtual const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Get information about vehicle
* @return vehicle information
*/
@@ -540,7 +562,6 @@ class PolicyManager : public usage_statistics::StatisticsManager {
*/
virtual AppIdURL GetNextUpdateUrl(const EndpointUrls& urls) = 0;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Assigns new HMI types for specified application
* @param application_id Unique application id
@@ -589,7 +610,6 @@ class PolicyManager : public usage_statistics::StatisticsManager {
*/
virtual void set_access_remote(
utils::SharedPtr<AccessRemote> access_remote) = 0;
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Checks if there is existing URL in the EndpointUrls vector with
diff --git a/src/components/include/policy/policy_regular/policy/policy_listener.h b/src/components/include/policy/policy_regular/policy/policy_listener.h
index e8de37d5de..3f6f555bcc 100644
--- a/src/components/include/policy/policy_regular/policy/policy_listener.h
+++ b/src/components/include/policy/policy_regular/policy/policy_listener.h
@@ -112,7 +112,6 @@ class PolicyListener {
*/
virtual void OnCertificateUpdated(const std::string& certificate_data) = 0;
-#ifdef SDL_REMOTE_CONTROL
/**
* Gets devices ids by policy application id
* @param policy_app_id
@@ -148,8 +147,6 @@ class PolicyListener {
virtual void OnUpdateHMIStatus(const std::string& device_id,
const std::string& policy_app_id,
const std::string& hmi_level) = 0;
-
-#endif // SDL_REMOTE_CONTROL
};
} // namespace policy
#endif // SRC_COMPONENTS_INCLUDE_POLICY_POLICY_REGULAR_POLICY_POLICY_LISTENER_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 3e90cfc094..bd29b2942e 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -41,9 +41,8 @@
#include "policy/policy_table/types.h"
#include "policy/policy_listener.h"
#include "policy/usage_statistics/statistics_manager.h"
-#ifdef SDL_REMOTE_CONTROL
+#include "policy/cache_manager_interface.h"
#include "policy/access_remote.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy {
class PolicySettings;
@@ -466,6 +465,22 @@ class PolicyManager : public usage_statistics::StatisticsManager {
virtual void OnAppsSearchCompleted(const bool trigger_ptu) = 0;
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ virtual RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ virtual RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Gets request types for application
* @param policy_app_id Unique application id
* @return request types of application
@@ -474,6 +489,14 @@ class PolicyManager : public usage_statistics::StatisticsManager {
const std::string policy_app_id) const = 0;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @return request subtypes of application
+ */
+ virtual const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Get information about vehicle
* @return vehicle information
*/
@@ -517,7 +540,7 @@ class PolicyManager : public usage_statistics::StatisticsManager {
* urls vector
*/
virtual AppIdURL GetNextUpdateUrl(const EndpointUrls& urls) = 0;
-#ifdef SDL_REMOTE_CONTROL
+
/**
* @brief Assigns new HMI types for specified application
* @param application_id Unique application id
@@ -567,7 +590,6 @@ class PolicyManager : public usage_statistics::StatisticsManager {
*/
virtual void set_access_remote(
utils::SharedPtr<AccessRemote> access_remote) = 0;
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Checks if there is existing URL in the EndpointUrls vector with
diff --git a/src/components/include/protocol_handler/protocol_handler.h b/src/components/include/protocol_handler/protocol_handler.h
index 6aafd7d53f..1da8d61e52 100644
--- a/src/components/include/protocol_handler/protocol_handler.h
+++ b/src/components/include/protocol_handler/protocol_handler.h
@@ -103,6 +103,12 @@ class ProtocolHandler {
virtual void SendEndService(int32_t connection_id,
uint8_t session_id,
uint8_t service_type) = 0;
+
+ /**
+ * \brief Called to notify all handsheke handlers about handshake failure.
+ */
+ virtual void NotifyOnFailedHandshake() = 0;
+
/**
* \brief Protocol handler settings getter
* \return pointer to protocol handler settings class
diff --git a/src/components/include/protocol_handler/session_observer.h b/src/components/include/protocol_handler/session_observer.h
index 3482c6569c..7a5dcf287c 100644
--- a/src/components/include/protocol_handler/session_observer.h
+++ b/src/components/include/protocol_handler/session_observer.h
@@ -66,7 +66,6 @@ struct SessionContext {
uint32_t hash_id_;
bool is_protected_;
bool is_new_service_;
- bool is_ptu_required_;
/**
* @brief Constructor
@@ -78,8 +77,7 @@ struct SessionContext {
, service_type_(protocol_handler::kInvalidServiceType)
, hash_id_(0)
, is_protected_(false)
- , is_new_service_(false)
- , is_ptu_required_(false) {}
+ , is_new_service_(false) {}
/**
* @brief Constructor
@@ -105,8 +103,7 @@ struct SessionContext {
, service_type_(service_type)
, hash_id_(hash_id)
, is_protected_(is_protected)
- , is_new_service_(false)
- , is_ptu_required_(false) {}
+ , is_new_service_(false) {}
};
/**
@@ -231,20 +228,6 @@ class SessionObserver {
uint8_t* sessionId) const = 0;
/**
- * DEPRECATED
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- virtual int32_t GetDataOnSessionKey(uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id) const = 0;
-
- /**
* \brief information about given Connection Key.
* \param key Unique key used by other components as session identifier
* \param app_id Returned: ApplicationID
diff --git a/src/components/include/security_manager/crypto_manager.h b/src/components/include/security_manager/crypto_manager.h
index 18c06ffe06..486b6da64f 100644
--- a/src/components/include/security_manager/crypto_manager.h
+++ b/src/components/include/security_manager/crypto_manager.h
@@ -33,6 +33,7 @@
#ifndef SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_CRYPTO_MANAGER_H_
#define SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_CRYPTO_MANAGER_H_
+#include <time.h>
#include "application_manager/policies/policy_handler_observer.h"
#include "security_manager/security_manager_settings.h"
@@ -65,8 +66,16 @@ class CryptoManager : public policy::PolicyHandlerObserver {
virtual bool OnCertificateUpdated(const std::string& data) = 0;
virtual void ReleaseSSLContext(SSLContext* context) = 0;
virtual std::string LastError() const = 0;
-
- virtual bool IsCertificateUpdateRequired() const = 0;
+ /**
+ * @brief IsCertificateUpdateRequired checks if certificate update is needed
+ * @param system_time - time with which certificate expiration time
+ * should be compared
+ * @param certificates_time - certificate expiration time
+ * @return True if certificate expired and need to be updated
+ * otherwise False
+ */
+ virtual bool IsCertificateUpdateRequired(
+ const time_t system_time, const time_t certificates_time) const = 0;
/**
* \brief Crypto manager settings getter
* \return pointer to crypto manager settings class
diff --git a/src/components/include/security_manager/security_manager.h b/src/components/include/security_manager/security_manager.h
index 8f772f6a13..61ba43c74f 100644
--- a/src/components/include/security_manager/security_manager.h
+++ b/src/components/include/security_manager/security_manager.h
@@ -41,6 +41,7 @@
#include "protocol_handler/session_observer.h"
#include "security_manager/security_manager_listener.h"
+#include "application_manager/policies/policy_handler_observer.h"
namespace security_manager {
@@ -50,7 +51,8 @@ class CryptoManager;
* protocol_handler::ProtocolObserver
* and provide interface for handling Security queries from mobile side
*/
-class SecurityManager : public protocol_handler::ProtocolObserver {
+class SecurityManager : public protocol_handler::ProtocolObserver,
+ public policy::PolicyHandlerObserver {
public:
/**
* \brief InternalErrors is 1 byte identifier of internal error
@@ -70,6 +72,10 @@ class SecurityManager : public protocol_handler::ProtocolObserver {
ERROR_INTERNAL = 0xFF,
ERROR_UNKNOWN_INTERNAL_ERROR = 0xFE // error value for testing
};
+
+ // SSL context creation strategy
+ enum ContextCreationStrategy { kUseExisting = 0, kForceRecreation };
+
/**
* \brief Sets pointer for Connection Handler layer for managing sessions
* \param session_observer pointer to object of the class implementing
@@ -114,13 +120,15 @@ class SecurityManager : public protocol_handler::ProtocolObserver {
}
/**
- * \brief Create new SSLContext for connection or return exists
+ * @brief Create new SSLContext for connection or return exists
* Do not notify listeners, send security error on occure
- * \param connection_key Unique key used by other components as session
+ * @param connection_key Unique key used by other components as session
* identifier
+ * @param cc_strategy - SSL context creation strategy
* @return new \c SSLContext or \c NULL on any error
*/
- virtual SSLContext* CreateSSLContext(const uint32_t& connection_key) = 0;
+ virtual SSLContext* CreateSSLContext(const uint32_t& connection_key,
+ ContextCreationStrategy cc_strategy) = 0;
/**
* \brief Start handshake as SSL client
@@ -128,10 +136,26 @@ class SecurityManager : public protocol_handler::ProtocolObserver {
virtual void StartHandshake(uint32_t connection_key) = 0;
/**
+ * @brief PostponeHandshake allows to postpone handshake. It notifies
+ * cryptomanager that certificate should be updated and adds specified
+ * connection key to the list of the certificate awaiting connections.
+ * @param connection_key the identifier for connection to postpone handshake.
+ */
+ virtual void PostponeHandshake(const uint32_t connection_key) = 0;
+
+ /**
* @brief Check whether certificate should be updated
+ * @param connection_key the connection identifier to check certificate for.
* @return true if certificate should be updated otherwise false
*/
- virtual bool IsCertificateUpdateRequired() = 0;
+ virtual bool IsCertificateUpdateRequired(const uint32_t connection_key) = 0;
+
+ /**
+ * @brief Checks whether system time ready notification
+ * was received from hmi
+ * @return true if received otherwise false
+ */
+ virtual bool IsSystemTimeProviderReady() const = 0;
/**
* @brief Notify all listeners that certificate update required
@@ -140,6 +164,11 @@ class SecurityManager : public protocol_handler::ProtocolObserver {
virtual void NotifyOnCertificateUpdateRequired() = 0;
/**
+ * @brief Notify all listeners that handshake was failed
+ */
+ virtual void NotifyListenersOnHandshakeFailed() = 0;
+
+ /**
* @brief Check if policy certificate data is empty
* @return true if policy certificate data is empty otherwise false
*/
@@ -150,6 +179,18 @@ class SecurityManager : public protocol_handler::ProtocolObserver {
*/
virtual void AddListener(SecurityManagerListener* const listener) = 0;
virtual void RemoveListener(SecurityManagerListener* const listener) = 0;
+
+ /**
+ * @brief OnCertificateUpdated allows to obtain notification when certificate
+ * has been updated with policy table update. Pass this certificate to crypto
+ * manager for further processing. Also process postopnes handshake for the
+ * certain connection key.
+ *
+ * @param data the certificates content.
+ *
+ * @return always true.
+ */
+ virtual bool OnCertificateUpdated(const std::string& data) = 0;
};
} // namespace security_manager
#endif // SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_SECURITY_MANAGER_H_
diff --git a/src/components/include/security_manager/security_manager_listener.h b/src/components/include/security_manager/security_manager_listener.h
index aeb3334a56..00a4c68134 100644
--- a/src/components/include/security_manager/security_manager_listener.h
+++ b/src/components/include/security_manager/security_manager_listener.h
@@ -47,6 +47,13 @@ class SecurityManagerListener {
*/
virtual bool OnHandshakeDone(uint32_t connection_key,
SSLContext::HandshakeResult result) = 0;
+
+ /**
+ * @brief Notification about handshake failure
+ * @return true on success notification handling or false otherwise
+ */
+ virtual bool OnHandshakeFailed() = 0;
+
/**
* @brief Notify listeners that certificate update is required.
*/
diff --git a/src/components/include/security_manager/security_manager_settings.h b/src/components/include/security_manager/security_manager_settings.h
index c6b97f85cc..0bbe0f4f96 100644
--- a/src/components/include/security_manager/security_manager_settings.h
+++ b/src/components/include/security_manager/security_manager_settings.h
@@ -33,12 +33,16 @@
#ifndef SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_SECURITY_MANAGER_SETTINGS_H_
#define SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_SECURITY_MANAGER_SETTINGS_H_
+#include <stddef.h>
+#include <string>
+#include <vector>
+
namespace security_manager {
enum Mode { CLIENT, SERVER };
-enum Protocol { SSLv3, TLSv1, TLSv1_1, TLSv1_2 };
+enum Protocol { SSLv3, TLSv1, TLSv1_1, TLSv1_2, DTLSv1 };
/**
- * \class ConnectionHandlerSettings
- * \brief Interface for connection handler component settings.
+ * \class CryptoManagerSettings
+ * \brief Interface for crypto manager component settings.
*/
class CryptoManagerSettings {
public:
@@ -50,8 +54,12 @@ class CryptoManagerSettings {
virtual const std::string& certificate_data() const = 0;
virtual const std::string& ciphers_list() const = 0;
virtual const std::string& ca_cert_path() const = 0;
+ virtual const std::string& module_cert_path() const = 0;
+ virtual const std::string& module_key_path() const = 0;
virtual size_t update_before_hours() const = 0;
virtual size_t maximum_payload_size() const = 0;
+ virtual const std::vector<int>& force_protected_service() const = 0;
+ virtual const std::vector<int>& force_unprotected_service() const = 0;
};
} // namespace security_manager
diff --git a/src/components/include/security_manager/ssl_context.h b/src/components/include/security_manager/ssl_context.h
index 86997edbd9..9d66e1af2f 100644
--- a/src/components/include/security_manager/ssl_context.h
+++ b/src/components/include/security_manager/ssl_context.h
@@ -81,10 +81,11 @@ class SSLContext {
HandshakeContext(const custom_str::CustomString& exp_sn,
const custom_str::CustomString& exp_cn)
- : expected_sn(exp_sn), expected_cn(exp_cn) {}
+ : expected_sn(exp_sn), expected_cn(exp_cn), system_time(time(NULL)) {}
custom_str::CustomString expected_sn;
custom_str::CustomString expected_cn;
+ time_t system_time;
};
virtual HandshakeResult StartHandshake(const uint8_t** const out_data,
@@ -103,6 +104,14 @@ class SSLContext {
size_t* out_data_size) = 0;
virtual bool IsInitCompleted() const = 0;
virtual bool IsHandshakePending() const = 0;
+ /**
+ * @brief GetCertificateDueDate gets certificate expiration date
+ * @param due_date - certificate expiration time to be received
+ * @return True if certificate expiration date received
+ * otherwise False
+ */
+ virtual bool GetCertificateDueDate(time_t& due_date) const = 0;
+ virtual bool HasCertificate() const = 0;
virtual size_t get_max_block_size(size_t mtu) const = 0;
virtual std::string LastError() const = 0;
diff --git a/src/components/include/test/application_manager/mock_app_extension.h b/src/components/include/test/application_manager/mock_app_extension.h
new file mode 100644
index 0000000000..eb8fcd51cf
--- /dev/null
+++ b/src/components/include/test/application_manager/mock_app_extension.h
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_APP_EXTENSION_H_
+#define SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_APP_EXTENSION_H_
+
+#include "gmock/gmock.h"
+#include "application_manager/app_extension.h"
+
+namespace test {
+namespace components {
+namespace application_manager_test {
+
+namespace {
+static unsigned MockAppExtensionUID = 123;
+} // namespace
+
+class MockAppExtension : public application_manager::AppExtension {
+ public:
+ MockAppExtension() : AppExtension(MockAppExtensionUID) {}
+ MOCK_METHOD1(
+ SaveResumptionData,
+ void(NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data));
+ MOCK_METHOD1(ProcessResumption,
+ void(const NsSmartDeviceLink::NsSmartObjects::SmartObject&
+ resumption_data));
+};
+
+} // namespace application_manager_test
+} // namespace components
+} // namespace test
+
+#endif // SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_APP_EXTENSION_H_
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 452a1e6c39..09957dbde0 100644
--- a/src/components/include/test/application_manager/mock_application_manager.h
+++ b/src/components/include/test/application_manager/mock_application_manager.h
@@ -35,6 +35,7 @@
#include <string>
#include <vector>
+#include <memory>
#include "gmock/gmock.h"
@@ -51,10 +52,13 @@
#include "application_manager/event_engine/event_dispatcher.h"
#include "application_manager/state_controller.h"
#include "smart_objects/smart_object.h"
+#include "application_manager/plugin_manager/rpc_plugin_manager.h"
+#include "application_manager/command_factory.h"
namespace test {
namespace components {
namespace application_manager_test {
+using application_manager::plugin_manager::RPCPluginManager;
class MockApplicationManager : public application_manager::ApplicationManager {
public:
@@ -74,22 +78,18 @@ class MockApplicationManager : public application_manager::ApplicationManager {
application, application_manager::ApplicationSharedPtr(uint32_t app_id));
MOCK_CONST_METHOD0(active_application,
application_manager::ApplicationSharedPtr());
-
-#ifdef SDL_REMOTE_CONTROL
MOCK_CONST_METHOD2(application,
application_manager::ApplicationSharedPtr(
const std::string& device_id,
const std::string& policy_app_id));
MOCK_METHOD2(ChangeAppsHMILevel,
void(uint32_t app_id, mobile_apis::HMILevel::eType level));
- MOCK_METHOD0(GetPluginManager, functional_modules::PluginManager&());
MOCK_CONST_METHOD1(
devices, std::vector<std::string>(const std::string& policy_app_id));
- MOCK_METHOD1(SendPostMessageToMobile,
- void(const application_manager::MessagePtr& message));
- MOCK_METHOD1(SendPostMessageToHMI,
- void(const application_manager::MessagePtr& message));
-#endif // SDL_REMOTE_CONTROL
+ MOCK_METHOD0(GetPluginManager, RPCPluginManager&());
+
+ MOCK_METHOD1(SetPluginManager,
+ void(std::unique_ptr<RPCPluginManager>& plugin_manager));
MOCK_CONST_METHOD1(
application_by_hmi_app,
@@ -122,20 +122,8 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD1(
SendHMIStatusNotification,
void(const utils::SharedPtr<application_manager::Application> app));
- MOCK_METHOD2(SendMessageToMobile,
- void(application_manager::commands::MessageSharedPtr, bool));
- MOCK_METHOD1(
- SendMessageToHMI,
- void(const application_manager::commands::MessageSharedPtr message));
MOCK_METHOD1(RemoveHMIFakeParameters,
- void(application_manager::MessagePtr& message));
- MOCK_METHOD1(
- ManageHMICommand,
- bool(const application_manager::commands::MessageSharedPtr message));
- MOCK_METHOD2(
- ManageMobileCommand,
- bool(const application_manager::commands::MessageSharedPtr message,
- application_manager::commands::Command::CommandOrigin origin));
+ void(application_manager::commands::MessageSharedPtr& message));
MOCK_CONST_METHOD1(
GetDefaultHmiLevel,
mobile_apis::HMILevel::eType(
@@ -158,6 +146,12 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_CONST_METHOD0(protocol_handler, protocol_handler::ProtocolHandler&());
MOCK_METHOD0(GetPolicyHandler, policy::PolicyHandlerInterface&());
MOCK_CONST_METHOD0(GetPolicyHandler, const policy::PolicyHandlerInterface&());
+ MOCK_CONST_METHOD0(GetRPCService,
+ application_manager::rpc_service::RPCService&());
+ MOCK_CONST_METHOD0(GetRPCHandler,
+ application_manager::rpc_handler::RPCHandler&());
+ MOCK_CONST_METHOD0(is_stopping, bool());
+ MOCK_CONST_METHOD0(is_audio_pass_thru_active, bool());
MOCK_METHOD0(GetNextHMICorrelationID, uint32_t());
MOCK_METHOD0(GenerateNewHMIAppID, uint32_t());
MOCK_METHOD1(EndNaviServices, void(uint32_t app_id));
@@ -169,9 +163,8 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD0(OnHMIStartedCooperation, void());
MOCK_CONST_METHOD0(IsHMICooperating, bool());
MOCK_METHOD2(IviInfoUpdated,
- std::vector<application_manager::ApplicationSharedPtr>(
- mobile_apis::VehicleDataType::eType vehicle_info,
- int value));
+ void(mobile_apis::VehicleDataType::eType vehicle_info,
+ int value));
MOCK_METHOD1(RegisterApplication,
application_manager::ApplicationSharedPtr(const utils::SharedPtr<
smart_objects::SmartObject>& request_for_registration));
@@ -182,6 +175,7 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_CONST_METHOD1(IsAppsQueriedFrom,
bool(const connection_handler::DeviceHandle handle));
MOCK_CONST_METHOD0(IsStopping, bool());
+ MOCK_METHOD0(IsLowVoltage, bool());
MOCK_METHOD1(RemoveAppFromTTSGlobalPropertiesList,
void(const uint32_t app_id));
MOCK_METHOD4(
@@ -234,6 +228,8 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD0(resume_controller, resumption::ResumeCtrl&());
MOCK_METHOD0(hmi_interfaces, application_manager::HmiInterfaces&());
MOCK_METHOD0(app_launch_ctrl, app_launch::AppLaunchCtrl&());
+ MOCK_CONST_METHOD0(SupportedSDLVersion,
+ protocol_handler::MajorProtocolVersion());
MOCK_METHOD1(
GetDeviceTransportType,
hmi_apis::Common_TransportType::eType(const std::string& transport_type));
@@ -248,11 +244,12 @@ class MockApplicationManager : public application_manager::ApplicationManager {
void(uint32_t app_id,
protocol_handler::ServiceType service_type,
bool state));
- MOCK_CONST_METHOD4(CreateRegularState,
+ MOCK_CONST_METHOD5(CreateRegularState,
application_manager::HmiStatePtr(
application_manager::ApplicationSharedPtr app,
mobile_apis::HMILevel::eType hmi_level,
mobile_apis::AudioStreamingState::eType audio_state,
+ mobile_apis::VideoStreamingState::eType video_state,
mobile_apis::SystemContext::eType system_context));
DEPRECATED MOCK_CONST_METHOD4(
CreateRegularState,
@@ -273,6 +270,10 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD0(event_dispatcher,
application_manager::event_engine::EventDispatcher&());
+ MOCK_METHOD2(IsSOStructValid,
+ bool(const hmi_apis::StructIdentifiers::eType struct_id,
+ const smart_objects::SmartObject& display_capabilities));
+
DEPRECATED MOCK_CONST_METHOD1(IsAppSubscribedForWayPoints,
bool(const uint32_t));
DEPRECATED MOCK_METHOD1(SubscribeAppForWayPoints, void(const uint32_t));
@@ -306,14 +307,12 @@ class MockApplicationManager : public application_manager::ApplicationManager {
protocol_handler::ServiceType service_type,
bool result,
std::vector<std::string>& rejected_params));
- MOCK_METHOD1(ValidateMessageBySchema,
- application_manager::MessageValidationResult(
- const application_manager::Message& message));
MOCK_METHOD2(ProcessReconnection,
void(application_manager::ApplicationSharedPtr application,
const uint32_t connection_key));
MOCK_CONST_METHOD1(IsAppInReconnectMode,
bool(const std::string& policy_app_id));
+ MOCK_CONST_METHOD0(GetCommandFactory, application_manager::CommandFactory&());
};
} // namespace application_manager_test
diff --git a/src/components/include/test/application_manager/mock_rpc_plugin.h b/src/components/include/test/application_manager/mock_rpc_plugin.h
new file mode 100644
index 0000000000..1f7dd8951b
--- /dev/null
+++ b/src/components/include/test/application_manager/mock_rpc_plugin.h
@@ -0,0 +1,30 @@
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_MOCK_RPC_PLUGIN_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_MOCK_RPC_PLUGIN_H
+
+#include "gmock/gmock.h"
+#include "application_manager/plugin_manager/rpc_plugin.h"
+
+namespace application_manager {
+class CommandFactory;
+namespace plugin_manager {
+
+class MockRPCPlugin : public RPCPlugin {
+ public:
+ MOCK_METHOD4(Init,
+ bool(ApplicationManager& app_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler));
+ MOCK_METHOD2(IsAbleToProcess,
+ bool(const int32_t function_id,
+ const commands::Command::CommandSource message_source));
+ MOCK_METHOD0(PluginName, std::string());
+ MOCK_METHOD0(GetCommandFactory, CommandFactory&());
+ MOCK_METHOD1(OnPolicyEvent, void(PolicyEvent event));
+ MOCK_METHOD2(OnApplicationEvent,
+ void(ApplicationEvent event,
+ application_manager::ApplicationSharedPtr application));
+};
+} // namespace plugin_manager
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_MOCK_RPC_PLUGIN_H
diff --git a/src/components/include/test/application_manager/mock_rpc_plugin_manager.h b/src/components/include/test/application_manager/mock_rpc_plugin_manager.h
new file mode 100644
index 0000000000..74763f00d6
--- /dev/null
+++ b/src/components/include/test/application_manager/mock_rpc_plugin_manager.h
@@ -0,0 +1,24 @@
+#ifndef SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_RPC_PLUGIN_MANAGER_H_
+#define SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_RPC_PLUGIN_MANAGER_H_
+#include <string>
+
+#include "gmock/gmock.h"
+#include "application_manager/plugin_manager/rpc_plugin_manager.h"
+
+namespace application_manager {
+namespace plugin_manager {
+
+class MockRPCPluginManager : public RPCPluginManager {
+ public:
+ MOCK_METHOD1(LoadPlugins, uint32_t(const std::string& plugins_path));
+ MOCK_METHOD0(GetPlugins, std::vector<RPCPluginPtr>&());
+ MOCK_METHOD2(FindPluginToProcess,
+ utils::Optional<RPCPlugin>(
+ const int32_t function_id,
+ const commands::Command::CommandSource message_source));
+ MOCK_METHOD1(ForEachPlugin, void(std::function<void(RPCPlugin&)> functor));
+};
+
+} // namespace plugin_manager
+} // namespace application_manager
+#endif // SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_RPC_PLUGIN_MANAGER_H_
diff --git a/src/components/include/test/application_manager/mock_rpc_service.h b/src/components/include/test/application_manager/mock_rpc_service.h
new file mode 100644
index 0000000000..4eddbbe257
--- /dev/null
+++ b/src/components/include/test/application_manager/mock_rpc_service.h
@@ -0,0 +1,34 @@
+#ifndef MOCK_RPC_SERVICE_H
+#define MOCK_RPC_SERVICE_H
+
+#include "gmock/gmock.h"
+#include "application_manager/rpc_service.h"
+
+namespace test {
+namespace components {
+namespace application_manager_test {
+
+class MockRPCService : public application_manager::rpc_service::RPCService {
+ public:
+ MOCK_METHOD1(
+ ManageHMICommand,
+ bool(const application_manager::commands::MessageSharedPtr message));
+ MOCK_METHOD2(
+ ManageMobileCommand,
+ bool(const application_manager::commands::MessageSharedPtr message,
+ application_manager::commands::Command::CommandSource origin));
+ MOCK_METHOD2(SendMessageToMobile,
+ void(application_manager::commands::MessageSharedPtr, bool));
+ MOCK_METHOD1(
+ SendMessageToHMI,
+ void(const application_manager::commands::MessageSharedPtr message));
+ MOCK_METHOD1(set_protocol_handler,
+ void(protocol_handler::ProtocolHandler* handler));
+ MOCK_METHOD1(set_hmi_message_handler,
+ void(hmi_message_handler::HMIMessageHandler* handler));
+};
+}
+}
+}
+
+#endif // MOCK_RPC_SERVICE_H
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 9f8d94599b..0165180a0a 100644
--- a/src/components/include/test/application_manager/mock_state_controller.h
+++ b/src/components/include/test/application_manager/mock_state_controller.h
@@ -51,27 +51,30 @@ class MockStateController : public am::StateController {
void(am::ApplicationSharedPtr app,
am::HmiStatePtr state,
const bool SendActivateApp));
- MOCK_METHOD4(SetRegularState,
+ MOCK_METHOD5(SetRegularState,
void(am::ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const bool SendActivateApp));
MOCK_METHOD3(SetRegularState,
void(am::ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const bool SendActivateApp));
- MOCK_METHOD5(SetRegularState,
+ MOCK_METHOD6(SetRegularState,
void(am::ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state,
const mobile_apis::SystemContext::eType system_context,
const bool SendActivateApp));
MOCK_METHOD2(SetRegularState,
void(am::ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level));
- MOCK_METHOD2(SetRegularState,
+ MOCK_METHOD3(SetRegularState,
void(am::ApplicationSharedPtr app,
- const mobile_apis::AudioStreamingState::eType audio_state));
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::VideoStreamingState::eType video_state));
MOCK_METHOD2(SetRegularState,
void(am::ApplicationSharedPtr app,
const mobile_apis::SystemContext::eType system_context));
@@ -84,8 +87,10 @@ class MockStateController : public am::StateController {
int64_t(am::ApplicationConstSharedPtr app,
hmi_apis::Common_HMILevel::eType level,
bool send_policy_priority));
- MOCK_METHOD0(OnNaviStreamingStarted, void());
- MOCK_METHOD0(OnNaviStreamingStopped, void());
+ MOCK_METHOD1(OnVideoStreamingStarted,
+ void(am::ApplicationConstSharedPtr app));
+ MOCK_METHOD1(OnVideoStreamingStopped,
+ void(am::ApplicationConstSharedPtr app));
MOCK_METHOD3(OnStateChanged,
void(am::ApplicationSharedPtr app,
am::HmiStatePtr old_state,
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 931fd6cfb4..ffa9222c8e 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
@@ -197,6 +197,18 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
MOCK_CONST_METHOD2(IsRequestTypeAllowed,
bool(const std::string& policy_app_id,
mobile_apis::RequestType::eType type));
+ MOCK_CONST_METHOD2(IsRequestSubTypeAllowed,
+ bool(const std::string& policy_app_id,
+ const std::string& request_subtype));
+ MOCK_CONST_METHOD1(
+ GetAppRequestTypeState,
+ policy::RequestType::State(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(
+ GetAppRequestSubTypeState,
+ policy::RequestSubType::State(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(
+ GetAppRequestSubTypes,
+ const std::vector<std::string>(const std::string& policy_app_id));
MOCK_CONST_METHOD1(
GetAppRequestTypes,
const std::vector<std::string>(const std::string& policy_app_id));
@@ -227,7 +239,6 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
void(const std::string& service_type,
policy::EndpointUrls& end_points));
-#ifdef SDL_REMOTE_CONTROL
MOCK_METHOD3(OnUpdateHMILevel,
void(const std::string& device_id,
const std::string& policy_app_id,
@@ -258,7 +269,6 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
MOCK_METHOD2(OnDeviceSwitching,
void(const std::string& device_id_from,
const std::string& device_id_to));
-#endif // SDL_REMOTE_CONTROL
private:
#ifdef EXTERNAL_PROPRIETARY_MODE
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 5aa92446b6..02931114f0 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
@@ -250,6 +250,13 @@ class MockCacheManagerInterface : public ::policy::CacheManagerInterface {
MOCK_METHOD2(OnDeviceSwitching,
void(const std::string& device_id_from,
const std::string& device_id_to));
+ MOCK_CONST_METHOD2(GetAppRequestSubTypes,
+ void(const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes));
+ MOCK_CONST_METHOD1(GetAppRequestTypesState,
+ RequestType::State(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(GetAppRequestSubTypesState,
+ RequestSubType::State(const std::string& policy_app_id));
};
} // namespace policy_test
diff --git a/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h b/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h
index ad2f1fd56c..1f570d8699 100644
--- a/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h
+++ b/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h
@@ -92,7 +92,6 @@ class MockPolicyListener : public ::policy::PolicyListener {
const std::string& hmi_level));
MOCK_CONST_METHOD1(GetRegisteredLinks,
void(std::map<std::string, std::string>&));
-#ifdef SDL_REMOTE_CONTROL
MOCK_METHOD1(OnRemoteAllowedChanged, void(bool new_consent));
MOCK_METHOD2(OnRemoteAppPermissionsChanged,
void(const std::string& device_id,
@@ -101,7 +100,6 @@ class MockPolicyListener : public ::policy::PolicyListener {
void(const std::string& device_id,
const std::string& policy_app_id,
const std::string& hmi_level));
-#endif // SDL_REMOTE_CONTROL
};
} // namespace policy_test
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 9e487da4ba..ea259fc916 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
@@ -112,7 +112,7 @@ class MockPolicyManager : public PolicyManager {
const policy::DeviceInfo& device_info));
MOCK_METHOD2(SetUserConsentForApp,
void(const policy::PermissionConsent& permissions,
- const NotificationMode mode));
+ const policy::PolicyManager::NotificationMode mode));
MOCK_CONST_METHOD2(GetDefaultHmi,
bool(const std::string& policy_app_id,
std::string* default_hmi));
@@ -148,7 +148,6 @@ class MockPolicyManager : public PolicyManager {
StatusNotifier(
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types));
-#ifdef SDL_REMOTE_CONTROL
MOCK_METHOD2(SetDefaultHmiTypes,
void(const std::string& application_id,
const std::vector<int>& hmi_types));
@@ -165,7 +164,6 @@ class MockPolicyManager : public PolicyManager {
std::vector<std::string>* modules));
MOCK_METHOD1(set_access_remote,
void(utils::SharedPtr<AccessRemote> access_remote));
-#endif // SDL_REMOTE_CONTROL
MOCK_METHOD0(CleanupUnpairedDevices, bool());
MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
@@ -218,6 +216,13 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD2(OnDeviceSwitching,
void(const std::string& device_id_from,
const std::string& device_id_to));
+ MOCK_CONST_METHOD1(
+ GetAppRequestSubTypes,
+ const std::vector<std::string>(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(GetAppRequestTypesState,
+ RequestType::State(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(GetAppRequestSubTypesState,
+ RequestSubType::State(const std::string& policy_app_id));
};
} // 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 ed3a5088c1..d216957eb0 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
@@ -206,7 +206,6 @@ class MockCacheManagerInterface : public CacheManagerInterface {
MOCK_METHOD1(GetHMITypes,
const policy_table::AppHMITypes*(const std::string& app_id));
MOCK_CONST_METHOD0(GetCertificate, std::string());
- MOCK_METHOD1(SetDecryptedCertificate, void(const std::string&));
MOCK_METHOD1(GetGroups, const policy_table::Strings&(const PTString& app_id));
MOCK_CONST_METHOD2(AppHasHMIType,
bool(const std::string& application_id,
@@ -214,6 +213,13 @@ class MockCacheManagerInterface : public CacheManagerInterface {
MOCK_METHOD2(OnDeviceSwitching,
void(const std::string& device_id_from,
const std::string& device_id_to));
+ MOCK_CONST_METHOD2(GetAppRequestSubTypes,
+ void(const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes));
+ MOCK_CONST_METHOD1(GetAppRequestTypesState,
+ RequestType::State(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(GetAppRequestSubTypesState,
+ RequestSubType::State(const std::string& policy_app_id));
};
} // namespace policy_test
diff --git a/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h b/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h
index d98a0279d7..3b0c1a925e 100644
--- a/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h
+++ b/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h
@@ -85,7 +85,6 @@ class MockPolicyListener : public ::policy::PolicyListener {
std::vector<std::string>(const std::string& policy_app_id));
MOCK_CONST_METHOD1(GetRegisteredLinks,
void(std::map<std::string, std::string>&));
-#ifdef SDL_REMOTE_CONTROL
MOCK_METHOD1(OnRemoteAllowedChanged, void(bool new_consent));
MOCK_METHOD2(OnRemoteAppPermissionsChanged,
void(const std::string& device_id,
@@ -94,7 +93,6 @@ class MockPolicyListener : public ::policy::PolicyListener {
void(const std::string& device_id,
const std::string& policy_app_id,
const std::string& hmi_level));
-#endif // SDL_REMOTE_CONTROL
};
} // namespace policy_test
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 82012b83c7..952b264caf 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
@@ -147,7 +147,6 @@ class MockPolicyManager : public PolicyManager {
StatusNotifier(
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types));
-#ifdef SDL_REMOTE_CONTROL
MOCK_METHOD2(SetDefaultHmiTypes,
void(const std::string& application_id,
const std::vector<int>& hmi_types));
@@ -164,7 +163,6 @@ class MockPolicyManager : public PolicyManager {
std::vector<std::string>* modules));
MOCK_METHOD1(set_access_remote,
void(utils::SharedPtr<AccessRemote> access_remote));
-#endif // SDL_REMOTE_CONTROL
MOCK_METHOD0(CleanupUnpairedDevices, bool());
MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
MOCK_CONST_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
@@ -186,7 +184,6 @@ class MockPolicyManager : public PolicyManager {
MOCK_CONST_METHOD0(GetMetaInfo, const policy::MetaInfo());
MOCK_CONST_METHOD0(RetrieveCertificate, std::string());
MOCK_CONST_METHOD0(HasCertificate, bool());
- MOCK_METHOD1(SetDecryptedCertificate, void(const std::string&));
MOCK_METHOD0(ExceededIgnitionCycles, bool());
MOCK_METHOD0(ExceededDays, bool());
MOCK_METHOD0(StartPTExchange, void());
@@ -226,6 +223,14 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD2(OnDeviceSwitching,
void(const std::string& device_id_from,
const std::string& device_id_to));
+
+ MOCK_CONST_METHOD1(
+ GetAppRequestSubTypes,
+ const std::vector<std::string>(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(GetAppRequestTypesState,
+ RequestType::State(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(GetAppRequestSubTypesState,
+ RequestSubType::State(const std::string& policy_app_id));
};
} // 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 79c2188cdf..e667911944 100644
--- a/src/components/include/test/protocol_handler/mock_protocol_handler.h
+++ b/src/components/include/test/protocol_handler/mock_protocol_handler.h
@@ -72,6 +72,7 @@ class MockProtocolHandler : public ::protocol_handler::ProtocolHandler {
MOCK_METHOD2(NotifySessionStarted,
void(const ::protocol_handler::SessionContext& context,
std::vector<std::string>& rejected_params));
+ MOCK_METHOD0(NotifyOnFailedHandshake, void());
};
} // namespace protocol_handler_test
} // namespace components
diff --git a/src/components/include/test/security_manager/mock_crypto_manager.h b/src/components/include/test/security_manager/mock_crypto_manager.h
index 55c364bd89..61ec5183e4 100644
--- a/src/components/include/test/security_manager/mock_crypto_manager.h
+++ b/src/components/include/test/security_manager/mock_crypto_manager.h
@@ -52,7 +52,9 @@ class MockCryptoManager : public ::security_manager::CryptoManager {
MOCK_METHOD0(CreateSSLContext, ::security_manager::SSLContext*());
MOCK_METHOD1(ReleaseSSLContext, void(::security_manager::SSLContext*));
MOCK_CONST_METHOD0(LastError, std::string());
- MOCK_CONST_METHOD0(IsCertificateUpdateRequired, bool());
+ MOCK_CONST_METHOD2(IsCertificateUpdateRequired,
+ bool(const time_t system_time,
+ const time_t certificates_time));
};
} // namespace security_manager_test
} // namespace components
diff --git a/src/components/include/test/security_manager/mock_security_manager.h b/src/components/include/test/security_manager/mock_security_manager.h
index 11890cb071..b2c2e3bf17 100644
--- a/src/components/include/test/security_manager/mock_security_manager.h
+++ b/src/components/include/test/security_manager/mock_security_manager.h
@@ -54,8 +54,9 @@ class MockSecurityManager : public ::security_manager::SecurityManager {
MOCK_METHOD4(
SendInternalError,
void(const uint32_t, const uint8_t&, const std::string&, const uint32_t));
- MOCK_METHOD1(CreateSSLContext,
- ::security_manager::SSLContext*(const uint32_t&));
+ MOCK_METHOD2(CreateSSLContext,
+ ::security_manager::SSLContext*(const uint32_t&,
+ ContextCreationStrategy));
MOCK_METHOD1(StartHandshake, void(uint32_t));
MOCK_METHOD1(AddListener, void(::security_manager::SecurityManagerListener*));
MOCK_METHOD1(RemoveListener,
@@ -65,9 +66,13 @@ class MockSecurityManager : public ::security_manager::SecurityManager {
void(const ::protocol_handler::RawMessagePtr));
MOCK_METHOD1(OnMobileMessageSent,
void(const ::protocol_handler::RawMessagePtr));
- MOCK_METHOD0(IsCertificateUpdateRequired, bool());
+ MOCK_METHOD1(IsCertificateUpdateRequired, bool(const uint32_t));
MOCK_METHOD0(NotifyOnCertificateUpdateRequired, void());
+ MOCK_METHOD0(NotifyListenersOnHandshakeFailed, void());
MOCK_METHOD0(IsPolicyCertificateDataEmpty, bool());
+ MOCK_METHOD1(OnCertificateUpdated, bool(const std::string&));
+ MOCK_METHOD1(PostponeHandshake, void(const uint32_t));
+ MOCK_CONST_METHOD0(IsSystemTimeProviderReady, bool());
};
/*
diff --git a/src/components/include/test/security_manager/mock_security_manager_listener.h b/src/components/include/test/security_manager/mock_security_manager_listener.h
index a06762a09d..7a7714d299 100644
--- a/src/components/include/test/security_manager/mock_security_manager_listener.h
+++ b/src/components/include/test/security_manager/mock_security_manager_listener.h
@@ -49,6 +49,7 @@ class MockSecurityManagerListener
::security_manager::SSLContext::HandshakeResult result));
MOCK_METHOD0(OnCertificateUpdateRequired, void());
MOCK_CONST_METHOD1(GetPolicyCertificateData, bool(std::string& data));
+ MOCK_METHOD0(OnHandshakeFailed, bool());
};
} // namespace security_manager_test
} // namespace components
diff --git a/src/components/include/test/security_manager/mock_security_manager_settings.h b/src/components/include/test/security_manager/mock_security_manager_settings.h
index 6ac194ced4..b1c869cd1b 100644
--- a/src/components/include/test/security_manager/mock_security_manager_settings.h
+++ b/src/components/include/test/security_manager/mock_security_manager_settings.h
@@ -50,8 +50,12 @@ class MockCryptoManagerSettings
MOCK_CONST_METHOD0(certificate_data, const std::string&());
MOCK_CONST_METHOD0(ciphers_list, const std::string&());
MOCK_CONST_METHOD0(ca_cert_path, const std::string&());
+ MOCK_CONST_METHOD0(module_cert_path, const std::string&());
+ MOCK_CONST_METHOD0(module_key_path, const std::string&());
MOCK_CONST_METHOD0(update_before_hours, size_t());
MOCK_CONST_METHOD0(maximum_payload_size, size_t());
+ MOCK_CONST_METHOD0(force_protected_service, const std::vector<int>&());
+ MOCK_CONST_METHOD0(force_unprotected_service, const std::vector<int>&());
};
} // namespace security_manager_test
diff --git a/src/components/include/test/security_manager/mock_ssl_context.h b/src/components/include/test/security_manager/mock_ssl_context.h
index 6b6a26a226..02198d1d22 100644
--- a/src/components/include/test/security_manager/mock_ssl_context.h
+++ b/src/components/include/test/security_manager/mock_ssl_context.h
@@ -68,6 +68,8 @@ class MockSSLContext : public ::security_manager::SSLContext {
MOCK_CONST_METHOD0(LastError, std::string());
MOCK_METHOD0(ResetConnection, void());
MOCK_METHOD1(SetHandshakeContext, void(const HandshakeContext& hsh_ctx));
+ MOCK_CONST_METHOD0(HasCertificate, bool());
+ MOCK_CONST_METHOD1(GetCertificateDueDate, bool(time_t& due_date));
};
} // namespace security_manager_test
} // namespace components
diff --git a/src/components/include/test/utils/mock_system_time_handler.h b/src/components/include/test/utils/mock_system_time_handler.h
new file mode 100644
index 0000000000..7bb2a7f0a5
--- /dev/null
+++ b/src/components/include/test/utils/mock_system_time_handler.h
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_INCLUDE_TEST_SECURITY_MANAGER_MOCK_SYSTEM_TIME_HANDLER_H
+#define SRC_COMPONENTS_INCLUDE_TEST_SECURITY_MANAGER_MOCK_SYSTEM_TIME_HANDLER_H
+
+#include "gmock/gmock.h"
+#include "utils/system_time_handler.h"
+
+namespace test {
+namespace components {
+namespace security_manager_test {
+
+class MockSystemTimeHandler : public ::utils::SystemTimeHandler {
+ public:
+ MockSystemTimeHandler() {}
+ MOCK_METHOD0(QuerySystemTime, void());
+ MOCK_METHOD1(SubscribeOnSystemTime,
+ void(utils::SystemTimeListener* listener));
+ MOCK_METHOD1(UnsubscribeFromSystemTime,
+ void(utils::SystemTimeListener* listener));
+ MOCK_METHOD0(GetUTCTime, time_t());
+ MOCK_CONST_METHOD0(system_time_can_be_received, bool());
+ ~MockSystemTimeHandler() {}
+
+ private:
+ void DoSubscribe(utils::SystemTimeListener*) {}
+ void DoSystemTimeQuery() {}
+ void DoUnsubscribe(utils::SystemTimeListener* listener) {}
+ bool utc_time_can_be_received() const {
+ return true;
+ }
+ time_t FetchSystemTime() {
+ return 0;
+ }
+};
+} // namespace security_manager_test
+} // namespace components
+} // namespace test
+#endif // SRC_COMPONENTS_INCLUDE_TEST_SECURITY_MANAGER_MOCK_SYSTEM_TIME_HANDLER_H
diff --git a/src/components/include/utils/data_accessor.h b/src/components/include/utils/data_accessor.h
index 9be28a638b..645886592c 100644
--- a/src/components/include/utils/data_accessor.h
+++ b/src/components/include/utils/data_accessor.h
@@ -32,6 +32,7 @@
#ifndef SRC_COMPONENTS_INCLUDE_UTILS_DATA_ACCESSOR_H_
#define SRC_COMPONENTS_INCLUDE_UTILS_DATA_ACCESSOR_H_
+#include <iostream>
#include "utils/lock.h"
#include "utils/shared_ptr.h"
@@ -39,11 +40,10 @@
template <class T>
class DataAccessor {
public:
- DataAccessor(const T& data, const sync_primitives::Lock& lock)
- : data_(data)
- , lock_(const_cast<sync_primitives::Lock&>(lock))
- , counter_(new uint32_t(0)) {
- lock_.Acquire();
+ DataAccessor(const T& data,
+ const std::shared_ptr<sync_primitives::Lock>& lock)
+ : data_(data), lock_(lock), counter_(new uint32_t(0)) {
+ lock_->Acquire();
}
DataAccessor(const DataAccessor<T>& other)
@@ -53,7 +53,7 @@ class DataAccessor {
~DataAccessor() {
if (0 == *counter_) {
- lock_.Release();
+ lock_->Release();
} else {
--(*counter_);
}
@@ -65,7 +65,8 @@ class DataAccessor {
private:
void* operator new(size_t size);
const T& data_;
- sync_primitives::Lock& lock_;
+ // Require that the lock lives at least as long as the DataAccessor
+ const std::shared_ptr<sync_primitives::Lock> lock_;
utils::SharedPtr<uint32_t> counter_;
};
diff --git a/src/components/include/utils/lock.h b/src/components/include/utils/lock.h
index e615a58f9d..081e651b13 100644
--- a/src/components/include/utils/lock.h
+++ b/src/components/include/utils/lock.h
Binary files differ
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index ab3933fc0f..f08709bb2b 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -371,6 +371,7 @@
<element name="LHPLUS_PHONEMES" />
<element name="PRE_RECORDED" />
<element name="SILENCE" />
+ <element name="FILE" />
</enum>
<enum name="VrCapabilities">
@@ -624,7 +625,10 @@
<description>The image field for the app icon (set by setAppIcon)</description>
</element>
<element name="graphic">
- <description>The image field for Show</description>
+ <description>The primary image field for Show</description>
+ </element>
+ <element name="secondaryGraphic">
+ <description>The secondary image field for Show</description>
</element>
<element name="showConstantTBTIcon">
<description>The primary image field for ShowConstantTBT</description>
@@ -726,6 +730,36 @@
</enum>
<!--IVI part-->
+<enum name="FuelType">
+ <element name="GASOLINE" />
+ <element name="DIESEL" />
+ <element name="CNG">
+ <description>
+ For vehicles using compressed natural gas.
+ </description>
+ </element>
+ <element name="LPG">
+ <description>
+ For vehicles using liquefied petroleum gas.
+ </description>
+ </element>
+ <element name="HYDROGEN">
+ <description>For FCEV (fuel cell electric vehicle).</description>
+ </element>
+ <element name="BATTERY">
+ <description>For BEV (Battery Electric Vehicle), PHEV (Plug-in Hybrid Electric Vehicle), solar vehicles and other vehicles which run on a battery.</description>
+ </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>
<element name="UNKNOWN" internal_name="CVS_UNKNOWN">
@@ -748,6 +782,33 @@
</element>
</enum>
+<enum name="TPMS">
+ <element name="UNKNOWN">
+ <description>If set the status of the tire is not known.</description>
+ </element>
+ <element name="SYSTEM_FAULT">
+ <description>TPMS does not function.</description>
+ </element>
+ <element name="SENSOR_FAULT">
+ <description>The sensor of the tire does not function.</description>
+ </element>
+ <element name="LOW">
+ <description>TPMS is reporting a low tire pressure for the tire.</description>
+ </element>
+ <element name="SYSTEM_ACTIVE">
+ <description>TPMS is active and the tire pressure is monitored.</description>
+ </element>
+ <element name="TRAIN">
+ <description>TPMS is reporting that the tire must be trained.</description>
+ </element>
+ <element name="TRAINING_COMPLETE">
+ <description>TPMS reports the training for the tire is completed.</description>
+ </element>
+ <element name="NOT_TRAINED">
+ <description>TPMS reports the tire is not trained.</description>
+ </element>
+</enum>
+
<enum name="PRNDL">
<description>The selected gear.</description>
<element name="PARK">
@@ -959,6 +1020,7 @@
<element name="VEHICLEDATA_FUELLEVEL_STATE" />
<element name="VEHICLEDATA_FUELCONSUMPTION" />
<element name="VEHICLEDATA_EXTERNTEMP" />
+ <element name="VEHICLEDATA_TURNSIGNAL" />
<element name="VEHICLEDATA_VIN" />
<element name="VEHICLEDATA_PRNDL" />
<element name="VEHICLEDATA_TIREPRESSURE" />
@@ -978,6 +1040,8 @@
<element name="VEHICLEDATA_ENGINETORQUE" />
<element name="VEHICLEDATA_ACCPEDAL" />
<element name="VEHICLEDATA_STEERINGWHEEL" />
+ <element name="VEHICLEDATA_FUELRANGE" />
+ <element name="VEHICLEDATA_ENGINEOILLIFE" />
</enum>
<enum name="WiperStatus">
@@ -1102,13 +1166,13 @@
</enum>
<enum name="RequestType">
- <description>Enumeration listing possible asynchronous requests.</description>
- <element name="HTTP" />
- <element name="FILE_RESUME" />
- <element name="AUTH_REQUEST" />
- <element name="AUTH_CHALLENGE" />
- <element name="AUTH_ACK" />
- <element name="PROPRIETARY" />
+ <description>Enumeration listing possible asynchronous requests.</description>
+ <element name="HTTP" />
+ <element name="FILE_RESUME" />
+ <element name="AUTH_REQUEST" />
+ <element name="AUTH_CHALLENGE" />
+ <element name="AUTH_ACK" />
+ <element name="PROPRIETARY" />
<element name="QUERY_APPS" />
<element name="LAUNCH_APP" />
<element name="LOCK_SCREEN_ICON_URL" />
@@ -1123,6 +1187,7 @@
<element name="EMERGENCY" />
<element name="MEDIA" />
<element name="FOTA" />
+ <element name="OEM_SPECIFIC"/>
</enum>
<enum name="ECallConfirmationStatus">
@@ -1821,6 +1886,9 @@
<param name="imageType" type="Common.ImageType" mandatory="true">
<description>Describes, whether it is a static or dynamic image.</description>
</param>
+ <param name="isTemplate" type="Boolean" mandatory="false">
+ <description>Optional value to specify whether it's a template image. A template image can be (re)colored by the HMI as needed by using an image pattern</description>
+ </param>
</struct>
<struct name="DeviceInfo">
@@ -1861,15 +1929,36 @@
</struct>
<struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to be spoken</description>
+ <description>A TTS chunk, that consists of text/phonemes to speak or the name of a file to play, and a TTS type (like text or SAPI)</description>
<param name="text" type="String" mandatory="true" maxlength="500">
- <description>The text or phonemes to be spoken.</description>
+ <description>The text or phonemes to be spoken, or the name of an audio file to play.</description>
</param>
<param name="type" type="Common.SpeechCapabilities" mandatory="true">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities.</description>
+ <description>Describes whether the TTS chunk is plain text, a specific phoneme set, or an audio file. See SpeechCapabilities.</description>
</param>
</struct>
+<struct name="RGBColor">
+ <param name="red" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="green" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="blue" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+</struct>
+
+<struct name="TemplateColorScheme">
+ <description>
+ A color scheme for all display layout templates.
+ </description>
+ <param name="primaryColor" type="Common.RGBColor" mandatory="false">
+ <description>The primary "accent" color</description>
+ </param>
+ <param name="secondaryColor" type="Common.RGBColor" mandatory="false">
+ <description>The secondary "accent" color</description>
+ </param>
+ <param name="backgroundColor" type="Common.RGBColor" mandatory="false">
+ <description>The color of the background</description>
+ </param>
+</struct>
+
<struct name="HMIApplication">
<description>Data type containing information about application needed by HMI.</description>
<param name="appName" type="String" maxlength="100" mandatory="true">
@@ -1927,6 +2016,16 @@
<description>If SDL omits this parameter - none RequestType is allowed for this app</description>
<description>(either this is a pre-registered app or such is dictated by policies).</description>
</param>
+ <param name="requestSubType" type="String" maxlength="100" minsize="0" maxsize="100" array="true" mandatory="false">
+ <description>
+ The list of SystemRequest's requestSubTypes allowed by policies for the named application.
+ If the app sends a requestSubType which is not specified in this list, then that request should be rejected.
+ An empty array signifies that any value of requestSubType is allowed for this app.
+ If this parameter is omitted, then a request with any value of requestSubType is now allowed for this app
+ </description>
+ </param>
+ <param name="dayColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
+ <param name="nightColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
</struct>
<struct name="MenuParams">
@@ -2059,6 +2158,9 @@
<param name="displayType" type="Common.DisplayType" mandatory="true">
<description>The type of the display. See DisplayType</description>
</param>
+ <param name="displayName" type="String" mandatory="false">
+ <description>The name of the display the app is connected to.</description>
+ </param>
<param name="textFields" type="Common.TextField" minsize="0" maxsize="100" array="true" mandatory="true">
<description>A set of all fields for text displaying supported by HU. See TextFieldName.</description>
<description>If there are no textfields supported, the empty array must be returned</description>
@@ -2191,6 +2293,22 @@
</struct>
<!--IVI part-->
+<enum name="TurnSignal">
+ <description>Enumeration that describes the status of the turn light indicator.</description>
+ <element name="OFF">
+ <description>Turn signal is OFF</description>
+ </element>
+ <element name="LEFT">
+ <description>Left turn signal is on</description>
+ </element>
+ <element name="RIGHT">
+ <description>Right turn signal is on</description>
+ </element>
+ <element name="BOTH">
+ <description>Both signals (left and right) are on.</description>
+ </element>
+</enum>
+
<struct name="GPSData">
<description>Struct with the GPS data.</description>
<param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="false">
@@ -2253,7 +2371,13 @@
<struct name="SingleTireStatus">
<param name="status" type="Common.ComponentVolumeStatus" mandatory="true">
<description>The status of component volume. See ComponentVolumeStatus.</description>
-</param>
+ </param>
+ <param name="tpms" type="TPMS" mandatory="false">
+ <description>The status of TPMS according to the particular tire.</description>
+ </param>
+ <param name="pressure" type="Float" mandatory="false" minvalue="0" maxvalue="2000">
+ <description>The pressure value of the particular tire in kilo pascal.</description>
+ </param>
</struct>
<struct name="DIDResult">
@@ -2747,6 +2871,17 @@
</interface>
<interface name="BasicCommunication" version="1.2.1" date="2017-08-02">
+ <function name="GetSystemTime" messagetype="request">
+ <description>Request from SDL to HMI to obtain current UTC time.</description>
+ </function>
+ <function name="GetSystemTime" messagetype="response">
+ <param name="systemTime" type="Common.DateTime" mandatory="true">
+ <description>Current UTC system time</description>
+ </param>
+ </function>
+ <function name="OnSystemTimeReady" messagetype="notification">
+ <description>HMI must notify SDL about readiness to provide system time.</description>
+ </function>
<function name="OnReady" messagetype="notification">
<description>HMI must notify SDL about its readiness to start communication. In fact, this has to be the first message between SDL and HMI.</description>
</function>
@@ -2928,6 +3063,11 @@
<param name="requestType" type="Common.RequestType" mandatory="true">
<description>The type of system request.</description>
</param>
+ <param name="requestSubType" type="String" maxlength="255" mandatory="false">
+ <description>
+ This parameter is filled for supporting OEM proprietary data exchanges.
+ </description>
+ </param>
<param name="url" type="String" maxlength="1000" minlength="1" mandatory="false">
<description>Optional array of URL(s) for HTTP requests.</description>
</param>
@@ -2954,6 +3094,11 @@
<param name="requestType" type="Common.RequestType" mandatory="true">
<description>The type of system request.</description>
</param>
+ <param name="requestSubType" type="String" maxlength="255" mandatory="false">
+ <description>
+ This parameter is filled for supporting OEM proprietary data exchanges.
+ </description>
+ </param>
<param name="fileName" type="String" maxlength="255" minlength="1" mandatory="true">
<description>The path to file.</description>
</param>
@@ -3232,10 +3377,10 @@
<description>Method is invoked at system start-up. SDL requests the information about all supported hardware and their capabilities</description>
</function>
<function name="GetCapabilities" messagetype="response">
- <param name="speechCapabilities" type="Common.SpeechCapabilities" minsize="1" maxsize="5" array="true" mandatory="true">
+ <param name="speechCapabilities" type="Common.SpeechCapabilities" minsize="1" maxsize="100" array="true" mandatory="true">
<description>See SpeechCapabilities</description>
</param>
- <param name="prerecordedSpeechCapabilities" type="Common.PrerecordedSpeech" minsize="1" maxsize="5" array="true" mandatory="true">
+ <param name="prerecordedSpeechCapabilities" type="Common.PrerecordedSpeech" minsize="1" maxsize="100" array="true" mandatory="true">
<description>See PrerecordedSpeech</description>
</param>
</function>
@@ -3455,6 +3600,9 @@
<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>
</param>
+ <param name="menuIcon" type="Common.Image" mandatory="false">
+ <description>The image field for AddSubMenu</description>
+ </param>
<param name="appID" type="Integer" mandatory="true">
<description>ID of application that requested this RPC.</description>
</param>
@@ -3670,6 +3818,8 @@
<param name="appID" type="Integer" mandatory="true">
<description>ID of application related to this RPC.</description>
</param>
+ <param name="dayColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
+ <param name="nightColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
</function>
<function name="SetDisplayLayout" messagetype="response">
<param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="false">
@@ -4195,9 +4345,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Boolean" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4234,6 +4390,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4271,9 +4430,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius.</description>
</param>
+ <param name="turnSignal" type="Common.VehicleDataResult" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="Common.VehicleDataResult" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4310,6 +4475,9 @@
<param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4353,9 +4521,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius.</description>
</param>
+ <param name="turnSignal" type="Boolean" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4392,6 +4566,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4429,9 +4606,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Common.VehicleDataResult" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="Common.VehicleDataResult" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4468,6 +4651,9 @@
<param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4506,9 +4692,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Boolean" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="vin" type="Boolean" mandatory="false">
<description>Vehicle identification number</description>
</param>
@@ -4548,6 +4740,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -4583,9 +4778,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Common.TurnSignal" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="vin" type="String" maxlength="17" mandatory="false">
<description>Vehicle identification number</description>
</param>
@@ -4625,6 +4826,9 @@
<param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <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="eCallInfo" type="Common.ECallInfo" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -4661,9 +4865,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Common.TurnSignal" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="vin" type="String" maxlength="17" mandatory="false">
<description>Vehicle identification number.</description>
</param>
@@ -4838,6 +5048,14 @@
If SDL omits this parameter - nothing is changed for RequestType in the policies
</description>
</param>
+ <param name="requestSubType" type="String" maxlength="100" minsize="0" maxsize="100" array="true" mandatory="false">
+ <description>
+ The list of SystemRequest's requestSubTypes allowed by policies for the named application.
+ If the app sends a requestSubType which is not specified in this list, then that request should be rejected.
+ An empty array signifies that any value of requestSubType is allowed for this app.
+ If this parameter is omitted, then a request with any value of requestSubType is now allowed for this app
+ </description>
+ </param>
</function>
<function name="OnSDLConsentNeeded" messagetype="notification">
@@ -4925,7 +5143,7 @@
<param name="moduleType" type="Common.ModuleType" mandatory="true" >
<description>The module data to retrieve from the vehicle for that type</description>
</param>
- <param name="subscribe" type="Boolean" mandatory="false" defvalue="false">
+ <param name="subscribe" type="Boolean" mandatory="false">
<description>If subscribe is true, the head unit will send onInteriorVehicleData notifications for the module type</description>
</param>
<param name="appID" type="Integer" mandatory="true">
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index a1c64aecda..4e4b096c1d 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -135,6 +135,9 @@
<element name="READ_ONLY">
<description>The value being set is read only</description>
</element>
+ <element name="CORRUPTED_DATA">
+ <description>The data sent failed to pass CRC check in receiver end</description>
+ </element>
</enum>
<enum name="ButtonPressMode">
@@ -358,6 +361,12 @@
<element name="ATTENUATED" />
<element name="NOT_AUDIBLE" />
</enum>
+
+ <enum name="VideoStreamingState">
+ <description>Enumeration that describes possible states of video streaming. </description>
+ <element name="STREAMABLE" />
+ <element name="NOT_STREAMABLE" />
+ </enum>
<enum name="SystemAction">
<description>Enumeration that describes system actions that can be triggered.</description>
@@ -438,6 +447,7 @@
<element name="LHPLUS_PHONEMES" />
<element name="PRE_RECORDED" />
<element name="SILENCE" />
+ <element name="FILE" />
</enum>
<enum name="VrCapabilities">
@@ -494,6 +504,7 @@
<element name="VEHICLEDATA_FUELLEVEL_STATE" />
<element name="VEHICLEDATA_FUELCONSUMPTION" />
<element name="VEHICLEDATA_EXTERNTEMP" />
+ <element name="VEHICLEDATA_TURNSIGNAL" />
<element name="VEHICLEDATA_VIN" />
<element name="VEHICLEDATA_PRNDL" />
<element name="VEHICLEDATA_TIREPRESSURE" />
@@ -513,6 +524,8 @@
<element name="VEHICLEDATA_ENGINETORQUE" />
<element name="VEHICLEDATA_ACCPEDAL" />
<element name="VEHICLEDATA_STEERINGWHEEL" />
+ <element name="VEHICLEDATA_FUELRANGE" />
+ <element name="VEHICLEDATA_ENGINEOILLIFE" />
</enum>
<enum name="ButtonName">
@@ -781,7 +794,11 @@
</element>
<element name="graphic">
- <description>The image field for Show</description>
+ <description>The primary image field for Show</description>
+ </element>
+
+ <element name="secondaryGraphic">
+ <description>The secondary image field for Show</description>
</element>
<element name="showConstantTBTIcon">
@@ -899,6 +916,9 @@
<param name="imageType" type="ImageType" mandatory="true">
<description>Describes, whether it is a static or dynamic image.</description>
</param>
+ <param name="isTemplate" type="Boolean" mandatory="false">
+ <description>Optional value to specify whether it's a template image. A template image can be (re)colored by the HMI as needed by using an image pattern</description>
+ </param>
</struct>
<struct name="SoftButton">
@@ -1082,11 +1102,74 @@
<element name="NOT_SUPPORTED" internal_name="CVS_NOT_SUPPORTED">
</element>
</enum>
+
+ <enum name="TPMS">
+ <element name="UNKNOWN">
+ <description>If set the status of the tire is not known.</description>
+ </element>
+ <element name="SYSTEM_FAULT">
+ <description>TPMS does not function.</description>
+ </element>
+ <element name="SENSOR_FAULT">
+ <description>The sensor of the tire does not function.</description>
+ </element>
+ <element name="LOW">
+ <description>TPMS is reporting a low tire pressure for the tire.</description>
+ </element>
+ <element name="SYSTEM_ACTIVE">
+ <description>TPMS is active and the tire pressure is monitored.</description>
+ </element>
+ <element name="TRAIN">
+ <description>TPMS is reporting that the tire must be trained.</description>
+ </element>
+ <element name="TRAINING_COMPLETE">
+ <description>TPMS reports the training for the tire is completed.</description>
+ </element>
+ <element name="NOT_TRAINED">
+ <description>TPMS reports the tire is not trained.</description>
+ </element>
+ </enum>
+ <enum name="FuelType">
+ <element name="GASOLINE" />
+ <element name="DIESEL" />
+ <element name="CNG">
+ <description>
+ For vehicles using compressed natural gas.
+ </description>
+ </element>
+ <element name="LPG">
+ <description>
+ For vehicles using liquefied petroleum gas.
+ </description>
+ </element>
+ <element name="HYDROGEN">
+ <description>For FCEV (fuel cell electric vehicle).</description>
+ </element>
+ <element name="BATTERY">
+ <description>For BEV (Battery Electric Vehicle), PHEV (Plug-in Hybrid Electric Vehicle), solar vehicles and other vehicles which run on a battery.</description>
+ </element>
+ </enum>
+
+ <struct name="FuelRange">
+ <param name="type" type="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>
+
<struct name="SingleTireStatus">
<param name="status" type="ComponentVolumeStatus" mandatory="true">
<description>See ComponentVolumeStatus.</description>
</param>
+ <param name="tpms" type="TPMS" mandatory="false">
+ <description>The status of TPMS according to the particular tire.</description>
+ </param>
+ <param name="pressure" type="Float" mandatory="false" minvalue="0" maxvalue="2000">
+ <description>The pressure value of the particular tire in kilo pascal.</description>
+ </param>
</struct>
<enum name="WarningLightStatus">
@@ -1682,6 +1765,23 @@
</param>
</struct>
+
+ <enum name="TurnSignal">
+ <description>Enumeration that describes the status of the turn light indicator.</description>
+ <element name="OFF">
+ <description>Turn signal is OFF</description>
+ </element>
+ <element name="LEFT">
+ <description>Left turn signal is on</description>
+ </element>
+ <element name="RIGHT">
+ <description>Right turn signal is on</description>
+ </element>
+ <element name="BOTH">
+ <description>Both signals (left and right) are on.</description>
+ </element>
+ </enum>
+
<struct name="GPSData">
<description>Struct with the GPS data.</description>
<param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="true">
@@ -1904,6 +2004,9 @@
<param name="displayType" type="DisplayType" mandatory="true">
<description>The type of the display. See DisplayType</description>
</param>
+ <param name="displayName" type="String" mandatory="false">
+ <description>The name of the display the app is connected to.</description>
+ </param>
<param name="textFields" type="TextField" minsize="1" maxsize="100" array="true" mandatory="true">
<description>A set of all fields that support text data. See TextField</description>
</param>
@@ -2019,15 +2122,15 @@
</param>
</struct>
<struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to speak and the type (like text or SAPI)</description>
+ <description>A TTS chunk, that consists of text/phonemes to speak or the name of a file to play, and a TTS type (like text or SAPI)</description>
<param name="text" minlength="0" maxlength="500" type="String" mandatory="true">
<description>
- The text or phonemes to speak.
+ The text or phonemes to speak, or the name of the audio file to play.
May not be empty.
</description>
</param>
<param name="type" type="SpeechCapabilities" mandatory="true">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities</description>
+ <description>Describes whether the TTS chunk is plain text, a specific phoneme set, or an audio file. See SpeechCapabilities</description>
</param>
</struct>
<struct name="Turn">
@@ -2144,6 +2247,7 @@
<element name="EMERGENCY" />
<element name="MEDIA" />
<element name="FOTA" />
+ <element name="OEM_SPECIFIC" />
</enum>
<enum name="AppHMIType">
<description>Enumeration listing possible app types.</description>
@@ -2887,7 +2991,27 @@
<description>The position of the haptic rectangle to be highlighted. The center of this rectangle will be "touched" when a press occurs.</description>
</param>
</struct>
-
+
+ <struct name="RGBColor">
+ <param name="red" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="green" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="blue" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ </struct>
+
+ <struct name="TemplateColorScheme">
+ <description>
+ A color scheme for all display layout templates.
+ </description>
+ <param name="primaryColor" type="RGBColor" mandatory="false">
+ <description>The primary "accent" color</description>
+ </param>
+ <param name="secondaryColor" type="RGBColor" mandatory="false">
+ <description>The secondary "accent" color</description>
+ </param>
+ <param name="backgroundColor" type="RGBColor" mandatory="false">
+ <description>The color of the background</description>
+ </param>
+ </struct>
<!-- Requests/Responses -->
<function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="request">
@@ -2988,6 +3112,10 @@
See AppInfo.
</description>
</param>
+
+ <param name="dayColorScheme" type="TemplateColorScheme" mandatory="false"/>
+
+ <param name="nightColorScheme" type="TemplateColorScheme" mandatory="false"/>
</function>
<function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="response">
@@ -3090,6 +3218,10 @@
<param name="systemSoftwareVersion" type="String" maxlength="100" mandatory="false" platform="documentation">
<description>The software version of the system that implements the SmartDeviceLink core.</description>
</param>
+ <param name="iconResumed" type="Boolean" mandatory="true">
+ <description>Existence of apps icon at system. If true, apps icon
+ was resumed at system. If false, apps icon is not resumed at system</description>
+ </param>
</function>
<function name="UnregisterAppInterface" functionID="UnregisterAppInterfaceID" messagetype="request">
@@ -3339,6 +3471,9 @@
<param name="menuName" maxlength="500" type="String" mandatory="true">
<description>Text to show in the menu for this sub menu.</description>
</param>
+ <param name="menuIcon" type="Image" mandatory="false">
+ <description>The image field for AddSubMenu</description>
+ </param>
</function>
<function name="AddSubMenu" functionID="AddSubMenuID" messagetype="response">
@@ -4056,9 +4191,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Boolean" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4095,6 +4236,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4159,9 +4303,15 @@
<param name="instantFuelConsumption" type="VehicleDataResult" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
+ <param name="fuelRange" type="VehicleDataResult" mandatory="false">
+ <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ </param>
<param name="externalTemperature" type="VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius.</description>
</param>
+ <param name="turnSignal" type="VehicleDataResult" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="VehicleDataResult" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4198,6 +4348,9 @@
<param name="steeringWheelAngle" type="VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
@@ -4240,9 +4393,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius.</description>
</param>
+ <param name="turnSignal" type="Boolean" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4279,6 +4438,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4341,9 +4503,15 @@
<param name="instantFuelConsumption" type="VehicleDataResult" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
+ <param name="fuelRange" type="VehicleDataResult" mandatory="false">
+ <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ </param>
<param name="externalTemperature" type="VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="VehicleDataResult" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="prndl" type="VehicleDataResult" mandatory="false">
<description>See PRNDL</description>
</param>
@@ -4380,6 +4548,9 @@
<param name="steeringWheelAngle" type="VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
@@ -4422,9 +4593,15 @@
<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>
+ </param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="Boolean" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="vin" type="Boolean" mandatory="false">
<description>Vehicle identification number</description>
</param>
@@ -4464,6 +4641,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4527,9 +4707,15 @@
<param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
+ <param name="fuelRange" type="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>
+ </param>
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="TurnSignal" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="vin" type="String" maxlength="17" mandatory="false">
<description>Vehicle identification number</description>
</param>
@@ -4569,6 +4755,9 @@
<param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
@@ -5073,6 +5262,9 @@
If offset is set to 0, then length is the total length of the file to be downloaded
</description>
</param>
+ <param name="crc" type="Integer" minvalue="0" maxvalue="4294967295" mandatory="false">
+ <description> Additional CRC32 checksum to protect data integrity up to 512 Mbits . </description>
+ </param>
</function>
<function name="PutFile" functionID="PutFileID" messagetype="response">
@@ -5092,6 +5284,7 @@
<element name="GENERIC_ERROR"/>
<element name="REJECTED"/>
<element name="UNSUPPORTED_REQUEST"/>
+ <element name="CORRUPTED_DATA"/>
</param>
<param name="spaceAvailable" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
@@ -5245,6 +5438,9 @@
</description>
</param>
+ <param name="dayColorScheme" type="TemplateColorScheme" mandatory="false"/>
+
+ <param name="nightColorScheme" type="TemplateColorScheme" mandatory="false"/>
</function>
<function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="response">
@@ -5295,6 +5491,11 @@
Note that Proprietary requests should forward the binary data to the known proprietary module on the system.
</description>
</param>
+ <param name="requestSubType" type="String" maxlength="255" mandatory="false">
+ <description>
+ This parameter is filled for supporting OEM proprietary data exchanges.
+ </description>
+ </param>
<param name="fileName" type="String" maxlength="255" mandatory="false">
<description>
Filename of HTTP data to store in predefined system staging area.
@@ -5471,7 +5672,7 @@
In the future, this should be the Identification of a module.
</description>
</param>
- <param name="subscribe" type="Boolean" mandatory="false" defvalue="false">
+ <param name="subscribe" type="Boolean" mandatory="false">
<description>
If subscribe is true, the head unit will register onInteriorVehicleData notifications for the requested moduelType.
If subscribe is false, the head unit will unregister onInteriorVehicleData notifications for the requested moduelType.
@@ -5695,6 +5896,9 @@
<param name="systemContext" type="SystemContext" mandatory="true">
<description>See SystemContext</description>
</param>
+ <param name="videoStreamingState" type="VideoStreamingState" mandatory="true">
+ <description>See VideoStreamingState. If it is NOT_STREAMABLE, the app must stop streaming video to SDL.</description>
+ </param>
</function>
<function name="OnAppInterfaceUnregistered" functionID="OnAppInterfaceUnregisteredID" messagetype="notification">
@@ -5745,9 +5949,15 @@
<param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
+ <param name="fuelRange" type="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>
+ </param>
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="turnSignal" type="TurnSignal" mandatory="false">
+ <description>See TurnSignal</description>
+ </param>
<param name="vin" type="String" maxlength="17" mandatory="false">
<description>Vehicle identification number.</description>
</param>
@@ -5787,6 +5997,9 @@
<param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Vehicle Data -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
@@ -5888,6 +6101,11 @@
<param name="requestType" type="RequestType" mandatory="true">
<description>The type of system request.</description>
</param>
+ <param name="requestSubType" type="String" maxlength="255" mandatory="false">
+ <description>
+ This parameter is filled for supporting OEM proprietary data exchanges.
+ </description>
+ </param>
<param name="url" type="String" maxlength="1000" mandatory="false">
<description>
Optional URL for HTTP requests.
diff --git a/src/components/media_manager/CMakeLists.txt b/src/components/media_manager/CMakeLists.txt
index 4913102c9c..9010d15dc0 100644
--- a/src/components/media_manager/CMakeLists.txt
+++ b/src/components/media_manager/CMakeLists.txt
@@ -35,7 +35,6 @@ include_directories(
${COMPONENTS_DIR}/media_manager/include/
${COMPONENTS_DIR}/media_manager/include/audio/
${COMPONENTS_DIR}/media_manager/include/video/
- ${COMPONENTS_DIR}/remote_control/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/connection_handler/include/
@@ -43,7 +42,6 @@ include_directories(
${COMPONENTS_DIR}/smart_objects/include/
${COMPONENTS_DIR}/policy/include/
${COMPONENTS_DIR}/rpc_base/include/
- ${COMPONENTS_DIR}/functional_module/include/
${COMPONENTS_DIR}/hmi_message_handler/include/
${COMPONENTS_DIR}/formatters/include/
${COMPONENTS_DIR}/config_profile/include/
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 3645a9cb81..a246e468b7 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
@@ -62,6 +62,12 @@ typedef enum {
typedef enum { AT_INVALID = -1, AT_PCM = 0 } AudioType;
+// AudioPassThru
+typedef struct {
+ std::vector<uint8_t> binary_data;
+ int32_t session_key;
+} AudioData;
+
/*
* @brief AudioStreamSenderThread class used to read binary data written from
* microphone
@@ -104,6 +110,18 @@ class AudioStreamSenderThread : public threads::ThreadDelegate {
*/
bool SendEndAudioPassThru();
+ /**
+ * @brief Creates AudioPassThru data chunk and inserts it
+ * to audio_pass_thru_messages_
+ *
+ * @param session_key Id of application for which
+ * audio pass thru should be sent
+ *
+ * @param binary_data AudioPassThru data chunk
+ */
+ void SendAudioPassThroughNotification(uint32_t session_key,
+ std::vector<uint8_t>& binary_data);
+
void sendAudioChunkToMobile();
bool getShouldBeStopped();
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 9b0057dfe8..1aacbe4c28 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
@@ -38,8 +38,9 @@
#include <string>
#include <string.h>
#include "application_manager/application_manager.h"
-#include "application_manager/mobile_command_factory.h"
#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "application_manager/commands/command.h"
#include "smart_objects/smart_object.h"
#include "interfaces/MOBILE_API.h"
#include "utils/file_system.h"
@@ -51,6 +52,7 @@
namespace media_manager {
using sync_primitives::AutoLock;
+namespace strings = application_manager::strings;
#ifdef EXTENDED_MEDIA_MODE
const int32_t AudioStreamSenderThread::kAudioPassThruTimeout = 50;
@@ -118,7 +120,7 @@ void AudioStreamSenderThread::sendAudioChunkToMobile() {
offset_ = offset_ + to - from;
std::vector<uint8_t> data(from, to);
- application_manager_.SendAudioPassThroughNotification(session_key_, data);
+ SendAudioPassThroughNotification(session_key_, data);
binaryData.clear();
}
#if !defined(EXTENDED_MEDIA_MODE)
@@ -127,6 +129,50 @@ void AudioStreamSenderThread::sendAudioChunkToMobile() {
#endif
}
+void AudioStreamSenderThread::SendAudioPassThroughNotification(
+ uint32_t session_key, std::vector<uint8_t>& binary_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!application_manager_.is_audio_pass_thru_active()) {
+ LOG4CXX_ERROR(logger_,
+ "Trying to send PassThroughNotification"
+ " when PassThrough is not active");
+ return;
+ }
+
+ AudioData data;
+ data.session_key = session_key;
+ data.binary_data = binary_data;
+
+ smart_objects::SmartObjectSPtr on_audio_pass =
+ new smart_objects::SmartObject();
+
+ if (!on_audio_pass) {
+ LOG4CXX_ERROR(logger_, "OnAudioPassThru NULL pointer");
+ return;
+ }
+
+ LOG4CXX_DEBUG(logger_, "Fill smart object");
+
+ (*on_audio_pass)[strings::params][strings::message_type] =
+ application_manager::MessageType::kNotification;
+
+ (*on_audio_pass)[strings::params][strings::connection_key] =
+ static_cast<int32_t>(data.session_key);
+ (*on_audio_pass)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnAudioPassThruID;
+
+ LOG4CXX_DEBUG(logger_, "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");
+ application_manager_.GetRPCService().ManageMobileCommand(
+ on_audio_pass, application_manager::commands::Command::SOURCE_SDL);
+}
+
bool AudioStreamSenderThread::getShouldBeStopped() {
AutoLock auto_lock(shouldBeStoped_lock_);
diff --git a/src/components/policy/policy_external/CMakeLists.txt b/src/components/policy/policy_external/CMakeLists.txt
index 8d04f20470..c66313240f 100644
--- a/src/components/policy/policy_external/CMakeLists.txt
+++ b/src/components/policy/policy_external/CMakeLists.txt
@@ -55,13 +55,10 @@ set(SOURCES
${POLICY_PATH}/src/update_status_manager.cc
${POLICY_PATH}/src/status.cc
${POLICY_PATH}/src/cache_manager.cc
+ ${POLICY_PATH}/src/access_remote_impl.cc
${COMPONENTS_DIR}/rpc_base/src/rpc_base/rpc_base.cc
)
-if (REMOTE_CONTROL)
- list(APPEND SOURCES ${POLICY_PATH}/src/access_remote_impl.cc)
-endif()
-
list(APPEND SOURCES
${POLICY_PATH}/src/sql_pt_ext_queries.cc
${POLICY_PATH}/src/sql_pt_ext_representation.cc
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 bda456c90a..f41ddb14cd 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager.h
@@ -84,6 +84,22 @@ class CacheManager : public CacheManagerInterface {
CheckPermissionResult& result);
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Returns true if Policy Table was not updated yet
* from preloaded pt file.
*/
@@ -642,8 +658,18 @@ class CacheManager : public CacheManagerInterface {
* @param policy_app_id Unique application id
* @param request_types Request types of application
*/
- void GetAppRequestTypes(const std::string& policy_app_id,
- std::vector<std::string>& request_types) const;
+ void GetAppRequestTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_types) const OVERRIDE;
+
+ /**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @param request_subtypes Request subtypes of application to be filled
+ */
+ void GetAppRequestSubTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes) const OVERRIDE;
virtual const MetaInfo GetMetaInfo() const OVERRIDE;
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 b9e9f73646..1d74780f19 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
@@ -47,6 +47,16 @@ namespace policy_table = rpc::policy_table_interface_base;
namespace policy {
+namespace RequestType {
+// Describes available RequestType states in policy table
+enum class State { UNAVAILABLE = 0, AVAILABLE, EMPTY, OMITTED };
+} // namespace RequestType
+
+namespace RequestSubType {
+// Describes available RequestSubType states in policy table
+enum class State { UNAVAILABLE = 0, AVAILABLE, EMPTY, OMITTED };
+} // namespace RequestSubType
+
class CacheManagerInterface {
public:
virtual ~CacheManagerInterface() {}
@@ -79,6 +89,21 @@ class CacheManagerInterface {
const PTString& hmi_level,
const PTString& rpc,
CheckPermissionResult& result) = 0;
+ /**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ virtual RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ virtual RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const = 0;
/**
* @brief Returns true if Policy Table was not updated yet
@@ -706,6 +731,15 @@ class CacheManagerInterface {
std::vector<std::string>& request_types) const = 0;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @param request_subtypes Request subtypes of application to be filled
+ */
+ virtual void GetAppRequestSubTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes) const = 0;
+
+ /**
* @brief Gets meta information
* @return meta information
*/
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 6945f45b45..e399b44719 100644
--- a/src/components/policy/policy_external/include/policy/policy_helper.h
+++ b/src/components/policy/policy_external/include/policy/policy_helper.h
@@ -192,6 +192,14 @@ struct CheckAppPolicy {
*/
bool IsRequestTypeChanged(const AppPoliciesValueType& app_policy) const;
+ /**
+ * @brief Checks whether App RequestSubTypes have been changed by
+ * udpated
+ * @param app_policy Reference to updated application policy
+ * @return True if changed, otherwise - false
+ */
+ bool IsRequestSubTypeChanged(const AppPoliciesValueType& app_policy) const;
+
private:
PolicyManagerImpl* pm_;
const utils::SharedPtr<policy_table::Table> update_;
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 97a2e60055..67756c053d 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
@@ -42,11 +42,8 @@
#include "policy/update_status_manager.h"
#include "policy/policy_table/functions.h"
#include "policy/usage_statistics/statistics_manager.h"
-
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
#include "policy/access_remote_impl.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy_table = rpc::policy_table_interface_base;
@@ -454,7 +451,6 @@ class PolicyManagerImpl : public PolicyManager {
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) OVERRIDE;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Assigns new HMI types for specified application
* @param application_id Unique application id
@@ -489,7 +485,6 @@ class PolicyManagerImpl : public PolicyManager {
* @param application_id Unique id of application
*/
void OnPrimaryGroupsChanged(const std::string& application_id);
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Removes consent for application functional group
@@ -538,6 +533,22 @@ class PolicyManagerImpl : public PolicyManager {
void OnAppsSearchCompleted(const bool trigger_ptu) OVERRIDE;
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Gets request types for application
* @param policy_app_id Unique application id
* @return request types of application
@@ -546,6 +557,14 @@ class PolicyManagerImpl : public PolicyManager {
const std::string policy_app_id) const OVERRIDE;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @return request subtypes of application
+ */
+ const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Get information about vehicle
* @return vehicle information
*/
@@ -844,7 +863,6 @@ class PolicyManagerImpl : public PolicyManager {
bool IsPTValid(utils::SharedPtr<policy_table::Table> policy_table,
policy_table::PolicyTableType type) const;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Get resulting RPCs permissions for application which started on
* specific device
@@ -881,7 +899,6 @@ class PolicyManagerImpl : public PolicyManager {
*/
bool GetModuleTypes(const std::string& policy_app_id,
std::vector<std::string>* modules) const OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Notify application about its permissions changes by preparing and
@@ -997,12 +1014,10 @@ class PolicyManagerImpl : public PolicyManager {
* @brief pointer to CacheManagerInterface instance for getting policy data
*/
CacheManagerInterfaceSPtr cache_;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief pointer to AccessRemote instance for working with RC applications
*/
utils::SharedPtr<AccessRemote> access_remote_;
-#endif
/**
* @brief lock guard for protecting applications list access
diff --git a/src/components/policy/policy_external/include/policy/policy_table/enums.h b/src/components/policy/policy_external/include/policy/policy_table/enums.h
index 4f8ae5c98d..2804166f17 100644
--- a/src/components/policy/policy_external/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_external/include/policy/policy_table/enums.h
@@ -66,10 +66,12 @@ enum Parameter {
P_SPEED,
P_ENGINETORQUE,
P_EXTERNALTEMPERATURE,
+ P_TURNSIGNAL,
P_FUELLEVEL,
P_FUELLEVEL_STATE,
P_HEADLAMPSTATUS,
P_INSTANTFUELCONSUMPTION,
+ P_FUELRANGE,
P_ODOMETER,
P_TIREPRESSURE,
P_WIPERSTATUS,
@@ -80,6 +82,7 @@ enum Parameter {
P_PRNDL,
P_RPM,
P_STEERINGWHEELANGLE,
+ P_ENGINEOILLIFE,
P_MYKEY,
P_AIRBAGSTATUS,
P_BODYINFORMATION,
@@ -88,7 +91,6 @@ enum Parameter {
P_EMERGENCYEVENT,
P_ECALLINFO,
P_ABS_STATE,
- P_TURN_SIGNAL,
P_FUEL_RANGE,
P_TIRE_PRESSURE_VALUE,
P_TPMS,
@@ -147,7 +149,9 @@ enum RequestType {
RT_VEHICLE_DIAGNOSTICS,
RT_EMERGENCY,
RT_MEDIA,
- RT_FOTA
+ RT_FOTA,
+ RT_OEM_SPECIFIC,
+ RT_EMPTY // Added to allow empty Request Types handling
};
bool IsValidEnum(RequestType val);
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 53f5a35b99..b062fa0966 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
@@ -78,7 +78,7 @@ typedef Map<URL, 1, 255> URLList;
typedef Map<URLList, 1, 255> ServiceEndpoints;
typedef uint8_t NumberOfNotificationsType;
-typedef Map<Integer<NumberOfNotificationsType, 0, 255>, 0, 6>
+typedef Map<Integer<NumberOfNotificationsType, 0, 255>, 0, 7>
NumberOfNotificationsPerMinute;
typedef Array<Integer<uint16_t, 1, 1000>, 0, 5> SecondsBetweenRetries;
@@ -102,11 +102,11 @@ typedef Map<DeviceParams, 0, 255> DeviceData;
typedef Array<Enum<RequestType>, 0, 255> RequestsTypeArray;
-#ifdef SDL_REMOTE_CONTROL
+typedef Strings RequestSubTypes;
+
typedef Map<Strings, 0, 255> RemoteRpcs;
typedef Map<RemoteRpcs, 0, 255> AccessModules;
typedef Array<Enum<ModuleType>, 0, 255> ModuleTypes;
-#endif // SDL_REMOTE_CONTROL
typedef AppHMIType AppHmiType;
typedef std::vector<AppHMIType> AppHmiTypes;
@@ -173,11 +173,10 @@ struct ApplicationParams : PolicyBase {
Optional<Strings> nicknames;
Optional<AppHMITypes> AppHMIType;
Optional<RequestTypes> RequestType;
+ Optional<RequestSubTypes> RequestSubType;
Optional<Integer<uint16_t, 0, 65225> > memory_kb;
Optional<Integer<uint32_t, 0, UINT_MAX> > heart_beat_timeout_ms;
-#ifdef SDL_REMOTE_CONTROL
mutable Optional<ModuleTypes> moduleType;
-#endif // SDL_REMOTE_CONTROL
public:
ApplicationParams();
@@ -197,9 +196,7 @@ struct ApplicationParams : PolicyBase {
private:
bool Validate() const;
-#ifdef SDL_REMOTE_CONTROL
bool ValidateModuleTypes() const;
-#endif // SDL_REMOTE_CONTROL
};
struct ApplicationPoliciesSection : CompositeType {
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 91518f8f6e..401a5dcb9f 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
@@ -26,10 +26,12 @@
<element name="speed" />
<element name="engineTorque" />
<element name="externalTemperature" />
+ <element name="turnSignal" />
<element name="fuelLevel" />
<element name="fuelLevel_State" />
<element name="headLampStatus" />
<element name="instantFuelConsumption" />
+ <element name="fuelRange" />
<element name="odometer" />
<element name="tirePressure" />
<element name="wiperStatus" />
@@ -40,6 +42,7 @@
<element name="prndl" />
<element name="rpm" />
<element name="steeringWheelAngle" />
+ <element name="engineOilLife" />
<element name="myKey" />
<element name="airbagStatus" />
<element name="bodyInformation" />
@@ -128,7 +131,7 @@
minsize="1" maxsize="255" />
<typedef name="NumberOfNotificationsPerMinute" type="Integer"
- map="true" maxsize="6" minvalue="0" maxvalue="255" />
+ map="true" maxsize="7" minvalue="0" maxvalue="255" />
<typedef name="SecondsBetweenRetries" type="Integer" array="true"
maxsize="10" minvalue="1" maxvalue="1000" />
diff --git a/src/components/policy/policy_external/include/policy/policy_types.h b/src/components/policy/policy_external/include/policy/policy_types.h
index 232191cfea..9682b3d58d 100644
--- a/src/components/policy/policy_external/include/policy/policy_types.h
+++ b/src/components/policy/policy_external/include/policy/policy_types.h
@@ -267,7 +267,8 @@ struct AppPermissions {
, appRevoked(false)
, appPermissionsConsentNeeded(false)
, appUnauthorized(false)
- , requestTypeChanged(false) {}
+ , requestTypeChanged(false)
+ , requestSubTypeChanged(false) {}
std::string application_id;
bool isAppPermissionsRevoked;
@@ -280,6 +281,8 @@ struct AppPermissions {
DeviceParams deviceInfo;
bool requestTypeChanged;
std::vector<std::string> requestType;
+ bool requestSubTypeChanged;
+ std::vector<std::string> requestSubType;
};
/**
@@ -503,7 +506,8 @@ enum PermissionsCheckResult {
RESULT_CONSENT_NEEDED,
RESULT_CONSENT_NOT_REQIURED,
RESULT_PERMISSIONS_REVOKED_AND_CONSENT_NEEDED,
- RESULT_REQUEST_TYPE_CHANGED
+ RESULT_REQUEST_TYPE_CHANGED,
+ RESULT_REQUEST_SUBTYPE_CHANGED
};
/**
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 a69df20cfc..646cc7663b 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
@@ -65,6 +65,7 @@ extern const std::string kSelectAppGroups;
extern const std::string kSelectNicknames;
extern const std::string kSelectAppTypes;
extern const std::string kSelectRequestTypes;
+extern const std::string kSelectRequestSubTypes;
extern const std::string kSelectSecondsBetweenRetries;
extern const std::string kSelectIgnitionCycles;
extern const std::string kSelectKilometers;
@@ -78,6 +79,9 @@ extern const std::string kInsertAppGroup;
extern const std::string kInsertNickname;
extern const std::string kInsertAppType;
extern const std::string kInsertRequestType;
+extern const std::string kInsertOmittedRequestType;
+extern const std::string kInsertOmittedRequestSubType;
+extern const std::string kInsertRequestSubType;
extern const std::string kInsertMessageType;
extern const std::string kInsertLanguage;
extern const std::string kInsertMessageString;
@@ -98,6 +102,7 @@ extern const std::string kDeleteExternalConsentEntities;
extern const std::string kDeleteAppGroup;
extern const std::string kDeleteApplication;
extern const std::string kDeleteRequestType;
+extern const std::string kDeleteRequestSubType;
extern const std::string kDeleteDevice;
extern const std::string kIncrementIgnitionCycles;
extern const std::string kResetIgnitionCycles;
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 54dfb9f0b7..d56f6aeba2 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
@@ -98,7 +98,6 @@ class SQLPTRepresentation : public virtual PTRepresentation {
}
#endif // BUILD_TESTS
protected:
-#ifdef SDL_REMOTE_CONTROL
enum TypeAccess { kAllowed, kManual };
bool GatherModuleType(const std::string& app_id,
policy_table::ModuleTypes* module_types) const;
@@ -113,7 +112,6 @@ class SQLPTRepresentation : public virtual PTRepresentation {
bool SaveAccessModule(TypeAccess access,
const policy_table::AccessModules& modules);
bool SaveRemoteRpc(int module_id, const policy_table::RemoteRpcs& rpcs);
-#endif // SDL_REMOTE_CONTROL
virtual void GatherModuleMeta(policy_table::ModuleMeta* meta) const;
virtual void GatherModuleConfig(policy_table::ModuleConfig* config) const;
@@ -133,6 +131,9 @@ class SQLPTRepresentation : public virtual PTRepresentation {
policy_table::AppHMITypes* app_types) const;
bool GatherRequestType(const std::string& app_id,
policy_table::RequestTypes* request_types) const;
+ bool GatherRequestSubType(
+ const std::string& app_id,
+ policy_table::RequestSubTypes* request_subtypes) const;
bool GatherNickName(const std::string& app_id,
policy_table::Strings* nicknames) const;
@@ -168,6 +169,9 @@ class SQLPTRepresentation : public virtual PTRepresentation {
const policy_table::AppHMITypes& types);
bool SaveRequestType(const std::string& app_id,
const policy_table::RequestTypes& types);
+ bool SaveRequestSubType(
+ const std::string& app_id,
+ const policy_table::RequestSubTypes& request_subtypes);
public:
virtual std::string GetLockScreenIconUrl() const;
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc
index 5aa39cb2f4..00bb1e4a1c 100644
--- a/src/components/policy/policy_external/src/cache_manager.cc
+++ b/src/components/policy/policy_external/src/cache_manager.cc
@@ -41,6 +41,7 @@
#include <vector>
#include "utils/file_system.h"
+#include "utils/helpers.h"
#include "json/reader.h"
#include "json/features.h"
#include "json/writer.h"
@@ -638,13 +639,11 @@ void CacheManager::RemoveAppConsentForGroup(const std::string& app_id,
}
}
-using rpc::policy_table_interface_base::RequestTypes;
-using rpc::policy_table_interface_base::RequestType;
-
void CacheManager::ProcessUpdate(
const policy_table::ApplicationPolicies::const_iterator
initial_policy_iter) {
using namespace policy;
+ using rpc::policy_table_interface_base::RequestTypes;
const RequestTypes& new_request_types =
*(initial_policy_iter->second.RequestType);
@@ -2392,6 +2391,32 @@ bool CacheManager::ResetPT(const std::string& file_name) {
return result;
}
+policy::RequestType::State CacheManager::GetAppRequestTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+ 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");
+ return RequestType::State::OMITTED;
+ }
+ if (request_types.empty()) {
+ LOG4CXX_TRACE(logger_,
+ "Request types for " << policy_app_id << " are EMPTY");
+ return policy::RequestType::State::EMPTY;
+ }
+ return policy::RequestType::State::AVAILABLE;
+}
+
void CacheManager::GetAppRequestTypes(
const std::string& policy_app_id,
std::vector<std::string>& request_types) const {
@@ -2411,16 +2436,64 @@ void CacheManager::GetAppRequestTypes(
return;
}
if (policy_iter->second.RequestType.is_initialized()) {
- policy_table::RequestTypes::iterator it_request_type =
- policy_iter->second.RequestType->begin();
- for (; it_request_type != policy_iter->second.RequestType->end();
- ++it_request_type) {
- request_types.push_back(EnumToJsonString(*it_request_type));
+ for (const auto& request_type : *policy_iter->second.RequestType) {
+ request_types.push_back(EnumToJsonString(request_type));
}
}
return;
}
+RequestSubType::State CacheManager::GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+ 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");
+ return RequestSubType::State::OMITTED;
+ }
+ if (request_subtypes.empty()) {
+ LOG4CXX_TRACE(logger_,
+ "Request subtypes for " << policy_app_id << " are EMPTY");
+ return RequestSubType::State::EMPTY;
+ }
+ return RequestSubType::State::AVAILABLE;
+}
+
+void CacheManager::GetAppRequestSubTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ CACHE_MANAGER_CHECK_VOID();
+ if (kDeviceId == policy_app_id) {
+ LOG4CXX_DEBUG(logger_,
+ "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);
+ return;
+ }
+
+ for (const auto& request_subtype : *policy_iter->second.RequestSubType) {
+ request_subtypes.push_back(request_subtype);
+ }
+ return;
+}
+
const MetaInfo CacheManager::GetMetaInfo() const {
LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock auto_lock(cache_lock_);
diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc
index 8be0372c03..39b9399c24 100644
--- a/src/components/policy/policy_external/src/policy_helper.cc
+++ b/src/components/policy/policy_external/src/policy_helper.cc
@@ -322,9 +322,21 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
PermissionsCheckResult result = CheckPermissionsChanges(app_policy);
- if (!IsPredefinedApp(app_policy) && IsRequestTypeChanged(app_policy)) {
- SetPendingPermissions(app_policy, RESULT_REQUEST_TYPE_CHANGED);
- AddResult(app_id, RESULT_REQUEST_TYPE_CHANGED);
+ if (!IsPredefinedApp(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);
+ SetPendingPermissions(app_policy, RESULT_REQUEST_TYPE_CHANGED);
+ AddResult(app_id, RESULT_REQUEST_TYPE_CHANGED);
+ }
+ if (is_request_subtype_changed) {
+ LOG4CXX_TRACE(
+ logger_, "Request subtypes were changed for application: " << app_id);
+ SetPendingPermissions(app_policy, RESULT_REQUEST_SUBTYPE_CHANGED);
+ AddResult(app_id, RESULT_REQUEST_SUBTYPE_CHANGED);
+ }
}
if (RESULT_NO_CHANGES == result) {
@@ -389,17 +401,18 @@ void policy::CheckAppPolicy::SetPendingPermissions(
break;
case RESULT_REQUEST_TYPE_CHANGED:
permissions_diff.requestTypeChanged = true;
- {
- // Getting RequestTypes from PTU (not from cache)
- policy_table::RequestTypes::const_iterator it_request_type =
- app_policy.second.RequestType->begin();
- for (; app_policy.second.RequestType->end() != it_request_type;
- ++it_request_type) {
- permissions_diff.requestType.push_back(
- EnumToJsonString(*it_request_type));
- }
- }
+ // Getting Request Types from PTU (not from cache)
+ for (const auto& request_type : *app_policy.second.RequestType) {
+ permissions_diff.requestType.push_back(EnumToJsonString(request_type));
+ }
+ break;
+ case RESULT_REQUEST_SUBTYPE_CHANGED:
+ permissions_diff.requestSubTypeChanged = true;
+ // Getting Request SubTypes from PTU (not from cache)
+ for (const auto& request_subtype : *app_policy.second.RequestSubType) {
+ permissions_diff.requestSubType.push_back(request_subtype);
+ }
break;
default:
return;
@@ -484,6 +497,32 @@ bool CheckAppPolicy::IsRequestTypeChanged(
return diff.size();
}
+bool CheckAppPolicy::IsRequestSubTypeChanged(
+ const AppPoliciesValueType& app_policy) const {
+ policy::AppPoliciesConstItr it =
+ snapshot_->policy_table.app_policies_section.apps.find(app_policy.first);
+
+ if (it == snapshot_->policy_table.app_policies_section.apps.end()) {
+ if (!app_policy.second.RequestSubType->empty()) {
+ return true;
+ }
+ return false;
+ }
+
+ if (it->second.RequestSubType->size() !=
+ app_policy.second.RequestSubType->size()) {
+ return true;
+ }
+
+ policy_table::RequestSubTypes diff;
+ std::set_difference(it->second.RequestSubType->begin(),
+ it->second.RequestSubType->end(),
+ app_policy.second.RequestSubType->begin(),
+ app_policy.second.RequestSubType->end(),
+ std::back_inserter(diff));
+ return diff.size();
+}
+
void FillActionsForAppPolicies::operator()(
const policy::CheckAppPolicyResults::value_type& value) {
const std::string app_id = value.first;
@@ -510,6 +549,7 @@ void FillActionsForAppPolicies::operator()(
case RESULT_CONSENT_NOT_REQIURED:
case RESULT_PERMISSIONS_REVOKED:
case RESULT_REQUEST_TYPE_CHANGED:
+ case RESULT_REQUEST_SUBTYPE_CHANGED:
break;
case RESULT_NO_CHANGES:
default:
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 433a7a6bca..4ac66c0d53 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -50,11 +50,8 @@
#include "policy/update_status_manager.h"
#include "config_profile/profile.h"
#include "utils/make_shared.h"
-
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
#include "policy/access_remote_impl.h"
-#endif // SDL_REMOTE_CONTROL
policy::PolicyManager* CreateManager() {
return new policy::PolicyManagerImpl();
@@ -216,32 +213,26 @@ PolicyManagerImpl::PolicyManagerImpl()
: PolicyManager()
, listener_(NULL)
, cache_(new CacheManager)
-#ifdef SDL_REMOTE_CONTROL
, access_remote_(new AccessRemoteImpl(
CacheManagerInterfaceSPtr::static_pointer_cast<CacheManager>(cache_)))
-#endif // SDL_REMOTE_CONTROL
, retry_sequence_timeout_(60)
, retry_sequence_index_(0)
, ignition_check(true)
- , retry_sequence_url_(0, 0, "") {
-}
+ , retry_sequence_url_(0, 0, "") {}
PolicyManagerImpl::PolicyManagerImpl(bool in_memory)
: PolicyManager()
, listener_(NULL)
, cache_(new CacheManager(in_memory))
-#ifdef SDL_REMOTE_CONTROL
, access_remote_(new AccessRemoteImpl(
CacheManagerInterfaceSPtr::static_pointer_cast<CacheManager>(cache_)))
-#endif // SDL_REMOTE_CONTROL
, retry_sequence_timeout_(60)
, retry_sequence_index_(0)
, ignition_check(true)
, retry_sequence_url_(0, 0, "")
, wrong_ptu_update_received_(false)
, send_on_update_sent_out_(false)
- , trigger_ptu_(false) {
-}
+ , trigger_ptu_(false) {}
void PolicyManagerImpl::set_listener(PolicyListener* listener) {
listener_ = listener;
@@ -563,6 +554,25 @@ const std::vector<std::string> PolicyManagerImpl::GetAppRequestTypes(
return request_types;
}
+RequestType::State PolicyManagerImpl::GetAppRequestTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return cache_->GetAppRequestTypesState(policy_app_id);
+}
+
+RequestSubType::State PolicyManagerImpl::GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return cache_->GetAppRequestSubTypesState(policy_app_id);
+}
+
+const std::vector<std::string> PolicyManagerImpl::GetAppRequestSubTypes(
+ const std::string& policy_app_id) const {
+ std::vector<std::string> request_subtypes;
+ cache_->GetAppRequestSubTypes(policy_app_id, request_subtypes);
+ return request_subtypes;
+}
+
const VehicleInfo PolicyManagerImpl::GetVehicleInfo() const {
return cache_->GetVehicleInfo();
}
@@ -773,13 +783,11 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
LOG4CXX_INFO(logger_,
"Send notification for application_id:" << application_id);
-#ifdef SDL_REMOTE_CONTROL
const ApplicationOnDevice who = {device_id, application_id};
if (access_remote_->IsAppRemoteControl(who)) {
listener()->OnPermissionsUpdated(application_id, notification_data);
return;
}
-#endif // SDL_REMOTE_CONTROL
std::string default_hmi;
GetDefaultHmi(application_id, &default_hmi);
@@ -1771,11 +1779,6 @@ StatusNotifier PolicyManagerImpl::AddApplication(
device_consent);
} else {
PromoteExistedApplication(application_id, device_consent);
- if (helpers::in_range(hmi_types, policy_table::AHT_NAVIGATION) &&
- !HasCertificate()) {
- LOG4CXX_DEBUG(logger_, "Certificate does not exist, scheduling update.");
- update_status_manager_.ScheduleUpdate();
- }
return utils::MakeShared<utils::CallNothing>();
}
}
@@ -1919,7 +1922,6 @@ std::ostream& operator<<(std::ostream& output,
return output;
}
-#ifdef SDL_REMOTE_CONTROL
void PolicyManagerImpl::SetDefaultHmiTypes(const std::string& application_id,
const std::vector<int>& hmi_types) {
LOG4CXX_INFO(logger_, "SetDefaultHmiTypes");
@@ -2025,6 +2027,5 @@ void PolicyManagerImpl::set_access_remote(
utils::SharedPtr<AccessRemote> access_remote) {
access_remote_ = access_remote;
}
-#endif // SDL_REMOTE_CONTROL
} // namespace policy
diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc
index 168ff86b27..cb724e93b1 100644
--- a/src/components/policy/policy_external/src/policy_table/enums.cc
+++ b/src/components/policy/policy_external/src/policy_table/enums.cc
@@ -118,6 +118,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_EXTERNALTEMPERATURE:
return true;
+ case P_TURNSIGNAL:
+ return true;
case P_FUELLEVEL:
return true;
case P_FUELLEVEL_STATE:
@@ -126,6 +128,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_INSTANTFUELCONSUMPTION:
return true;
+ case P_FUELRANGE:
+ return true;
case P_ODOMETER:
return true;
case P_TIREPRESSURE:
@@ -146,6 +150,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_STEERINGWHEELANGLE:
return true;
+ case P_ENGINEOILLIFE:
+ return true;
case P_MYKEY:
return true;
case P_AIRBAGSTATUS:
@@ -162,8 +168,6 @@ bool IsValidEnum(Parameter val) {
return true;
case P_ABS_STATE:
return true;
- case P_TURN_SIGNAL:
- return true;
case P_FUEL_RANGE:
return true;
case P_TIRE_PRESSURE_VALUE:
@@ -207,6 +211,8 @@ const char* EnumToJsonString(Parameter val) {
return "engineTorque";
case P_EXTERNALTEMPERATURE:
return "externalTemperature";
+ case P_TURNSIGNAL:
+ return "turnSignal";
case P_FUELLEVEL:
return "fuelLevel";
case P_FUELLEVEL_STATE:
@@ -215,6 +221,8 @@ const char* EnumToJsonString(Parameter val) {
return "headLampStatus";
case P_INSTANTFUELCONSUMPTION:
return "instantFuelConsumption";
+ case P_FUELRANGE:
+ return "fuelRange";
case P_ODOMETER:
return "odometer";
case P_TIREPRESSURE:
@@ -235,6 +243,8 @@ const char* EnumToJsonString(Parameter val) {
return "rpm";
case P_STEERINGWHEELANGLE:
return "steeringWheelAngle";
+ case P_ENGINEOILLIFE:
+ return "engineOilLife";
case P_MYKEY:
return "myKey";
case P_AIRBAGSTATUS:
@@ -251,8 +261,6 @@ const char* EnumToJsonString(Parameter val) {
return "eCallInfo";
case P_ABS_STATE:
return "abs_State";
- case P_TURN_SIGNAL:
- return "turnSignal";
case P_FUEL_RANGE:
return "fuelRange";
case P_TIRE_PRESSURE_VALUE:
@@ -299,6 +307,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("externalTemperature" == literal) {
*result = P_EXTERNALTEMPERATURE;
return true;
+ } else if ("turnSignal" == literal) {
+ *result = P_TURNSIGNAL;
+ return true;
} else if ("fuelLevel" == literal) {
*result = P_FUELLEVEL;
return true;
@@ -311,6 +322,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("instantFuelConsumption" == literal) {
*result = P_INSTANTFUELCONSUMPTION;
return true;
+ } else if ("fuelRange" == literal) {
+ *result = P_FUELRANGE;
+ return true;
} else if ("odometer" == literal) {
*result = P_ODOMETER;
return true;
@@ -341,6 +355,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("steeringWheelAngle" == literal) {
*result = P_STEERINGWHEELANGLE;
return true;
+ } else if ("engineOilLife" == literal) {
+ *result = P_ENGINEOILLIFE;
+ return true;
} else if ("myKey" == literal) {
*result = P_MYKEY;
return true;
@@ -365,9 +382,6 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("abs_State" == literal) {
*result = P_ABS_STATE;
return true;
- } else if ("turnSignal" == literal) {
- *result = P_TURN_SIGNAL;
- return true;
} else if ("fuelRange" == literal) {
*result = P_FUEL_RANGE;
return true;
@@ -591,6 +605,10 @@ bool IsValidEnum(RequestType val) {
return true;
case RT_FOTA:
return true;
+ case RT_OEM_SPECIFIC:
+ return true;
+ case RT_EMPTY:
+ return true;
default:
return false;
}
@@ -638,6 +656,10 @@ const char* EnumToJsonString(RequestType val) {
return "MEDIA";
case RT_FOTA:
return "FOTA";
+ case RT_OEM_SPECIFIC:
+ return "OEM_SPECIFIC";
+ case RT_EMPTY:
+ return "EMPTY";
default:
return "";
}
@@ -723,12 +745,19 @@ bool EnumFromJsonString(const std::string& literal, RequestType* result) {
if ("FOTA" == literal) {
*result = RT_FOTA;
return true;
+ }
+ if ("OEM_SPECIFIC" == literal) {
+ *result = RT_OEM_SPECIFIC;
+ return true;
+ }
+ if ("EMPTY" == literal) {
+ *result = RT_EMPTY;
+ return true;
} else {
return false;
}
}
-#ifdef SDL_REMOTE_CONTROL
bool IsValidEnum(ModuleType val) {
switch (val) {
case MT_CLIMATE:
@@ -761,7 +790,6 @@ bool EnumFromJsonString(const std::string& literal, ModuleType* result) {
return false;
}
}
-#endif // SDL_REMOTE_CONTROL
const std::string kDefaultApp = "default";
const std::string kPreDataConsentApp = "pre_DataConsent";
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 da83626448..8c4f454dfa 100644
--- a/src/components/policy/policy_external/src/policy_table/types.cc
+++ b/src/components/policy/policy_external/src/policy_table/types.cc
@@ -238,25 +238,21 @@ ApplicationParams::ApplicationParams(const Json::Value* value__)
, nicknames(impl::ValueMember(value__, "nicknames"))
, AppHMIType(impl::ValueMember(value__, "AppHMIType"))
, RequestType(impl::ValueMember(value__, "RequestType"))
+ , RequestSubType(impl::ValueMember(value__, "RequestSubType"))
, memory_kb(impl::ValueMember(value__, "memory_kb"), 0)
, heart_beat_timeout_ms(impl::ValueMember(value__, "heart_beat_timeout_ms"))
-#ifdef SDL_REMOTE_CONTROL
- , moduleType(impl::ValueMember(value__, "moduleType"))
-#endif // SDL_REMOTE_CONTROL
-{
-}
+ , moduleType(impl::ValueMember(value__, "moduleType")) {}
Json::Value ApplicationParams::ToJsonValue() const {
Json::Value result__(PolicyBase::ToJsonValue());
impl::WriteJsonField("nicknames", nicknames, &result__);
impl::WriteJsonField("AppHMIType", AppHMIType, &result__);
impl::WriteJsonField("RequestType", RequestType, &result__);
+ impl::WriteJsonField("RequestSubType", RequestSubType, &result__);
impl::WriteJsonField("memory_kb", memory_kb, &result__);
impl::WriteJsonField(
"heart_beat_timeout_ms", heart_beat_timeout_ms, &result__);
-#ifdef SDL_REMOTE_CONTROL
impl::WriteJsonField("moduleType", moduleType, &result__);
-#endif // SDL_REMOTE_CONTROL
return result__;
}
@@ -278,11 +274,9 @@ bool ApplicationParams::is_valid() const {
if (!heart_beat_timeout_ms.is_valid()) {
return false;
}
-#ifdef SDL_REMOTE_CONTROL
if (!moduleType.is_valid()) {
return false;
}
-#endif // SDL_REMOTE_CONTROL
return Validate();
}
@@ -303,17 +297,18 @@ bool ApplicationParams::struct_empty() const {
if (RequestType.is_initialized()) {
return false;
}
+ if (RequestSubType.is_initialized()) {
+ return false;
+ }
if (memory_kb.is_initialized()) {
return false;
}
if (heart_beat_timeout_ms.is_initialized()) {
return false;
}
-#ifdef SDL_REMOTE_CONTROL
if (moduleType.is_initialized()) {
return false;
}
-#endif // SDL_REMOTE_CONTROL
return true;
}
@@ -337,6 +332,9 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const {
if (!RequestType.is_valid()) {
RequestType.ReportErrors(&report__->ReportSubobject("RequestType"));
}
+ if (!RequestSubType.is_valid()) {
+ RequestSubType.ReportErrors(&report__->ReportSubobject("RequestSubType"));
+ }
if (!priority.is_valid()) {
priority.ReportErrors(&report__->ReportSubobject("priority"));
}
@@ -356,23 +354,19 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const {
heart_beat_timeout_ms.ReportErrors(
&report__->ReportSubobject("heart_beat_timeout_ms"));
}
-
-#ifdef SDL_REMOTE_CONTROL
if (!moduleType.is_valid()) {
moduleType.ReportErrors(&report__->ReportSubobject("moduleType"));
}
-#endif // SDL_REMOTE_CONTROL
}
void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) {
PolicyBase::SetPolicyTableType(pt_type);
AppHMIType.SetPolicyTableType(pt_type);
RequestType.SetPolicyTableType(pt_type);
+ RequestSubType.SetPolicyTableType(pt_type);
memory_kb.SetPolicyTableType(pt_type);
heart_beat_timeout_ms.SetPolicyTableType(pt_type);
-#ifdef SDL_REMOTE_CONTROL
moduleType.SetPolicyTableType(pt_type);
-#endif // SDL_REMOTE_CONTROL
}
// RpcParameters methods
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 48a8578855..9b227615d8 100644
--- a/src/components/policy/policy_external/src/policy_table/validation.cc
+++ b/src/components/policy/policy_external/src/policy_table/validation.cc
@@ -89,6 +89,7 @@ bool ApplicationPoliciesSection::Validate() const {
continue;
}
+ LOG4CXX_TRACE(logger_, "Checking app Request Types...");
RequestTypes& app_request_types = *iter->second.RequestType;
if (app_request_types.is_omitted()) {
@@ -133,10 +134,36 @@ bool ApplicationPoliciesSection::Validate() const {
++iter;
}
+ LOG4CXX_TRACE(logger_, "Checking app Request SubTypes...");
+ iter = apps.begin();
+ while (iter != end_iter) {
+ if (it_default_policy == iter || it_pre_data_policy == iter) {
+ ++iter;
+ continue;
+ }
+ ApplicationParams& app_params = (*iter).second;
+ const bool is_request_subtype_omitted =
+ !app_params.RequestSubType.is_initialized();
+
+ if (is_request_subtype_omitted) {
+ LOG4CXX_WARN(logger_,
+ "App policy RequestSubTypes omitted."
+ " Will be replaced with default.");
+ app_params.RequestSubType = apps[kDefaultApp].RequestSubType;
+ ++iter;
+ continue;
+ }
+
+ const bool is_request_subtype_empty = app_params.RequestSubType->empty();
+ if (is_request_subtype_empty) {
+ LOG4CXX_WARN(logger_, "App policy RequestSubTypes empty.");
+ }
+ ++iter;
+ }
+
return true;
}
-#ifdef SDL_REMOTE_CONTROL
bool ApplicationParams::ValidateModuleTypes() const {
// moduleType is optional so see Optional<T>::is_valid()
bool is_initialized = moduleType->is_initialized();
@@ -166,7 +193,6 @@ bool ApplicationParams::ValidateModuleTypes() const {
}
return true;
}
-#endif // SDL_REMOTE_CONTROL
bool ApplicationParams::Validate() const {
if (is_initialized()) {
@@ -178,11 +204,7 @@ bool ApplicationParams::Validate() const {
}
}
}
-#ifdef SDL_REMOTE_CONTROL
return ValidateModuleTypes();
-#else // SDL_REMOTE_CONTROL
- return true;
-#endif // SDL_REMOTE_CONTROL
}
bool RpcParameters::Validate() const {
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 f58a7f0b82..5bb602244e 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
@@ -670,6 +670,11 @@ bool SQLPTExtRepresentation::SaveApplicationPoliciesSection(
return false;
}
+ if (!query_delete.Exec(sql_pt::kDeleteRequestSubType)) {
+ LOG4CXX_WARN(logger_, "Incorrect delete from request subtype.");
+ return false;
+ }
+
// First, all predefined apps (e.g. default, pre_DataConsent) should be saved,
// otherwise another app with the predefined permissions can get incorrect
// permissions
@@ -713,18 +718,17 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy(
if (!SetDefaultPolicy(app.first)) {
return false;
}
- if (!SaveRequestType(app.first, *app.second.RequestType)) {
- return false;
- }
} else if (kPreDataConsentId.compare(app.second.get_string()) == 0) {
if (!SetPredataPolicy(app.first)) {
return false;
}
- if (!SaveRequestType(app.first, *app.second.RequestType)) {
- return false;
- }
}
-
+ if (!SaveRequestType(app.first, *app.second.RequestType)) {
+ return false;
+ }
+ if (!SaveRequestSubType(app.first, *app.second.RequestSubType)) {
+ return false;
+ }
// Stop saving other params, since predefined permissions already set
return true;
}
@@ -771,6 +775,10 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy(
return false;
}
+ if (!SaveRequestSubType(app.first, *app.second.RequestSubType)) {
+ return false;
+ }
+
return true;
}
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 9702c315b0..ee53eb1487 100644
--- a/src/components/policy/policy_external/src/sql_pt_queries.cc
+++ b/src/components/policy/policy_external/src/sql_pt_queries.cc
@@ -271,13 +271,21 @@ const std::string kCreateSchema =
" REFERENCES `application`(`id`) "
"); "
"CREATE TABLE IF NOT EXISTS `request_type`( "
- " `request_type` VARCHAR(50) NOT NULL, "
+ " `request_type` VARCHAR(50), "
" `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, "
" PRIMARY KEY(`request_type`,`application_id`), "
" CONSTRAINT `fk_app_type_application1` "
" FOREIGN KEY(`application_id`) "
" REFERENCES `application`(`id`) "
"); "
+ "CREATE TABLE IF NOT EXISTS `request_subtype`( "
+ " `request_subtype` VARCHAR(50), "
+ " `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, "
+ " PRIMARY KEY(`request_subtype`,`application_id`), "
+ " CONSTRAINT `fk_request_subtype_app_id` "
+ " FOREIGN KEY(`application_id`) "
+ " REFERENCES `application`(`id`) "
+ "); "
"CREATE INDEX IF NOT EXISTS `app_type.fk_app_type_application1_idx` "
" ON `app_type`(`application_id` COLLATE NOCASE); "
"CREATE TABLE IF NOT EXISTS `consent_group`( "
@@ -482,6 +490,7 @@ const std::string kDropSchema =
"DROP INDEX IF EXISTS `app_type.fk_app_type_application1_idx`; "
"DROP TABLE IF EXISTS `app_type`; "
"DROP TABLE IF EXISTS `request_type`; "
+ "DROP TABLE IF EXISTS `request_subtype`; "
"DROP INDEX IF EXISTS `nickname.fk_nickname_application1_idx`; "
"DROP TABLE IF EXISTS `nickname`; "
"DROP INDEX IF EXISTS `app_level.fk_app_level_language2_idx`; "
@@ -636,6 +645,19 @@ const std::string kInsertRequestType =
"INSERT OR IGNORE INTO `request_type` (`application_id`, `request_type`) "
"VALUES (?, ?)";
+const std::string kInsertOmittedRequestType =
+ "INSERT INTO `request_type` (`application_id`) "
+ "VALUES (?)";
+
+const std::string kInsertRequestSubType =
+ "INSERT INTO `request_subtype` (`application_id`, "
+ "`request_subtype`) "
+ "VALUES (?, ?)";
+
+const std::string kInsertOmittedRequestSubType =
+ "INSERT INTO `request_subtype` (`application_id`) "
+ "VALUES (?)";
+
const std::string kUpdateVersion = "UPDATE `version` SET `number`= ?";
const std::string kInsertMessageType =
@@ -760,6 +782,11 @@ const std::string kSelectRequestTypes =
"SELECT DISTINCT `request_type` FROM `request_type` WHERE `application_id` "
"= ?";
+const std::string kSelectRequestSubTypes =
+ "SELECT DISTINCT `request_subtype` FROM `request_subtype` WHERE "
+ "`application_id` "
+ "= ?";
+
const std::string kSelectSecondsBetweenRetries =
"SELECT `value` FROM `seconds_between_retry` ORDER BY `index`";
@@ -805,6 +832,8 @@ const std::string kDeleteApplication = "DELETE FROM `application`";
const std::string kDeleteRequestType = "DELETE FROM `request_type`";
+const std::string kDeleteRequestSubType = "DELETE FROM `request_subtype`";
+
const std::string kSelectApplicationRevoked =
"SELECT `is_revoked` FROM `application` WHERE `id` = ?";
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 4315d99b3a..3cd7388672 100644
--- a/src/components/policy/policy_external/src/sql_pt_representation.cc
+++ b/src/components/policy/policy_external/src/sql_pt_representation.cc
@@ -765,7 +765,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
return false;
}
-#ifdef SDL_REMOTE_CONTROL
bool denied = false;
if (!GatherRemoteControlDenied(app_id, &denied)) {
return false;
@@ -775,7 +774,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
return false;
}
}
-#endif // SDL_REMOTE_CONTROL
if (!GatherNickName(app_id, &*params.nicknames)) {
return false;
@@ -786,6 +784,9 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
if (!GatherRequestType(app_id, &*params.RequestType)) {
return false;
}
+ if (!GatherRequestSubType(app_id, &*params.RequestSubType)) {
+ return false;
+ }
(*policies).apps[app_id] = params;
}
@@ -1048,14 +1049,11 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
return false;
}
-#ifdef SDL_REMOTE_CONTROL
-
bool denied = !app.second.moduleType->is_initialized();
if (!SaveRemoteControlDenied(app.first, denied) ||
!SaveModuleType(app.first, *app.second.moduleType)) {
return false;
}
-#endif // SDL_REMOTE_CONTROL
if (!SaveNickname(app.first, *app.second.nicknames)) {
return false;
@@ -1175,15 +1173,83 @@ bool SQLPTRepresentation::SaveRequestType(
}
policy_table::RequestTypes::const_iterator it;
- for (it = types.begin(); it != types.end(); ++it) {
+ if (!types.empty()) {
+ LOG4CXX_WARN(logger_, "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.");
+ return false;
+ }
+ }
+ } else if (types.is_initialized()) {
+ LOG4CXX_WARN(logger_, "Request types empty.");
query.Bind(0, app_id);
- query.Bind(1, std::string(policy_table::EnumToJsonString(*it)));
+ 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.");
return false;
}
+ } else {
+ utils::dbms::SQLQuery query_omitted(db());
+ if (!query_omitted.Prepare(sql_pt::kInsertOmittedRequestType)) {
+ LOG4CXX_WARN(logger_, "Incorrect insert statement for request types.");
+ return false;
+ }
+ LOG4CXX_WARN(logger_, "Request types omitted.");
+ query_omitted.Bind(0, app_id);
+ if (!query_omitted.Exec() || !query_omitted.Reset()) {
+ LOG4CXX_WARN(logger_, "Incorrect insert into request types.");
+ return false;
+ }
+ }
+ return true;
+}
+
+bool SQLPTRepresentation::SaveRequestSubType(
+ const std::string& app_id,
+ 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.");
+ return false;
}
+ policy_table::Strings::const_iterator it;
+ if (!request_subtypes.empty()) {
+ LOG4CXX_TRACE(logger_, "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.");
+ return false;
+ }
+ }
+ } else if (request_subtypes.is_initialized()) {
+ LOG4CXX_WARN(logger_, "Request subtypes empty.");
+ query.Bind(0, app_id);
+ query.Bind(1, std::string("EMPTY"));
+ if (!query.Exec() || !query.Reset()) {
+ LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ return false;
+ }
+ } else {
+ utils::dbms::SQLQuery query_omitted(db());
+ if (!query_omitted.Prepare(sql_pt::kInsertOmittedRequestSubType)) {
+ LOG4CXX_WARN(logger_, "Incorrect insert statement for request subtypes.");
+ return false;
+ }
+ LOG4CXX_WARN(logger_, "Request subtypes omitted.");
+ query_omitted.Bind(0, app_id);
+ if (!query_omitted.Exec() || !query_omitted.Reset()) {
+ LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ return false;
+ }
+ }
return true;
}
@@ -1583,11 +1649,36 @@ bool SQLPTRepresentation::GatherRequestType(
if (!policy_table::EnumFromJsonString(query.GetString(0), &type)) {
return false;
}
+ if (policy_table::RequestType::RT_EMPTY == type) {
+ request_types->mark_initialized();
+ continue;
+ }
request_types->push_back(type);
}
return true;
}
+bool SQLPTRepresentation::GatherRequestSubType(
+ const std::string& app_id,
+ 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.");
+ return false;
+ }
+
+ query.Bind(0, app_id);
+ while (query.Next()) {
+ const std::string request_subtype = query.GetString(0);
+ if ("EMPTY" == request_subtype) {
+ request_subtypes->mark_initialized();
+ continue;
+ }
+ request_subtypes->push_back(request_subtype);
+ }
+ return true;
+}
+
bool SQLPTRepresentation::GatherNickName(
const std::string& app_id, policy_table::Strings* nicknames) const {
utils::dbms::SQLQuery query(db());
@@ -1618,8 +1709,6 @@ bool SQLPTRepresentation::GatherAppGroup(
return true;
}
-#ifdef SDL_REMOTE_CONTROL
-
bool SQLPTRepresentation::GatherRemoteControlDenied(const std::string& app_id,
bool* denied) const {
LOG4CXX_AUTO_TRACE(logger_);
@@ -1809,7 +1898,6 @@ bool SQLPTRepresentation::GatherRemoteRpc(
}
return true;
}
-#endif // SDL_REMOTE_CONTROL
bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
bool is_revoked,
@@ -1907,6 +1995,13 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
!SaveRequestType(app_id, request_types)) {
return false;
}
+
+ policy_table::Strings request_subtypes;
+ if (!GatherRequestSubType(kDefaultId, &request_subtypes) ||
+ !SaveRequestSubType(app_id, request_subtypes)) {
+ return false;
+ }
+
policy_table::AppHMITypes app_types;
if (!GatherAppType(kDefaultId, &app_types) ||
!SaveAppType(app_id, app_types)) {
diff --git a/src/components/policy/policy_external/test/CMakeLists.txt b/src/components/policy/policy_external/test/CMakeLists.txt
index a455d43b91..8b77c90dd2 100644
--- a/src/components/policy/policy_external/test/CMakeLists.txt
+++ b/src/components/policy/policy_external/test/CMakeLists.txt
@@ -55,12 +55,6 @@ file (GLOB POLICY_TEST_SOURCES
list (REMOVE_ITEM POLICY_TEST_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/policy_manager_impl_stress_test.cc)
-if (REMOTE_CONTROL)
- list (APPEND testSources
- access_remote_impl_test.cc
- )
-endif ()
-
create_test("policy_test" "${POLICY_TEST_SOURCES}" "${testLibraries}")
#Additional test files (json)
diff --git a/src/components/policy/policy_external/test/json/PTU.json b/src/components/policy/policy_external/test/json/PTU.json
index c0f18bb6a9..5209030eec 100644
--- a/src/components/policy/policy_external/test/json/PTU.json
+++ b/src/components/policy/policy_external/test/json/PTU.json
@@ -472,12 +472,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -493,12 +496,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -514,12 +520,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -534,12 +543,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/policy/policy_external/test/json/PTU2.json b/src/components/policy/policy_external/test/json/PTU2.json
index 8ad6aefb83..30746123d4 100644
--- a/src/components/policy/policy_external/test/json/PTU2.json
+++ b/src/components/policy/policy_external/test/json/PTU2.json
@@ -472,12 +472,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -493,12 +496,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -514,12 +520,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -534,12 +543,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/policy/policy_external/test/json/PTU3.json b/src/components/policy/policy_external/test/json/PTU3.json
index 33f699d068..f3bd615c73 100644
--- a/src/components/policy/policy_external/test/json/PTU3.json
+++ b/src/components/policy/policy_external/test/json/PTU3.json
@@ -472,12 +472,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -493,12 +496,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -514,12 +520,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -534,12 +543,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 45e616c874..6db3836e4a 100644
--- 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
@@ -1592,12 +1592,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1607,12 +1610,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1622,12 +1628,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1636,12 +1645,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 917d53177f..22f7bd2930 100644
--- 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
@@ -1595,12 +1595,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1610,12 +1613,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1625,12 +1631,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1639,12 +1648,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index f514f279de..83a2b308bb 100644
--- 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
@@ -1592,12 +1592,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1607,12 +1610,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1622,12 +1628,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1636,12 +1645,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 57c1bce8f1..8509935752 100644
--- 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
@@ -1591,12 +1591,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1606,12 +1609,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1621,12 +1627,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1635,12 +1644,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 20023ba8e5..4d99dfbc35 100644
--- 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
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
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
index 5e4dffbc56..aeed9655e1 100644
--- 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
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
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
index 6b92db7c17..2e99c6c8ee 100644
--- 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
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
diff --git a/src/components/policy/policy_external/test/json/ptu2_requestType.json b/src/components/policy/policy_external/test/json/ptu2_requestType.json
index c12ec773e0..9a6ad3720d 100644
--- a/src/components/policy/policy_external/test/json/ptu2_requestType.json
+++ b/src/components/policy/policy_external/test/json/ptu2_requestType.json
@@ -484,12 +484,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -505,12 +508,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -526,12 +532,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -546,12 +555,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/policy/policy_external/test/json/ptu_requestType.json b/src/components/policy/policy_external/test/json/ptu_requestType.json
index 0b1f0ed469..87fcf17aee 100644
--- a/src/components/policy/policy_external/test/json/ptu_requestType.json
+++ b/src/components/policy/policy_external/test/json/ptu_requestType.json
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 10894516cf..7f5436b5b6 100644
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
@@ -20,6 +20,7 @@
"notifications_per_minute_by_priority": {
"EMERGENCY": 60,
"NAVIGATION": 15,
+ "PROJECTION": 15,
"COMMUNICATION": 6,
"NORMAL": 4,
"NONE": 0
@@ -349,12 +350,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +370,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +390,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +409,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
index 79d1b572e6..37e0476683 100644
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
@@ -2308,12 +2308,15 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -2327,12 +2330,15 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -2346,12 +2352,15 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -2364,12 +2373,15 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 1401c3b7a1..2a503ab4a1 100644
--- 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
@@ -484,12 +484,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -505,12 +508,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -526,12 +532,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -546,12 +555,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index ac2b18ab6f..d28f70379c 100644
--- 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
@@ -1609,12 +1609,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1624,12 +1627,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1639,12 +1645,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1653,12 +1662,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 230ad1fa4f..7bf287671e 100644
--- 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
@@ -1609,12 +1609,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1624,12 +1627,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1639,12 +1645,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1653,12 +1662,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 4e2dd3a85c..6b130c8f60 100644
--- a/src/components/policy/policy_external/test/json/sdl_pt_update.json
+++ b/src/components/policy/policy_external/test/json/sdl_pt_update.json
@@ -1593,12 +1593,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1608,12 +1611,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1623,12 +1629,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1637,12 +1646,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 8a3ef897c5..be177335fe 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index dcb96f147b..58e3f2fad3 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index dd7a529ec8..4b10f8c80b 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 14eb11d195..7728b69a0b 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index f1e460e603..aaa7664d06 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 0ba24ce484..079892677d 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 6e8ce0c6a7..82048d21e6 100644
--- 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
@@ -483,12 +483,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -504,12 +507,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -525,12 +531,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -545,12 +554,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index c384ea73e2..81521a2e0b 100644
--- 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
@@ -1585,12 +1585,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1600,12 +1603,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1615,12 +1621,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1629,12 +1638,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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 a657a01145..0b0831eaad 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
@@ -407,7 +407,8 @@ TEST_F(SQLPTRepresentationTest,
query.Prepare(query_select);
query.Next();
- const int policy_tables_number = 32;
+ // 33 - is current total tables number created by schema
+ const int policy_tables_number = 33;
ASSERT_EQ(policy_tables_number, query.GetInteger(0));
const std::string query_select_count_of_iap_buffer_full =
diff --git a/src/components/policy/policy_regular/CMakeLists.txt b/src/components/policy/policy_regular/CMakeLists.txt
index c7b9c068b9..225e99329a 100644
--- a/src/components/policy/policy_regular/CMakeLists.txt
+++ b/src/components/policy/policy_regular/CMakeLists.txt
@@ -71,11 +71,6 @@ set(PATHS
)
collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}")
-if (NOT REMOTE_CONTROL)
- list(REMOVE_ITEM SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/src/access_remote_impl.cc)
-endif()
-
set(LIBRARIES
ConfigProfile
policy_struct
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 8c0acd44d2..4a0a09db83 100644
--- a/src/components/policy/policy_regular/include/policy/cache_manager.h
+++ b/src/components/policy/policy_regular/include/policy/cache_manager.h
@@ -73,6 +73,22 @@ class CacheManager : public CacheManagerInterface {
CheckPermissionResult& result);
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Returns true if Policy Table was not updated yet
* from preloaded pt file.
*/
@@ -597,8 +613,18 @@ class CacheManager : public CacheManagerInterface {
* @param policy_app_id Unique application id
* @param request_types Request types of application
*/
- void GetAppRequestTypes(const std::string& policy_app_id,
- std::vector<std::string>& request_types) const;
+ void GetAppRequestTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_types) const OVERRIDE;
+
+ /**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @param request_subtypes Request subtypes of application to be filled
+ */
+ void GetAppRequestSubTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes) const OVERRIDE;
/**
* @brief GetCertificate allows to obtain certificate in order to
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 9f7c7318db..3dd2953865 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
@@ -46,6 +46,16 @@ namespace policy_table = rpc::policy_table_interface_base;
namespace policy {
+namespace RequestType {
+// Describes available RequestType states in policy table
+enum class State { UNAVAILABLE = 0, AVAILABLE, EMPTY, OMITTED };
+} // namespace RequestType
+
+namespace RequestSubType {
+// Describes available RequestSubType states in policy table
+enum class State { UNAVAILABLE = 0, AVAILABLE, EMPTY, OMITTED };
+} // namespace RequestSubType
+
class CacheManagerInterface {
public:
virtual ~CacheManagerInterface() {}
@@ -67,6 +77,22 @@ class CacheManagerInterface {
CheckPermissionResult& result) = 0;
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ virtual RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ virtual RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Returns true if Policy Table was not updated yet
* from preloaded pt file.
*/
@@ -627,6 +653,15 @@ class CacheManagerInterface {
std::vector<std::string>& request_types) const = 0;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @param request_subtypes Request subtypes of application to be filled
+ */
+ virtual void GetAppRequestSubTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_subtypes) const = 0;
+
+ /**
* @brief GetCertificate allows to obtain certificate in order to
* make secure connection
*
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 8a60801dd4..7f27ab2676 100644
--- a/src/components/policy/policy_regular/include/policy/policy_helper.h
+++ b/src/components/policy/policy_regular/include/policy/policy_helper.h
@@ -95,7 +95,8 @@ struct CheckAppPolicy {
RESULT_CONSENT_NEEDED,
RESULT_CONSENT_NOT_REQIURED,
RESULT_PERMISSIONS_REVOKED_AND_CONSENT_NEEDED,
- RESULT_REQUEST_TYPE_CHANGED
+ RESULT_REQUEST_TYPE_CHANGED,
+ RESULT_REQUEST_SUBTYPE_CHANGED
};
void SetPendingPermissions(const AppPoliciesValueType& app_policy,
@@ -126,6 +127,7 @@ struct CheckAppPolicy {
bool IsConsentRequired(const std::string& app_id,
const std::string& group_name) const;
bool IsRequestTypeChanged(const AppPoliciesValueType& app_policy) const;
+ bool IsRequestSubTypeChanged(const AppPoliciesValueType& app_policy) const;
private:
PolicyManagerImpl* pm_;
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 941db1a67f..c162d73011 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
@@ -47,10 +47,8 @@
#include "policy/usage_statistics/statistics_manager.h"
#include "policy/policy_helper.h"
#include "utils/timer.h"
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
#include "policy/access_remote_impl.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy_table = rpc::policy_table_interface_base;
@@ -448,7 +446,6 @@ class PolicyManagerImpl : public PolicyManager {
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) OVERRIDE;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Assigns new HMI types for specified application
* @param application_id Unique application id
@@ -483,7 +480,6 @@ class PolicyManagerImpl : public PolicyManager {
* @param application_id Unique id of application
*/
void OnPrimaryGroupsChanged(const std::string& application_id);
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Removes consent for application functional group
@@ -532,6 +528,22 @@ class PolicyManagerImpl : public PolicyManager {
void OnAppsSearchCompleted(const bool trigger_ptu) OVERRIDE;
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Gets request types for application
* @param policy_app_id Unique application id
* @return request types of application
@@ -540,6 +552,14 @@ class PolicyManagerImpl : public PolicyManager {
const std::string policy_app_id) const OVERRIDE;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @return request subtypes of application
+ */
+ const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Get information about vehicle
* @return vehicle information
*/
@@ -792,7 +812,6 @@ class PolicyManagerImpl : public PolicyManager {
void RetrySequence();
private:
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Get resulting RPCs permissions for application which started on
* specific device
@@ -829,10 +848,10 @@ class PolicyManagerImpl : public PolicyManager {
*/
bool GetModuleTypes(const std::string& policy_app_id,
std::vector<std::string>* modules) const OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
- /**
- * @brief pointer to policy table listener for callbacks
- */
+
+ /**
+ * @brief pointer to policy table listener for callbacks
+ */
PolicyListener* listener_;
/**
@@ -844,12 +863,11 @@ class PolicyManagerImpl : public PolicyManager {
* @brief pointer to CacheManagerInterface instance for getting policy data
*/
CacheManagerInterfaceSPtr cache_;
-#ifdef SDL_REMOTE_CONTROL
+
/**
* @brief pointer to AccessRemote instance for working with RC applications
*/
utils::SharedPtr<AccessRemote> access_remote_;
-#endif
/**
* @brief lock guard for protecting applications list access
diff --git a/src/components/policy/policy_regular/include/policy/policy_table/enums.h b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
index 4eb35d2aa4..050ab63973 100644
--- a/src/components/policy/policy_regular/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
@@ -66,10 +66,12 @@ enum Parameter {
P_SPEED,
P_ENGINETORQUE,
P_EXTERNALTEMPERATURE,
+ P_TURNSIGNAL,
P_FUELLEVEL,
P_FUELLEVEL_STATE,
P_HEADLAMPSTATUS,
P_INSTANTFUELCONSUMPTION,
+ P_FUELRANGE,
P_ODOMETER,
P_TIREPRESSURE,
P_WIPERSTATUS,
@@ -80,6 +82,7 @@ enum Parameter {
P_PRNDL,
P_RPM,
P_STEERINGWHEELANGLE,
+ P_ENGINEOILLIFE,
P_MYKEY,
P_AIRBAGSTATUS,
P_BODYINFORMATION,
@@ -132,7 +135,9 @@ enum RequestType {
RT_VEHICLE_DIAGNOSTICS,
RT_EMERGENCY,
RT_MEDIA,
- RT_FOTA
+ RT_FOTA,
+ RT_OEM_SPECIFIC,
+ RT_EMPTY // Added to allow empty Request Types handling
};
bool IsValidEnum(RequestType val);
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 61585776f2..ebfbb7f29f 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
@@ -76,7 +76,7 @@ typedef Map<URL, 1, 255> URLList;
typedef Map<URLList, 1, 255> ServiceEndpoints;
typedef uint8_t NumberOfNotificationsType;
-typedef Map<Integer<NumberOfNotificationsType, 0, 255>, 0, 6>
+typedef Map<Integer<NumberOfNotificationsType, 0, 255>, 0, 7>
NumberOfNotificationsPerMinute;
typedef Array<Integer<uint16_t, 1, 1000>, 0, 5> SecondsBetweenRetries;
@@ -96,11 +96,11 @@ typedef Map<DeviceParams, 0, 255> DeviceData;
typedef Array<Enum<RequestType>, 0, 255> RequestTypes;
-#ifdef SDL_REMOTE_CONTROL
+typedef Strings RequestSubTypes;
+
typedef Map<Strings, 0, 255> RemoteRpcs;
typedef Map<RemoteRpcs, 0, 255> AccessModules;
typedef Array<Enum<ModuleType>, 0, 255> ModuleTypes;
-#endif // SDL_REMOTE_CONTROL
typedef AppHMIType AppHmiType;
typedef std::vector<AppHMIType> AppHmiTypes;
@@ -139,12 +139,11 @@ struct ApplicationParams : PolicyBase {
Optional<Strings> nicknames;
Optional<AppHMITypes> AppHMIType;
Optional<RequestTypes> RequestType;
+ Optional<RequestSubTypes> RequestSubType;
Optional<Integer<uint16_t, 0, 65225> > memory_kb;
Optional<Integer<uint32_t, 0, UINT_MAX> > heart_beat_timeout_ms;
Optional<String<0, 255> > certificate;
-#ifdef SDL_REMOTE_CONTROL
mutable Optional<ModuleTypes> moduleType;
-#endif // SDL_REMOTE_CONTROL
public:
ApplicationParams();
@@ -160,9 +159,7 @@ struct ApplicationParams : PolicyBase {
private:
bool Validate() const;
-#ifdef SDL_REMOTE_CONTROL
bool ValidateModuleTypes() const;
-#endif // SDL_REMOTE_CONTROL
};
struct ApplicationPoliciesSection : CompositeType {
diff --git a/src/components/policy/policy_regular/include/policy/policy_types.h b/src/components/policy/policy_regular/include/policy/policy_types.h
index af1d119e7a..e0fc808e2f 100644
--- a/src/components/policy/policy_regular/include/policy/policy_types.h
+++ b/src/components/policy/policy_regular/include/policy/policy_types.h
@@ -267,7 +267,8 @@ struct AppPermissions {
, appRevoked(false)
, appPermissionsConsentNeeded(false)
, appUnauthorized(false)
- , requestTypeChanged(false) {}
+ , requestTypeChanged(false)
+ , requestSubTypeChanged(false) {}
std::string application_id;
bool isAppPermissionsRevoked;
@@ -280,6 +281,8 @@ struct AppPermissions {
DeviceParams deviceInfo;
bool requestTypeChanged;
std::vector<std::string> requestType;
+ bool requestSubTypeChanged;
+ std::vector<std::string> requestSubType;
};
/**
@@ -471,7 +474,8 @@ enum PermissionsCheckResult {
RESULT_CONSENT_NEEDED,
RESULT_CONSENT_NOT_REQIURED,
RESULT_PERMISSIONS_REVOKED_AND_CONSENT_NEEDED,
- RESULT_REQUEST_TYPE_CHANGED
+ RESULT_REQUEST_TYPE_CHANGED,
+ RESULT_REQUEST_SUBTYPE_CHANGED
};
/**
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 2ded25e456..5259ffa7e9 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
@@ -65,6 +65,7 @@ extern const std::string kSelectAppGroups;
extern const std::string kSelectNicknames;
extern const std::string kSelectAppTypes;
extern const std::string kSelectRequestTypes;
+extern const std::string kSelectRequestSubTypes;
extern const std::string kSelectSecondsBetweenRetries;
extern const std::string kSelectIgnitionCycles;
extern const std::string kSelectKilometers;
@@ -78,6 +79,9 @@ extern const std::string kInsertAppGroup;
extern const std::string kInsertNickname;
extern const std::string kInsertAppType;
extern const std::string kInsertRequestType;
+extern const std::string kInsertOmittedRequestType;
+extern const std::string kInsertOmittedRequestSubType;
+extern const std::string kInsertRequestSubType;
extern const std::string kInsertMessageType;
extern const std::string kInsertLanguage;
extern const std::string kInsertMessageString;
@@ -97,6 +101,7 @@ extern const std::string kDeleteRpc;
extern const std::string kDeleteAppGroup;
extern const std::string kDeleteApplication;
extern const std::string kDeleteRequestType;
+extern const std::string kDeleteRequestSubType;
extern const std::string kDeleteDevice;
extern const std::string kIncrementIgnitionCycles;
extern const std::string kResetIgnitionCycles;
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 6b5d6111f1..b26b2c9ede 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
@@ -97,7 +97,6 @@ class SQLPTRepresentation : public virtual PTRepresentation {
}
#endif // BUILD_TESTS
protected:
-#ifdef SDL_REMOTE_CONTROL
enum TypeAccess { kAllowed, kManual };
bool GatherModuleType(const std::string& app_id,
policy_table::ModuleTypes* module_types) const;
@@ -112,7 +111,6 @@ class SQLPTRepresentation : public virtual PTRepresentation {
bool SaveAccessModule(TypeAccess access,
const policy_table::AccessModules& modules);
bool SaveRemoteRpc(int module_id, const policy_table::RemoteRpcs& rpcs);
-#endif // SDL_REMOTE_CONTROL
virtual void GatherModuleMeta(policy_table::ModuleMeta* meta) const;
virtual void GatherModuleConfig(policy_table::ModuleConfig* config) const;
@@ -132,6 +130,9 @@ class SQLPTRepresentation : public virtual PTRepresentation {
policy_table::AppHMITypes* app_types) const;
bool GatherRequestType(const std::string& app_id,
policy_table::RequestTypes* request_types) const;
+ bool GatherRequestSubType(
+ const std::string& app_id,
+ policy_table::RequestSubTypes* request_subtypes) const;
bool GatherNickName(const std::string& app_id,
policy_table::Strings* nicknames) const;
@@ -167,6 +168,9 @@ class SQLPTRepresentation : public virtual PTRepresentation {
const policy_table::AppHMITypes& types);
bool SaveRequestType(const std::string& app_id,
const policy_table::RequestTypes& types);
+ bool SaveRequestSubType(
+ const std::string& app_id,
+ const policy_table::RequestSubTypes& request_subtypes);
public:
bool UpdateRequired() const;
diff --git a/src/components/policy/policy_regular/policy_table_interface_ext.xml b/src/components/policy/policy_regular/policy_table_interface_ext.xml
index 468eec2b0b..742ed547a8 100644
--- a/src/components/policy/policy_regular/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_regular/policy_table_interface_ext.xml
@@ -1,3 +1,4 @@
+
<?xml version="1.0" standalone="no"?>
<?xml-stylesheet type="text/xml" href="protocol2html.xsl"?>
@@ -26,10 +27,12 @@
<element name="speed" />
<element name="engineTorque" />
<element name="externalTemperature" />
+ <element name="turnSignal" />
<element name="fuelLevel" />
<element name="fuelLevel_State" />
<element name="headLampStatus" />
<element name="instantFuelConsumption" />
+ <element name="fuelRange" />
<element name="odometer" />
<element name="tirePressure" />
<element name="wiperStatus" />
@@ -40,6 +43,7 @@
<element name="prndl" />
<element name="rpm" />
<element name="steeringWheelAngle" />
+ <element name="engineOilLife" />
<element name="myKey" />
<element name="airbagStatus" />
<element name="bodyInformation" />
@@ -123,7 +127,7 @@
minsize="1" maxsize="255" />
<typedef name="NumberOfNotificationsPerMinute" type="Integer"
- map="true" maxsize="6" minvalue="0" maxvalue="255" />
+ map="true" maxsize="7" minvalue="0" maxvalue="255" />
<typedef name="SecondsBetweenRetries" type="Integer" array="true"
maxsize="10" minvalue="1" maxvalue="1000" />
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc
index 6a142374d5..1d51b81af4 100644
--- a/src/components/policy/policy_regular/src/cache_manager.cc
+++ b/src/components/policy/policy_regular/src/cache_manager.cc
@@ -39,6 +39,7 @@
#include <sstream>
#include "utils/file_system.h"
+#include "utils/helpers.h"
#include "json/reader.h"
#include "json/features.h"
#include "json/writer.h"
@@ -1550,6 +1551,32 @@ int32_t CacheManager::GenerateHash(const std::string& str_to_hash) {
return result;
}
+RequestType::State CacheManager::GetAppRequestTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+ 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");
+ return RequestType::State::OMITTED;
+ }
+ if (request_types.empty()) {
+ LOG4CXX_DEBUG(logger_,
+ "Request types for " << policy_app_id << " are EMPTY");
+ return RequestType::State::EMPTY;
+ }
+ return RequestType::State::AVAILABLE;
+}
+
void CacheManager::GetAppRequestTypes(
const std::string& policy_app_id,
std::vector<std::string>& request_types) const {
@@ -1568,11 +1595,60 @@ void CacheManager::GetAppRequestTypes(
"Can't find request types for app_id " << policy_app_id);
return;
}
- policy_table::RequestTypes::iterator it_request_type =
- policy_iter->second.RequestType->begin();
- for (; it_request_type != policy_iter->second.RequestType->end();
- ++it_request_type) {
- request_types.push_back(EnumToJsonString(*it_request_type));
+
+ for (const auto& request_type : *policy_iter->second.RequestType) {
+ request_types.push_back(EnumToJsonString(request_type));
+ }
+ return;
+}
+
+RequestSubType::State CacheManager::GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+ 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");
+ return RequestSubType::State::OMITTED;
+ }
+ if (request_subtypes.empty()) {
+ LOG4CXX_DEBUG(logger_,
+ "Request subtypes for " << policy_app_id << " are EMPTY");
+ return RequestSubType::State::EMPTY;
+ }
+ return RequestSubType::State::AVAILABLE;
+}
+
+void CacheManager::GetAppRequestSubTypes(
+ const std::string& policy_app_id,
+ std::vector<std::string>& request_types) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ 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);
+ 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);
+ return;
+ }
+
+ for (const auto& request_subtype : *policy_iter->second.RequestSubType) {
+ request_types.push_back(request_subtype);
}
return;
}
diff --git a/src/components/policy/policy_regular/src/policy_helper.cc b/src/components/policy/policy_regular/src/policy_helper.cc
index 95f275769c..796dd25ec4 100644
--- a/src/components/policy/policy_regular/src/policy_helper.cc
+++ b/src/components/policy/policy_regular/src/policy_helper.cc
@@ -339,9 +339,20 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
}
PermissionsCheckResult result = CheckPermissionsChanges(app_policy);
- if (!IsPredefinedApp(app_policy) && IsRequestTypeChanged(app_policy)) {
- SetPendingPermissions(app_policy, RESULT_REQUEST_TYPE_CHANGED);
- NotifySystem(app_policy);
+ if (!IsPredefinedApp(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) {
+ SetPendingPermissions(app_policy, RESULT_REQUEST_TYPE_CHANGED);
+ }
+ if (is_request_subtype_changed) {
+ SetPendingPermissions(app_policy, RESULT_REQUEST_SUBTYPE_CHANGED);
+ }
+
+ if (is_request_type_changed || is_request_subtype_changed) {
+ NotifySystem(app_policy);
+ }
}
if (RESULT_NO_CHANGES == result) {
LOG4CXX_INFO(logger_,
@@ -412,17 +423,19 @@ void policy::CheckAppPolicy::SetPendingPermissions(
case RESULT_REQUEST_TYPE_CHANGED:
permissions_diff.priority.clear();
permissions_diff.requestTypeChanged = true;
- {
- // Getting RequestTypes from PTU (not from cache)
- policy_table::RequestTypes::const_iterator it_request_type =
- app_policy.second.RequestType->begin();
- for (; app_policy.second.RequestType->end() != it_request_type;
- ++it_request_type) {
- permissions_diff.requestType.push_back(
- EnumToJsonString(*it_request_type));
- }
- }
+ // Getting Request Types from PTU (not from cache)
+ for (const auto& request_type : *app_policy.second.RequestType) {
+ permissions_diff.requestType.push_back(EnumToJsonString(request_type));
+ }
+ break;
+ case RESULT_REQUEST_SUBTYPE_CHANGED:
+ permissions_diff.priority.clear();
+ permissions_diff.requestSubTypeChanged = true;
+ // Getting Request SubTypes from PTU (not from cache)
+ for (const auto& request_subtype : *app_policy.second.RequestSubType) {
+ permissions_diff.requestSubType.push_back(request_subtype);
+ }
break;
default:
return;
@@ -491,6 +504,32 @@ bool CheckAppPolicy::IsRequestTypeChanged(
return diff.size();
}
+bool CheckAppPolicy::IsRequestSubTypeChanged(
+ const AppPoliciesValueType& app_policy) const {
+ policy::AppPoliciesConstItr it =
+ snapshot_->policy_table.app_policies_section.apps.find(app_policy.first);
+
+ if (it == snapshot_->policy_table.app_policies_section.apps.end()) {
+ if (!app_policy.second.RequestSubType->empty()) {
+ return true;
+ }
+ return false;
+ }
+
+ if (it->second.RequestSubType->size() !=
+ app_policy.second.RequestSubType->size()) {
+ return true;
+ }
+
+ policy_table::RequestSubTypes diff;
+ std::set_difference(it->second.RequestSubType->begin(),
+ it->second.RequestSubType->end(),
+ app_policy.second.RequestSubType->begin(),
+ app_policy.second.RequestSubType->end(),
+ std::back_inserter(diff));
+ return diff.size();
+}
+
FillNotificationData::FillNotificationData(Permissions& data,
GroupConsent group_state,
GroupConsent undefined_group_consent)
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 3e08147a4c..d01631a2a2 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -50,11 +50,8 @@
#include "config_profile/profile.h"
#include "utils/timer_task_impl.h"
#include "utils/make_shared.h"
-
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
#include "policy/access_remote_impl.h"
-#endif // SDL_REMOTE_CONTROL
policy::PolicyManager* CreateManager() {
return new policy::PolicyManagerImpl();
@@ -76,10 +73,8 @@ PolicyManagerImpl::PolicyManagerImpl()
: PolicyManager()
, listener_(NULL)
, cache_(new CacheManager)
-#ifdef SDL_REMOTE_CONTROL
, access_remote_(new AccessRemoteImpl(
CacheManagerInterfaceSPtr::static_pointer_cast<CacheManager>(cache_)))
-#endif // SDL_REMOTE_CONTROL
, retry_sequence_timeout_(kDefaultRetryTimeoutInMSec)
, retry_sequence_index_(0)
, timer_retry_sequence_("Retry sequence timer",
@@ -89,8 +84,7 @@ PolicyManagerImpl::PolicyManagerImpl()
, retry_sequence_url_(0, 0, "")
, wrong_ptu_update_received_(false)
, send_on_update_sent_out_(false)
- , trigger_ptu_(false) {
-}
+ , trigger_ptu_(false) {}
void PolicyManagerImpl::set_listener(PolicyListener* listener) {
listener_ = listener;
@@ -219,10 +213,8 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
return false;
}
- if (pt_update->policy_table.module_config.certificate.is_initialized()) {
- listener_->OnCertificateUpdated(
- *(pt_update->policy_table.module_config.certificate));
- }
+ listener_->OnCertificateUpdated(
+ *(pt_update->policy_table.module_config.certificate));
std::map<std::string, StringArray> app_hmi_types;
cache_->GetHMIAppTypeAfterUpdate(app_hmi_types);
@@ -385,6 +377,25 @@ const std::vector<std::string> PolicyManagerImpl::GetAppRequestTypes(
return request_types;
}
+RequestType::State PolicyManagerImpl::GetAppRequestTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return cache_->GetAppRequestTypesState(policy_app_id);
+}
+
+RequestSubType::State PolicyManagerImpl::GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return cache_->GetAppRequestSubTypesState(policy_app_id);
+}
+
+const std::vector<std::string> PolicyManagerImpl::GetAppRequestSubTypes(
+ const std::string& policy_app_id) const {
+ std::vector<std::string> request_subtypes;
+ cache_->GetAppRequestSubTypes(policy_app_id, request_subtypes);
+ return request_subtypes;
+}
+
const VehicleInfo PolicyManagerImpl::GetVehicleInfo() const {
return cache_->GetVehicleInfo();
}
@@ -406,12 +417,16 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
"CheckPermissions for " << app_id << " and rpc " << rpc
<< " for " << hmi_level << " level.");
-#ifdef SDL_REMOTE_CONTROL
ApplicationOnDevice who = {device_id, app_id};
- const policy_table::Strings& groups = access_remote_->GetGroups(who);
-#else // SDL_REMOTE_CONTROL
- const policy_table::Strings& groups = cache_->GetGroups(app_id);
-#endif // SDL_REMOTE_CONTROL
+ policy_table::Strings groups;
+ if (access_remote_->IsAppRemoteControl(who)) {
+ groups = access_remote_->GetGroups(who);
+ LOG4CXX_INFO(logger_,
+ "CheckPermissions for " << app_id << " and rpc " << rpc
+ << " for " << hmi_level << " level.");
+ } else {
+ groups = cache_->GetGroups(app_id);
+ }
cache_->CheckPermissions(groups, hmi_level, rpc, result);
if (cache_->IsApplicationRevoked(app_id)) {
@@ -467,13 +482,11 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
std::string default_hmi;
default_hmi = "NONE";
-#ifdef SDL_REMOTE_CONTROL
const ApplicationOnDevice who = {device_id, application_id};
if (access_remote_->IsAppRemoteControl(who)) {
listener()->OnPermissionsUpdated(application_id, notification_data);
return;
}
-#endif // SDL_REMOTE_CONTROL
listener()->OnPermissionsUpdated(
application_id, notification_data, default_hmi);
@@ -711,14 +724,15 @@ void PolicyManagerImpl::GetPermissionsForApp(
}
FunctionalIdType group_types;
-#ifdef SDL_REMOTE_CONTROL
- allowed_by_default = false;
- bool ret = access_remote_->GetPermissionsForApp(
- device_id, policy_app_id, group_types);
-#else
- bool ret =
- cache_->GetPermissionsForApp(device_id, app_id_to_check, group_types);
-#endif // REMOTE_CONTROL
+ const ApplicationOnDevice who = {device_id, app_id_to_check};
+ bool ret = false;
+ if (access_remote_->IsAppRemoteControl(who)) {
+ allowed_by_default = false;
+ ret = access_remote_->GetPermissionsForApp(
+ device_id, policy_app_id, group_types);
+ } else {
+ ret = cache_->GetPermissionsForApp(device_id, app_id_to_check, group_types);
+ }
if (!ret) {
LOG4CXX_WARN(logger_,
@@ -1056,13 +1070,6 @@ StatusNotifier PolicyManagerImpl::AddApplication(
device_consent);
} else {
PromoteExistedApplication(application_id, device_consent);
- const policy_table::AppHMIType type = policy_table::AHT_NAVIGATION;
- if (helpers::in_range(hmi_types,
- (rpc::Enum<policy_table::AppHMIType>)type) &&
- !HasCertificate()) {
- LOG4CXX_DEBUG(logger_, "Certificate does not exist, scheduling update.");
- update_status_manager_.ScheduleUpdate();
- }
return utils::MakeShared<utils::CallNothing>();
}
}
@@ -1140,6 +1147,10 @@ bool PolicyManagerImpl::InitPT(const std::string& file_name,
if (ret) {
RefreshRetrySequence();
update_status_manager_.OnPolicyInit(cache_->UpdateRequired());
+ const std::string certificate_data = cache_->GetCertificate();
+ if (!certificate_data.empty()) {
+ listener_->OnCertificateUpdated(certificate_data);
+ }
}
return ret;
}
@@ -1174,7 +1185,6 @@ void PolicyManagerImpl::RetrySequence() {
timer_retry_sequence_.Start(timeout_msec, timer::kPeriodic);
}
-#ifdef SDL_REMOTE_CONTROL
void PolicyManagerImpl::SetDefaultHmiTypes(const std::string& application_id,
const std::vector<int>& hmi_types) {
LOG4CXX_INFO(logger_, "SetDefaultHmiTypes");
@@ -1280,6 +1290,5 @@ void PolicyManagerImpl::set_access_remote(
utils::SharedPtr<AccessRemote> access_remote) {
access_remote_ = access_remote;
}
-#endif // SDL_REMOTE_CONTROL
} // namespace policy
diff --git a/src/components/policy/policy_regular/src/policy_table/enums.cc b/src/components/policy/policy_regular/src/policy_table/enums.cc
index 34d12420d8..e05ed8f064 100644
--- a/src/components/policy/policy_regular/src/policy_table/enums.cc
+++ b/src/components/policy/policy_regular/src/policy_table/enums.cc
@@ -119,6 +119,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_EXTERNALTEMPERATURE:
return true;
+ case P_TURNSIGNAL:
+ return true;
case P_FUELLEVEL:
return true;
case P_FUELLEVEL_STATE:
@@ -127,6 +129,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_INSTANTFUELCONSUMPTION:
return true;
+ case P_FUELRANGE:
+ return true;
case P_ODOMETER:
return true;
case P_TIREPRESSURE:
@@ -147,6 +151,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_STEERINGWHEELANGLE:
return true;
+ case P_ENGINEOILLIFE:
+ return true;
case P_MYKEY:
return true;
case P_AIRBAGSTATUS:
@@ -177,6 +183,8 @@ const char* EnumToJsonString(Parameter val) {
return "engineTorque";
case P_EXTERNALTEMPERATURE:
return "externalTemperature";
+ case P_TURNSIGNAL:
+ return "turnSignal";
case P_FUELLEVEL:
return "fuelLevel";
case P_FUELLEVEL_STATE:
@@ -185,6 +193,8 @@ const char* EnumToJsonString(Parameter val) {
return "headLampStatus";
case P_INSTANTFUELCONSUMPTION:
return "instantFuelConsumption";
+ case P_FUELRANGE:
+ return "fuelRange";
case P_ODOMETER:
return "odometer";
case P_TIREPRESSURE:
@@ -205,6 +215,8 @@ const char* EnumToJsonString(Parameter val) {
return "rpm";
case P_STEERINGWHEELANGLE:
return "steeringWheelAngle";
+ case P_ENGINEOILLIFE:
+ return "engineOilLife";
case P_MYKEY:
return "myKey";
case P_AIRBAGSTATUS:
@@ -239,6 +251,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("externalTemperature" == literal) {
*result = P_EXTERNALTEMPERATURE;
return true;
+ } else if ("turnSignal" == literal) {
+ *result = P_TURNSIGNAL;
+ return true;
} else if ("fuelLevel" == literal) {
*result = P_FUELLEVEL;
return true;
@@ -251,6 +266,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("instantFuelConsumption" == literal) {
*result = P_INSTANTFUELCONSUMPTION;
return true;
+ } else if ("fuelRange" == literal) {
+ *result = P_FUELRANGE;
+ return true;
} else if ("odometer" == literal) {
*result = P_ODOMETER;
return true;
@@ -281,6 +299,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("steeringWheelAngle" == literal) {
*result = P_STEERINGWHEELANGLE;
return true;
+ } else if ("engineOilLife" == literal) {
+ *result = P_ENGINEOILLIFE;
+ return true;
} else if ("myKey" == literal) {
*result = P_MYKEY;
return true;
@@ -454,6 +475,10 @@ bool IsValidEnum(RequestType val) {
return true;
case RT_FOTA:
return true;
+ case RT_OEM_SPECIFIC:
+ return true;
+ case RT_EMPTY:
+ return true;
default:
return false;
}
@@ -501,6 +526,10 @@ const char* EnumToJsonString(RequestType val) {
return "MEDIA";
case RT_FOTA:
return "FOTA";
+ case RT_OEM_SPECIFIC:
+ return "OEM_SPECIFIC";
+ case RT_EMPTY:
+ return "EMPTY";
default:
return "";
}
@@ -586,12 +615,19 @@ bool EnumFromJsonString(const std::string& literal, RequestType* result) {
if ("FOTA" == literal) {
*result = RT_FOTA;
return true;
+ }
+ if ("OEM_SPECIFIC" == literal) {
+ *result = RT_OEM_SPECIFIC;
+ return true;
+ }
+ if ("EMPTY" == literal) {
+ *result = RT_EMPTY;
+ return true;
} else {
return false;
}
}
-#ifdef SDL_REMOTE_CONTROL
bool IsValidEnum(ModuleType val) {
switch (val) {
case MT_CLIMATE:
@@ -624,7 +660,6 @@ bool EnumFromJsonString(const std::string& literal, ModuleType* result) {
return false;
}
}
-#endif // SDL_REMOTE_CONTROL
const std::string kDefaultApp = "default";
const std::string kPreDataConsentApp = "pre_DataConsent";
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 5f6f85f5dd..c983e4f12b 100644
--- a/src/components/policy/policy_regular/src/policy_table/types.cc
+++ b/src/components/policy/policy_regular/src/policy_table/types.cc
@@ -164,14 +164,11 @@ ApplicationParams::ApplicationParams(const Json::Value* value__)
, nicknames(impl::ValueMember(value__, "nicknames"))
, AppHMIType(impl::ValueMember(value__, "AppHMIType"))
, RequestType(impl::ValueMember(value__, "RequestType"))
+ , RequestSubType(impl::ValueMember(value__, "RequestSubType"))
, memory_kb(impl::ValueMember(value__, "memory_kb"), 0)
, heart_beat_timeout_ms(impl::ValueMember(value__, "heart_beat_timeout_ms"))
, certificate(impl::ValueMember(value__, "certificate"), "not_specified")
-#ifdef SDL_REMOTE_CONTROL
- , moduleType(impl::ValueMember(value__, "moduleType"))
-#endif // SDL_REMOTE_CONTROL
-{
-}
+ , moduleType(impl::ValueMember(value__, "moduleType")) {}
Json::Value ApplicationParams::ToJsonValue() const {
Json::Value result__(PolicyBase::ToJsonValue());
@@ -179,17 +176,17 @@ Json::Value ApplicationParams::ToJsonValue() const {
impl::WriteJsonField("nicknames", nicknames, &result__);
impl::WriteJsonField("AppHMIType", AppHMIType, &result__);
impl::WriteJsonField("RequestType", RequestType, &result__);
+ impl::WriteJsonField("RequestSubType", RequestSubType, &result__);
impl::WriteJsonField("memory_kb", memory_kb, &result__);
impl::WriteJsonField(
"heart_beat_timeout_ms", heart_beat_timeout_ms, &result__);
-#ifdef SDL_REMOTE_CONTROL
impl::WriteJsonField("moduleType", moduleType, &result__);
-#endif // SDL_REMOTE_CONTROL
return result__;
}
bool ApplicationParams::is_valid() const {
- // RequestType is not validated since there is high-level validation logic,
+ // RequestType and RequestSubType are not validated since there is high-level
+ // validation logic,
// which takes into account information not available here.
if (!PolicyBase::is_valid()) {
return false;
@@ -212,11 +209,9 @@ bool ApplicationParams::is_valid() const {
if (!certificate.is_valid()) {
return false;
}
-#ifdef SDL_REMOTE_CONTROL
if (!moduleType.is_valid()) {
return false;
}
-#endif // SDL_REMOTE_CONTROL
return Validate();
}
@@ -240,6 +235,9 @@ bool ApplicationParams::struct_empty() const {
if (RequestType.is_initialized()) {
return false;
}
+ if (RequestSubType.is_initialized()) {
+ return false;
+ }
if (memory_kb.is_initialized()) {
return false;
}
@@ -249,11 +247,9 @@ bool ApplicationParams::struct_empty() const {
if (certificate.is_initialized()) {
return false;
}
-#ifdef SDL_REMOTE_CONTROL
if (moduleType.is_initialized()) {
return false;
}
-#endif // SDL_REMOTE_CONTROL
return true;
}
@@ -273,6 +269,9 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const {
if (!RequestType.is_valid()) {
RequestType.ReportErrors(&report__->ReportSubobject("RequestType"));
}
+ if (!RequestSubType.is_valid()) {
+ RequestSubType.ReportErrors(&report__->ReportSubobject("RequestSubType"));
+ }
if (!priority.is_valid()) {
priority.ReportErrors(&report__->ReportSubobject("priority"));
}
@@ -286,11 +285,9 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const {
if (!certificate.is_valid()) {
certificate.ReportErrors(&report__->ReportSubobject("certificate"));
}
-#ifdef SDL_REMOTE_CONTROL
if (!moduleType.is_valid()) {
moduleType.ReportErrors(&report__->ReportSubobject("moduleType"));
}
-#endif // SDL_REMOTE_CONTROL
}
void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) {
@@ -298,12 +295,11 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) {
groups.SetPolicyTableType(pt_type);
AppHMIType.SetPolicyTableType(pt_type);
RequestType.SetPolicyTableType(pt_type);
+ RequestSubType.SetPolicyTableType(pt_type);
memory_kb.SetPolicyTableType(pt_type);
heart_beat_timeout_ms.SetPolicyTableType(pt_type);
certificate.SetPolicyTableType(pt_type);
-#ifdef SDL_REMOTE_CONTROL
moduleType.SetPolicyTableType(pt_type);
-#endif // SDL_REMOTE_CONTROL
}
// RpcParameters methods
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 10b8e4bf7c..714dfaae5a 100644
--- a/src/components/policy/policy_regular/src/policy_table/validation.cc
+++ b/src/components/policy/policy_regular/src/policy_table/validation.cc
@@ -40,11 +40,12 @@ bool ApplicationPoliciesSection::Validate() const {
return false;
}
- PolicyTableType pt_type = GetPolicyTableType();
+ const PolicyTableType pt_type = GetPolicyTableType();
if (PT_PRELOADED != pt_type && PT_UPDATE != pt_type) {
return true;
}
+ LOG4CXX_TRACE(logger_, "Checking app Request Types...");
if (!it_default_policy->second.RequestType.is_valid()) {
LOG4CXX_WARN(logger_,
"Default policy RequestTypes are not valid. Will be cleaned.");
@@ -65,10 +66,15 @@ bool ApplicationPoliciesSection::Validate() const {
ApplicationPolicies::iterator end_iter = apps.end();
while (iter != end_iter) {
+ if (it_default_policy == iter || it_pre_data_policy == iter) {
+ ++iter;
+ continue;
+ }
ApplicationParams& app_params = (*iter).second;
- bool is_request_type_omitted = !app_params.RequestType.is_initialized();
- bool is_request_type_valid = app_params.RequestType.is_valid();
- bool is_request_type_empty = app_params.RequestType->empty();
+ const bool is_request_type_omitted =
+ !app_params.RequestType.is_initialized();
+ const bool is_request_type_valid = app_params.RequestType.is_valid();
+ const bool is_request_type_empty = app_params.RequestType->empty();
if (PT_PRELOADED == pt_type) {
if (!is_request_type_valid) {
@@ -111,10 +117,36 @@ bool ApplicationPoliciesSection::Validate() const {
++iter;
}
+ LOG4CXX_TRACE(logger_, "Checking app Request SubTypes...");
+ iter = apps.begin();
+ while (iter != end_iter) {
+ if (it_default_policy == iter || it_pre_data_policy == iter) {
+ ++iter;
+ continue;
+ }
+ ApplicationParams& app_params = (*iter).second;
+ const bool is_request_subtype_omitted =
+ !app_params.RequestSubType.is_initialized();
+
+ if (is_request_subtype_omitted) {
+ LOG4CXX_WARN(logger_,
+ "App policy RequestSubTypes omitted."
+ " Will be replaced with default.");
+ app_params.RequestSubType = apps[kDefaultApp].RequestSubType;
+ ++iter;
+ continue;
+ }
+
+ const bool is_request_subtype_empty = app_params.RequestSubType->empty();
+ if (is_request_subtype_empty) {
+ LOG4CXX_WARN(logger_, "App policy RequestSubTypes empty.");
+ }
+ ++iter;
+ }
+
return true;
}
-#ifdef SDL_REMOTE_CONTROL
bool ApplicationParams::ValidateModuleTypes() const {
// moduleType is optional so see Optional<T>::is_valid()
bool is_initialized = moduleType->is_initialized();
@@ -148,11 +180,6 @@ bool ApplicationParams::ValidateModuleTypes() const {
bool ApplicationParams::Validate() const {
return ValidateModuleTypes();
}
-#else // SDL_REMOTE_CONTROL
-bool ApplicationParams::Validate() const {
- return true;
-}
-#endif // SDL_REMOTE_CONTROL
bool RpcParameters::Validate() const {
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 ef4ef49273..91a5573a04 100644
--- a/src/components/policy/policy_regular/src/sql_pt_queries.cc
+++ b/src/components/policy/policy_regular/src/sql_pt_queries.cc
@@ -258,13 +258,21 @@ const std::string kCreateSchema =
" REFERENCES `application`(`id`) "
"); "
"CREATE TABLE IF NOT EXISTS `request_type`( "
- " `request_type` VARCHAR(50) NOT NULL, "
+ " `request_type` VARCHAR(50), "
" `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, "
" PRIMARY KEY(`request_type`,`application_id`), "
" CONSTRAINT `fk_app_type_application1` "
" FOREIGN KEY(`application_id`) "
" REFERENCES `application`(`id`) "
"); "
+ "CREATE TABLE IF NOT EXISTS `request_subtype`( "
+ " `request_subtype` VARCHAR(50), "
+ " `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, "
+ " PRIMARY KEY(`request_subtype`,`application_id`), "
+ " CONSTRAINT `fk_request_subtype_app_id` "
+ " FOREIGN KEY(`application_id`) "
+ " REFERENCES `application`(`id`) "
+ "); "
"CREATE INDEX IF NOT EXISTS `app_type.fk_app_type_application1_idx` "
" ON `app_type`(`application_id` COLLATE NOCASE); "
"CREATE TABLE IF NOT EXISTS `consent_group`( "
@@ -440,6 +448,8 @@ const std::string kDropSchema =
"DROP TABLE IF EXISTS `consent_group`; "
"DROP INDEX IF EXISTS `app_type.fk_app_type_application1_idx`; "
"DROP TABLE IF EXISTS `app_type`; "
+ "DROP TABLE IF EXISTS `request_type`; "
+ "DROP TABLE IF EXISTS `request_subtype`; "
"DROP INDEX IF EXISTS `nickname.fk_nickname_application1_idx`; "
"DROP TABLE IF EXISTS `nickname`; "
"DROP INDEX IF EXISTS `app_level.fk_app_level_language2_idx`; "
@@ -582,9 +592,22 @@ const std::string kInsertAppType =
"INSERT OR IGNORE INTO `app_type` (`application_id`, `name`) VALUES (?, ?)";
const std::string kInsertRequestType =
- "INSERT OR IGNORE INTO `request_type` (`application_id`, `request_type`) "
+ "INSERT INTO `request_type` (`application_id`, `request_type`) "
"VALUES (?, ?)";
+const std::string kInsertOmittedRequestType =
+ "INSERT INTO `request_type` (`application_id`) "
+ "VALUES (?)";
+
+const std::string kInsertRequestSubType =
+ "INSERT INTO `request_subtype` (`application_id`, "
+ "`request_subtype`) "
+ "VALUES (?, ?)";
+
+const std::string kInsertOmittedRequestSubType =
+ "INSERT INTO `request_subtype` (`application_id`) "
+ "VALUES (?)";
+
const std::string kUpdateVersion = "UPDATE `version` SET `number`= ?";
const std::string kInsertMessageType =
@@ -695,6 +718,11 @@ const std::string kSelectRequestTypes =
"SELECT DISTINCT `request_type` FROM `request_type` WHERE `application_id` "
"= ?";
+const std::string kSelectRequestSubTypes =
+ "SELECT DISTINCT `request_subtype` FROM `request_subtype` WHERE "
+ "`application_id` "
+ "= ?";
+
const std::string kSelectSecondsBetweenRetries =
"SELECT `value` FROM `seconds_between_retry` ORDER BY `index`";
@@ -740,6 +768,8 @@ const std::string kDeleteApplication = "DELETE FROM `application`";
const std::string kDeleteRequestType = "DELETE FROM `request_type`";
+const std::string kDeleteRequestSubType = "DELETE FROM `request_subtype`";
+
const std::string kSelectApplicationRevoked =
"SELECT `is_revoked` FROM `application` WHERE `id` = ?";
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 9840a08b26..b1e574578e 100644
--- a/src/components/policy/policy_regular/src/sql_pt_representation.cc
+++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc
@@ -723,7 +723,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
if (!GatherAppGroup(app_id, &params.groups)) {
return false;
}
-#ifdef SDL_REMOTE_CONTROL
bool denied = false;
if (!GatherRemoteControlDenied(app_id, &denied)) {
return false;
@@ -733,7 +732,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
return false;
}
}
-#endif // SDL_REMOTE_CONTROL
if (!GatherNickName(app_id, &*params.nicknames)) {
return false;
}
@@ -744,6 +742,10 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
return false;
}
+ if (!GatherRequestSubType(app_id, &*params.RequestSubType)) {
+ return false;
+ }
+
(*policies).apps[app_id] = params;
}
return true;
@@ -837,6 +839,7 @@ bool SQLPTRepresentation::SaveFunctionalGroupings(
bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
const policy_table::Rpc& rpcs) {
+ LOG4CXX_AUTO_TRACE(logger_);
utils::dbms::SQLQuery query(db());
utils::dbms::SQLQuery query_parameter(db());
if (!query.Prepare(sql_pt::kInsertRpc) ||
@@ -900,12 +903,10 @@ bool SQLPTRepresentation::SaveApplicationPoliciesSection(
LOG4CXX_WARN(logger_, "Incorrect delete from app_group.");
return false;
}
-#ifdef SDL_REMOTE_CONTROL
if (!query_delete.Exec(sql_pt::kDeleteModuleTypes)) {
LOG4CXX_WARN(logger_, "Incorrect delete from module_type.");
return false;
}
-#endif // SDL_REMOTE_CONTROL
if (!query_delete.Exec(sql_pt::kDeleteApplication)) {
LOG4CXX_WARN(logger_, "Incorrect delete from application.");
return false;
@@ -916,6 +917,11 @@ bool SQLPTRepresentation::SaveApplicationPoliciesSection(
return false;
}
+ if (!query_delete.Exec(sql_pt::kDeleteRequestSubType)) {
+ LOG4CXX_WARN(logger_, "Incorrect delete from request subtype.");
+ return false;
+ }
+
// All predefined apps (e.g. default, pre_DataConsent) should be saved first,
// otherwise another app with the predefined permissions can get incorrect
// permissions
@@ -988,13 +994,11 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
if (!SaveAppGroup(app.first, app.second.groups)) {
return false;
}
-#ifdef SDL_REMOTE_CONTROL
bool denied = !app.second.moduleType->is_initialized();
if (!SaveRemoteControlDenied(app.first, denied) ||
!SaveModuleType(app.first, *app.second.moduleType)) {
return false;
}
-#endif // SDL_REMOTE_CONTROL
if (!SaveNickname(app.first, *app.second.nicknames)) {
return false;
}
@@ -1006,6 +1010,10 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
return false;
}
+ if (!SaveRequestSubType(app.first, *app.second.RequestSubType)) {
+ return false;
+ }
+
return true;
}
@@ -1109,15 +1117,83 @@ bool SQLPTRepresentation::SaveRequestType(
}
policy_table::RequestTypes::const_iterator it;
- for (it = types.begin(); it != types.end(); ++it) {
+ if (!types.empty()) {
+ LOG4CXX_WARN(logger_, "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.");
+ return false;
+ }
+ }
+ } else if (types.is_initialized()) {
+ LOG4CXX_WARN(logger_, "Request types empty.");
query.Bind(0, app_id);
- query.Bind(1, std::string(policy_table::EnumToJsonString(*it)));
+ 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.");
return false;
}
+ } else {
+ utils::dbms::SQLQuery query_omitted(db());
+ if (!query_omitted.Prepare(sql_pt::kInsertOmittedRequestType)) {
+ LOG4CXX_WARN(logger_, "Incorrect insert statement for request types.");
+ return false;
+ }
+ LOG4CXX_WARN(logger_, "Request types omitted.");
+ query_omitted.Bind(0, app_id);
+ if (!query_omitted.Exec() || !query_omitted.Reset()) {
+ LOG4CXX_WARN(logger_, "Incorrect insert into request types.");
+ return false;
+ }
+ }
+ return true;
+}
+
+bool SQLPTRepresentation::SaveRequestSubType(
+ const std::string& app_id,
+ 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.");
+ return false;
}
+ policy_table::Strings::const_iterator it;
+ if (!request_subtypes.empty()) {
+ LOG4CXX_TRACE(logger_, "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.");
+ return false;
+ }
+ }
+ } else if (request_subtypes.is_initialized()) {
+ LOG4CXX_WARN(logger_, "Request subtypes empty.");
+ query.Bind(0, app_id);
+ query.Bind(1, std::string("EMPTY"));
+ if (!query.Exec() || !query.Reset()) {
+ LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ return false;
+ }
+ } else {
+ utils::dbms::SQLQuery query_omitted(db());
+ if (!query_omitted.Prepare(sql_pt::kInsertOmittedRequestSubType)) {
+ LOG4CXX_WARN(logger_, "Incorrect insert statement for request subtypes.");
+ return false;
+ }
+ LOG4CXX_WARN(logger_, "Request subtypes omitted.");
+ query_omitted.Bind(0, app_id);
+ if (!query_omitted.Exec() || !query_omitted.Reset()) {
+ LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ return false;
+ }
+ }
return true;
}
@@ -1529,11 +1605,36 @@ bool SQLPTRepresentation::GatherRequestType(
if (!policy_table::EnumFromJsonString(query.GetString(0), &type)) {
return false;
}
+ if (policy_table::RequestType::RT_EMPTY == type) {
+ request_types->mark_initialized();
+ continue;
+ }
request_types->push_back(type);
}
return true;
}
+bool SQLPTRepresentation::GatherRequestSubType(
+ const std::string& app_id,
+ 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.");
+ return false;
+ }
+
+ query.Bind(0, app_id);
+ while (query.Next()) {
+ const std::string request_subtype = query.GetString(0);
+ if ("EMPTY" == request_subtype) {
+ request_subtypes->mark_initialized();
+ continue;
+ }
+ request_subtypes->push_back(request_subtype);
+ }
+ return true;
+}
+
bool SQLPTRepresentation::GatherNickName(
const std::string& app_id, policy_table::Strings* nicknames) const {
utils::dbms::SQLQuery query(db());
@@ -1564,8 +1665,6 @@ bool SQLPTRepresentation::GatherAppGroup(
return true;
}
-#ifdef SDL_REMOTE_CONTROL
-
bool SQLPTRepresentation::GatherRemoteControlDenied(const std::string& app_id,
bool* denied) const {
LOG4CXX_AUTO_TRACE(logger_);
@@ -1755,7 +1854,6 @@ bool SQLPTRepresentation::GatherRemoteRpc(
}
return true;
}
-#endif // SDL_REMOTE_CONTROL
bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
bool is_revoked,
@@ -1858,6 +1956,13 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
!SaveRequestType(app_id, request_types)) {
return false;
}
+
+ policy_table::Strings request_subtypes;
+ if (!GatherRequestSubType(kDefaultId, &request_subtypes) ||
+ !SaveRequestSubType(app_id, request_subtypes)) {
+ return false;
+ }
+
policy_table::AppHMITypes app_types;
if (!GatherAppType(kDefaultId, &app_types) ||
!SaveAppType(app_id, app_types)) {
diff --git a/src/components/policy/policy_regular/test/CMakeLists.txt b/src/components/policy/policy_regular/test/CMakeLists.txt
index 62ff691f83..bd6af96867 100644
--- a/src/components/policy/policy_regular/test/CMakeLists.txt
+++ b/src/components/policy/policy_regular/test/CMakeLists.txt
@@ -45,11 +45,6 @@ include_directories(
)
collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
-if (NOT REMOTE_CONTROL)
- list (REMOVE_ITEM SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/access_remote_impl_test.cc
- )
-endif ()
set(LIBRARIES
gmock
diff --git a/src/components/policy/policy_regular/test/PTU.json b/src/components/policy/policy_regular/test/PTU.json
index d9f70426d1..f53ceb735b 100644
--- a/src/components/policy/policy_regular/test/PTU.json
+++ b/src/components/policy/policy_regular/test/PTU.json
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
diff --git a/src/components/policy/policy_regular/test/PTU2.json b/src/components/policy/policy_regular/test/PTU2.json
index b4c3c0624c..6f24ee97f6 100644
--- a/src/components/policy/policy_regular/test/PTU2.json
+++ b/src/components/policy/policy_regular/test/PTU2.json
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
diff --git a/src/components/policy/policy_regular/test/PTU3.json b/src/components/policy/policy_regular/test/PTU3.json
index 6309bd9cfd..e1aaa953c5 100644
--- a/src/components/policy/policy_regular/test/PTU3.json
+++ b/src/components/policy/policy_regular/test/PTU3.json
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
diff --git a/src/components/policy/policy_regular/test/PTU4.json b/src/components/policy/policy_regular/test/PTU4.json
index 651a4cb2ef..dad00de53e 100644
--- a/src/components/policy/policy_regular/test/PTU4.json
+++ b/src/components/policy/policy_regular/test/PTU4.json
@@ -349,12 +349,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +369,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +389,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +408,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
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 5fd0a48f7c..e4e361c52c 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
@@ -53,9 +53,8 @@
#include "utils/date_time.h"
#include "utils/make_shared.h"
#include "utils/gen_hash.h"
-#ifdef SDL_REMOTE_CONTROL
#include "policy/mock_access_remote.h"
-#endif // SDL_REMOTE_CONTROL
+
using ::testing::ReturnRef;
using ::testing::DoAll;
using ::testing::SetArgReferee;
@@ -146,20 +145,15 @@ class PolicyManagerImplTest : public ::testing::Test {
MockCacheManagerInterface* cache_manager;
NiceMock<MockPolicyListener> listener;
const std::string device_id;
-#ifdef SDL_REMOTE_CONTROL
utils::SharedPtr<access_remote_test::MockAccessRemote> access_remote;
-#endif // SDL_REMOTE_CONTROL
void SetUp() OVERRIDE {
manager = new PolicyManagerImpl();
manager->set_listener(&listener);
cache_manager = new MockCacheManagerInterface();
manager->set_cache_manager(cache_manager);
-
-#ifdef SDL_REMOTE_CONTROL
access_remote = new access_remote_test::MockAccessRemote();
manager->set_access_remote(access_remote);
-#endif // SDL_REMOTE_CONTROL
}
void TearDown() OVERRIDE {
diff --git a/src/components/policy/policy_regular/test/ptu2_requestType.json b/src/components/policy/policy_regular/test/ptu2_requestType.json
index e25095bb9f..1f23adda1c 100644
--- a/src/components/policy/policy_regular/test/ptu2_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu2_requestType.json
@@ -485,12 +485,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -506,12 +509,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -527,12 +533,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -547,12 +556,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/policy/policy_regular/test/ptu_requestType.json b/src/components/policy/policy_regular/test/ptu_requestType.json
index c5aa6f0a6c..998ab7f5d4 100644
--- a/src/components/policy/policy_regular/test/ptu_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu_requestType.json
@@ -485,12 +485,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -506,12 +509,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -527,12 +533,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -547,12 +556,15 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
index 10894516cf..7f5436b5b6 100644
--- a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
+++ b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
@@ -20,6 +20,7 @@
"notifications_per_minute_by_priority": {
"EMERGENCY": 60,
"NAVIGATION": 15,
+ "PROJECTION": 15,
"COMMUNICATION": 6,
"NORMAL": 4,
"NONE": 0
@@ -349,12 +350,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -366,12 +370,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -383,12 +390,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
@@ -399,12 +409,15 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"]
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
index ac2b18ab6f..d28f70379c 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_first_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_first_update.json
@@ -1609,12 +1609,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1624,12 +1627,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1639,12 +1645,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1653,12 +1662,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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
index 230ad1fa4f..7bf287671e 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_second_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_second_update.json
@@ -1609,12 +1609,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1624,12 +1627,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1639,12 +1645,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1653,12 +1662,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/policy/policy_regular/test/sdl_pt_update.json b/src/components/policy/policy_regular/test/sdl_pt_update.json
index f890e8e5ae..cb9f9bddf6 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_update.json
@@ -1587,12 +1587,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1602,12 +1605,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1617,12 +1623,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1631,12 +1640,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
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 fd83c82b1a..a5f3741331 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
@@ -289,6 +289,7 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
app_policies["default"]["default_hmi"] = Json::Value("FULL");
app_policies["default"]["keep_context"] = Json::Value(true);
app_policies["default"]["steal_focus"] = Json::Value(true);
+ app_policies["default"]["RequestType"] = Json::Value(Json::arrayValue);
app_policies["pre_DataConsent"] = Json::Value(Json::objectValue);
app_policies["pre_DataConsent"]["memory_kb"] = Json::Value(40);
@@ -300,6 +301,9 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
app_policies["pre_DataConsent"]["is_revoked"] = Json::Value(false);
app_policies["pre_DataConsent"]["keep_context"] = Json::Value(true);
app_policies["pre_DataConsent"]["steal_focus"] = Json::Value(true);
+ app_policies["pre_DataConsent"]["RequestType"] =
+ Json::Value(Json::arrayValue);
+
app_policies["1234"] = Json::Value(Json::objectValue);
app_policies["1234"]["memory_kb"] = Json::Value(150);
app_policies["1234"]["heart_beat_timeout_ms"] = Json::Value(200);
@@ -310,6 +314,8 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
app_policies["1234"]["is_revoked"] = Json::Value(true);
app_policies["1234"]["keep_context"] = Json::Value(false);
app_policies["1234"]["steal_focus"] = Json::Value(false);
+ app_policies["1234"]["RequestType"] = Json::Value(Json::arrayValue);
+
app_policies["device"] = Json::Value(Json::objectValue);
app_policies["device"]["groups"] = Json::Value(Json::arrayValue);
app_policies["device"]["groups"][0] = Json::Value("default");
@@ -420,7 +426,9 @@ TEST_F(SQLPTRepresentationTest,
ASSERT_EQ(0, dbms->FetchOneInt(query_select));
ASSERT_TRUE(reps->RefreshDB());
// Check PT structure destroyed and tables number is 0
- const int32_t total_tables_number = 28;
+
+ // There are 29 tables in the database, now.
+ const int32_t total_tables_number = 29;
ASSERT_EQ(total_tables_number, dbms->FetchOneInt(query_select));
const char* query_select_count_of_iap_buffer_full =
"SELECT `count_of_iap_buffer_full` FROM `usage_and_error_count`";
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
index c384ea73e2..81521a2e0b 100644
--- a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
@@ -1585,12 +1585,15 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1600,12 +1603,15 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"vin",
@@ -1615,12 +1621,15 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
@@ -1629,12 +1638,15 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
"instantFuelConsumption",
+ "fuelRange",
"odometer",
"tirePressure",
"wiperStatus"
diff --git a/src/components/protocol_handler/CMakeLists.txt b/src/components/protocol_handler/CMakeLists.txt
index ed3aaaf24c..d57211040a 100644
--- a/src/components/protocol_handler/CMakeLists.txt
+++ b/src/components/protocol_handler/CMakeLists.txt
@@ -65,7 +65,7 @@ endforeach()
add_library(ProtocolHandler ${SOURCES})
-add_dependencies(ProtocolHandler libbson)
+#add_dependencies(ProtocolHandler libbson)
target_link_libraries(ProtocolHandler ${LIBRARIES})
if(BUILD_TESTS)
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 0ef40290f2..8b7f28d50e 100644
--- a/src/components/protocol_handler/include/protocol_handler/handshake_handler.h
+++ b/src/components/protocol_handler/include/protocol_handler/handshake_handler.h
@@ -61,14 +61,14 @@ class HandshakeHandler : public security_manager::SecurityManagerListener {
const std::vector<int>& force_protected_service,
const bool is_new_service,
ProtocolPacket::ProtocolVersion& full_version,
- std::shared_ptr<uint8_t> payload);
+ std::shared_ptr<BsonObject> payload);
HandshakeHandler(ProtocolHandlerImpl& protocol_handler,
SessionObserver& session_observer,
ProtocolPacket::ProtocolVersion& full_version,
const SessionContext& context,
const uint8_t protocol_version,
- std::shared_ptr<uint8_t> payload);
+ std::shared_ptr<BsonObject> payload);
~HandshakeHandler();
@@ -90,6 +90,12 @@ class HandshakeHandler : public security_manager::SecurityManagerListener {
security_manager::SSLContext::HandshakeResult result) OVERRIDE;
/**
+ * @brief Notification about handshake failure
+ * @return true on success notification handling or false otherwise
+ */
+ bool OnHandshakeFailed() OVERRIDE;
+
+ /**
* @brief Notification that certificate update is required.
*/
void OnCertificateUpdateRequired() OVERRIDE;
@@ -120,7 +126,7 @@ class HandshakeHandler : public security_manager::SecurityManagerListener {
SessionContext context_;
ProtocolPacket::ProtocolVersion full_version_;
const uint8_t protocol_version_;
- std::shared_ptr<uint8_t> payload_;
+ std::shared_ptr<BsonObject> payload_;
};
} // namespace protocol_handler
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 0efb81cdd7..99f03b1c04 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
@@ -235,6 +235,8 @@ class ProtocolHandlerImpl
uint8_t session_id,
uint8_t service_type);
+ void NotifyOnFailedHandshake() OVERRIDE;
+
// TODO(Ezamakhov): move Ack/Nack as interface for StartSessionHandler
/**
* \brief Sends acknowledgement of starting session to mobile application
@@ -473,14 +475,6 @@ class ProtocolHandlerImpl
const transport_manager::ConnectionUID connection_id) OVERRIDE;
/**
- * @brief OnPTUFinished the callback which signals PTU has finished
- *
- * @param ptu_result the result from the PTU - true if successful,
- * otherwise false.
- */
- void OnPTUFinished(const bool ptu_result) OVERRIDE;
-
- /**
* @brief Notifies subscribers about message
* received from mobile device.
* @param message Message with already parsed header.
@@ -683,10 +677,6 @@ class ProtocolHandlerImpl
#ifdef ENABLE_SECURITY
security_manager::SecurityManager* security_manager_;
-
- bool is_ptu_triggered_;
- std::list<std::shared_ptr<HandshakeHandler> > ptu_pending_handlers_;
- sync_primitives::Lock ptu_handlers_lock_;
#endif // ENABLE_SECURITY
// Thread that pumps non-parsed messages coming from mobile side.
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 1c427533e6..b6c05d4c46 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
@@ -252,6 +252,12 @@ class ProtocolPacket {
const size_t messageSize);
/**
+ * @brief Calculates FIRST_FRAME data for further handling of consecutive
+ * frames
+ */
+ void HandleRawFirstFrameData(const uint8_t* message);
+
+ /**
* \brief Getter of protocol version.
*/
uint8_t protocol_version() const;
diff --git a/src/components/protocol_handler/src/handshake_handler.cc b/src/components/protocol_handler/src/handshake_handler.cc
index 055ff2cf45..8db551cfd6 100644
--- a/src/components/protocol_handler/src/handshake_handler.cc
+++ b/src/components/protocol_handler/src/handshake_handler.cc
@@ -55,7 +55,7 @@ HandshakeHandler::HandshakeHandler(
const std::vector<int>& force_protected_service,
const bool is_new_service,
ProtocolPacket::ProtocolVersion& full_version,
- std::shared_ptr<uint8_t> payload)
+ std::shared_ptr<BsonObject> payload)
: protocol_handler_(protocol_handler)
, session_observer_(session_observer)
, context_()
@@ -69,7 +69,7 @@ HandshakeHandler::HandshakeHandler(
ProtocolPacket::ProtocolVersion& full_version,
const SessionContext& context,
const uint8_t protocol_version,
- std::shared_ptr<uint8_t> payload)
+ std::shared_ptr<BsonObject> payload)
: protocol_handler_(protocol_handler)
, session_observer_(session_observer)
, context_(context)
@@ -92,6 +92,19 @@ bool HandshakeHandler::GetPolicyCertificateData(std::string& data) const {
void HandshakeHandler::OnCertificateUpdateRequired() {}
+bool HandshakeHandler::OnHandshakeFailed() {
+ if (payload_) {
+ ProcessFailedHandshake(*payload_);
+ } else {
+ BsonObject params;
+ bson_object_initialize_default(&params);
+ ProcessFailedHandshake(params);
+ bson_object_deinitialize(&params);
+ }
+
+ return true;
+}
+
bool HandshakeHandler::OnHandshakeDone(
uint32_t connection_key,
security_manager::SSLContext::HandshakeResult result) {
@@ -110,20 +123,23 @@ bool HandshakeHandler::OnHandshakeDone(
const bool success =
result == security_manager::SSLContext::Handshake_Result_Success;
- BsonObject params;
if (payload_) {
- params = bson_object_from_bytes(payload_.get());
+ if (success) {
+ ProcessSuccessfulHandshake(connection_key, *payload_);
+ } else {
+ ProcessFailedHandshake(*payload_);
+ }
} else {
+ BsonObject params;
bson_object_initialize_default(&params);
+ if (success) {
+ ProcessSuccessfulHandshake(connection_key, params);
+ } else {
+ ProcessFailedHandshake(params);
+ }
+ bson_object_deinitialize(&params);
}
- if (success) {
- ProcessSuccessfulHandshake(connection_key, params);
- } else {
- ProcessFailedHandshake(params);
- }
-
- bson_object_deinitialize(&params);
return true;
}
diff --git a/src/components/protocol_handler/src/multiframe_builder.cc b/src/components/protocol_handler/src/multiframe_builder.cc
index 5a1fc6d205..cf8a23ddc1 100644
--- a/src/components/protocol_handler/src/multiframe_builder.cc
+++ b/src/components/protocol_handler/src/multiframe_builder.cc
@@ -91,6 +91,8 @@ 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());
ProtocolFramePtrList outpute_frame_list;
for (MultiFrameMap::iterator connection_it = multiframes_map_.begin();
connection_it != multiframes_map_.end();
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index 762b986782..636932f449 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -39,6 +39,7 @@
#include "connection_handler/connection_handler_impl.h"
#include "protocol_handler/session_observer.h"
#include "utils/byte_order.h"
+#include "utils/helpers.h"
#include "protocol/common.h"
#ifdef ENABLE_SECURITY
@@ -75,7 +76,6 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
,
#ifdef ENABLE_SECURITY
security_manager_(NULL)
- , is_ptu_triggered_(false)
,
#endif // ENABLE_SECURITY
raw_ford_messages_from_mobile_(
@@ -279,16 +279,28 @@ void ProtocolHandlerImpl::SendStartSessionAck(
if (ack_protocol_version >= PROTOCOL_VERSION_5) {
ServiceType serviceTypeValue = ServiceTypeFromByte(service_type);
- bson_object_put_int64(
+ const bool mtu_written = bson_object_put_int64(
&params,
strings::mtu,
static_cast<int64_t>(
protocol_header_validator_.max_payload_size_by_service_type(
serviceTypeValue)));
+ LOG4CXX_DEBUG(logger_,
+ "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
- bson_object_put_int32(
+ const bool hash_written = bson_object_put_int32(
&params, strings::hash_id, static_cast<int32_t>(hash_id));
+ 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)));
+
// Minimum protocol version supported by both
ProtocolPacket::ProtocolVersion* minVersion =
(full_version.majorVersion < PROTOCOL_VERSION_5)
@@ -297,8 +309,14 @@ void ProtocolHandlerImpl::SendStartSessionAck(
defaultProtocolVersion);
char protocolVersionString[256];
strncpy(protocolVersionString, (*minVersion).to_string().c_str(), 255);
- bson_object_put_string(
+
+ const bool protocol_ver_written = bson_object_put_string(
&params, strings::protocol_version, protocolVersionString);
+ LOG4CXX_DEBUG(
+ logger_,
+ "Protocol version parameter was written to bson params: "
+ << protocol_ver_written << "; Value: "
+ << bson_object_get_string(&params, strings::protocol_version));
}
uint8_t* payloadBytes = bson_object_to_bytes(&params);
ptr->set_data(payloadBytes, bson_object_size(&params));
@@ -839,56 +857,10 @@ void ProtocolHandlerImpl::OnConnectionClosed(
multiframe_builder_.RemoveConnection(connection_id);
}
-void ProtocolHandlerImpl::OnPTUFinished(const bool ptu_result) {
+void ProtocolHandlerImpl::NotifyOnFailedHandshake() {
LOG4CXX_AUTO_TRACE(logger_);
-
#ifdef ENABLE_SECURITY
- sync_primitives::AutoLock lock(ptu_handlers_lock_);
-
- if (!is_ptu_triggered_) {
- LOG4CXX_ERROR(logger_,
- "PTU was not triggered by service starting. Ignored");
- return;
- }
-
- const bool is_cert_expired = security_manager_->IsCertificateUpdateRequired();
- for (auto handler : ptu_pending_handlers_) {
- security_manager::SSLContext* ssl_context =
- is_cert_expired
- ? NULL
- : security_manager_->CreateSSLContext(handler->connection_key());
-
- if (!ssl_context) {
- const std::string error("CreateSSLContext failed");
- LOG4CXX_ERROR(logger_, error);
- security_manager_->SendInternalError(
- handler->connection_key(),
- security_manager::SecurityManager::ERROR_INTERNAL,
- error);
-
- handler->OnHandshakeDone(
- handler->connection_key(),
- security_manager::SSLContext::Handshake_Result_Fail);
-
- continue;
- }
-
- if (ssl_context->IsInitCompleted()) {
- handler->OnHandshakeDone(
- handler->connection_key(),
- security_manager::SSLContext::Handshake_Result_Success);
- } else {
- security_manager_->AddListener(new HandshakeHandler(*handler));
- if (!ssl_context->IsHandshakePending()) {
- // Start handshake process
- security_manager_->StartHandshake(handler->connection_key());
- }
- }
- }
-
- LOG4CXX_DEBUG(logger_, "Handshake handlers were notified");
- ptu_pending_handlers_.clear();
- is_ptu_triggered_ = false;
+ security_manager_->NotifyListenersOnHandshakeFailed();
#endif // ENABLE_SECURITY
}
@@ -1286,7 +1258,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
session_observer_.KeyFromPair(connection_id, session_id);
security_manager::SSLContext* ssl_context =
- security_manager_->CreateSSLContext(connection_key);
+ security_manager_->CreateSSLContext(
+ connection_key, security_manager::SecurityManager::kUseExisting);
if (!ssl_context) {
const std::string error("CreateSSLContext failed");
LOG4CXX_ERROR(logger_, error);
@@ -1416,11 +1389,11 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
}
#ifdef ENABLE_SECURITY
+ const uint8_t protocol_version = packet->protocol_version();
const bool protection =
- // Protocol version 1 is not support protection
- (packet->protocol_version() > PROTOCOL_VERSION_1)
- ? packet->protection_flag()
- : false;
+ // Protocol version 1 does not support protection
+ (protocol_version > PROTOCOL_VERSION_1) ? packet->protection_flag()
+ : false;
#else
const bool protection = false;
#endif // ENABLE_SECURITY
@@ -1552,51 +1525,19 @@ void ProtocolHandlerImpl::NotifySessionStarted(
const uint32_t connection_key = session_observer_.KeyFromPair(
context.connection_id_, context.new_session_id_);
- std::shared_ptr<uint8_t> bson_object_bytes(
- bson_object_to_bytes(start_session_ack_params.get()),
- [](uint8_t* p) { delete[] p; });
-
std::shared_ptr<HandshakeHandler> handler =
std::make_shared<HandshakeHandler>(*this,
session_observer_,
*fullVersion,
context,
packet->protocol_version(),
- bson_object_bytes);
-
- const bool is_certificate_empty =
- security_manager_->IsPolicyCertificateDataEmpty();
-
- const bool is_certificate_expired =
- is_certificate_empty ||
- security_manager_->IsCertificateUpdateRequired();
-
- if (context.is_ptu_required_ && is_certificate_empty) {
- LOG4CXX_DEBUG(logger_,
- "PTU for StartSessionHandler "
- << handler.get()
- << " is required and certificate data is empty");
-
- sync_primitives::AutoLock lock(ptu_handlers_lock_);
- if (!is_ptu_triggered_) {
- LOG4CXX_DEBUG(logger_,
- "PTU is not triggered yet. "
- << "Starting PTU and postponing SSL handshake");
-
- ptu_pending_handlers_.push_back(handler);
- is_ptu_triggered_ = true;
- security_manager_->NotifyOnCertificateUpdateRequired();
- } else {
- LOG4CXX_DEBUG(logger_, "PTU has been triggered. Added to pending.");
- ptu_pending_handlers_.push_back(handler);
- }
- return;
- }
+ start_session_ack_params);
security_manager::SSLContext* ssl_context =
- is_certificate_expired
- ? NULL
- : security_manager_->CreateSSLContext(connection_key);
+ security_manager_->CreateSSLContext(
+ connection_key,
+ security_manager::SecurityManager::ContextCreationStrategy::
+ kUseExisting);
if (!ssl_context) {
const std::string error("CreateSSLContext failed");
LOG4CXX_ERROR(logger_, error);
@@ -1630,12 +1571,27 @@ void ProtocolHandlerImpl::NotifySessionStarted(
*fullVersion,
*start_session_ack_params);
} else {
- security_manager_->AddListener(new HandshakeHandler(*handler));
+ LOG4CXX_DEBUG(logger_,
+ "Adding Handshake handler to listeners: " << handler.get());
+ security_manager::SecurityManagerListener* listener =
+ new HandshakeHandler(*handler);
+ security_manager_->AddListener(listener);
+
if (!ssl_context->IsHandshakePending()) {
// Start handshake process
security_manager_->StartHandshake(connection_key);
+
+ if (!security_manager_->IsSystemTimeProviderReady()) {
+ security_manager_->RemoveListener(listener);
+ SendStartSessionNAck(context.connection_id_,
+ packet->session_id(),
+ protocol_version,
+ packet->service_type(),
+ rejected_params);
+ }
}
}
+
LOG4CXX_DEBUG(logger_,
"Protection establishing for connection "
<< connection_key << " is in progress");
@@ -1688,6 +1644,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat(
}
void ProtocolHandlerImpl::PopValideAndExpirateMultiframes() {
+ LOG4CXX_AUTO_TRACE(logger_);
const ProtocolFramePtrList& frame_list = multiframe_builder_.PopMultiframes();
for (ProtocolFramePtrList::const_iterator it = frame_list.begin();
it != frame_list.end();
@@ -1845,7 +1802,9 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
DCHECK(packet);
// Control frames and data over control service shall be unprotected
if (packet->service_type() == kControl ||
- packet->frame_type() == FRAME_TYPE_CONTROL) {
+ // For protocol v5 control frames could be protected
+ (packet->frame_type() == FRAME_TYPE_CONTROL &&
+ packet->protocol_version() < PROTOCOL_VERSION_5)) {
return RESULT_OK;
}
if (!security_manager_) {
@@ -1888,12 +1847,30 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
DCHECK(packet);
- if (!packet->protection_flag() ||
- // Control frames and data over control service shall be unprotected
- packet->service_type() == kControl ||
- packet->frame_type() == FRAME_TYPE_CONTROL) {
+
+ bool shoud_not_decrypt;
+ if (packet->protocol_version() >= PROTOCOL_VERSION_5) {
+ // For v5 protocol control frames except StartService could be encrypted
+ shoud_not_decrypt =
+ !packet->protection_flag() || packet->service_type() == kControl ||
+ (FRAME_TYPE_CONTROL == packet->frame_type() &&
+ helpers::Compare<ServiceType, helpers::EQ, helpers::ONE>(
+ static_cast<ServiceType>(packet->service_type()),
+ kMobileNav,
+ kAudio,
+ kRpc));
+ } else {
+ // Control frames and data over control service shall be unprotected
+ shoud_not_decrypt = !packet->protection_flag() ||
+ packet->service_type() == kControl ||
+ packet->frame_type() == FRAME_TYPE_CONTROL;
+ }
+
+ if (shoud_not_decrypt) {
+ LOG4CXX_DEBUG(logger_, "Frame will not be decrypted");
return RESULT_OK;
}
+
if (!security_manager_) {
LOG4CXX_WARN(logger_, "No security_manager_ set.");
return RESULT_FAIL;
@@ -1934,6 +1911,11 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
<< out_data_size << " bytes");
DCHECK(out_data);
DCHECK(out_data_size);
+ // Special handling for decrypted FIRST_FRAME
+ if (packet->frame_type() == FRAME_TYPE_FIRST && packet->protection_flag()) {
+ packet->HandleRawFirstFrameData(out_data);
+ return RESULT_OK;
+ }
packet->set_data(out_data, out_data_size);
return RESULT_OK;
}
diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc
index ae52849de6..a490916c99 100644
--- a/src/components/protocol_handler/src/protocol_packet.cc
+++ b/src/components/protocol_handler/src/protocol_packet.cc
@@ -520,6 +520,17 @@ bool ProtocolPacket::operator==(const ProtocolPacket& other) const {
return false;
}
+void ProtocolPacket::HandleRawFirstFrameData(const uint8_t* message) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ payload_size_ = 0;
+ const uint8_t* data = message;
+ uint32_t total_data_bytes = data[0] << 24;
+ total_data_bytes |= data[1] << 16;
+ total_data_bytes |= data[2] << 8;
+ total_data_bytes |= data[3];
+ set_total_data_bytes(total_data_bytes);
+}
+
RESULT_CODE ProtocolPacket::deserializePacket(const uint8_t* message,
const size_t messageSize) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -532,18 +543,15 @@ RESULT_CODE ProtocolPacket::deserializePacket(const uint8_t* message,
packet_data_.totalDataBytes = packet_header_.dataSize;
uint32_t dataPayloadSize = 0;
- if ((offset < messageSize) && packet_header_.frameType != FRAME_TYPE_FIRST) {
+ if ((offset < messageSize)) {
dataPayloadSize = messageSize - offset;
}
- if (packet_header_.frameType == FRAME_TYPE_FIRST) {
+ if (packet_header_.frameType == FRAME_TYPE_FIRST &&
+ !packet_header_.protection_flag) {
payload_size_ = 0;
const uint8_t* data = message + offset;
- uint32_t total_data_bytes = data[0] << 24;
- total_data_bytes |= data[1] << 16;
- total_data_bytes |= data[2] << 8;
- total_data_bytes |= data[3];
- set_total_data_bytes(total_data_bytes);
+ HandleRawFirstFrameData(data);
if (0 == packet_data_.data) {
return RESULT_FAIL;
}
@@ -602,6 +610,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);
if (dataBytes) {
delete[] packet_data_.data;
packet_data_.data = new (std::nothrow) uint8_t[dataBytes];
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 77de1705da..0cb8e155d0 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -46,6 +46,7 @@
#include "security_manager/mock_ssl_context.h"
#endif // ENABLE_SECURITY
#include "transport_manager/mock_transport_manager.h"
+#include "utils/mock_system_time_handler.h"
#include "utils/make_shared.h"
#include "utils/test_async_waiter.h"
#include <bson_object.h>
@@ -95,8 +96,14 @@ using protocol_handler::kBulk;
using protocol_handler::kInvalidServiceType;
// For TM states
using transport_manager::TransportManagerListener;
+using test::components::security_manager_test::MockSystemTimeHandler;
using transport_manager::E_SUCCESS;
using transport_manager::DeviceInfo;
+#ifdef ENABLE_SECURITY
+// For security
+using ContextCreationStrategy =
+ security_manager::SecurityManager::ContextCreationStrategy;
+#endif // ENABLE_SECURITY
// For CH entities
using connection_handler::DeviceHandle;
// Google Testing Framework Entities
@@ -618,6 +625,18 @@ TEST_F(ProtocolHandlerImplTest,
const ::transport_manager::ConnectionUID connection_id2 = 0xBu;
const uint8_t session_id2 = 2u;
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock, KeyFromPair(connection_id2, session_id2))
+ .WillOnce(Return(connection_key));
+
+ EXPECT_CALL(session_observer_mock,
+ GetSSLContext(connection_key, start_service))
+ .Times(2)
+ .WillRepeatedly(ReturnNull());
+#endif // ENABLE_SECURITY
+
EXPECT_CALL(session_observer_mock, IsHeartBeatSupported(connection_id1, _))
.WillRepeatedly(Return(false));
EXPECT_CALL(session_observer_mock, IsHeartBeatSupported(connection_id2, _))
@@ -987,7 +1006,10 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_Fail) {
SetProtocolVersion2();
// Expect start protection for unprotected session
- EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key))
+ EXPECT_CALL(security_manager_mock,
+ CreateSSLContext(connection_key,
+ security_manager::SecurityManager::
+ ContextCreationStrategy::kUseExisting))
.
// Return fail protection
WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
@@ -1042,7 +1064,7 @@ TEST_F(ProtocolHandlerImplTest,
SetProtocolVersion2();
// call new SSLContext creation
- EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key))
+ EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
WillOnce(
@@ -1119,7 +1141,7 @@ TEST_F(ProtocolHandlerImplTest,
.WillOnce(ReturnRefOfCopy(services));
// call new SSLContext creation
- EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key))
+ EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
WillOnce(Return(&ssl_context_mock));
@@ -1198,7 +1220,7 @@ TEST_F(ProtocolHandlerImplTest,
times++;
// call new SSLContext creation
- EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key))
+ EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
WillOnce(
@@ -1296,7 +1318,7 @@ TEST_F(
times++;
// call new SSLContext creation
- EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key))
+ EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
WillOnce(
@@ -1392,7 +1414,10 @@ TEST_F(ProtocolHandlerImplTest,
times++;
// call new SSLContext creation
- EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key))
+ EXPECT_CALL(security_manager_mock,
+ CreateSSLContext(connection_key,
+ security_manager::SecurityManager::
+ ContextCreationStrategy::kUseExisting))
.
// Return new SSLContext
WillOnce(
@@ -1420,27 +1445,37 @@ TEST_F(ProtocolHandlerImplTest,
// Expect add listener for handshake result
EXPECT_CALL(security_manager_mock, AddListener(_))
- // Emulate handshake fail
- .WillOnce(Invoke(OnHandshakeDoneFunctor(
- connection_key,
- security_manager::SSLContext::Handshake_Result_Success)));
+ // Emulate handshake
+ .WillOnce(
+ DoAll(NotifyTestAsyncWaiter(&waiter),
+ Invoke(OnHandshakeDoneFunctor(
+ connection_key,
+ security_manager::SSLContext::Handshake_Result_Success))));
+ times++;
// Listener check SSLContext
EXPECT_CALL(session_observer_mock,
GetSSLContext(connection_key, start_service))
.
// Emulate protection for service is not enabled
- WillOnce(ReturnNull());
+ WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
+ times++;
+
+ EXPECT_CALL(security_manager_mock, IsSystemTimeProviderReady())
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ times++;
- // Expect service protection enable
EXPECT_CALL(session_observer_mock,
- SetProtectionFlag(connection_key, start_service));
+ SetProtectionFlag(connection_key, start_service))
+ .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ times++;
- // Expect send Ack with PROTECTION_OFF (on fail handshake)
+ // Expect send Ack with PROTECTION_ON (on successfull handshake)
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_ON)))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+
times++;
SendControlMessage(
@@ -1989,7 +2024,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeat_Successful) {
transport_manager_mock,
SendMessageToDevice(ExpectedMessage(
FRAME_TYPE_CONTROL, FRAME_DATA_HEART_BEAT, PROTECTION_OFF, kControl)))
- .WillOnce(Return(E_SUCCESS));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
+ times++;
// Act
protocol_handler_impl->SendHeartBeat(connection_id, session_id);
@@ -2086,7 +2122,8 @@ TEST_F(ProtocolHandlerImplTest,
transport_manager_mock,
SendMessageToDevice(ExpectedMessage(
FRAME_TYPE_SINGLE, FRAME_DATA_SINGLE, PROTECTION_OFF, kControl)))
- .WillOnce(Return(E_SUCCESS));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
+ times++;
// Act
protocol_handler_impl->SendMessageToMobileApp(message, is_final);
diff --git a/src/components/remote_control/CMakeLists.txt b/src/components/remote_control/CMakeLists.txt
deleted file mode 100644
index a320273a1e..0000000000
--- a/src/components/remote_control/CMakeLists.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-set(target "RemoteControlModule")
-set(install_destination ${CMAKE_BINARY_DIR}/bin/plugins)
-if (ENABLE_GCOV)
- set(GCOV_FLAGS "-ftest-coverage -fprofile-arcs")
-else()
- set(GCOV_FLAGS "")
-endif()
-
-if (CMAKE_BUILD_TYPE)
- if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
- set(CMAKE_CXX_FLAGS_DEBUG "")
- else ()
- set(CMAKE_CXX_FLAGS_RELEASE "")
- set(CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG")
- endif()
-endif()
-
-include_directories (
- ${COMPONENTS_DIR}/include/
- ${COMPONENTS_DIR}/application_manager/include
- ${COMPONENTS_DIR}/remote_control/include/
- ${COMPONENTS_DIR}/connection_handler/include/
- ${COMPONENTS_DIR}/protocol_handler/include/
- ${COMPONENTS_DIR}/functional_module/include/
- ${COMPONENTS_DIR}/config_profile/include/
-
- ${COMPONENTS_DIR}/hmi_message_handler/include/
- ${COMPONENTS_DIR}/formatters/include/
- ${POLICY_PATH}/include/
- ${POLICY_GLOBAL_INCLUDE_PATH}/
- ${COMPONENTS_DIR}/rpc_base/include/
- ${COMPONENTS_DIR}/application_manager/test/include/
-
- ${COMPONENTS_DIR}/smart_objects/include/
- ${COMPONENTS_DIR}/utils/include/
- ${JSONCPP_INCLUDE_DIRECTORY}
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${CMAKE_BINARY_DIR}/src/components/
-)
-
-set (RC_SOURCE_DIR ${COMPONENTS_DIR}/remote_control/src)
-set (RC_TEST_DIR ${COMPONENTS_DIR}/remote_control/test)
-set (RC_COMMANDS_DIR ${RC_SOURCE_DIR}/commands)
-
-collect_sources(RC_SOURCES "${RC_SOURCE_DIR}")
-collect_sources(RC_COMMANDS_SOURCES "${RC_COMMANDS_DIR}")
-
-set (SOURCES
- ${RC_SOURCES}
- ${RC_COMMANDS_SOURCES}
-)
-
-set (LIBRARIES
- jsoncpp
- FunctionalModule
- Utils
- ConfigProfile
-)
-
-add_library(${target} SHARED ${SOURCES})
-target_link_libraries(${target} ${LIBRARIES} )
-
-if(ENABLE_LOG)
- target_link_libraries(${target} log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
-endif()
-
-
-install(TARGETS ${target}
- DESTINATION ${install_destination}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
-)
-
-install(
- FILES ${FILES_FOR_COPY}
- DESTINATION ${install_destination}
-)
-
-if(BUILD_TESTS)
- add_subdirectory(test)
-endif()
diff --git a/src/components/remote_control/include/remote_control/commands/base_command_notification.h b/src/components/remote_control/include/remote_control/commands/base_command_notification.h
deleted file mode 100644
index 578afad67b..0000000000
--- a/src/components/remote_control/include/remote_control/commands/base_command_notification.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BASE_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BASE_COMMAND_NOTIFICATION_H_
-
-#include "remote_control/commands/command.h"
-#include "application_manager/message.h"
-#include "application_manager/service.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/remote_plugin_interface.h"
-#include "utils/logger.h"
-
-namespace Json {
-class Value;
-}
-
-namespace remote_control {
-
-namespace commands {
-
-/**
- * @brief Base command class for notifications
- */
-class BaseCommandNotification : public Command {
- public:
- /**
- * @brief BaseCommandNotification class constructor
- *
- * @param message Message from mobile
- **/
- BaseCommandNotification(const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
-
- /**
- * @brief BaseCommandNotification class destructor
- */
- virtual ~BaseCommandNotification();
-
- /**
- * \brief BaseCommandNotification on timeout reaction
- */
- virtual void OnTimeout() {}
-
- void Run();
-
- protected:
- application_manager::MessagePtr message() {
- return message_;
- }
- application_manager::ServicePtr service_;
-
- RCAppExtensionPtr GetAppExtension(
- application_manager::ApplicationSharedPtr app) const;
-
- /**
- * @brief executes specific logic of children classes
- */
- virtual void Execute() = 0;
-
- /**
- * @brief Validates notification by xml schema
- */
- virtual bool Validate();
-
- virtual std::string ModuleType(const Json::Value& message);
- virtual std::vector<std::string> ControlData(const Json::Value& message);
-
- void NotifyOneApplication(application_manager::MessagePtr message);
-
- private:
- void NotifyApplications();
- bool CheckPolicy(application_manager::MessagePtr message);
- application_manager::MessagePtr message_;
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BASE_COMMAND_NOTIFICATION_H_
diff --git a/src/components/remote_control/include/remote_control/commands/base_command_request.h b/src/components/remote_control/include/remote_control/commands/base_command_request.h
deleted file mode 100644
index 64128b971e..0000000000
--- a/src/components/remote_control/include/remote_control/commands/base_command_request.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BASE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BASE_COMMAND_REQUEST_H_
-
-#include "remote_control/commands/command.h"
-#include "remote_control/event_engine/event_observer.h"
-#include "application_manager/message.h"
-#include "application_manager/service.h"
-#include "utils/logger.h"
-#include "interfaces/HMI_API.h"
-#include "remote_control/rc_app_extension.h"
-#include "json/json.h"
-#include "remote_control/remote_plugin_interface.h"
-
-namespace remote_control {
-
-namespace commands {
-
-// Forward declaration to make this struct friend to BaseCommandRequest
-struct OnDriverAnswerCallback;
-
-/**
- * @brief Base command class for requests
- */
-class BaseCommandRequest
- : public Command,
- public rc_event_engine::EventObserver<application_manager::MessagePtr,
- std::string> {
- public:
- /**
- * @brief BaseCommandRequest class constructor
- *
- * @param message Message from mobile
- **/
- BaseCommandRequest(const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
-
- /**
- * @brief BaseCommandRequest class destructor
- */
- virtual ~BaseCommandRequest();
-
- /**
- * @brief BaseCommandRequest on timeout reaction
- */
- virtual void OnTimeout();
-
- void Run();
- void on_event(const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event);
-
- /**
- * @brief Generates correct request to HMI
- * @param function_id request ID
- * @param msg_params json with message params
- * @return generated request shared ptr
- */
- application_manager::MessagePtr CreateHmiRequest(
- const char* function_id, const Json::Value& message_params);
-
- /**
- * @brief Prepares response for sending to mobile
- * Adds necessary fields to message
- * @param success true if successful; false, if failed
- * @param result_code Mobile result code in string ("SUCCESS", "INVALID_DATA",
- * e.t.c)
- * @param info Provides additional human readable info regarding the
- *result(may be empty)
- */
- void PrepareResponse(const bool success,
- const char* result_code,
- const std::string& info);
-
- protected:
- application_manager::MessagePtr message_;
- Json::Value response_params_;
-
- /**
- * @brief AcquireResource try to allocate resource for application
- * In case if allocation of resource is not required, return ALLOWED by
- * default.
- * This method should be overrided in RPCs that requires resource allocation
- * @return result of resource allocation, in case if allocation os not
- * required, return ALLOWED
- */
- virtual AcquireResult::eType AcquireResource(const Json::Value&) {
- return AcquireResult::ALLOWED;
- }
-
- /**
- * @brief IsResourceFree check resource state
- * This is default implementation which has to be redefined for RPCs which
- * need to manage the resources
- * @param module_type Resource name
- * @return True if free, otherwise - false
- */
- virtual bool IsResourceFree(const std::string& module_type) const {
- UNUSED(module_type);
- return true;
- }
-
- /**
- * @brief SetResourceState changes state of resource
- * This is default implementation which has to be redefined for RPCs which
- * need to manage the resources
- * @param Message containing type of module to extract
- * @param State to set for resource
- */
- virtual void SetResourceState(const Json::Value&,
- const ResourceState::eType) {}
-
- /**
- * @brief Get extension for specified application. If extension doesn't exist,
- * it will be created
- * @param app pointer to application
- * @return pointer to extension
- */
- RCAppExtensionPtr GetAppExtension(
- application_manager::ApplicationSharedPtr app) const;
-
- /**
- * @brief Converts HMI result code to string with mobile result code
- *
- * @param hmi_code HMI result code
- * @return String with mobile result code
- */
- const char* GetMobileResultCode(
- const hmi_apis::Common_Result::eType& hmi_code) const;
-
- /**
- * @brief Sends Mobile response
- * @param success true if successful; false, if failed
- * @param result_code Mobile result code in string ("SUCCESS", "INVALID_DATA",
- *e.t.c)
- * @param info Provides additional human readable info regarding the
- *result(may be empty)
- */
- void SendResponse(const bool success,
- const char* result_code,
- const std::string& info);
-
- /**
- * @brief Parse result code from response
- *
- * @param message Response from HMI or Can
- * @param result_code Outgoing param with mobile result code in string
- *("SUCCESS", "INVALID_DATA", e.t.c)
- * @param info Outgoing param with additional human readable info regarding
- *the result(may be empty)
- * @return true if it is success response? otherwise false
- */
- bool ParseResultCode(const Json::Value& value,
- std::string& result_code,
- std::string& info);
-
- /**
- * @brief Sends request to HMI
- * @param message_to_send to send
- */
- void SendMessageToHMI(const application_manager::MessagePtr& message_to_send);
-
- /**
- * @brief Sends request to CAN or HMI
- * @param function_id request ID
- * @param msg_params json with message params
- */
- void SendRequest(const char* function_id, const Json::Value& message_params);
-
- application_manager::ApplicationSharedPtr app() {
- DCHECK(app_);
- return app_;
- }
-
- /**
- * @brief executes specific logic of children classes
- */
- void virtual Execute() = 0;
-
- /**
- * @brief Validates request by xml schema
- */
- bool Validate();
-
- /*
- * @brief Parses incoming string into Json
- * @param parsed_mgs Resulting json object (must be valid pointer)
- * @returns True if json string was valid false otherwise.
- */
- virtual bool ParseJsonString(Json::Value* parsed_msg);
-
- /**
- * @brief Interface method that is called whenever new event received
- * @param event The received event
- */
- void virtual OnEvent(
- const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event) = 0;
-
- virtual std::string ModuleType(const Json::Value& message);
- virtual std::vector<std::string> ControlData(const Json::Value& message);
- virtual application_manager::TypeAccess CheckModule(
- const Json::Value& message);
-
- bool auto_allowed() const {
- return auto_allowed_;
- }
-
- void set_auto_allowed(bool value) {
- auto_allowed_ = value;
- }
-
- application_manager::ServicePtr service() {
- return service_;
- }
-
- void set_disallowed_info(const std::string& info) {
- disallowed_info_ = info;
- }
-
- private:
- /**
- * @brief CheckPolicyPermissions checks RPC permissions defined in policy
- * table
- * @return True if RPC is allowed, otherwise - false
- */
- bool CheckPolicyPermissions();
-
- /**
- * @brief CheckDriverConsent checks driver consent defined in policy table
- * @return True if no consent is required, otherwise - false
- */
- bool CheckDriverConsent();
-
- /**
- * @brief AcquireResources checks whether resource status is busy or not and
- * then tries to acquire this resource. In case driver consent is required -
- * sends consent request to HMI.
- * @return True in case of resource is free and successfully acquired,
- * otherwise false
- */
- bool AcquireResources();
- inline bool IsAutoAllowed(application_manager::TypeAccess access) const;
- void SendDisallowed(application_manager::TypeAccess access);
- void SendGetUserConsent(const Json::Value& value);
- void ProcessAccessResponse(
- const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event);
-
- const Json::Value msg_json_;
- application_manager::ApplicationSharedPtr app_;
- application_manager::ServicePtr service_;
- bool auto_allowed_;
- std::string disallowed_info_;
-
- friend struct OnDriverAnswerCallback;
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BASE_COMMAND_REQUEST_H_
diff --git a/src/components/remote_control/include/remote_control/commands/button_press_request.h b/src/components/remote_control/include/remote_control/commands/button_press_request.h
deleted file mode 100644
index 945f98bdc8..0000000000
--- a/src/components/remote_control/include/remote_control/commands/button_press_request.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BUTTON_PRESS_REQUEST_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BUTTON_PRESS_REQUEST_H_
-
-#include "remote_control/commands/base_command_request.h"
-#include "remote_control/event_engine/event.h"
-#include "utils/macro.h"
-
-namespace remote_control {
-
-namespace commands {
-
-/**
- * @brief ButtonPressRequest command class
- */
-class ButtonPressRequest : public BaseCommandRequest {
- public:
- /**
- * @brief ButtonPressRequest class constructor
- *
- * @param message Message from mobile
- **/
- ButtonPressRequest(const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
- /**
- * @brief Execute command
- */
- void Execute() FINAL;
-
- /**
- * @brief AcquireResource Tries to acquire specific resource
- * @param message Incoming message containg the resource name
- * @return Acquire result
- */
- AcquireResult::eType AcquireResource(
- const Json::Value& message) OVERRIDE FINAL;
-
- /**
- * @brief IsResourceFree check resource state
- * @param module_type Resource name
- * @return True if free, otherwise - false
- */
- bool IsResourceFree(const std::string& module_type) const FINAL;
-
- /**
- * @brief SetResourceState changes state of resource
- * @param state State to set for resource
- */
- void SetResourceState(const Json::Value& message,
- const ResourceState::eType state) FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void OnEvent(const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event);
-
- /**
- * @brief ButtonPressRequest class destructor
- */
- virtual ~ButtonPressRequest();
-
- protected:
- std::string ModuleType(const Json::Value& message) FINAL;
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_BUTTON_PRESS_REQUEST_H_
diff --git a/src/components/remote_control/include/remote_control/commands/command.h b/src/components/remote_control/include/remote_control/commands/command.h
deleted file mode 100644
index 0e03f8b330..0000000000
--- a/src/components/remote_control/include/remote_control/commands/command.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_COMMAND_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_COMMAND_H_
-
-#include "utils/shared_ptr.h"
-#include "remote_control/remote_plugin_interface.h"
-#include "remote_control/event_engine/event.h"
-
-namespace remote_control {
-
-class RemotePluginInterface;
-
-namespace commands {
-
-/**
- * @brief Command interface
- **/
-class Command {
- public:
- /**
- * @brief Execute command
- */
- virtual void Run() = 0;
-
- /**
- * \brief Command class destructor
- */
- virtual ~Command() {}
-
- /**
- * \brief Command on timeout reaction
- */
- virtual void OnTimeout() = 0;
-
- /**
- * @brief Interface method that is called whenever new event received
- * @param event The received event
- */
- virtual void on_event(
- const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event) {}
-
- protected:
- Command(RemotePluginInterface& rc_module) : rc_module_(rc_module) {}
-
- RemotePluginInterface& rc_module_;
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_COMMAND_H_
diff --git a/src/components/remote_control/include/remote_control/commands/get_interior_vehicle_data_request.h b/src/components/remote_control/include/remote_control/commands/get_interior_vehicle_data_request.h
deleted file mode 100644
index 220f7da979..0000000000
--- a/src/components/remote_control/include/remote_control/commands/get_interior_vehicle_data_request.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
-
-#include "remote_control/commands/base_command_request.h"
-#include "remote_control/event_engine/event.h"
-#include "utils/macro.h"
-
-namespace remote_control {
-
-namespace commands {
-
-/**
- * @brief GetInteriorVehicleDataRequest command class
- */
-class GetInteriorVehicleDataRequest : public BaseCommandRequest {
- public:
- /**
- * @brief GetInteriorVehicleDataRequest class constructor
- *
- * @param message Message from mobile
- **/
- explicit GetInteriorVehicleDataRequest(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
-
- /**
- * @brief Execute command
- */
- void Execute() FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void OnEvent(const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event);
-
- /**
- * @brief Check if app wants to proceed with already setup subscription
- * @param request_params request parameters to check
- * @return true if app already subscribed(unsubsribed) for module type but
- * wants to subscribe(unsubscribe) for the same module again
- * otherwise - false
- */
- bool HasRequestExcessiveSubscription(const Json::Value& request_params);
-
- protected:
- virtual std::string ModuleType(const Json::Value& message);
-
- private:
- /**
- * @brief Handle subscription to vehicle data
- * @param hmi_response json message with response from HMI
- */
- void ProccessSubscription(const Json::Value& hmi_response);
-
- /**
- * @brief Cuts off subscribe parameter
- * @param request_params request parameters to handle
- */
- void RemoveExcessiveSubscription(Json::Value& request_params);
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/remote_control/include/remote_control/commands/on_interior_vehicle_data_notification.h b/src/components/remote_control/include/remote_control/commands/on_interior_vehicle_data_notification.h
deleted file mode 100644
index 4ee9ce4709..0000000000
--- a/src/components/remote_control/include/remote_control/commands/on_interior_vehicle_data_notification.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
-
-#include "utils/macro.h"
-#include "remote_control/commands/base_command_notification.h"
-
-namespace remote_control {
-
-namespace commands {
-
-/**
- * @brief OnInteriorVehicleDataNotification command class
- */
-class OnInteriorVehicleDataNotification : public BaseCommandNotification {
- public:
- /**
- * @brief OnInteriorVehicleDataNotification class constructor
- *
- * @param message Message with notification
- **/
- OnInteriorVehicleDataNotification(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
-
- /**
- * @brief Execute command
- */
- void Execute() FINAL;
-
- /**
- * @brief OnInteriorVehicleDataNotification class destructor
- */
- virtual ~OnInteriorVehicleDataNotification();
-
- protected:
- std::string ModuleType(const Json::Value& message) FINAL;
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/remote_control/include/remote_control/commands/on_remote_control_settings_notification.h b/src/components/remote_control/include/remote_control/commands/on_remote_control_settings_notification.h
deleted file mode 100644
index ef248a2b38..0000000000
--- a/src/components/remote_control/include/remote_control/commands/on_remote_control_settings_notification.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H_
-
-#include "utils/macro.h"
-#include "remote_control/commands/base_command_notification.h"
-
-namespace remote_control {
-
-namespace commands {
-
-/**
- * @brief OnRemoteControlSettingsNotification command class
- */
-class OnRemoteControlSettingsNotification : public BaseCommandNotification {
- public:
- /**
- * @brief OnRemoteControlSettingsNotification class constructor
- *
- * @param message Message with notification
- * @param rc_module Module used for handling RC functionality
- **/
- OnRemoteControlSettingsNotification(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
-
- /**
- * @brief Execute command
- */
- void Execute() FINAL;
-
- private:
- /**
- * @brief Disalows RC functionality for all RC apps
- * All registered apps with appHMIType REMOTE_CONTROL will be put to NONE hmi
- * level
- * OnHMIStatus (NONE) will be send to such apps
- * All registered apps will be unsubsribed from OnInteriorVehicleData
- * notifications
- */
- void DisallowRCFunctionality();
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H_
diff --git a/src/components/remote_control/include/remote_control/commands/set_interior_vehicle_data_request.h b/src/components/remote_control/include/remote_control/commands/set_interior_vehicle_data_request.h
deleted file mode 100644
index bc1e3942e5..0000000000
--- a/src/components/remote_control/include/remote_control/commands/set_interior_vehicle_data_request.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_
-
-#include "remote_control/commands/base_command_request.h"
-#include "remote_control/event_engine/event.h"
-#include "utils/macro.h"
-
-namespace remote_control {
-
-namespace commands {
-
-/**
- * @brief SetInteriorVehicleDataRequest command class
- */
-class SetInteriorVehicleDataRequest : public BaseCommandRequest {
- public:
- /**
- * @brief SetInteriorVehicleDataRequest class constructor
- *
- * @param message Message from mobile
- * @param rc_module Module used for handling RC functionality
- **/
- SetInteriorVehicleDataRequest(const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module);
-
- /**
- * @brief Execute command
- */
- void Execute() FINAL;
-
- /**
- * @brief AcquireResource proxy AcquireResource to Resource allocation manager
- * @param message message of requires contatin module types
- * @return result of acauiring resources
- */
- AcquireResult::eType AcquireResource(
- const Json::Value& message) OVERRIDE FINAL;
-
- /**
- * @brief IsResourceFree check resource state
- * @param module_type Resource name
- * @return True if free, otherwise - false
- */
- bool IsResourceFree(const std::string& module_type) const FINAL;
-
- /**
- * @brief SetResourceState changes state of resource
- * @param state State to set for resource
- */
- void SetResourceState(const Json::Value& message,
- const ResourceState::eType state) FINAL;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void OnEvent(const rc_event_engine::Event<application_manager::MessagePtr,
- std::string>& event) OVERRIDE;
- /**
- * @brief Method that check if READ_ONLY parameters present
- * @param request_params params from received message
- * @return true if present , false - otherwise
- */
- bool AreReadOnlyParamsPresent(const Json::Value& request_params);
-
- /**
- * @brief Method that check if all request parameters are READ_ONLY
- * @param request_params params from received message
- * @return true if all are read only , false - otherwise
- */
- bool AreAllParamsReadOnly(const Json::Value& request_params);
-
- /**
- * @brief Method that cuts-off READ_ONLY parameters
- * @param request_params params to handle
- */
- void CutOffReadOnlyParams(Json::Value& request_params);
-
- /**
- * @brief SetInteriorVehicleDataRequest class destructor
- */
- virtual ~SetInteriorVehicleDataRequest();
-
- protected:
- virtual std::string ModuleType(const Json::Value& message) FINAL;
- virtual std::vector<std::string> ControlData(
- const Json::Value& message) FINAL;
-};
-
-} // namespace commands
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_
diff --git a/src/components/remote_control/include/remote_control/event_engine/event.h b/src/components/remote_control/include/remote_control/event_engine/event.h
deleted file mode 100644
index 0da248e5a7..0000000000
--- a/src/components/remote_control/include/remote_control/event_engine/event.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_H_
-
-#include <string>
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "utils/shared_ptr.h"
-#include "application_manager/message.h"
-
-namespace rc_event_engine {
-
-template <typename EventMessage, typename EventID>
-class EventDispatcher;
-
-template <typename EventMessage, typename EventID>
-class Event {
- public:
- /*
- * @brief Constructor with parameters
- *
- * @param id Event ID.
- * @param message Message received in event
- */
- Event(EventMessage& message, const EventID& id);
-
- /*
- * @brief Destructor
- */
- virtual ~Event() {}
-
- /*
- * @brief Provides event ID
- */
- inline const EventID& id() const;
-
- /*
- * @brief Sets event message
- *
- * @param message The message received in event
- */
- void set_event_message(EventMessage& message);
-
- /*
- * @brief Retrieves event message
- *
- * @return The message received in event
- */
- inline const EventMessage& event_message() const;
-
- /*
- * @brief Retrieves event message request ID
- */
- virtual int32_t event_message_function_id() const = 0;
-
- /*
- * @brief Retrieves event message correlation ID
- */
- virtual int32_t event_message_correlation_id() const = 0;
-
- /*
- * @brief Retrieves event message response type
- */
- virtual int32_t event_message_type() const = 0;
-
- void raise(EventDispatcher<EventMessage, EventID>& event_dispatcher);
-
- protected:
- EventMessage event_message_;
-
- private:
- EventID id_;
-};
-
-template <typename EventMessage, typename EventID>
-const EventID& Event<EventMessage, EventID>::id() const {
- return id_;
-}
-
-template <typename EventMessage, typename EventID>
-const EventMessage& Event<EventMessage, EventID>::event_message() const {
- return event_message_;
-}
-
-template <typename EventMessage, typename EventID>
-Event<EventMessage, EventID>::Event(EventMessage& message, const EventID& id)
- : event_message_(message), id_(id) {}
-
-template <typename EventMessage, typename EventID>
-void Event<EventMessage, EventID>::raise(
- EventDispatcher<EventMessage, EventID>& event_dispatcher) {
- event_dispatcher.raise_event(*this);
-}
-
-} // namespace event_engine
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_H_
diff --git a/src/components/remote_control/include/remote_control/event_engine/event_dispatcher.h b/src/components/remote_control/include/remote_control/event_engine/event_dispatcher.h
deleted file mode 100644
index ddee6caccc..0000000000
--- a/src/components/remote_control/include/remote_control/event_engine/event_dispatcher.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_DISPATCHER_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_DISPATCHER_H_
-
-#include <list>
-#include <map>
-
-#include "utils/lock.h"
-
-#include "remote_control/event_engine/event.h"
-#include "remote_control/event_engine/event_observer.h"
-
-#include "interfaces/HMI_API.h"
-
-namespace rc_event_engine {
-
-template <typename EventMessage, typename EventID>
-class Event;
-
-template <typename EventMessage, typename EventID>
-class EventObserver;
-
-template <typename EventMessage, typename EventID>
-class EventDispatcher {
- public:
- /**
- * @brief Default constructor
- */
- EventDispatcher();
-
- /**
- * @brief Destructor
- */
- virtual ~EventDispatcher();
-
- /*
- * @brief Delivers the event to all subscribers
- *
- * @param event Received event
- */
- void raise_event(const Event<EventMessage, EventID>& event);
-
- /*
- * @brief Subscribe the observer to event
- *
- * @param event_id The event ID to subscribe for
- * @param hmi_correlation_id The event HMI correlation ID
- * @param observer The observer to subscribe for event
- */
- void add_observer(const EventID& event_id,
- int32_t hmi_correlation_id,
- EventObserver<EventMessage, EventID>* const observer);
-
- /*
- * @brief Unsubscribes the observer from specific event
- *
- * @param event_id The event ID to unsubscribe from
- * @param observer The observer to be unsubscribed
- */
- void remove_observer(
- const EventID& event_id,
- const EventObserver<EventMessage, EventID>* const observer);
-
- /*
- * @brief Unsubscribes the observer from all events
- *
- * @param observer The observer to be unsubscribed
- */
- void remove_observer(
- const EventObserver<EventMessage, EventID>* const observer);
-
- protected:
- private:
- DISALLOW_COPY_AND_ASSIGN(EventDispatcher);
-
- // Data types section
- typedef std::list<EventObserver<EventMessage, EventID>*> ObserverList;
- typedef std::map<int32_t, ObserverList> ObserversMap;
- typedef std::map<EventID, ObserversMap> EventObserverMap;
-
- // Members section
- sync_primitives::Lock state_lock_;
- EventObserverMap observers_;
-};
-
-template <typename EventMessage, typename EventID>
-EventDispatcher<EventMessage, EventID>::EventDispatcher()
- : observers_() {}
-
-template <typename EventMessage, typename EventID>
-EventDispatcher<EventMessage, EventID>::~EventDispatcher() {}
-
-template <typename EventMessage, typename EventID>
-void EventDispatcher<EventMessage, EventID>::raise_event(
- const Event<EventMessage, EventID>& event) {
- // create local list
- ObserverList list;
- {
- sync_primitives::AutoLock auto_lock(state_lock_);
- // check if event is notification
- if (hmi_apis::messageType::notification == event.event_message_type()) {
- // ObserversMap iterator
- typename ObserversMap::iterator it = observers_[event.id()].begin();
- for (; observers_[event.id()].end() != it; ++it) {
- list = it->second;
- }
- }
-
- if ((hmi_apis::messageType::response == event.event_message_type()) ||
- (hmi_apis::messageType::error_response == event.event_message_type())) {
- list = observers_[event.id()][event.event_message_correlation_id()];
- }
- }
-
- // Call observers
- typename ObserverList::iterator observers = list.begin();
- for (; list.end() != observers; ++observers) {
- (*observers)->on_event(event);
- }
-}
-
-template <typename EventMessage, typename EventID>
-void EventDispatcher<EventMessage, EventID>::add_observer(
- const EventID& event_id,
- int32_t hmi_correlation_id,
- EventObserver<EventMessage, EventID>* const observer) {
- sync_primitives::AutoLock auto_lock(state_lock_);
- observers_[event_id][hmi_correlation_id].push_back(observer);
-}
-
-template <typename EventMessage, typename EventID>
-void EventDispatcher<EventMessage, EventID>::remove_observer(
- const EventID& event_id,
- const EventObserver<EventMessage, EventID>* const observer) {
- sync_primitives::AutoLock auto_lock(state_lock_);
- typename ObserversMap::iterator it = observers_[event_id].begin();
- for (; observers_[event_id].end() != it; ++it) {
- // ObserverList iterator
- typename ObserverList::iterator observer_it = it->second.begin();
- while (it->second.end() != observer_it) {
- if (observer->id() == (*observer_it)->id()) {
- observer_it = it->second.erase(observer_it);
- } else {
- ++observer_it;
- }
- }
- }
-}
-
-template <typename EventMessage, typename EventID>
-void EventDispatcher<EventMessage, EventID>::remove_observer(
- const EventObserver<EventMessage, EventID>* const observer) {
- sync_primitives::AutoLock auto_lock(state_lock_);
- typename EventObserverMap::iterator event_map = observers_.begin();
- for (; observers_.end() != event_map; ++event_map) {
- typename ObserversMap::iterator it = event_map->second.begin();
- for (; event_map->second.end() != it; ++it) {
- // ObserverList iterator
- typename ObserverList::iterator observer_it = it->second.begin();
- while (it->second.end() != observer_it) {
- if (observer->id() == (*observer_it)->id()) {
- observer_it = it->second.erase(observer_it);
- } else {
- ++observer_it;
- }
- }
- }
- }
-}
-}
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_DISPATCHER_H_
diff --git a/src/components/remote_control/include/remote_control/event_engine/event_observer.h b/src/components/remote_control/include/remote_control/event_engine/event_observer.h
deleted file mode 100644
index 66a38da88b..0000000000
--- a/src/components/remote_control/include/remote_control/event_engine/event_observer.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_OBSERVER_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_OBSERVER_H_
-
-#include <string>
-#include "remote_control/event_engine/event.h"
-
-namespace rc_event_engine {
-
-template <typename EventMessage, typename EventID>
-class Event;
-
-template <typename EventMessage, typename EventID>
-class EventObserver {
- public:
- // Typedef for possible Observer ID's from mobile_apis functionID enum
- typedef unsigned long ObserverID;
-
- /*
- * @brief Constructor
- *
- */
- EventObserver();
-
- /*
- * @brief Destructor
- */
- virtual ~EventObserver();
-
- /**
- * @brief Retrieves observer unique id
- *
- * @return Unique Observer id
- */
- const ObserverID& id() const {
- return id_;
- }
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const Event<EventMessage, EventID>& event) = 0;
-
- private:
- ObserverID id_;
-
- DISALLOW_COPY_AND_ASSIGN(EventObserver);
-};
-
-template <typename EventMessage, typename EventID>
-EventObserver<EventMessage, EventID>::EventObserver()
- : id_(0) {
- // Get unique id based on this
- id_ = reinterpret_cast<unsigned long>(this);
-}
-
-template <typename EventMessage, typename EventID>
-EventObserver<EventMessage, EventID>::~EventObserver() {
- // unsubscribe_from_all_events();
-}
-}
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_EVENT_ENGINE_EVENT_OBSERVER_H_
diff --git a/src/components/remote_control/include/remote_control/message_helper.h b/src/components/remote_control/include/remote_control/message_helper.h
deleted file mode 100644
index 6358459da7..0000000000
--- a/src/components/remote_control/include/remote_control/message_helper.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_MESSAGE_HELPER_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_MESSAGE_HELPER_H_
-
-#include <stdint.h>
-#include <string>
-#include <map>
-
-#include "utils/macro.h"
-#include "json/json.h"
-#include "interfaces/HMI_API.h"
-#include "functional_module/function_ids.h"
-#include "remote_control/remote_plugin_interface.h"
-#include "application_manager/message.h"
-
-namespace remote_control {
-
-/**
- * @brief MessageHelper class
- **/
-class MessageHelper {
- public:
- static const std::string GetMobileAPIName(
- functional_modules::RCFunctionID func_id);
-
- /**
- * @brief Convert Json::Value to std::string
- *
- * @param value Value with json
- *
- * @return string with json
- */
- static std::string ValueToString(const Json::Value& value);
-
- /**
- * @brief Convert std::string to Json::Value
- *
- * @param string string with json
- *
- * @return Value created from string with json
- */
- static Json::Value StringToValue(const std::string& string);
-
- /**
- * Creates hmi request
- * @param function_id - API function we create request for
- * @param message_params - params in request
- * @param rc_module - used module for requests handling
- * @param hmi_app_id - app is used between SDL & HMI
- * @return creted request - reqdy to be sent to hmi
- */
- static application_manager::MessagePtr CreateHmiRequest(
- const char* function_id,
- const uint32_t hmi_app_id,
- const Json::Value& message_params,
- RemotePluginInterface& rc_module);
-
- /** @brief Converts string to hmi AccessMode enum value
- * @param access_mode stringified value
- * @return hmi AccessMode enum value if succedeed, otherwise - INVALID_ENUM
- * value
- */
- static hmi_apis::Common_RCAccessMode::eType AccessModeFromString(
- const std::string& access_mode);
-
- /**
- * @brief AccessModeToString converts enum values to string
- * @param access_mode Access mode enum value
- * @return Appropriate string value
- */
- static std::string AccessModeToString(
- const hmi_apis::Common_RCAccessMode::eType access_mode);
-
- private:
- MessageHelper();
-
- static const std::map<functional_modules::RCFunctionID, std::string>
- kMobileAPINames;
- DISALLOW_COPY_AND_ASSIGN(MessageHelper);
-};
-
-/** @brief Check for existence of specified key in Json::Value
- * @param value Value with json
- * @param key string with key name
- * @return true if key exist
- */
-bool IsMember(const Json::Value& value, const std::string& key);
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_MESSAGE_HELPER_H_
diff --git a/src/components/remote_control/include/remote_control/module_helper.h b/src/components/remote_control/include/remote_control/module_helper.h
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/components/remote_control/include/remote_control/module_helper.h
+++ /dev/null
diff --git a/src/components/remote_control/include/remote_control/rc_app_extension.h b/src/components/remote_control/include/remote_control/rc_app_extension.h
deleted file mode 100644
index 485514faba..0000000000
--- a/src/components/remote_control/include/remote_control/rc_app_extension.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_
-
-#include <string>
-#include <set>
-#include "application_manager/service.h"
-#include "application_manager/app_extension.h"
-#include "remote_control/remote_control_plugin.h"
-#include "json/json.h"
-
-namespace remote_control {
-
-class RCAppExtension : public application_manager::AppExtension {
- public:
- explicit RCAppExtension(application_manager::AppExtensionUID uid);
- ~RCAppExtension();
-
- /**
- * @brief Subscribe to OnInteriorVehicleDataNotification
- * @param module interior data specification(zone, data type)
- */
- void SubscribeToInteriorVehicleData(const Json::Value& module_type);
-
- /**
- * @brief Unsubscribe from OnInteriorVehicleDataNotification
- * @param module interior data specification(zone, data type)
- */
- void UnsubscribeFromInteriorVehicleData(const Json::Value& module_type);
-
- /**
- * @brief UnsubscribeFromInteriorVehicleData removes all subscriptions for
- * interior data
- */
- void UnsubscribeFromInteriorVehicleData();
-
- /**
- * @brief Check if application subscribed to OnInteriorVehicleDataNotification
- * @param module interior data specification(zone, data type)
- */
- bool IsSubscibedToInteriorVehicleData(const Json::Value& module_type);
-
- private:
- std::set<Json::Value> subscribed_interior_vehicle_data_;
-};
-
-typedef utils::SharedPtr<RCAppExtension> RCAppExtensionPtr;
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_
diff --git a/src/components/remote_control/include/remote_control/rc_command_factory.h b/src/components/remote_control/include/remote_control/rc_command_factory.h
deleted file mode 100644
index 9463c4b1ef..0000000000
--- a/src/components/remote_control/include/remote_control/rc_command_factory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_COMMAND_FACTORY_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_COMMAND_FACTORY_H_
-
-#include "utils/shared_ptr.h"
-#include "remote_control/commands/command.h"
-#include "remote_control/remote_control_plugin.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace remote_control {
-
-/**
- * @brief Factory class for command creation
- **/
-class RCCommandFactory {
- public:
- /**
- * @brief Create command object and return pointer to it
- *
- * @param message Message shared pointer.
- * @return Pointer to created command object.
- **/
- static utils::SharedPtr<commands::Command> CreateCommand(
- const application_manager::MessagePtr& msg,
- RemotePluginInterface& rc_module);
-
- private:
- RCCommandFactory();
- DISALLOW_COPY_AND_ASSIGN(RCCommandFactory);
-};
-
-} // namespace can_cooperaion
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_COMMAND_FACTORY_H_
diff --git a/src/components/remote_control/include/remote_control/rc_module_constants.h b/src/components/remote_control/include/remote_control/rc_module_constants.h
deleted file mode 100644
index 021e3cd6f0..0000000000
--- a/src/components/remote_control/include/remote_control/rc_module_constants.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_
-
-namespace remote_control {
-
-namespace strings {
-// RemoteControlCapabilities constants
-const char kclimateControlCapabilities[] = "climateControlCapabilities";
-const char kradioControlCapabilities[] = "radioControlCapabilities";
-const char kbuttonCapabilities[] = "buttonCapabilities";
-// RemoteControlCapabilities constants
-
-const char kRadioControlData[] = "radioControlData";
-const char kClimateControlData[] = "climateControlData";
-} // strings
-
-namespace result_codes {
-const char kSuccess[] = "SUCCESS";
-const char kUnsupportedRequest[] = "UNSUPPORTED_REQUEST";
-const char kUnsupportedResource[] = "UNSUPPORTED_RESOURCE";
-const char kDisallowed[] = "DISALLOWED";
-const char kRejected[] = "REJECTED";
-const char kAborted[] = "ABORTED";
-const char kIgnored[] = "IGNORED";
-const char kRetry[] = "RETRY";
-const char kInUse[] = "IN_USE";
-const char kVehicleDataNotAvailable[] = "VEHICLE_DATA_NOT_AVAILABLE";
-const char kTimedOut[] = "TIMED_OUT";
-const char kInvalidData[] = "INVALID_DATA";
-const char kCharLimitExceeded[] = "CHAR_LIMIT_EXCEEDED";
-const char kInvalidId[] = "INVALID_ID";
-const char kDuplicateName[] = "DUPLICATE_NAME";
-const char kApplicationNotRegistered[] = "APPLICATION_NOT_REGISTERED";
-const char kOutOfMemory[] = "OUT_OF_MEMORY";
-const char kTooManyPendingRequests[] = "TOO_MANY_PENDING_REQUESTS";
-const char kWarnings[] = "WARNINGS";
-const char kWrongLanguage[] = "WRONG_LANGUAGE";
-const char kGenericError[] = "GENERIC_ERROR";
-const char kUserDisallowed[] = "USER_DISALLOWED";
-const char kReadOnly[] = "READ_ONLY";
-} // result_codes
-
-namespace json_keys {
-const char kParams[] = "params";
-const char kSuccess[] = "success";
-const char kResultCode[] = "resultCode";
-const char kResult[] = "result";
-const char kInfo[] = "info";
-const char kId[] = "id";
-const char kJsonrpc[] = "jsonrpc";
-const char kMethod[] = "method";
-const char kError[] = "error";
-const char kMessage[] = "message";
-const char kData[] = "data";
-const char kAppId[] = "appID";
-const char kCode[] = "code";
-} // json_keys
-
-namespace message_params {
-const char kName[] = "name";
-
-// SetInteriorVehicleData request
-const char kModuleData[] = "moduleData";
-// SetInteriorVehicleData request
-
-// GetInteriorVehicleData request
-const char kSubscribe[] = "subscribe";
-// GetInteriorVehicleData request
-
-// GetInteriorVehicleData response
-const char kIsSubscribed[] = "isSubscribed";
-// GetInteriorVehicleData response
-
-// OnRemoteControlSettings notification
-const char kAccessMode[] = "accessMode";
-const char kAllowed[] = "allowed";
-// OnRemoteControlSettings notification
-
-// ButtonPress request
-const char kModuleType[] = "moduleType";
-const char kButtonName[] = "buttonName";
-const char kButtonPressMode[] = "buttonPressMode";
-// ButtonPress request
-
-// RdsData struct
-const char kPS[] = "PS";
-const char kRT[] = "RT";
-const char kCT[] = "CT";
-const char kPI[] = "PI";
-const char kPTY[] = "PTY";
-const char kTA[] = "TA";
-const char kTP[] = "TP";
-const char kREG[] = "REG";
-// RdsData struct
-
-// RadioControlData struct
-const char kFrequencyInteger[] = "frequencyInteger";
-const char kFrequencyFraction[] = "frequencyFraction";
-const char kBand[] = "band";
-const char kRdsData[] = "rdsData";
-const char kAvailableHDs[] = "availableHDs";
-const char kHdChannel[] = "hdChannel";
-const char kSignalStrength[] = "signalStrength";
-const char kSignalChangeThreshold[] = "signalChangeThreshold";
-const char kRadioEnable[] = "radioEnable";
-const char kState[] = "state";
-// RadioControlData struct
-
-// ClimateControlData struct
-const char kFanSpeed[] = "fanSpeed";
-const char kCurrentTemperature[] = "currentTemperature";
-const char kDesiredTemperature[] = "desiredTemperature";
-const char kTemperatureUnit[] = "temperatureUnit";
-const char kACEnable[] = "acEnable";
-const char kCirculateAirEnable[] = "circulateAirEnable";
-const char kAutoModeEnable[] = "autoModeEnable";
-const char kDefrostZone[] = "defrostZone";
-const char kDualModeEnable[] = "dualModeEnable";
-const char kACMaxEnable[] = "acMaxEnable";
-const char kVentilationMode[] = "ventilationMode";
-// ClimateControlData struct
-
-// ModuleData struct
-const char kRadioControlData[] = "radioControlData";
-const char kClimateControlData[] = "climateControlData";
-// ModuleData struct
-
-const char kHMIAppID[] = "appID";
-const char kHmiLevel[] = "hmiLevel";
-const char kSysContext[] = "systemContext";
-const char kAudioState[] = "audioStreamingState";
-} // namespace message_params
-
-namespace enums_value {
-
-// ModuleType enum
-const char kClimate[] = "CLIMATE";
-const char kRadio[] = "RADIO";
-// ModuleType enum
-
-// RadioBand enum
-const char kAM[] = "AM";
-const char kFM[] = "FM";
-const char kXM[] = "XM";
-// RadioBand enum
-
-// RadioState enum
-const char kAcquiring[] = "ACQUIRING";
-const char kAcquired[] = "ACQUIRED";
-const char kMulticast[] = "MULTICAST";
-const char kNotFound[] = "NOT_FOUND";
-// RadioState enum
-
-// DefrostZone enum
-const char kFront[] = "FRONT";
-const char kRear[] = "REAR";
-const char kAll[] = "ALL";
-// DefrostZone enum
-
-// TemperatureUnit enum
-const char kFahrenheit[] = "FAHRENHEIT";
-const char kCelsius[] = "CELSIUS";
-// TemperatureUnit enum
-
-// ButtonName enum
-const char kACMax[] = "AC_MAX";
-const char kAC[] = "AC";
-const char kRecirculate[] = "RECIRCULATE";
-const char kFanUp[] = "FAN_UP";
-const char kFanDown[] = "FAN_DOWN";
-const char kTempUp[] = "TEMP_UP";
-const char kTempDown[] = "TEMP_DOWN";
-const char kDefrostMax[] = "DEFROST_MAX";
-const char kDefrost[] = "DEFROST";
-const char kDefrostRear[] = "DEFROST_REAR";
-const char kUpperVent[] = "UPPER_VENT";
-const char kLowerVent[] = "LOWER_VENT";
-const char kVolumeUp[] = "VOLUME_UP";
-const char kVolumeDown[] = "VOLUME_DOWN";
-const char kEject[] = "EJECT";
-const char kSource[] = "SOURCE";
-const char kShuffle[] = "SHUFFLE";
-const char kRepeat[] = "REPEAT";
-// ButtonName enum
-
-// ButtonPressMode enum
-const char kLong[] = "LONG";
-const char kShort[] = "SHORT";
-// ButtonPressMode enum
-
-// Access mode enum
-const char kAutoAllow[] = "AUTO_ALLOW";
-const char kAutoDeny[] = "AUTO_DENY";
-const char kAskDriver[] = "ASK_DRIVER";
-// Access mode enum
-
-} // namespace enums_value
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_
diff --git a/src/components/remote_control/include/remote_control/rc_module_timer.h b/src/components/remote_control/include/remote_control/rc_module_timer.h
deleted file mode 100644
index 813f26a885..0000000000
--- a/src/components/remote_control/include/remote_control/rc_module_timer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_TIMER_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_TIMER_H_
-
-#include "functional_module/timer/module_timer.h"
-
-namespace remote_control {
-
-class TrackableMessage : public functional_modules::Trackable {
- public:
- TrackableMessage(uint32_t app_id, uint32_t correlation_id)
- : custom_interval_(0), app_id_(app_id), correlation_id_(correlation_id) {}
-
- functional_modules::TimeUnit custom_interval() const {
- return custom_interval_;
- }
-
- uint32_t app_id() const {
- return app_id_;
- }
-
- uint32_t correlation_id() const {
- return correlation_id_;
- }
-
- bool operator==(const TrackableMessage& other) const {
- return (other.app_id_ == app_id_ &&
- other.correlation_id_ == correlation_id_);
- }
-
- private:
- functional_modules::TimeUnit custom_interval_;
- uint32_t app_id_;
- uint32_t correlation_id_;
-};
-
-} // namesapce remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_TIMER_H_
diff --git a/src/components/remote_control/include/remote_control/remote_control_event.h b/src/components/remote_control/include/remote_control/remote_control_event.h
deleted file mode 100644
index 3c98f971ac..0000000000
--- a/src/components/remote_control/include/remote_control/remote_control_event.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_CONTROL_EVENT_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_CONTROL_EVENT_H_
-
-#include <string>
-
-#include "application_manager/message.h"
-
-#include "remote_control/event_engine/event.h"
-
-namespace remote_control {
-
-class RCPluginEvent
- : public rc_event_engine::Event<application_manager::MessagePtr,
- std::string> {
- public:
- /*
- * @brief Constructor with parameters
- *
- * @param id Event ID. (HMI or CAN function name)
- * @param message Message received in HMI or CAN response
- */
- RCPluginEvent(application_manager::MessagePtr& message,
- const std::string& id);
-
- /*
- * @brief Destructor
- */
- virtual ~RCPluginEvent();
-
- /*
- * @brief Retrieves event message request ID
- */
- virtual int32_t event_message_function_id() const;
-
- /*
- * @brief Retrieves event message correlation ID
- */
- virtual int32_t event_message_correlation_id() const;
-
- /*
- * @brief Retrieves event message response type
- */
- virtual int32_t event_message_type() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RCPluginEvent);
-};
-}
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_CONTROL_EVENT_H_
diff --git a/src/components/remote_control/include/remote_control/remote_control_plugin.h b/src/components/remote_control/include/remote_control/remote_control_plugin.h
deleted file mode 100644
index 1e7d49c18e..0000000000
--- a/src/components/remote_control/include/remote_control/remote_control_plugin.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_CONTROL_PLUGIN_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_CONTROL_PLUGIN_H_
-
-#include <queue>
-#include <string>
-
-#include "remote_control/remote_plugin_interface.h"
-#include "functional_module/generic_module.h"
-#include "remote_control/request_controller.h"
-#include "utils/threads/message_loop_thread.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "remote_control/resource_allocation_manager_impl.h"
-
-namespace remote_control {
-typedef rc_event_engine::EventDispatcher<application_manager::MessagePtr,
- std::string> RCEventDispatcher;
-
-class RemoteControlPlugin : public RemotePluginInterface {
- public:
- RemoteControlPlugin();
- ~RemoteControlPlugin();
-
- functional_modules::PluginInfo GetPluginInfo() const;
- virtual functional_modules::ProcessResult ProcessMessage(
- application_manager::MessagePtr msg);
- virtual functional_modules::ProcessResult ProcessHMIMessage(
- application_manager::MessagePtr msg);
-
- /**
- * @brief Sends response to mobile application
- * @param msg response mesage
- */
- void SendResponseToMobile(application_manager::MessagePtr msg);
-
- /**
- * @brief Sends timeout response to mobile application
- * @param msg response mesage
- */
- void SendTimeoutResponseToMobile(application_manager::MessagePtr msg);
-
- /**
- * @brief Remove extension created for specified application
- * @param app_id application id
- */
- virtual void RemoveAppExtension(uint32_t app_id);
-
- /**
- * @brief Check registering app can be handled by plugin
- * @param msg Registration message
- * @param app Application basis already create by Core
- */
- bool IsAppForPlugin(application_manager::ApplicationSharedPtr app);
-
- /**
- * @brief Notify about change of HMILevel of plugin's app
- * @param app App with new HMILevel
- * @param old_level Old HMILevel of app
- */
- void OnAppHMILevelChanged(application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level);
-
- /**
- * @brief Sends HMI status notification to mobile
- * @param app application with changed HMI status
- **/
- void SendHmiStatusNotification(
- application_manager::ApplicationSharedPtr app) OVERRIDE;
-
- /**
- * @brief Getter for event_dispatcher
- * @return reference to RCEventDispatcher instance
- */
- RCEventDispatcher& event_dispatcher() OVERRIDE;
-
- /**
- * @brief Getter for resource_allocation_manager
- * @return reference to ResourceAllocationManager instance
- */
- ResourceAllocationManager& resource_allocation_manager() OVERRIDE;
-
- /**
- * @brief Overriden setter for service
- * @param service pointer to new service instance
- */
- void set_service(application_manager::ServicePtr service) OVERRIDE;
-
- /**
- * @brief OnApplicationEvent Processes application related events
- * @param event Event
- * @param application Pointer to application struct
- */
- void OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) OVERRIDE;
-
- /**
- * @brief OnPolicyEvent Processes policy related events
- * @param event Policy event
- */
- void OnPolicyEvent(functional_modules::PolicyEvent event) OVERRIDE;
-
- protected:
- /**
- * @brief Remove extension for all applications
- */
- virtual void RemoveAppExtensions() OVERRIDE;
-
- private:
- /**
- * @brief Trigger actions which should be done after plugin service instance
- * have been changed
- */
- void OnPluginServiceChanged();
-
- /**
- * @brief Subscribes on all RC related functions
- */
- void SubscribeOnFunctions();
-
- functional_modules::PluginInfo plugin_info_;
- bool is_scan_started_;
- request_controller::RequestController request_controller_;
-
- RCEventDispatcher event_dispatcher_;
-
- ResourceAllocationManagerImpl resource_allocation_manager_;
- DISALLOW_COPY_AND_ASSIGN(RemoteControlPlugin);
-};
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_CONTROL_PLUGIN_H_
diff --git a/src/components/remote_control/include/remote_control/remote_plugin_interface.h b/src/components/remote_control/include/remote_control/remote_plugin_interface.h
deleted file mode 100644
index 51135d8a8a..0000000000
--- a/src/components/remote_control/include/remote_control/remote_plugin_interface.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_PLUGIN_INTERFACE_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_PLUGIN_INTERFACE_H_
-
-#include <queue>
-#include <string>
-#include "functional_module/generic_module.h"
-#include "remote_control/request_controller.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "utils/threads/message_loop_thread.h"
-#include "utils/shared_ptr.h"
-
-namespace remote_control {
-
-class RCAppExtension;
-class ResourceAllocationManager;
-
-typedef utils::SharedPtr<RCAppExtension> RCAppExtensionPtr;
-
-class RemotePluginInterface : public functional_modules::GenericModule {
- public:
- RemotePluginInterface() : GenericModule(kCANModuleID) {}
- virtual ~RemotePluginInterface() {}
- virtual functional_modules::PluginInfo GetPluginInfo() const = 0;
- virtual functional_modules::ProcessResult ProcessMessage(
- application_manager::MessagePtr msg) = 0;
- virtual functional_modules::ProcessResult ProcessHMIMessage(
- application_manager::MessagePtr msg) = 0;
-
- /**
- * @brief Sends response to mobile application
- * @param msg response mesage
- */
- virtual void SendResponseToMobile(application_manager::MessagePtr msg) = 0;
-
- /**
- * @brief Sends timeout response to mobile application
- * @param msg response mesage
- */
- virtual void SendTimeoutResponseToMobile(
- application_manager::MessagePtr msg) = 0;
-
- /**
- * @brief Remove extension created for specified application
- * @param app_id application id
- */
- virtual void RemoveAppExtension(uint32_t app_id) = 0;
-
- /**
- * @brief Check registering app can be handled by plugin
- * @param msg Registration message
- * @param app Application basis already create by Core
- */
- virtual bool IsAppForPlugin(
- application_manager::ApplicationSharedPtr app) = 0;
-
- /**
- * @brief Notify about change of HMILevel of plugin's app
- * @param app App with new HMILevel
- * @param old_level Old HMILevel of app
- */
- virtual void OnAppHMILevelChanged(
- application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level) = 0;
-
- virtual void SendHmiStatusNotification(
- application_manager::ApplicationSharedPtr app) = 0;
-
- typedef rc_event_engine::EventDispatcher<application_manager::MessagePtr,
- std::string> RCPluginEventDispatcher;
-
- virtual RCPluginEventDispatcher& event_dispatcher() = 0;
-
- virtual ResourceAllocationManager& resource_allocation_manager() = 0;
-
- protected:
- /**
- * @brief Remove extension for all applications
- */
- virtual void RemoveAppExtensions() = 0;
-
- static const functional_modules::ModuleID kCANModuleID = 153;
-};
-
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REMOTE_PLUGIN_INTERFACE_H_
diff --git a/src/components/remote_control/include/remote_control/request_controller.h b/src/components/remote_control/include/remote_control/request_controller.h
deleted file mode 100644
index 8a79d9ebc4..0000000000
--- a/src/components/remote_control/include/remote_control/request_controller.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Copyright (c) 2017, 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_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REQUEST_CONTROLLER_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REQUEST_CONTROLLER_H_
-
-#include <map>
-
-#include "remote_control/commands/command.h"
-#include "remote_control/rc_module_timer.h"
-#include "functional_module/timer/timer_director.h"
-#include "utils/lock.h"
-
-namespace remote_control {
-
-namespace commands {
-class Command;
-}
-
-namespace request_controller {
-
-typedef utils::SharedPtr<commands::Command> MobileRequestPtr;
-typedef uint32_t correlation_id;
-
-/**
- * @brief RequestController class is used to manage mobile requests lifetime.
- */
-class RequestController
- : public functional_modules::TimerObserver<TrackableMessage> {
- public:
- /**
- * @brief Class constructor
- *
- */
- RequestController();
-
- /**
- * @brief Class destructor
- *
- */
- virtual ~RequestController();
-
- /**
- * @brief Adds pointer to request.
- * @param mobile_correlation_id mobile request correlation id
- * @param command pointer to request created in mobile factory
- */
- void AddRequest(const uint32_t mobile_correlation_id,
- MobileRequestPtr request);
-
- /**
- * @brief Removes request
- * @param mobile_corellation_id mobile request correlation id
- */
- void DeleteRequest(const uint32_t& mobile_correlation_id);
-
- /**
- * @brief Sets timeout value for RC requests
- * @param timeout_seconds new timeout value in seconds
- */
- void SetRequestTimeout(const functional_modules::TimeUnit timeout_seconds);
-
- /**
- * @brief Triggers actions when timeout for some request is expired
- * @param expired reference to request which timeout was expired
- */
- void OnTimeoutTriggered(const TrackableMessage& expired) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RequestController);
-
- std::map<correlation_id, MobileRequestPtr> mobile_request_list_;
- functional_modules::ModuleTimer<TrackableMessage> timer_;
- functional_modules::TimerDirector time_director_;
- sync_primitives::Lock mobile_request_lock_;
-};
-
-} // namespace request_controller
-} // namespace remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_REQUEST_CONTROLLER_H_
diff --git a/src/components/remote_control/include/remote_control/resource_allocation_manager.h b/src/components/remote_control/include/remote_control/resource_allocation_manager.h
deleted file mode 100644
index f789fe4af9..0000000000
--- a/src/components/remote_control/include/remote_control/resource_allocation_manager.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H
-#include <string>
-#include "utils/macro.h"
-#include "utils/shared_ptr.h"
-#include "interfaces/HMI_API.h"
-#include "remote_control/event_engine/event.h"
-#include "functional_module/generic_module.h"
-
-namespace remote_control {
-
-/**
- * Enum for list of results of allocation resources
- */
-namespace AcquireResult {
-enum eType { ALLOWED = 0, IN_USE, ASK_DRIVER, REJECTED };
-}
-
-/**
- * Defines states of acquired resource
- */
-namespace ResourceState {
-enum eType { FREE = 0, BUSY };
-}
-
-/**
- * @brief Resources defines list of resources
- */
-typedef std::vector<std::string> Resources;
-
-class ResourceAllocationManager {
- public:
- /**
- * @brief AcquireResource acquires resource by application
- * @param module_type resource to acquire
- * @param app_id application that acquire resource
- * @return ALLOWED if resource acquired \
- * IN_USE if subscription is not allowed
- * ASK_DRIVER if driver confirmation is required
- */
- virtual AcquireResult::eType AcquireResource(const std::string& module_type,
- const uint32_t app_id) = 0;
-
- /**
- * @brief SetResourceState changes resource state. Resource must be acquired
- * beforehand.
- * @param module_type Resource to change its state
- * @param app_id Application aquired resource before
- * @param state State to set for resource
- */
- virtual void SetResourceState(const std::string& module_type,
- const uint32_t app_id,
- const ResourceState::eType state) = 0;
-
- /**
- * @brief IsResourceFree check resource state
- * @param module_type Resource name
- * @return True if free, otherwise - false
- */
- virtual bool IsResourceFree(const std::string& module_type) const = 0;
-
- /**
- * @brief AcquireResource forces acquiring resource by application
- * @param module_type resource to acquire
- * @param app_id application that acquire resource
- */
- virtual void ForceAcquireResource(const std::string& module_type,
- const uint32_t app_id) = 0;
-
- /**
- * @brief OnDriverDisallowed callback for rejecting acquiring resource
- * @param module_type resource type
- * @param app_id application id
- */
- virtual void OnDriverDisallowed(const std::string& module_type,
- const uint32_t app_id) = 0;
-
- /**
- * @brief OnApplicationEvent Processes application related events
- * @param event Event
- * @param application Pointer to application struct
- */
- virtual void OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) = 0;
-
- /**
- * @brief OnPolicyEvent Processes policy related events
- * @param event Policy event
- */
- virtual void OnPolicyEvent(functional_modules::PolicyEvent event) = 0;
-
- /**
- * @brief Set current access mode for acquiring resource
- * @param access_mode
- */
- virtual void SetAccessMode(
- const hmi_apis::Common_RCAccessMode::eType access_mode) = 0;
-
- /**
- * @brief Get last set access mode for acquiring resource
- * @param access_mode
- */
- virtual hmi_apis::Common_RCAccessMode::eType GetAccessMode() const = 0;
-
- /**
- * @brief Remove all information about all allocations
- */
- virtual void ResetAllAllocations() = 0;
-
- virtual ~ResourceAllocationManager() {}
-};
-
-} // namespace remote_control
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H
diff --git a/src/components/remote_control/include/remote_control/resource_allocation_manager_impl.h b/src/components/remote_control/include/remote_control/resource_allocation_manager_impl.h
deleted file mode 100644
index 57c2a8f360..0000000000
--- a/src/components/remote_control/include/remote_control/resource_allocation_manager_impl.h
+++ /dev/null
@@ -1,137 +0,0 @@
-#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H
-#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H
-#include "remote_control/resource_allocation_manager.h"
-#include "remote_control/remote_plugin_interface.h"
-#include "utils/macro.h"
-#include "utils/lock.h"
-
-namespace remote_control {
-
-typedef rc_event_engine::EventDispatcher<application_manager::MessagePtr,
- std::string> RCEventDispatcher;
-
-class ResourceAllocationManagerImpl : public ResourceAllocationManager {
- public:
- ResourceAllocationManagerImpl(RemotePluginInterface& rc_plugin);
-
- ~ResourceAllocationManagerImpl();
-
- AcquireResult::eType AcquireResource(const std::string& module_type,
- const uint32_t app_id) OVERRIDE FINAL;
-
- void SetResourceState(const std::string& module_type,
- const uint32_t app_id,
- const ResourceState::eType state) FINAL;
-
- bool IsResourceFree(const std::string& module_type) const FINAL;
-
- void SetAccessMode(
- const hmi_apis::Common_RCAccessMode::eType access_mode) FINAL;
-
- hmi_apis::Common_RCAccessMode::eType GetAccessMode() const FINAL;
-
- void ForceAcquireResource(const std::string& module_type,
- const uint32_t app_id) FINAL;
-
- void OnDriverDisallowed(const std::string& module_type,
- const uint32_t app_id) FINAL;
-
- /**
- * @brief OnApplicationEvent Notifies modules on certain application events
- * @param event Event
- * @param application Pointer to application struct
- */
- void OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) FINAL;
-
- /**
- * @brief OnPolicyEvent Processes policy related events
- * @param event Policy event
- */
- void OnPolicyEvent(functional_modules::PolicyEvent event) FINAL;
-
- void ResetAllAllocations() FINAL;
-
- private:
- typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
-
- /**
- * @brief IsModuleTypeRejected check if current resource was rejected by
- * driver for current application
- * @param module_type resource to check
- * @param app_id application id
- * @return true if current resource was rejected by driver for current
- * application, otherwise - false
- */
- bool IsModuleTypeRejected(const std::string& module_type,
- const uint32_t app_id);
-
- /**
- * @brief ReleaseResource Releases resource acquired by application
- * @param module_type Module name
- * @param application_id Application id
- */
- void ReleaseResource(const std::string& module_type,
- const uint32_t application_id);
-
- /**
- * @brief GetAcquiredResources Provides resources acquired by particular
- * application currently
- * @param application_id Application id
- * @return List of acquired resources by specific application
- */
- Resources GetAcquiredResources(const uint32_t application_id) const;
-
- /**
- * @brief ProcessApplicationPolicyUpdate Checks if allowed modules list is
- * changed for registered RC applications and releases in case some modules
- * now out of the list
- */
- void ProcessApplicationPolicyUpdate();
-
- /**
- * @brief GetApplicationExtention Provides access to application RC extention
- * @param application Application
- * @return Pointer to RC extention of application or NULL if not available
- */
- RCAppExtensionPtr GetApplicationExtention(
- application_manager::ApplicationSharedPtr application);
-
- /**
- * @brief RemoveAppsSubscriptions Removes subscriptions for interior data for
- * applications in the list
- * @param apps Application list
- */
- void RemoveAppsSubscriptions(const Apps& apps);
-
- /**
- * @brief AllocatedResources contains link between resource and application
- * owning that resource
- */
- typedef std::map<std::string, uint32_t> AllocatedResources;
- AllocatedResources allocated_resources_;
- mutable sync_primitives::Lock allocated_resources_lock_;
-
- /**
- * @brief ResourcesState contains states of ALLOCATED resources
- */
- typedef std::map<std::string, ResourceState::eType> ResourcesState;
- ResourcesState resources_state_;
- mutable sync_primitives::Lock resources_state_lock_;
-
- /**
- * @brief RejectedResources type for connecting list of resources rejected by
- * driver for application
- * application_id : [vector of rejected resources]
- */
- typedef std::map<uint32_t, std::vector<std::string> > RejectedResources;
- RejectedResources rejected_resources_for_application_;
- mutable sync_primitives::Lock rejected_resources_for_application_lock_;
-
- hmi_apis::Common_RCAccessMode::eType current_access_mode_;
- RemotePluginInterface& rc_plugin_;
-};
-} // remote_control
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H
diff --git a/src/components/remote_control/src/commands/base_command_notification.cc b/src/components/remote_control/src/commands/base_command_notification.cc
deleted file mode 100644
index 2de82abdef..0000000000
--- a/src/components/remote_control/src/commands/base_command_notification.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/commands/base_command_notification.h"
-#include "json/json.h"
-#include "remote_control/remote_control_plugin.h"
-#include "remote_control/rc_module_constants.h"
-#include "application_manager/application_manager.h"
-
-namespace remote_control {
-
-namespace commands {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
-
-BaseCommandNotification::BaseCommandNotification(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : Command(rc_module), service_(rc_module_.service()), message_(message) {
- Json::Value value;
- Json::Reader reader;
- reader.parse(message_->json_message(), value);
- if (value.isMember(json_keys::kParams)) {
- Json::FastWriter writer;
- message_->set_json_message(writer.write(value[json_keys::kParams]));
- } else {
- message_->set_json_message("");
- }
-}
-
-BaseCommandNotification::~BaseCommandNotification() {}
-
-RCAppExtensionPtr BaseCommandNotification::GetAppExtension(
- application_manager::ApplicationSharedPtr app) const {
- if (!app) {
- return NULL;
- }
-
- functional_modules::ModuleID id = rc_module_.GetModuleID();
-
- RCAppExtensionPtr rc_app_extension;
- application_manager::AppExtensionPtr app_extension = app->QueryInterface(id);
- if (!app_extension) {
- return NULL;
- }
-
- rc_app_extension =
- application_manager::AppExtensionPtr::static_pointer_cast<RCAppExtension>(
- app_extension);
-
- return rc_app_extension;
-}
-
-void BaseCommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- Execute();
-}
-
-void BaseCommandNotification::NotifyApplications() {
- LOG4CXX_AUTO_TRACE(logger_);
- typedef std::vector<application_manager::ApplicationSharedPtr> AppList;
- AppList applications = service_->GetApplications(rc_module_.GetModuleID());
- for (AppList::iterator i = applications.begin(); i != applications.end();
- ++i) {
- application_manager::MessagePtr message(
- new application_manager::Message(*message_));
- message->set_connection_key((*i)->app_id());
- NotifyOneApplication(message);
- }
-}
-
-void BaseCommandNotification::NotifyOneApplication(
- application_manager::MessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (CheckPolicy(message)) {
- service_->SendMessageToMobile(message);
- } else {
- LOG4CXX_WARN(logger_,
- "Function \"" << message->function_name() << "\" (#"
- << message->function_id()
- << ") not allowed by policy");
- }
-}
-
-bool BaseCommandNotification::CheckPolicy(
- application_manager::MessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager::ApplicationSharedPtr app =
- service_->GetApplication(message->connection_key());
-
- if (!app) {
- LOG4CXX_WARN(logger_,
- "Application " << message->connection_key()
- << "isn't registered");
- return false;
- }
-
- mobile_apis::Result::eType permission =
- service_->CheckPolicyPermissions(message);
-
- Json::Value value;
- Json::Reader reader;
- LOG4CXX_DEBUG(logger_, "Notification: " << message->json_message());
- reader.parse(message->json_message(), value);
-
- return permission == mobile_apis::Result::eType::SUCCESS &&
- service_->CheckModule(app->app_id(), ModuleType(value));
-}
-
-std::string BaseCommandNotification::ModuleType(const Json::Value& message) {
- return "";
-}
-
-bool BaseCommandNotification::Validate() {
- return true;
-}
-
-std::vector<std::string> BaseCommandNotification::ControlData(
- const Json::Value& message) {
- return std::vector<std::string>();
-}
-
-} // namespace commands
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/commands/base_command_request.cc b/src/components/remote_control/src/commands/base_command_request.cc
deleted file mode 100644
index bc6202d2a8..0000000000
--- a/src/components/remote_control/src/commands/base_command_request.cc
+++ /dev/null
@@ -1,564 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/commands/base_command_request.h"
-#include <cstring>
-#include "utils/make_shared.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/remote_control_plugin.h"
-#include "remote_control/rc_module_constants.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace remote_control {
-
-namespace commands {
-
-using rc_event_engine::EventDispatcher;
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
-
-BaseCommandRequest::BaseCommandRequest(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : Command(rc_module)
- , message_(message)
- , msg_json_(MessageHelper::StringToValue(message->json_message()))
- , auto_allowed_(false) {
- service_ = rc_module_.service();
- app_ = service_->GetApplication(message_->connection_key());
-}
-
-BaseCommandRequest::~BaseCommandRequest() {
- rc_module_.event_dispatcher().remove_observer(this);
-}
-
-void BaseCommandRequest::OnTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
- SetResourceState(msg_json_, ResourceState::FREE);
-
- PrepareResponse(
- false, result_codes::kGenericError, "Request timeout expired.");
- rc_module_.SendTimeoutResponseToMobile(message_);
-}
-
-void BaseCommandRequest::PrepareResponse(const bool success,
- const char* result_code,
- const std::string& info) {
- message_->set_message_type(application_manager::MessageType::kResponse);
- Json::Value msg_params;
-
- if (!response_params_.isNull()) {
- msg_params = response_params_;
- }
-
- msg_params[json_keys::kSuccess] = success;
- msg_params[json_keys::kResultCode] = result_code;
- if (!info.empty()) {
- msg_params[json_keys::kInfo] = info;
- }
-
- Json::FastWriter writer;
- std::string params = writer.write(msg_params);
- message_->set_json_message(params);
-}
-
-void BaseCommandRequest::SendResponse(const bool success,
- const char* result_code,
- const std::string& info) {
- LOG4CXX_AUTO_TRACE(logger_);
- SetResourceState(msg_json_, ResourceState::FREE);
- PrepareResponse(success, result_code, info);
- rc_module_.SendResponseToMobile(message_);
-}
-
-void BaseCommandRequest::SendMessageToHMI(
- const application_manager::MessagePtr& message_to_send) {
- LOG4CXX_AUTO_TRACE(logger_);
- using application_manager::HmiInterfaces;
-
- const bool is_rc_available =
- service_->IsInterfaceAvailable(HmiInterfaces::HMI_INTERFACE_RC);
- LOG4CXX_DEBUG(logger_, "HMI interface RC is available: " << is_rc_available);
- if (!is_rc_available) {
- const bool success = false;
- const char* result_code = result_codes::kUnsupportedResource;
- const std::string info = "Remote control is not supported by system";
-
- SendResponse(success, result_code, info);
- return;
- }
-
- const std::string function_name = message_to_send->function_name();
- const int32_t correlation_id = message_to_send->correlation_id();
- LOG4CXX_DEBUG(logger_,
- "Subsribing to response for function: "
- << function_name
- << " and correlation id: " << correlation_id);
-
- rc_module_.event_dispatcher().add_observer(
- function_name, correlation_id, this);
-
- LOG4CXX_DEBUG(logger_, "HMI Request:\n " << message_to_send->json_message());
-
- service_->SendMessageToHMI(message_to_send);
-}
-
-void BaseCommandRequest::SendRequest(const char* function_id,
- const Json::Value& message_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager::MessagePtr message_to_send =
- CreateHmiRequest(function_id, message_params);
- SendMessageToHMI(message_to_send);
-}
-
-application_manager::MessagePtr BaseCommandRequest::CreateHmiRequest(
- const char* function_id, const Json::Value& message_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- const uint32_t hmi_app_id = app_->hmi_app_id();
- return MessageHelper::CreateHmiRequest(
- function_id, hmi_app_id, message_params, rc_module_);
-}
-
-bool BaseCommandRequest::Validate() {
- return application_manager::MessageValidationResult::SUCCESS ==
- service_->ValidateMessageBySchema(*message_);
-}
-
-bool BaseCommandRequest::ParseJsonString(Json::Value* parsed_msg) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(parsed_msg);
- if (!parsed_msg)
- return false;
-
- (*parsed_msg) = MessageHelper::StringToValue(message_->json_message());
- if (Json::ValueType::nullValue == parsed_msg->type()) {
- LOG4CXX_ERROR(logger_,
- "Invalid JSON received in " << message_->json_message());
- SendResponse(
- false, result_codes::kInvalidData, "Mobile request validation failed!");
- return false;
- }
- return true;
-}
-
-const char* BaseCommandRequest::GetMobileResultCode(
- const hmi_apis::Common_Result::eType& hmi_code) const {
- LOG4CXX_AUTO_TRACE(logger_);
- switch (hmi_code) {
- case hmi_apis::Common_Result::SUCCESS: {
- return result_codes::kSuccess;
- }
- case hmi_apis::Common_Result::UNSUPPORTED_REQUEST: {
- return result_codes::kUnsupportedRequest;
- }
- case hmi_apis::Common_Result::UNSUPPORTED_RESOURCE: {
- return result_codes::kUnsupportedResource;
- }
- case hmi_apis::Common_Result::DISALLOWED: {
- return result_codes::kDisallowed;
- }
- case hmi_apis::Common_Result::REJECTED: {
- return result_codes::kRejected;
- }
- case hmi_apis::Common_Result::ABORTED: {
- return result_codes::kAborted;
- }
- case hmi_apis::Common_Result::IGNORED: {
- return result_codes::kIgnored;
- }
- case hmi_apis::Common_Result::RETRY: {
- return result_codes::kRetry;
- }
- case hmi_apis::Common_Result::IN_USE: {
- return result_codes::kInUse;
- }
- case hmi_apis::Common_Result::DATA_NOT_AVAILABLE: {
- return result_codes::kVehicleDataNotAvailable;
- }
- case hmi_apis::Common_Result::TIMED_OUT: {
- return result_codes::kTimedOut;
- }
- case hmi_apis::Common_Result::INVALID_DATA: {
- return result_codes::kInvalidData;
- }
- case hmi_apis::Common_Result::CHAR_LIMIT_EXCEEDED: {
- return result_codes::kCharLimitExceeded;
- }
- case hmi_apis::Common_Result::INVALID_ID: {
- return result_codes::kInvalidId;
- }
- case hmi_apis::Common_Result::DUPLICATE_NAME: {
- return result_codes::kDuplicateName;
- }
- case hmi_apis::Common_Result::APPLICATION_NOT_REGISTERED: {
- return result_codes::kApplicationNotRegistered;
- }
- case hmi_apis::Common_Result::WRONG_LANGUAGE: {
- return result_codes::kWrongLanguage;
- }
- case hmi_apis::Common_Result::OUT_OF_MEMORY: {
- return result_codes::kOutOfMemory;
- }
- case hmi_apis::Common_Result::TOO_MANY_PENDING_REQUESTS: {
- return result_codes::kTooManyPendingRequests;
- }
- case hmi_apis::Common_Result::NO_APPS_REGISTERED: {
- return result_codes::kApplicationNotRegistered;
- }
- case hmi_apis::Common_Result::NO_DEVICES_CONNECTED: {
- return result_codes::kApplicationNotRegistered;
- }
- case hmi_apis::Common_Result::WARNINGS: {
- return result_codes::kWarnings;
- }
- case hmi_apis::Common_Result::GENERIC_ERROR: {
- return result_codes::kGenericError;
- }
- case hmi_apis::Common_Result::USER_DISALLOWED: {
- return result_codes::kUserDisallowed;
- }
- case hmi_apis::Common_Result::READ_ONLY: {
- return result_codes::kReadOnly;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Unknown HMI result code " << hmi_code);
- return result_codes::kGenericError;
- }
- }
-}
-
-RCAppExtensionPtr BaseCommandRequest::GetAppExtension(
- application_manager::ApplicationSharedPtr app) const {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- return NULL;
- }
-
- functional_modules::ModuleID id = rc_module_.GetModuleID();
-
- RCAppExtensionPtr rc_app_extension;
- application_manager::AppExtensionPtr app_extension = app->QueryInterface(id);
- if (!app_extension) {
- LOG4CXX_DEBUG(logger_, "New app extension will be created");
- app_extension = new RCAppExtension(id);
- app->AddExtension(app_extension);
- }
-
- rc_app_extension =
- application_manager::AppExtensionPtr::static_pointer_cast<RCAppExtension>(
- app_extension);
-
- return rc_app_extension;
-}
-
-bool BaseCommandRequest::ParseResultCode(const Json::Value& value,
- std::string& result_code,
- std::string& info) {
- LOG4CXX_AUTO_TRACE(logger_);
- result_code = result_codes::kInvalidData;
- info = "";
-
- if (IsMember(value, json_keys::kResult) &&
- IsMember(value[json_keys::kResult], json_keys::kCode)) {
- result_code =
- GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- value[json_keys::kResult][json_keys::kCode].asInt()));
- } else if (IsMember(value, json_keys::kError) &&
- IsMember(value[json_keys::kError], json_keys::kCode)) {
- result_code =
- GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- value[json_keys::kError][json_keys::kCode].asInt()));
-
- if (IsMember(value[json_keys::kError], json_keys::kMessage)) {
- info = value[json_keys::kError][json_keys::kMessage].asCString();
- }
- }
-
- if ((result_codes::kSuccess == result_code) ||
- (result_codes::kWarnings == result_code)) {
- return true;
- }
-
- return false;
-}
-
-void BaseCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!Validate()) {
- LOG4CXX_WARN(logger_, "Request message validation failed !");
- SendResponse(
- false, result_codes::kInvalidData, "Validation by schema failed");
- return;
- }
- LOG4CXX_TRACE(logger_, "Request message validated successfully!");
- using application_manager::HmiInterfaces;
- if (!service_->IsInterfaceAvailable(HmiInterfaces::HMI_INTERFACE_RC)) {
- LOG4CXX_WARN(logger_, "HMI interface RC is not available");
- SendResponse(false,
- result_codes::kUnsupportedResource,
- "Remote control is not supported by system");
- return;
- }
- LOG4CXX_TRACE(logger_, "RC interface is available!");
- if (CheckPolicyPermissions() && CheckDriverConsent()) {
- if (AcquireResources()) {
- Execute(); // run child's logic
- }
- // If resource is not aqcuired, AcquireResources method will either
- // send response to mobile or
- // send additional request to HMI to ask driver consent
- }
-}
-
-bool BaseCommandRequest::CheckPolicyPermissions() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!app_) {
- LOG4CXX_ERROR(logger_, "Application doesn't registered!");
- SendResponse(false, result_codes::kApplicationNotRegistered, "");
- return false;
- }
-
- if (!service_->IsRemoteControlApplication(app_)) {
- LOG4CXX_WARN(logger_, "Application has no remote control functions");
- SendResponse(false, result_codes::kDisallowed, "");
- return false;
- }
-
- mobile_apis::Result::eType ret = service_->CheckPolicyPermissions(message_);
- if (ret != mobile_apis::Result::eType::SUCCESS) {
- LOG4CXX_WARN(logger_,
- "Function \"" << message_->function_name() << "\" (#"
- << message_->function_id()
- << ") not allowed by policy");
-
- SendResponse(false, result_codes::kDisallowed, "");
- return false;
- }
-
- return true;
-}
-
-application_manager::TypeAccess BaseCommandRequest::CheckModule(
- const Json::Value& message) {
- const std::string& module = ModuleType(message);
- return service_->CheckModule(app_->app_id(), module)
- ? application_manager::TypeAccess::kAllowed
- : application_manager::TypeAccess::kDisallowed;
-}
-
-bool BaseCommandRequest::CheckDriverConsent() {
- LOG4CXX_AUTO_TRACE(logger_);
- RCAppExtensionPtr extension = GetAppExtension(app_);
- if (!extension) {
- return false;
- }
- Json::Value value;
- Json::Reader reader;
- LOG4CXX_DEBUG(logger_, "Request: " << message_->json_message());
- reader.parse(message_->json_message(), value);
-
- application_manager::TypeAccess access = CheckModule(value);
-
- if (IsAutoAllowed(access)) {
- set_auto_allowed(true);
- return true;
- } else {
- SendDisallowed(access);
- }
- return false;
-}
-
-bool BaseCommandRequest::AcquireResources() {
- LOG4CXX_AUTO_TRACE(logger_);
- const Json::Value message_params =
- MessageHelper::StringToValue(message_->json_message());
-
- if (!IsResourceFree(ModuleType(message_params))) {
- LOG4CXX_WARN(logger_, "Resource is busy.");
- SendResponse(false, result_codes::kInUse, "");
- return false;
- }
-
- AcquireResult::eType acquire_result = AcquireResource(message_params);
- switch (acquire_result) {
- case AcquireResult::ALLOWED: {
- SetResourceState(msg_json_, ResourceState::BUSY);
- return true;
- }
- case AcquireResult::IN_USE: {
- SendResponse(false, result_codes::kInUse, "");
- return false;
- }
- case AcquireResult::ASK_DRIVER: {
- SetResourceState(msg_json_, ResourceState::BUSY);
-
- Json::Value value;
- Json::Reader reader;
- LOG4CXX_DEBUG(logger_, "Request: " << message_->json_message());
- reader.parse(message_->json_message(), value);
-
- SendGetUserConsent(value);
-
- return false;
- }
- case AcquireResult::REJECTED: {
- SendResponse(false, result_codes::kRejected, "");
- return false;
- }
- }
-
- return false;
-}
-
-bool BaseCommandRequest::IsAutoAllowed(
- application_manager::TypeAccess access) const {
- return access == application_manager::kAllowed;
-}
-
-void BaseCommandRequest::SendDisallowed(
- application_manager::TypeAccess access) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::string info;
- switch (access) {
- case application_manager::kAllowed:
- return;
- case application_manager::kDisallowed:
- info = disallowed_info_.empty()
- ? "The RPC is disallowed by vehicle settings"
- : disallowed_info_;
- break;
- default:
- info = "Unknown issue";
- }
- LOG4CXX_ERROR(logger_, info);
- SendResponse(false, result_codes::kDisallowed, info);
-}
-
-void BaseCommandRequest::SendGetUserConsent(const Json::Value& value) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(app_);
- Json::Value params;
- params[json_keys::kAppId] = app_->hmi_app_id();
- params[message_params::kModuleType] = ModuleType(value);
- SendRequest(functional_modules::hmi_api::get_user_consent, params);
-}
-
-std::string BaseCommandRequest::ModuleType(const Json::Value& message) {
- return "";
-}
-
-std::vector<std::string> BaseCommandRequest::ControlData(
- const Json::Value& message) {
- return std::vector<std::string>();
-}
-
-void BaseCommandRequest::on_event(
- const rc_event_engine::Event<application_manager::MessagePtr, std::string>&
- event) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- SetResourceState(msg_json_, ResourceState::FREE);
-
- if (event.id() == functional_modules::hmi_api::get_user_consent) {
- ProcessAccessResponse(event);
- } else {
- OnEvent(event); // run child's logic
- }
-}
-
-void BaseCommandRequest::ProcessAccessResponse(
- const rc_event_engine::Event<application_manager::MessagePtr, std::string>&
- event) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!app_) {
- LOG4CXX_ERROR(logger_, "Application doesn't registered!");
- SendResponse(false, result_codes::kApplicationNotRegistered, "");
- return;
- }
-
- application_manager::Message& hmi_response = *(event.event_message());
- const application_manager::MessageValidationResult validate_result =
- service_->ValidateMessageBySchema(hmi_response);
- LOG4CXX_DEBUG(logger_,
- "HMI response validation result is " << validate_result);
-
- if (validate_result !=
- application_manager::MessageValidationResult::SUCCESS) {
- SendResponse(
- false, result_codes::kGenericError, "HMI has sent invalid parameters");
- return;
- }
-
- Json::Value value;
- Json::Reader reader;
- reader.parse(event.event_message()->json_message(), value);
-
- std::string result_code;
- std::string info;
- const bool is_succeeded = ParseResultCode(value, result_code, info);
-
- bool is_allowed = false;
- if (is_succeeded) {
- if (IsMember(value[json_keys::kResult], message_params::kAllowed) &&
- value[json_keys::kResult][message_params::kAllowed].isBool()) {
- is_allowed = value[json_keys::kResult][message_params::kAllowed].asBool();
- }
-
- const std::string module = ModuleType(msg_json_);
-
- // Check the actual User's answer.
- LOG4CXX_DEBUG(logger_,
- "Setting allowed access for " << app_->app_id() << " for "
- << module);
- if (is_allowed) {
- rc_module_.resource_allocation_manager().ForceAcquireResource(
- module, app_->app_id());
-
- Execute(); // run child's logic
- } else {
- rc_module_.resource_allocation_manager().OnDriverDisallowed(
- module, app_->app_id());
-
- SendResponse(
- false,
- result_codes::kRejected,
- "The resource is in use and the driver disallows this remote "
- "control RPC");
- }
- } else {
- SendResponse(false, result_code.c_str(), info);
- }
-}
-
-} // namespace commands
-} // namespace remote_control
diff --git a/src/components/remote_control/src/commands/button_press_request.cc b/src/components/remote_control/src/commands/button_press_request.cc
deleted file mode 100644
index 1e5eef1e64..0000000000
--- a/src/components/remote_control/src/commands/button_press_request.cc
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/commands/button_press_request.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_module_constants.h"
-#include "functional_module/function_ids.h"
-#include "json/json.h"
-#include "utils/helpers.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace remote_control {
-
-namespace commands {
-
-using namespace json_keys;
-using namespace message_params;
-
-typedef std::map<std::string, mobile_apis::ButtonName::eType> ButtonsMap;
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "ButtonPressRequest")
-
-ButtonPressRequest::ButtonPressRequest(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : BaseCommandRequest(message, rc_module) {}
-
-ButtonPressRequest::~ButtonPressRequest() {}
-
-const std::vector<std::string> buttons_climate() {
- std::vector<std::string> data;
- data.push_back(enums_value::kACMax);
- data.push_back(enums_value::kAC);
- data.push_back(enums_value::kRecirculate);
- data.push_back(enums_value::kFanUp);
- data.push_back(enums_value::kFanDown);
- data.push_back(enums_value::kTempUp);
- data.push_back(enums_value::kTempDown);
- data.push_back(enums_value::kDefrostMax);
- data.push_back(enums_value::kDefrost);
- data.push_back(enums_value::kDefrostRear);
- data.push_back(enums_value::kUpperVent);
- data.push_back(enums_value::kLowerVent);
- return data;
-}
-
-const std::vector<std::string> buttons_radio() {
- std::vector<std::string> data;
- data.push_back(enums_value::kVolumeUp);
- data.push_back(enums_value::kVolumeDown);
- data.push_back(enums_value::kEject);
- data.push_back(enums_value::kSource);
- data.push_back(enums_value::kShuffle);
- data.push_back(enums_value::kRepeat);
- return data;
-}
-
-const ButtonsMap buttons_map() {
- using namespace mobile_apis;
-
- ButtonsMap buttons_map;
- buttons_map[enums_value::kACMax] = ButtonName::AC_MAX;
- buttons_map[enums_value::kAC] = ButtonName::AC;
- buttons_map[enums_value::kRecirculate] = ButtonName::RECIRCULATE;
- buttons_map[enums_value::kFanUp] = ButtonName::FAN_UP;
- buttons_map[enums_value::kFanDown] = ButtonName::FAN_DOWN;
- buttons_map[enums_value::kTempUp] = ButtonName::TEMP_UP;
- buttons_map[enums_value::kTempDown] = ButtonName::TEMP_DOWN;
- buttons_map[enums_value::kDefrostMax] = ButtonName::DEFROST_MAX;
- buttons_map[enums_value::kDefrost] = ButtonName::DEFROST;
- buttons_map[enums_value::kDefrostRear] = ButtonName::DEFROST_REAR;
- buttons_map[enums_value::kUpperVent] = ButtonName::UPPER_VENT;
- buttons_map[enums_value::kLowerVent] = ButtonName::LOWER_VENT;
- buttons_map[enums_value::kVolumeUp] = ButtonName::VOLUME_UP;
- buttons_map[enums_value::kVolumeDown] = ButtonName::VOLUME_DOWN;
- buttons_map[enums_value::kEject] = ButtonName::EJECT;
- buttons_map[enums_value::kSource] = ButtonName::SOURCE;
- buttons_map[enums_value::kShuffle] = ButtonName::SHUFFLE;
- buttons_map[enums_value::kRepeat] = ButtonName::REPEAT;
-
- return buttons_map;
-}
-
-bool CheckIfButtonExistInRCCaps(
- const smart_objects::SmartObject& rc_capabilities,
- const mobile_apis::ButtonName::eType button) {
- if (rc_capabilities.keyExists(strings::kbuttonCapabilities)) {
- const smart_objects::SmartObject& button_caps =
- rc_capabilities[strings::kbuttonCapabilities];
- smart_objects::SmartArray::iterator it = button_caps.asArray()->begin();
- for (; it != button_caps.asArray()->end(); ++it) {
- smart_objects::SmartObject& so = *it;
- int64_t current_id = so[message_params::kName].asInt();
- if (-1 == current_id) {
- // capabilities received from HMI contains enum values
- // capabilities loaded from file contains string values
- // TODO : unificate capabilities storing
- const std::string& bt_name = so[message_params::kName].asString();
- static ButtonsMap btn_map = buttons_map();
- current_id = btn_map[bt_name];
- }
- 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");
- return true;
- }
- }
- }
- LOG4CXX_TRACE(logger_,
- "Button id " << button << " do not exist in capabilities");
- return false;
-}
-
-bool CheckButtonName(const std::string& module_type,
- const std::string& button_name,
- const smart_objects::SmartObject* rc_capabilities) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (rc_capabilities == NULL) {
- LOG4CXX_ERROR(logger_, "No remote controll capabilities available");
- return false;
- }
-
- if (enums_value::kRadio == module_type) {
- if (!helpers::in_range(buttons_radio(), button_name)) {
- LOG4CXX_WARN(logger_,
- "Trying to acceess climate button with module type radio");
- return false;
- }
- }
-
- if (enums_value::kClimate == module_type) {
- if (!helpers::in_range(buttons_climate(), button_name)) {
- LOG4CXX_WARN(logger_,
- "Trying to acceess radio button with module type climate");
- return false;
- }
- }
- return true;
-}
-
-void ButtonPressRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const Json::Value request_params =
- MessageHelper::StringToValue(message_->json_message());
-
- const std::string button_name = request_params[kButtonName].asString();
- const std::string module_type = request_params[kModuleType].asString();
-
- static ButtonsMap btn_map = buttons_map();
- mobile_apis::ButtonName::eType button_id =
- mobile_apis::ButtonName::INVALID_ENUM;
- if (btn_map.end() != btn_map.find(button_name)) {
- button_id = btn_map[button_name];
- }
-
- const smart_objects::SmartObject* rc_capabilities =
- service()->GetRCCapabilities();
- const bool button_name_matches_module_type =
- CheckButtonName(module_type, button_name, rc_capabilities);
- const bool button_id_exist_in_caps =
- rc_capabilities &&
- CheckIfButtonExistInRCCaps(*rc_capabilities, button_id);
-
- if (button_name_matches_module_type && button_id_exist_in_caps) {
- SendRequest(functional_modules::hmi_api::button_press, request_params);
- } else if (!button_name_matches_module_type) {
- LOG4CXX_WARN(logger_, "Request module type and button name mismatch!");
- SendResponse(false,
- result_codes::kInvalidData,
- "Request module type and button name mismatch!");
- } else {
- LOG4CXX_WARN(logger_, "Requested button is not exists in capabilities!");
- SendResponse(false,
- result_codes::kUnsupportedResource,
- "Requested button is not exists in capabilities!");
- }
-}
-
-AcquireResult::eType ButtonPressRequest::AcquireResource(
- const Json::Value& message) {
- ResourceAllocationManager& allocation_manager =
- rc_module_.resource_allocation_manager();
- const std::string& module_type = ModuleType(message);
- const uint32_t app_id = app()->app_id();
- return allocation_manager.AcquireResource(module_type, app_id);
-}
-
-bool ButtonPressRequest::IsResourceFree(const std::string& module_type) const {
- return rc_module_.resource_allocation_manager().IsResourceFree(module_type);
-}
-
-void ButtonPressRequest::SetResourceState(const Json::Value& message,
- const ResourceState::eType state) {
- const std::string& module_type = ModuleType(message);
- const uint32_t app_id = app()->app_id();
-
- ResourceAllocationManager& allocation_manager =
- rc_module_.resource_allocation_manager();
- allocation_manager.SetResourceState(module_type, app_id, state);
-}
-
-void ButtonPressRequest::OnEvent(
- const rc_event_engine::Event<application_manager::MessagePtr, std::string>&
- event) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(
- (functional_modules::hmi_api::button_press == event.id()));
-
- application_manager::Message& hmi_response = *(event.event_message());
- const Json::Value value =
- MessageHelper::StringToValue(hmi_response.json_message());
-
- std::string result_code;
- std::string info;
-
- bool is_response_successful = ParseResultCode(value, result_code, info);
-
- if (remote_control::result_codes::kReadOnly == result_code) {
- is_response_successful = false;
- result_code = result_codes::kGenericError;
- }
- SendResponse(is_response_successful, result_code.c_str(), info);
-}
-
-std::string ButtonPressRequest::ModuleType(const Json::Value& message) {
- return message.get(message_params::kModuleType, Json::Value("")).asString();
-}
-
-} // namespace commands
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/commands/get_interior_vehicle_data_request.cc b/src/components/remote_control/src/commands/get_interior_vehicle_data_request.cc
deleted file mode 100644
index 6a7e746aa5..0000000000
--- a/src/components/remote_control/src/commands/get_interior_vehicle_data_request.cc
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- Copyright (c) 2017, 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 <map>
-
-#include "remote_control/commands/get_interior_vehicle_data_request.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/remote_control_plugin.h"
-#include "functional_module/function_ids.h"
-#include "json/json.h"
-
-namespace remote_control {
-
-namespace commands {
-
-using namespace enums_value;
-using namespace json_keys;
-using namespace message_params;
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "GetInteriorVehicleDataRequest")
-
-GetInteriorVehicleDataRequest::GetInteriorVehicleDataRequest(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : BaseCommandRequest(message, rc_module) {}
-
-bool CheckIfModuleTypeExistInCapabilities(
- const smart_objects::SmartObject& rc_capabilities,
- const std::string& module_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (enums_value::kRadio == module_type &&
- !rc_capabilities.keyExists(strings::kradioControlCapabilities)) {
- LOG4CXX_DEBUG(logger_, " Radio control capabilities not present");
- return false;
- }
- if (enums_value::kClimate == module_type &&
- !rc_capabilities.keyExists(strings::kclimateControlCapabilities)) {
- LOG4CXX_DEBUG(logger_, " Climate control capabilities not present");
- return false;
- }
-
- return true;
-}
-
-void GetInteriorVehicleDataRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
- Json::Value request_params =
- MessageHelper::StringToValue(message_->json_message());
-
- const smart_objects::SmartObject* capabilities =
- service()->GetRCCapabilities();
- if (capabilities &&
- !CheckIfModuleTypeExistInCapabilities(*capabilities,
- ModuleType(request_params))) {
- LOG4CXX_WARN(logger_, "Accessing not supported module data");
- SendResponse(false,
- result_codes::kUnsupportedResource,
- "Accessing not supported module data");
- return;
- }
- if (HasRequestExcessiveSubscription(request_params)) {
- RemoveExcessiveSubscription(request_params);
- }
-
- SendRequest(functional_modules::hmi_api::get_interior_vehicle_data,
- request_params);
-}
-
-void GetInteriorVehicleDataRequest::OnEvent(
- const rc_event_engine::Event<application_manager::MessagePtr, std::string>&
- event) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(
- (functional_modules::hmi_api::get_interior_vehicle_data == event.id()));
-
- application_manager::Message& hmi_response = *(event.event_message());
- const bool validate_result =
- application_manager::MessageValidationResult::SUCCESS ==
- service()->ValidateMessageBySchema(hmi_response);
- LOG4CXX_DEBUG(logger_,
- "HMI response validation result is " << validate_result);
- const Json::Value value =
- MessageHelper::StringToValue(hmi_response.json_message());
- std::string result_code;
- std::string info;
- bool success = validate_result && ParseResultCode(value, result_code, info);
-
- if (!validate_result ||
- remote_control::result_codes::kReadOnly == result_code) {
- success = false;
- result_code = result_codes::kGenericError;
- }
-
- if (success) {
- ProccessSubscription(value);
- response_params_[kModuleData] =
- value[json_keys::kResult][message_params::kModuleData];
- }
- SendResponse(success, result_code.c_str(), info);
-}
-
-void GetInteriorVehicleDataRequest::ProccessSubscription(
- const Json::Value& hmi_response) {
- LOG4CXX_AUTO_TRACE(logger_);
- Json::Value request_params;
- Json::Reader reader;
- reader.parse(message_->json_message(), request_params);
-
- const bool is_subscribe_present_in_request =
- IsMember(request_params, kSubscribe);
- const bool isSubscribed_present_in_response =
- IsMember(hmi_response[json_keys::kResult], message_params::kIsSubscribed);
-
- if (!is_subscribe_present_in_request && !isSubscribed_present_in_response) {
- return;
- }
-
- RCAppExtensionPtr extension = GetAppExtension(app());
- if (is_subscribe_present_in_request && !isSubscribed_present_in_response) {
- LOG4CXX_WARN(logger_,
- "conditional mandatory parameter "
- << kIsSubscribed << " missed in hmi response");
- response_params_[kIsSubscribed] =
- extension->IsSubscibedToInteriorVehicleData(
- request_params[kModuleType]);
- return;
- }
-
- if (!is_subscribe_present_in_request && isSubscribed_present_in_response) {
- LOG4CXX_WARN(logger_,
- "Parameter " << message_params::kIsSubscribed
- << " is ignored due to absence '"
- << message_params::kSubscribe
- << "' parameter in request");
- return;
- }
-
- const bool request_subscribe = request_params[kSubscribe].asBool();
- const bool response_subscribe =
- hmi_response[json_keys::kResult][message_params::kIsSubscribed].asBool();
- response_params_[message_params::kIsSubscribed] = response_subscribe;
- LOG4CXX_TRACE(logger_, "request_subscribe = " << request_subscribe);
- LOG4CXX_TRACE(logger_, "response_subscribe = " << response_subscribe);
- if (request_subscribe == response_subscribe) {
- if (response_subscribe) {
- LOG4CXX_DEBUG(logger_,
- "SubscribeToInteriorVehicleData "
- << app()->app_id() << " "
- << request_params[kModuleType].asString());
- extension->SubscribeToInteriorVehicleData(request_params[kModuleType]);
- } else {
- LOG4CXX_DEBUG(logger_,
- "UnsubscribeFromInteriorVehicleData "
- << app()->app_id() << " "
- << request_params[kModuleType].asString());
- extension->UnsubscribeFromInteriorVehicleData(
- request_params[kModuleType]);
- }
- }
-}
-
-bool GetInteriorVehicleDataRequest::HasRequestExcessiveSubscription(
- const Json::Value& request_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- const bool is_subscribe_present_in_request =
- IsMember(request_params, kSubscribe);
- if (is_subscribe_present_in_request) {
- RCAppExtensionPtr extension = GetAppExtension(app());
- const bool is_app_already_subscribed =
- extension->IsSubscibedToInteriorVehicleData(
- request_params[kModuleType]);
- const bool app_wants_to_subscribe = request_params[kSubscribe].asBool();
- if (!app_wants_to_subscribe && !is_app_already_subscribed) {
- return true;
- }
- return app_wants_to_subscribe && is_app_already_subscribed;
- }
- return false;
-}
-
-void GetInteriorVehicleDataRequest::RemoveExcessiveSubscription(
- Json::Value& request_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- request_params.removeMember(kSubscribe);
-}
-
-std::string GetInteriorVehicleDataRequest::ModuleType(
- const Json::Value& message) {
- return message.get(message_params::kModuleType, "").asString();
-}
-
-} // namespace commands
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc b/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc
deleted file mode 100644
index fccd8392c7..0000000000
--- a/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/commands/on_interior_vehicle_data_notification.h"
-#include <algorithm>
-#include <vector>
-#include "json/json.h"
-#include "utils/make_shared.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/remote_control_plugin.h"
-#include "remote_control/rc_app_extension.h"
-
-namespace remote_control {
-
-namespace commands {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "OnInteriorVehicleDataNotification")
-
-OnInteriorVehicleDataNotification::OnInteriorVehicleDataNotification(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : BaseCommandNotification(message, rc_module) {}
-
-OnInteriorVehicleDataNotification::~OnInteriorVehicleDataNotification() {}
-
-void OnInteriorVehicleDataNotification::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- Json::Value json;
-
- application_manager::MessagePtr msg = message();
-
- json = MessageHelper::StringToValue(msg->json_message());
-
- Json::Value module_type = ModuleType(json);
-
- typedef std::vector<application_manager::ApplicationSharedPtr> AppPtrs;
- AppPtrs apps = service_->GetApplications(rc_module_.GetModuleID());
-
- for (AppPtrs::iterator it = apps.begin(); it != apps.end(); ++it) {
- DCHECK(*it);
- application_manager::Application& app = **it;
-
- RCAppExtensionPtr extension =
- application_manager::AppExtensionPtr::static_pointer_cast<
- RCAppExtension>(app.QueryInterface(rc_module_.GetModuleID()));
- DCHECK(extension);
- LOG4CXX_TRACE(logger_, "Check subscription for " << app.app_id());
- if (extension->IsSubscibedToInteriorVehicleData(module_type)) {
- application_manager::MessagePtr message =
- utils::MakeShared<application_manager::Message>(*msg);
- message->set_message_type(
- application_manager::MessageType::kNotification);
- message->set_protocol_version(app.protocol_version());
- message->set_function_id(functional_modules::ON_INTERIOR_VEHICLE_DATA);
- message->set_function_name(MessageHelper::GetMobileAPIName(
- functional_modules::ON_INTERIOR_VEHICLE_DATA));
- message->set_connection_key(app.app_id());
- NotifyOneApplication(message);
- }
- }
-}
-
-std::string OnInteriorVehicleDataNotification::ModuleType(
- const Json::Value& message) {
- const Json::Value& module_data =
- message.get(message_params::kModuleData, Json::Value(Json::objectValue));
- return module_data.get(message_params::kModuleType, "").asString();
-}
-
-} // namespace commands
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/commands/on_remote_control_settings_notification.cc b/src/components/remote_control/src/commands/on_remote_control_settings_notification.cc
deleted file mode 100644
index f18180aa21..0000000000
--- a/src/components/remote_control/src/commands/on_remote_control_settings_notification.cc
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/commands/on_remote_control_settings_notification.h"
-#include <algorithm>
-#include <vector>
-#include "json/json.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/remote_control_plugin.h"
-#include "remote_control/rc_app_extension.h"
-#include "functional_module/function_ids.h"
-
-namespace remote_control {
-
-namespace commands {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "OnRemoteControlSettingsNotification");
-
-OnRemoteControlSettingsNotification::OnRemoteControlSettingsNotification(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : BaseCommandNotification(message, rc_module) {}
-
-void UnsubscribeFromInteriorVehicleDataForAllModules(
- RCAppExtensionPtr extension) {
- LOG4CXX_AUTO_TRACE(logger_);
- const Json::Value climate(enums_value::kClimate);
- extension->UnsubscribeFromInteriorVehicleData(climate);
- const Json::Value radio(enums_value::kRadio);
- extension->UnsubscribeFromInteriorVehicleData(radio);
-}
-
-void OnRemoteControlSettingsNotification::DisallowRCFunctionality() {
- LOG4CXX_AUTO_TRACE(logger_);
- typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
- Apps apps = service_->GetApplications(rc_module_.GetModuleID());
- for (Apps::iterator it = apps.begin(); it != apps.end(); ++it) {
- application_manager::ApplicationSharedPtr app = *it;
- DCHECK(app);
- service_->ChangeNotifyHMILevel(app, mobile_apis::HMILevel::eType::HMI_NONE);
-
- const RCAppExtensionPtr extension =
- application_manager::AppExtensionPtr::static_pointer_cast<
- RCAppExtension>(app->QueryInterface(rc_module_.GetModuleID()));
- if (extension) {
- UnsubscribeFromInteriorVehicleDataForAllModules(extension);
- }
- }
-}
-
-void OnRemoteControlSettingsNotification::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
- const Json::Value value =
- MessageHelper::StringToValue(message()->json_message());
-
- if (!value.isMember(message_params::kAllowed)) {
- LOG4CXX_DEBUG(logger_,
- "Notification is ignored due to \"allow\" parameter absense");
- LOG4CXX_DEBUG(logger_, "RC Functionality remains unchanged");
- return;
- }
- ResourceAllocationManager& allocation_manager =
- rc_module_.resource_allocation_manager();
- const bool is_allowed = value[message_params::kAllowed].asBool();
- if (is_allowed) {
- hmi_apis::Common_RCAccessMode::eType access_mode =
- hmi_apis::Common_RCAccessMode::INVALID_ENUM;
- LOG4CXX_DEBUG(logger_, "Allowing RC Functionality");
- if (value.isMember(message_params::kAccessMode)) {
- const std::string access_mode_str =
- value.get(message_params::kAccessMode, enums_value::kAutoAllow)
- .asString();
-
- access_mode = MessageHelper::AccessModeFromString(access_mode_str);
- LOG4CXX_DEBUG(logger_, "Setting up access mode : " << access_mode_str);
- } else {
- access_mode = allocation_manager.GetAccessMode();
- LOG4CXX_DEBUG(logger_,
- "No access mode received. Using last known: "
- << MessageHelper::AccessModeToString(access_mode));
- }
- allocation_manager.SetAccessMode(access_mode);
- } else {
- LOG4CXX_DEBUG(logger_, "Disallowing RC Functionality");
- DisallowRCFunctionality();
- allocation_manager.ResetAllAllocations();
- }
-}
-
-} // namespace commands
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc b/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc
deleted file mode 100644
index 70fbd9280e..0000000000
--- a/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/commands/set_interior_vehicle_data_request.h"
-#include <algorithm>
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "functional_module/function_ids.h"
-#include "json/json.h"
-#include "utils/helpers.h"
-
-namespace remote_control {
-
-namespace commands {
-
-using namespace json_keys;
-using namespace message_params;
-
-namespace {
-std::vector<std::string> GetModuleReadOnlyParams(
- const std::string& module_type) {
- std::vector<std::string> module_ro_params;
- if (enums_value::kClimate == module_type) {
- module_ro_params.push_back(kCurrentTemperature);
- } else if (enums_value::kRadio == module_type) {
- module_ro_params.push_back(kRdsData);
- module_ro_params.push_back(kAvailableHDs);
- module_ro_params.push_back(kSignalStrength);
- module_ro_params.push_back(kSignalChangeThreshold);
- module_ro_params.push_back(kState);
- }
- return module_ro_params;
-}
-
-const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
- std::map<std::string, std::string> mapping;
- // climate
- mapping["fanSpeed"] = "fanSpeedAvailable";
- mapping["currentTemperature"] = "currentTemperatureAvailable";
- mapping["desiredTemperature"] = "desiredTemperatureAvailable";
- mapping["acEnable"] = "acEnableAvailable";
- mapping["circulateAirEnable"] = "circulateAirEnableAvailable";
- mapping["autoModeEnable"] = "autoModeEnableAvailable";
- mapping["defrostZone"] = "defrostZoneAvailable";
- mapping["dualModeEnable"] = "dualModeEnableAvailable";
- mapping["acMaxEnable"] = "acMaxEnableAvailable";
- mapping["ventilationMode"] = "ventilationModeAvailable";
-
- // radio
- mapping["band"] = "radioBandAvailable";
- mapping["frequencyInteger"] = "radioFrequencyAvailable";
- mapping["frequencyFraction"] = "radioFrequencyAvailable";
- mapping["rdsData"] = "rdsDataAvailable";
- mapping["availableHDs"] = "availableHDsAvailable";
- mapping["hdChannel"] = "availableHDsAvailable";
- mapping["signalStrength"] = "signalStrengthAvailable";
- mapping["signalChangeThreshold"] = "signalChangeThresholdAvailable";
- mapping["radioEnable"] = "radioEnableAvailable";
- mapping["state"] = "stateAvailable";
-
- return mapping;
-}
-} // namespace
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "SetInteriorVehicleDataRequest")
-
-SetInteriorVehicleDataRequest::SetInteriorVehicleDataRequest(
- const application_manager::MessagePtr& message,
- RemotePluginInterface& rc_module)
- : BaseCommandRequest(message, rc_module) {}
-
-SetInteriorVehicleDataRequest::~SetInteriorVehicleDataRequest() {}
-
-bool CheckControlDataByCapabilities(
- const smart_objects::SmartObject& module_caps,
- const Json::Value& control_data) {
- std::map<std::string, std::string> mapping =
- GetModuleDataToCapabilitiesMapping();
- Json::Value::Members control_data_keys = control_data.getMemberNames();
-
- Json::Value::Members::const_iterator it = control_data_keys.begin();
- for (; it != control_data_keys.end(); ++it) {
- const std::string& request_parameter = *it;
- const std::string& caps_key = mapping[request_parameter];
- const smart_objects::SmartObject& capabilities_status = module_caps[0];
- LOG4CXX_DEBUG(logger_,
- "Checking request parameter "
- << request_parameter
- << " with capabilities. Appropriate key is " << caps_key);
- if (!capabilities_status.keyExists(caps_key)) {
- LOG4CXX_DEBUG(logger_,
- "Capability "
- << caps_key
- << " is missed in RemoteControl capabilities");
- return false;
- }
- if (!capabilities_status[caps_key].asBool()) {
- LOG4CXX_DEBUG(logger_,
- "Capability "
- << caps_key
- << " is switched off in RemoteControl capabilities");
- return false;
- }
- }
- return true;
-}
-
-bool CheckIfModuleDataExistInCapabilities(
- const smart_objects::SmartObject& rc_capabilities,
- const Json::Value& module_data) {
- LOG4CXX_AUTO_TRACE(logger_);
- bool is_radio_data_valid = true;
- bool is_climate_data_valid = true;
- if (IsMember(module_data, kRadioControlData)) {
- if (!rc_capabilities.keyExists(strings::kradioControlCapabilities)) {
- LOG4CXX_DEBUG(logger_, " Radio control capabilities not present");
- return false;
- }
- const smart_objects::SmartObject& radio_caps =
- rc_capabilities[strings::kradioControlCapabilities];
- is_radio_data_valid = CheckControlDataByCapabilities(
- radio_caps, module_data[strings::kRadioControlData]);
- }
- if (IsMember(module_data, kClimateControlData)) {
- if (!rc_capabilities.keyExists(strings::kclimateControlCapabilities)) {
- LOG4CXX_DEBUG(logger_, " Climate control capabilities not present");
- return false;
- }
- const smart_objects::SmartObject& climate_caps =
- rc_capabilities[strings::kclimateControlCapabilities];
- is_climate_data_valid = CheckControlDataByCapabilities(
- climate_caps, module_data[strings::kClimateControlData]);
- }
-
- return is_radio_data_valid && is_climate_data_valid;
-}
-
-void SetInteriorVehicleDataRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- Json::Value request_params =
- MessageHelper::StringToValue(message_->json_message());
- const Json::Value module_data = request_params[kModuleData];
- const std::string module_type = module_data[kModuleType].asString();
- bool module_type_and_data_match = true;
-
- if (enums_value::kRadio == module_type) {
- module_type_and_data_match = !IsMember(module_data, kClimateControlData);
- }
-
- if (enums_value::kClimate == module_type) {
- module_type_and_data_match = !IsMember(module_data, kRadioControlData);
- }
-
- if (module_type_and_data_match) {
- const smart_objects::SmartObject* capabilities =
- service()->GetRCCapabilities();
- if (capabilities &&
- !CheckIfModuleDataExistInCapabilities(*capabilities, module_data)) {
- LOG4CXX_WARN(logger_, "Accessing not supported module data");
- SendResponse(false,
- result_codes::kUnsupportedResource,
- "Accessing not supported module data");
- return;
- }
- if (AreAllParamsReadOnly(request_params)) {
- LOG4CXX_WARN(logger_, "All request params in module type are READ ONLY!");
- SendResponse(false,
- result_codes::kReadOnly,
- "All request params in module type are READ ONLY!");
- return;
- }
- if (AreReadOnlyParamsPresent(request_params)) {
- LOG4CXX_DEBUG(logger_, "Request module type has READ ONLY parameters");
- LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameters... ");
- CutOffReadOnlyParams(request_params);
- }
- application_manager::MessagePtr hmi_request = CreateHmiRequest(
- functional_modules::hmi_api::set_interior_vehicle_data, request_params);
- service()->RemoveHMIFakeParameters(hmi_request);
- SendMessageToHMI(hmi_request);
- } else {
- LOG4CXX_WARN(logger_, "Request module type & data mismatch!");
- SendResponse(false,
- result_codes::kInvalidData,
- "Request module type & data mismatch!");
- }
-}
-
-AcquireResult::eType SetInteriorVehicleDataRequest::AcquireResource(
- const Json::Value& message) {
- return rc_module_.resource_allocation_manager().AcquireResource(
- ModuleType(message), app()->app_id());
-}
-
-bool SetInteriorVehicleDataRequest::IsResourceFree(
- const std::string& module_type) const {
- return rc_module_.resource_allocation_manager().IsResourceFree(module_type);
-}
-
-void SetInteriorVehicleDataRequest::SetResourceState(
- const Json::Value& message, const ResourceState::eType state) {
- const std::string& module_type = ModuleType(message);
- const uint32_t app_id = app()->app_id();
-
- ResourceAllocationManager& allocation_manager =
- rc_module_.resource_allocation_manager();
-
- allocation_manager.SetResourceState(module_type, app_id, state);
-}
-
-bool SetInteriorVehicleDataRequest::AreReadOnlyParamsPresent(
- const Json::Value& request_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::vector<std::string> module_type_params = ControlData(request_params);
- std::vector<std::string>::iterator it = module_type_params.begin();
- std::vector<std::string> ro_params =
- GetModuleReadOnlyParams(ModuleType(request_params));
- for (; it != module_type_params.end(); ++it) {
- if (helpers::in_range(ro_params, *it)) {
- return true;
- }
- }
- return false;
-}
-
-void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
- Json::Value& request_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::vector<std::string> module_type_params = ControlData(request_params);
- std::vector<std::string>::iterator it = module_type_params.begin();
- const std::string module_type = ModuleType(request_params);
- std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type);
- for (; it != module_type_params.end(); ++it) {
- if (helpers::in_range(ro_params, *it)) {
- if (enums_value::kClimate == module_type) {
- request_params[message_params::kModuleData]
- [message_params::kClimateControlData].removeMember(*it);
- LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << *it);
- } else if (enums_value::kRadio == module_type) {
- request_params[message_params::kModuleData]
- [message_params::kRadioControlData].removeMember(*it);
- LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << *it);
- }
- }
- }
-}
-
-bool SetInteriorVehicleDataRequest::AreAllParamsReadOnly(
- const Json::Value& request_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::vector<std::string> module_type_params = ControlData(request_params);
- std::vector<std::string>::iterator it = module_type_params.begin();
- std::vector<std::string> ro_params =
- GetModuleReadOnlyParams(ModuleType(request_params));
- for (; it != module_type_params.end(); ++it) {
- if (!helpers::in_range(ro_params, *it)) {
- return false;
- }
- }
- return true;
-}
-
-void SetInteriorVehicleDataRequest::OnEvent(
- const rc_event_engine::Event<application_manager::MessagePtr, std::string>&
- event) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(
- (functional_modules::hmi_api::set_interior_vehicle_data == event.id()));
-
- application_manager::Message& hmi_response = *(event.event_message());
- if (application_manager::MessageValidationResult::SUCCESS !=
- service()->ValidateMessageBySchema(hmi_response)) {
- SendResponse(false, result_codes::kGenericError, "");
- return;
- }
-
- LOG4CXX_DEBUG(logger_, "HMI response is valid");
- const Json::Value value =
- MessageHelper::StringToValue(hmi_response.json_message());
-
- std::string result_code;
- std::string info;
-
- const bool is_response_successful = ParseResultCode(value, result_code, info);
-
- if (is_response_successful) {
- response_params_[message_params::kModuleData] =
- value[json_keys::kResult][message_params::kModuleData];
- }
-
- SendResponse(is_response_successful, result_code.c_str(), info);
-}
-
-std::string SetInteriorVehicleDataRequest::ModuleType(
- const Json::Value& message) {
- const Json::Value& module_data =
- message.get(message_params::kModuleData, Json::Value(Json::objectValue));
- return module_data.get(message_params::kModuleType, "").asString();
-}
-
-std::vector<std::string> SetInteriorVehicleDataRequest::ControlData(
- const Json::Value& message) {
- Json::Value data =
- message.get(message_params::kModuleData, Json::Value(Json::objectValue));
- std::string module = ModuleType(message);
- Json::Value params;
- if (module == enums_value::kRadio) {
- params = data.get(message_params::kRadioControlData,
- Json::Value(Json::objectValue));
- }
- if (module == enums_value::kClimate) {
- params = data.get(message_params::kClimateControlData,
- Json::Value(Json::objectValue));
- }
- return params.getMemberNames();
-}
-
-} // namespace commands
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/message_helper.cc b/src/components/remote_control/src/message_helper.cc
deleted file mode 100644
index 140e0a977a..0000000000
--- a/src/components/remote_control/src/message_helper.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/message_helper.h"
-#include "remote_control/rc_module_constants.h"
-#include "utils/make_shared.h"
-
-namespace remote_control {
-using functional_modules::RCFunctionID;
-namespace {
-std::map<RCFunctionID, std::string> GenerateAPINames() {
- std::map<RCFunctionID, std::string> result;
- result.insert(std::make_pair<RCFunctionID, std::string>(
- RCFunctionID::BUTTON_PRESS, "ButtonPress"));
- result.insert(std::make_pair<RCFunctionID, std::string>(
- RCFunctionID::GET_INTERIOR_VEHICLE_DATA, "GetInteriorVehicleData"));
- result.insert(std::make_pair<RCFunctionID, std::string>(
- RCFunctionID::SET_INTERIOR_VEHICLE_DATA, "SetInteriorVehicleData"));
- result.insert(std::make_pair<RCFunctionID, std::string>(
- RCFunctionID::ON_INTERIOR_VEHICLE_DATA, "OnInteriorVehicleData"));
- result.insert(std::make_pair<RCFunctionID, std::string>(
- RCFunctionID::ON_REMOTE_CONTROL_SETTINGS, "OnRemoteControlSettings"));
- return result;
-}
-
-std::map<std::string, hmi_apis::Common_RCAccessMode::eType> access_modes{
- {enums_value::kAutoAllow, hmi_apis::Common_RCAccessMode::AUTO_ALLOW},
- {enums_value::kAutoDeny, hmi_apis::Common_RCAccessMode::AUTO_DENY},
- {enums_value::kAskDriver, hmi_apis::Common_RCAccessMode::ASK_DRIVER}};
-}
-
-const std::map<RCFunctionID, std::string> MessageHelper::kMobileAPINames =
- GenerateAPINames();
-
-const std::string MessageHelper::GetMobileAPIName(RCFunctionID func_id) {
- std::map<RCFunctionID, std::string>::const_iterator it =
- kMobileAPINames.find(func_id);
- if (kMobileAPINames.end() != it) {
- return it->second;
- } else {
- return "";
- }
-}
-
-std::string MessageHelper::ValueToString(const Json::Value& value) {
- Json::FastWriter writer;
-
- return writer.write(value);
-}
-
-Json::Value MessageHelper::StringToValue(const std::string& string) {
- Json::Reader reader;
- Json::Value json;
-
- return reader.parse(string, json) ? json
- : Json::Value(Json::ValueType::nullValue);
-}
-
-bool IsMember(const Json::Value& value, const std::string& key) {
- if (!value.isObject()) {
- return false;
- }
-
- return value.isMember(key);
-}
-
-application_manager::MessagePtr MessageHelper::CreateHmiRequest(
- const char* function_id,
- const uint32_t hmi_app_id,
- const Json::Value& message_params,
- RemotePluginInterface& rc_module) {
- using namespace json_keys;
- Json::Value msg;
-
- msg[json_keys::kId] = rc_module.service()->GetNextCorrelationID();
-
- msg[json_keys::kJsonrpc] = "2.0";
- msg[json_keys::kMethod] = function_id;
- if (!message_params.isNull()) {
- msg[json_keys::kParams] = message_params;
- }
-
- msg[json_keys::kParams][json_keys::kAppId] = hmi_app_id;
-
- Json::FastWriter writer;
- application_manager::MessagePtr message_to_send =
- utils::MakeShared<application_manager::Message>(
- application_manager::Message(
- protocol_handler::MessagePriority::kDefault));
- message_to_send->set_protocol_version(
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI);
- message_to_send->set_correlation_id(msg[json_keys::kId].asInt());
- message_to_send->set_function_name(msg[json_keys::kMethod].asString());
- std::string json_msg = writer.write(msg);
- message_to_send->set_json_message(json_msg);
- message_to_send->set_message_type(application_manager::MessageType::kRequest);
-
- return message_to_send;
-}
-
-hmi_apis::Common_RCAccessMode::eType MessageHelper::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 MessageHelper::AccessModeToString(
- const hmi_apis::Common_RCAccessMode::eType access_mode) {
- std::map<std::string, hmi_apis::Common_RCAccessMode::eType>::const_iterator
- it = access_modes.begin();
- for (; access_modes.end() != it; ++it) {
- if (access_mode == it->second) {
- return it->first;
- }
- }
- const std::string error = "UNKNOW_ACCESS_MODE";
- DCHECK_OR_RETURN(false, error);
- return error;
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/module_helper.cc b/src/components/remote_control/src/module_helper.cc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/components/remote_control/src/module_helper.cc
+++ /dev/null
diff --git a/src/components/remote_control/src/rc_app_extension.cc b/src/components/remote_control/src/rc_app_extension.cc
deleted file mode 100644
index 3431a713f9..0000000000
--- a/src/components/remote_control/src/rc_app_extension.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/rc_app_extension.h"
-
-namespace remote_control {
-RCAppExtension::RCAppExtension(application_manager::AppExtensionUID uid)
- : AppExtension(uid) {}
-
-void RCAppExtension::SubscribeToInteriorVehicleData(
- const Json::Value& module_type) {
- subscribed_interior_vehicle_data_.insert(module_type);
-}
-
-void RCAppExtension::UnsubscribeFromInteriorVehicleData(
- const Json::Value& module_type) {
- subscribed_interior_vehicle_data_.erase(module_type);
-}
-
-void RCAppExtension::UnsubscribeFromInteriorVehicleData() {
- subscribed_interior_vehicle_data_.clear();
-}
-
-bool RCAppExtension::IsSubscibedToInteriorVehicleData(
- const Json::Value& module_type) {
- std::set<Json::Value>::iterator it =
- subscribed_interior_vehicle_data_.find(module_type);
-
- return (it != subscribed_interior_vehicle_data_.end());
-}
-
-RCAppExtension::~RCAppExtension() {}
-} // namespace remote_control
diff --git a/src/components/remote_control/src/rc_command_factory.cc b/src/components/remote_control/src/rc_command_factory.cc
deleted file mode 100644
index 93b90b64ac..0000000000
--- a/src/components/remote_control/src/rc_command_factory.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- Copyright (c) 2017, 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/shared_ptr.h"
-#include "utils/make_shared.h"
-#include "remote_control/rc_command_factory.h"
-#include "functional_module/function_ids.h"
-#include "remote_control/commands/get_interior_vehicle_data_request.h"
-#include "remote_control/commands/set_interior_vehicle_data_request.h"
-#include "remote_control/commands/button_press_request.h"
-#include "remote_control/commands/on_interior_vehicle_data_notification.h"
-#include "remote_control/commands/on_remote_control_settings_notification.h"
-
-namespace remote_control {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControl")
-
-using functional_modules::RCFunctionID;
-
-utils::SharedPtr<commands::Command> RCCommandFactory::CreateCommand(
- const application_manager::MessagePtr& msg,
- RemotePluginInterface& rc_module) {
- switch (msg->function_id()) {
- case RCFunctionID::GET_INTERIOR_VEHICLE_DATA: {
- return utils::MakeShared<commands::GetInteriorVehicleDataRequest>(
- msg, rc_module);
- break;
- }
- case RCFunctionID::SET_INTERIOR_VEHICLE_DATA: {
- return utils::MakeShared<commands::SetInteriorVehicleDataRequest>(
- msg, rc_module);
- break;
- }
- case RCFunctionID::BUTTON_PRESS: {
- return utils::MakeShared<commands::ButtonPressRequest>(msg, rc_module);
- break;
- }
- case RCFunctionID::ON_INTERIOR_VEHICLE_DATA: {
- return utils::MakeShared<commands::OnInteriorVehicleDataNotification>(
- msg, rc_module);
- break;
- }
- case RCFunctionID::ON_REMOTE_CONTROL_SETTINGS: {
- return utils::MakeShared<commands::OnRemoteControlSettingsNotification>(
- msg, rc_module);
- break;
- }
- default: {
- utils::SharedPtr<commands::Command> invalid_command;
- LOG4CXX_DEBUG(logger_,
- "RSDL unable to proces function " << msg->function_id());
- return invalid_command;
- }
- }
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/remote_control_event.cc b/src/components/remote_control/src/remote_control_event.cc
deleted file mode 100644
index e4f887ffc6..0000000000
--- a/src/components/remote_control/src/remote_control_event.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/remote_control_event.h"
-
-namespace remote_control {
-
-RCPluginEvent::RCPluginEvent(application_manager::MessagePtr& message,
- const std::string& id)
- : rc_event_engine::Event<application_manager::MessagePtr, std::string>(
- message, id) {}
-
-RCPluginEvent::~RCPluginEvent() {}
-
-int32_t RCPluginEvent::event_message_function_id() const {
- return event_message_->function_id();
-}
-
-int32_t RCPluginEvent::event_message_correlation_id() const {
- return event_message_->correlation_id();
-}
-
-int32_t RCPluginEvent::event_message_type() const {
- return event_message_->type();
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/remote_control_plugin.cc b/src/components/remote_control/src/remote_control_plugin.cc
deleted file mode 100644
index c885d724ad..0000000000
--- a/src/components/remote_control/src/remote_control_plugin.cc
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- Copyright (c) 2017, 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 "remote_control/remote_control_plugin.h"
-#include "remote_control/rc_command_factory.h"
-#include "remote_control/remote_control_event.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/message_helper.h"
-#include "utils/logger.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-#include "utils/make_shared.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace remote_control {
-
-using functional_modules::ProcessResult;
-using functional_modules::GenericModule;
-using functional_modules::PluginInfo;
-using functional_modules::RCFunctionID;
-namespace hmi_api = functional_modules::hmi_api;
-
-using namespace json_keys;
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControl");
-
-EXPORT_FUNCTION_IMPL(remote_control::RemoteControlPlugin);
-
-RemoteControlPlugin::RemoteControlPlugin()
- : is_scan_started_(false), resource_allocation_manager_(*this) {
- plugin_info_.name = "RemoteControlPlugin";
- plugin_info_.version = 1;
- SubscribeOnFunctions();
-}
-
-void RemoteControlPlugin::SubscribeOnFunctions() {
- plugin_info_.rc_function_list.push_back(RCFunctionID::BUTTON_PRESS);
- plugin_info_.rc_function_list.push_back(
- RCFunctionID::GET_INTERIOR_VEHICLE_DATA);
- plugin_info_.rc_function_list.push_back(
- RCFunctionID::SET_INTERIOR_VEHICLE_DATA);
- plugin_info_.rc_function_list.push_back(
- RCFunctionID::ON_INTERIOR_VEHICLE_DATA);
-
- plugin_info_.hmi_function_list.push_back(hmi_api::get_interior_vehicle_data);
- plugin_info_.hmi_function_list.push_back(hmi_api::set_interior_vehicle_data);
- plugin_info_.hmi_function_list.push_back(hmi_api::on_interior_vehicle_data);
- plugin_info_.hmi_function_list.push_back(hmi_api::button_press);
- plugin_info_.hmi_function_list.push_back(hmi_api::get_user_consent);
- plugin_info_.hmi_function_list.push_back(hmi_api::on_remote_control_settings);
-}
-
-RemoteControlPlugin::~RemoteControlPlugin() {
- RemoveAppExtensions();
-}
-
-functional_modules::PluginInfo RemoteControlPlugin::GetPluginInfo() const {
- return plugin_info_;
-}
-
-const std::string ExtractFunctionAndAddMetadata(
- const Json::Value& value, application_manager::Message& out_msg) {
- if (value.isMember(json_keys::kMethod)) {
- const std::string& function_name =
- value.get(json_keys::kMethod, "").asCString();
-
- // Existence of method name must be guaranteed by plugin manager
- DCHECK_OR_RETURN(!function_name.empty(), "");
-
- if (value.isMember(json_keys::kId)) {
- out_msg.set_correlation_id(value.get(json_keys::kId, "").asInt());
- out_msg.set_message_type(application_manager::MessageType::kRequest);
- } else {
- out_msg.set_message_type(application_manager::MessageType::kNotification);
- }
- return function_name;
- }
-
- if (value.isMember(json_keys::kResult)) {
- const Json::Value& result = value.get(json_keys::kResult, Json::Value());
- const std::string& function_name =
- result.get(json_keys::kMethod, "").asCString();
- out_msg.set_correlation_id(value.get(json_keys::kId, "").asInt());
-
- // Existence of method name must be guaranteed by plugin manager
- DCHECK_OR_RETURN(!function_name.empty(), "");
-
- out_msg.set_message_type(application_manager::MessageType::kResponse);
- return function_name;
- }
-
- if (value.isMember(json_keys::kError)) {
- const Json::Value& error = value.get(json_keys::kError, Json::Value());
- const Json::Value& data = error.get(json_keys::kData, Json::Value());
- const std::string& function_name =
- data.get(json_keys::kMethod, "").asCString();
-
- // Existence of method name must be guaranteed by plugin manager
- DCHECK_OR_RETURN(!function_name.empty(), "");
-
- out_msg.set_message_type(application_manager::MessageType::kErrorResponse);
- out_msg.set_correlation_id(value.get(json_keys::kId, "").asInt());
- return function_name;
- }
- return std::string();
-}
-
-ProcessResult RemoteControlPlugin::ProcessMessage(
- application_manager::MessagePtr msg) {
- DCHECK_OR_RETURN(msg, ProcessResult::FAILED);
-
- const std::string& function_name = MessageHelper::GetMobileAPIName(
- static_cast<functional_modules::RCFunctionID>(msg->function_id()));
-
- LOG4CXX_DEBUG(logger_, "Function name to set : " << function_name);
- msg->set_function_name(function_name);
-
- LOG4CXX_DEBUG(logger_, "Mobile message: " << msg->json_message());
-
- request_controller::MobileRequestPtr command(
- RCCommandFactory::CreateCommand(msg, *this));
- if (command) {
- request_controller_.AddRequest(msg->correlation_id(), command);
- command->Run();
- } else {
- return ProcessResult::CANNOT_PROCESS;
- }
-
- return ProcessResult::PROCESSED;
-}
-
-ProcessResult RemoteControlPlugin::ProcessHMIMessage(
- application_manager::MessagePtr msg) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- Json::Value value;
- Json::Reader reader;
- reader.parse(msg->json_message(), value);
- LOG4CXX_TRACE(logger_, "Process " << msg->json_message());
- const std::string& function_name = ExtractFunctionAndAddMetadata(value, *msg);
-
- // Existence of method name must be guaranteed by plugin manager
- DCHECK_OR_RETURN(!function_name.empty(), ProcessResult::FAILED);
-
- LOG4CXX_DEBUG(logger_, "Process " << function_name);
-
- switch (msg->type()) {
- case application_manager::MessageType::kResponse:
- case application_manager::MessageType::kErrorResponse: {
- RCPluginEvent event(msg, function_name);
- LOG4CXX_DEBUG(logger_, "Response received");
- event_dispatcher_.raise_event(event);
- return ProcessResult::PROCESSED;
- }
- case application_manager::MessageType::kRequest:
- case application_manager::MessageType::kNotification: {
- if (hmi_api::on_interior_vehicle_data == function_name) {
- msg->set_function_id(functional_modules::ON_INTERIOR_VEHICLE_DATA);
- }
- if (hmi_api::on_remote_control_settings == function_name) {
- msg->set_function_id(functional_modules::ON_REMOTE_CONTROL_SETTINGS);
- }
- const application_manager::MessageValidationResult validation_result =
- service()->ValidateMessageBySchema(*msg);
- utils::SharedPtr<commands::Command> command =
- RCCommandFactory::CreateCommand(msg, *this);
- if ((validation_result ==
- application_manager::MessageValidationResult::SUCCESS) &&
- command) {
- command->Run();
- return ProcessResult::PROCESSED;
- }
- LOG4CXX_DEBUG(logger_, "Message validation failed");
- break;
- }
- default: { LOG4CXX_DEBUG(logger_, "Unknown message type"); }
- }
- return ProcessResult::CANNOT_PROCESS;
-}
-
-void RemoteControlPlugin::SendHmiStatusNotification(
- application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager::MessagePtr msg = new application_manager::Message(
- protocol_handler::MessagePriority::kDefault);
- Json::Value msg_params;
-
- msg->set_function_id(mobile_apis::FunctionID::OnHMIStatusID);
- msg->set_message_type(application_manager::MessageType::kNotification);
-
- msg->set_connection_key(app->app_id());
- msg->set_protocol_version(app->protocol_version());
-
- msg_params["hmiLevel"] = static_cast<uint32_t>(app->hmi_level());
-
- msg_params["audioStreamingState"] =
- static_cast<uint32_t>(app->audio_streaming_state());
-
- msg_params["systemContext"] = static_cast<uint32_t>(app->system_context());
-
- msg->set_json_message(MessageHelper::ValueToString(msg_params));
-
- service()->SendMessageToMobile(msg);
-}
-
-void RemoteControlPlugin::SendResponseToMobile(
- application_manager::MessagePtr msg) {
- LOG4CXX_DEBUG(logger_, "Response to mobile: " << msg->json_message());
- service()->SendMessageToMobile(msg);
- request_controller_.DeleteRequest(msg->correlation_id());
-}
-
-void RemoteControlPlugin::SendTimeoutResponseToMobile(
- application_manager::MessagePtr msg) {
- LOG4CXX_DEBUG(
- logger_,
- "Timeout is expired. Response to mobile: " << msg->json_message());
- service()->SendMessageToMobile(msg);
-}
-
-void RemoteControlPlugin::RemoveAppExtensions() {
- std::vector<application_manager::ApplicationSharedPtr> applications =
- service()->GetApplications(GetModuleID());
-
- std::vector<application_manager::ApplicationSharedPtr>::iterator it =
- applications.begin();
-
- for (; it != applications.end(); ++it) {
- application_manager::ApplicationSharedPtr app = *it;
- if (app) {
- app->RemoveExtension(GetModuleID());
- }
- }
-}
-
-void RemoteControlPlugin::RemoveAppExtension(uint32_t app_id) {
- application_manager::ApplicationSharedPtr app =
- service()->GetApplication(app_id);
-
- if (app) {
- app->RemoveExtension(GetModuleID());
- }
-}
-
-bool RemoteControlPlugin::IsAppForPlugin(
- application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager::AppExtensionPtr app_extension =
- app->QueryInterface(GetModuleID());
- if (app_extension) {
- return true;
- }
-
- if (service()->IsRemoteControlApplication(app)) {
- RCAppExtensionPtr rc_app_extension = new RCAppExtension(GetModuleID());
- app->AddExtension(rc_app_extension);
- return true;
- }
- return false;
-}
-
-void RemoteControlPlugin::OnAppHMILevelChanged(
- application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType) {
- LOG4CXX_DEBUG(logger_,
- "RSDL application " << app->name().AsMBString()
- << " has changed hmi level to "
- << app->hmi_level());
- service()->NotifyHMIAboutHMILevel(app, app->hmi_level());
-}
-
-void RemoteControlPlugin::OnPluginServiceChanged() {
- LOG4CXX_AUTO_TRACE(logger_);
- const functional_modules::TimeUnit timeout_msec =
- service()->GetSettings().default_timeout();
- request_controller_.SetRequestTimeout(timeout_msec / 1000);
-}
-
-void RemoteControlPlugin::set_service(application_manager::ServicePtr service) {
- RemotePluginInterface::set_service(service);
- OnPluginServiceChanged();
-}
-
-RCEventDispatcher& RemoteControlPlugin::event_dispatcher() {
- return event_dispatcher_;
-}
-
-ResourceAllocationManager& RemoteControlPlugin::resource_allocation_manager() {
- return resource_allocation_manager_;
-}
-
-void RemoteControlPlugin::OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (false == service()->IsRemoteControlApplication(application)) {
- LOG4CXX_DEBUG(logger_,
- "Application " << application->app_id()
- << " has no remote control functionality."
- << " Event will be ignored for RC plugin");
- return;
- }
- resource_allocation_manager_.OnApplicationEvent(event, application);
-}
-
-void RemoteControlPlugin::OnPolicyEvent(functional_modules::PolicyEvent event) {
- LOG4CXX_AUTO_TRACE(logger_);
- resource_allocation_manager_.OnPolicyEvent(event);
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/src/request_controller.cc b/src/components/remote_control/src/request_controller.cc
deleted file mode 100644
index 9ffc639898..0000000000
--- a/src/components/remote_control/src/request_controller.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "remote_control/request_controller.h"
-#include "json/json.h"
-#include "utils/logger.h"
-
-namespace remote_control {
-namespace request_controller {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "RCRequestController")
-
-RequestController::RequestController() {
- timer_.AddObserver(this);
- time_director_.RegisterTimer(timer_);
-}
-
-RequestController::~RequestController() {
- time_director_.UnregisterTimer(timer_);
- timer_.RemoveObserver(this);
-}
-
-void RequestController::AddRequest(const uint32_t mobile_correlation_id,
- MobileRequestPtr request) {
- // TODO(VS) Research and fix be problem with overlap correlation ids from two
- // different apllications(on two different mobile devices)
- sync_primitives::AutoLock lock(mobile_request_lock_);
- LOG4CXX_DEBUG(logger_,
- "Add request with correlation_id: " << mobile_correlation_id);
- mobile_request_list_[mobile_correlation_id] = request;
- // TODO(VS): add app id
- timer_.AddTrackable(TrackableMessage(0, mobile_correlation_id));
- time_director_.ResetTimer(timer_);
-}
-
-void RequestController::DeleteRequest(const uint32_t& mobile_correlation_id) {
- sync_primitives::AutoLock lock(mobile_request_lock_);
- LOG4CXX_DEBUG(
- logger_, "Delete request with correlation_id: " << mobile_correlation_id);
- mobile_request_list_.erase(mobile_correlation_id);
- // TODO(VS): add app id
- timer_.RemoveTrackable(TrackableMessage(0, mobile_correlation_id));
-}
-
-void RequestController::OnTimeoutTriggered(const TrackableMessage& expired) {
- sync_primitives::AutoLock lock(mobile_request_lock_);
- LOG4CXX_DEBUG(logger_,
- "Timeout is expired for request with correlation_id: "
- << expired.correlation_id());
- std::map<correlation_id, MobileRequestPtr>::iterator it =
- mobile_request_list_.find(expired.correlation_id());
- if (mobile_request_list_.end() == it) {
- // no corresponding request found, error.
- return;
- }
- it->second->OnTimeout();
- mobile_request_list_.erase(it);
-}
-
-void RequestController::SetRequestTimeout(
- const functional_modules::TimeUnit timeout_seconds) {
- LOG4CXX_DEBUG(logger_, "RC request timeout is set to " << timeout_seconds);
- timer_.set_period(timeout_seconds);
-}
-
-} // namespace request_controller
-} // namespace remote_control
diff --git a/src/components/remote_control/src/resource_allocation_manager_impl.cc b/src/components/remote_control/src/resource_allocation_manager_impl.cc
deleted file mode 100644
index 233cc79764..0000000000
--- a/src/components/remote_control/src/resource_allocation_manager_impl.cc
+++ /dev/null
@@ -1,377 +0,0 @@
-#include "remote_control/resource_allocation_manager_impl.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "remote_control/rc_module_constants.h"
-#include "json/json.h"
-#include "utils/helpers.h"
-#include "utils/make_shared.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_app_extension.h"
-
-namespace remote_control {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
-
-ResourceAllocationManagerImpl::ResourceAllocationManagerImpl(
- RemotePluginInterface& rc_plugin)
- : current_access_mode_(hmi_apis::Common_RCAccessMode::AUTO_ALLOW)
- , rc_plugin_(rc_plugin) {}
-
-ResourceAllocationManagerImpl::~ResourceAllocationManagerImpl() {}
-
-AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
- const std::string& module_type, const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- const application_manager::ApplicationSharedPtr acquiring_app =
- rc_plugin_.service()->GetApplication(app_id);
- if (!acquiring_app) {
- LOG4CXX_WARN(logger_, "App with app_id: " << app_id << "does not exist!");
- return AcquireResult::IN_USE;
- }
-
- sync_primitives::AutoLock lock(allocated_resources_lock_);
- const AllocatedResources::const_iterator allocated_it =
- allocated_resources_.find(module_type);
- if (allocated_resources_.end() == allocated_it) {
- allocated_resources_[module_type] = app_id;
- LOG4CXX_DEBUG(logger_,
- "Resource is not acquired yet. "
- << "App: " << app_id << " is allowed to acquire "
- << module_type);
- return AcquireResult::ALLOWED;
- }
-
- if (app_id == allocated_resources_[module_type]) {
- LOG4CXX_DEBUG(logger_,
- "App: " << app_id << " is already acquired resource "
- << module_type);
- return AcquireResult::ALLOWED;
- }
-
- if (IsModuleTypeRejected(module_type, app_id)) {
- LOG4CXX_DEBUG(logger_,
- "Driver disallowed app: " << app_id << " to acquire "
- << module_type);
- return AcquireResult::REJECTED;
- }
-
- const mobile_apis::HMILevel::eType acquiring_app_hmi_level =
- acquiring_app->hmi_level();
-
- if (mobile_apis::HMILevel::HMI_FULL != acquiring_app_hmi_level) {
- LOG4CXX_DEBUG(
- logger_,
- "Aquiring resources is not allowed in HMI level: "
- << application_manager::MessageHelper::StringifiedHMILevel(
- acquiring_app_hmi_level) << ". App: " << app_id
- << " is disallowed to acquire " << module_type);
- 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);
- 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);
- 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);
-
- allocated_resources_[module_type] = app_id;
- return AcquireResult::ALLOWED;
- }
- default: { DCHECK_OR_RETURN(false, AcquireResult::IN_USE); }
- }
-}
-
-void ResourceAllocationManagerImpl::ReleaseResource(
- const std::string& module_type, const uint32_t application_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Release " << module_type << " by " << application_id);
- AllocatedResources::const_iterator allocation =
- allocated_resources_.find(module_type);
- if (allocated_resources_.end() == allocation) {
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is not allocated.");
- return;
- }
-
- if (application_id != allocation->second) {
- LOG4CXX_DEBUG(logger_,
- "Resource " << module_type
- << " is allocated by different application "
- << allocation->second);
- return;
- }
-
- allocated_resources_.erase(allocation);
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is released.");
- return;
-}
-
-void ResourceAllocationManagerImpl::ProcessApplicationPolicyUpdate() {
- typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
- Apps app_list =
- rc_plugin_.service()->GetApplications(rc_plugin_.GetModuleID());
- Apps::const_iterator app = app_list.begin();
- for (; app_list.end() != app; ++app) {
- application_manager::ApplicationSharedPtr app_ptr = *app;
- const uint32_t application_id = app_ptr->app_id();
- Resources acquired_modules = GetAcquiredResources(application_id);
- std::sort(acquired_modules.begin(), acquired_modules.end());
-
- Resources allowed_modules;
- rc_plugin_.service()->GetModuleTypes((*app)->policy_app_id(),
- &allowed_modules);
- std::sort(allowed_modules.begin(), allowed_modules.end());
-
- LOG4CXX_DEBUG(logger_,
- "Acquired modules: " << acquired_modules.size()
- << " , allowed modules: "
- << allowed_modules.size());
-
- Resources disallowed_modules;
- std::set_difference(acquired_modules.begin(),
- acquired_modules.end(),
- allowed_modules.begin(),
- allowed_modules.end(),
- std::back_inserter(disallowed_modules));
-
- RCAppExtensionPtr rc_extention = GetApplicationExtention(app_ptr);
- Resources::const_iterator module = disallowed_modules.begin();
- for (; disallowed_modules.end() != module; ++module) {
- ReleaseResource(*module, application_id);
- if (rc_extention) {
- rc_extention->UnsubscribeFromInteriorVehicleData(Json::Value(*module));
- }
- }
- }
-}
-
-RCAppExtensionPtr ResourceAllocationManagerImpl::GetApplicationExtention(
- application_manager::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- RCAppExtensionPtr rc_app_extension;
- if (!application) {
- return rc_app_extension;
- }
-
- application_manager::AppExtensionPtr app_extension =
- application->QueryInterface(rc_plugin_.GetModuleID());
- if (!app_extension) {
- return rc_app_extension;
- }
-
- rc_app_extension =
- application_manager::AppExtensionPtr::static_pointer_cast<RCAppExtension>(
- app_extension);
-
- return rc_app_extension;
-}
-
-void ResourceAllocationManagerImpl::RemoveAppsSubscriptions(const Apps& apps) {
- LOG4CXX_AUTO_TRACE(logger_);
- Apps::const_iterator app = apps.begin();
- for (; apps.end() != app; ++app) {
- application_manager::ApplicationSharedPtr app_ptr = *app;
- if (!app_ptr) {
- continue;
- }
- RCAppExtensionPtr rc_extention = GetApplicationExtention(app_ptr);
- if (rc_extention) {
- rc_extention->UnsubscribeFromInteriorVehicleData();
- }
- }
-}
-
-std::vector<std::string> ResourceAllocationManagerImpl::GetAcquiredResources(
- const uint32_t application_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- Resources allocated_resources;
- AllocatedResources::const_iterator allocation = allocated_resources_.begin();
- for (; allocated_resources_.end() != allocation; ++allocation) {
- if (application_id == allocation->second) {
- allocated_resources.push_back(allocation->first);
- }
- }
-
- LOG4CXX_DEBUG(logger_,
- "Application " << application_id << " acquired "
- << allocated_resources.size()
- << " resource(s).");
-
- return allocated_resources;
-}
-
-void ResourceAllocationManagerImpl::SetResourceState(
- const std::string& module_type,
- 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
- << " to state " << state);
- {
- sync_primitives::AutoLock lock(allocated_resources_lock_);
- const AllocatedResources::const_iterator allocated_it =
- allocated_resources_.find(module_type);
-
- const bool acquired = allocated_resources_.end() != allocated_it;
- if (acquired) {
- LOG4CXX_DEBUG(logger_,
- "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");
- }
- }
-
- sync_primitives::AutoLock lock(resources_state_lock_);
- resources_state_[module_type] = state;
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " got state " << state);
-}
-
-bool ResourceAllocationManagerImpl::IsResourceFree(
- const std::string& module_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
-
- sync_primitives::AutoLock lock(resources_state_lock_);
- const ResourcesState::const_iterator resource =
- resources_state_.find(module_type);
-
- if (resources_state_.end() == resource) {
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is free.");
- return true;
- }
-
- LOG4CXX_DEBUG(logger_,
- "Resource " << module_type << " state is " << resource->second);
-
- return ResourceState::FREE == resource->second;
-}
-
-void ResourceAllocationManagerImpl::SetAccessMode(
- const hmi_apis::Common_RCAccessMode::eType access_mode) {
- if (hmi_apis::Common_RCAccessMode::ASK_DRIVER != access_mode) {
- sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
- rejected_resources_for_application_.clear();
- }
- current_access_mode_ = access_mode;
-}
-
-hmi_apis::Common_RCAccessMode::eType
-ResourceAllocationManagerImpl::GetAccessMode() const {
- return current_access_mode_;
-}
-
-void ResourceAllocationManagerImpl::ForceAcquireResource(
- const std::string& module_type, const uint32_t app_id) {
- LOG4CXX_DEBUG(logger_, "Force " << app_id << " acquiring " << module_type);
- sync_primitives::AutoLock lock(allocated_resources_lock_);
- allocated_resources_[module_type] = app_id;
-}
-
-bool ResourceAllocationManagerImpl::IsModuleTypeRejected(
- const std::string& module_type, const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
- RejectedResources::iterator it =
- rejected_resources_for_application_.find(app_id);
-
- if (rejected_resources_for_application_.end() == it) {
- return false;
- }
-
- const std::vector<std::string>& list_of_rejected_resources =
- rejected_resources_for_application_[app_id];
-
- return helpers::in_range(list_of_rejected_resources, module_type);
-}
-
-void ResourceAllocationManagerImpl::OnDriverDisallowed(
- const std::string& module_type, const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
- RejectedResources::iterator it =
- rejected_resources_for_application_.find(app_id);
-
- if (rejected_resources_for_application_.end() == it) {
- rejected_resources_for_application_[app_id] = std::vector<std::string>();
- }
- std::vector<std::string>& list_of_rejected_resources =
- rejected_resources_for_application_[app_id];
- list_of_rejected_resources.push_back(module_type);
-}
-
-void ResourceAllocationManagerImpl::OnApplicationEvent(
- functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Event " << event << " came for " << application->app_id());
-
- if (functional_modules::ApplicationEvent::kApplicationExit == event ||
- functional_modules::ApplicationEvent::kApplicationUnregistered == event) {
- Resources acquired_modules = GetAcquiredResources(application->app_id());
- Resources::const_iterator module = acquired_modules.begin();
- for (; acquired_modules.end() != module; ++module) {
- ReleaseResource(*module, application->app_id());
- }
-
- Apps app_list;
- app_list.push_back(application);
- RemoveAppsSubscriptions(app_list);
- }
-}
-
-void ResourceAllocationManagerImpl::OnPolicyEvent(
- functional_modules::PolicyEvent event) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Event " << event);
-
- if (functional_modules::PolicyEvent::kApplicationPolicyUpdated == event) {
- ProcessApplicationPolicyUpdate();
- return;
- }
-
- if (functional_modules::PolicyEvent::kApplicationsDisabled == event) {
- ResetAllAllocations();
- application_manager::ServicePtr s = rc_plugin_.service();
- Apps app_list = s->GetApplications(rc_plugin_.GetModuleID());
- RemoveAppsSubscriptions(app_list);
- return;
- }
-}
-
-void ResourceAllocationManagerImpl::ResetAllAllocations() {
- LOG4CXX_AUTO_TRACE(logger_);
- {
- sync_primitives::AutoLock lock(resources_state_lock_);
- resources_state_.clear();
- }
- {
- sync_primitives::AutoLock lock(allocated_resources_lock_);
- allocated_resources_.clear();
- }
- {
- sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
- rejected_resources_for_application_.clear();
- }
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/test/CMakeLists.txt b/src/components/remote_control/test/CMakeLists.txt
deleted file mode 100644
index 6457b56397..0000000000
--- a/src/components/remote_control/test/CMakeLists.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-include_directories (
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${GMOCK_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/components/functional_module/include/
- ${CMAKE_SOURCE_DIR}/src/components/functional_module/test/
- ${CMAKE_SOURCE_DIR}/src/components/remote_control/include/
- ${CMAKE_SOURCE_DIR}/src/components/remote_control/test/include/
- ${CMAKE_SOURCE_DIR}/src/components/include/
- ${CMAKE_SOURCE_DIR}/src/components/application_manager/test/include/
- ${CMAKE_SOURCE_DIR}/src/components/connection_handler/include/
- ${CMAKE_SOURCE_DIR}/src/components/smart_objects/include/
- ${CMAKE_SOURCE_DIR}/src/components/policy/src/policy/usage_statistics/include/
- ${JSONCPP_INCLUDE_DIRECTORY}
- ${CMAKE_BINARY_DIR}/src/components/
- include/
-)
-
-set (SOURCES
- src/rc_module_test.cc
- src/rc_app_extension_test.cc
- src/resource_allocation_manager_impl_test.cc
- ${CMAKE_SOURCE_DIR}/src/components/application_manager/test/mock_message_helper.cc
-)
-
-set (LIBRARIES
- gtest
- gmock
- gmock_main
- RemoteControlModule
- SmartObjects
- gcov
- Policy
-)
-
-if (ENABLE_TEST_COV_COUNT)
- set(GCOV_FLAGS "-ftest-coverage -fprofile-arcs")
-else()
- set(GCOV_FLAGS "")
-endif()
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCOV_FLAGS}")
-
-# use, i.e. don't skip the full RPATH for the build tree
-#SET(CMAKE_SKIP_BUILD_RPATH FALSE)
-
-# when building, don't use the install RPATH already
-# (but later on when installing)
-#SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-
-#SET(RPATH_DIRECTORIES
-# ${CMAKE_BINARY_DIR}/src/components/remote_control/
-# /usr/local/lib
-# /usr/local
-# ${CMAKE_BINARY_DIR}/src/components/utils
-#)
-
-#SET(CMAKE_INSTALL_RPATH "${RPATH_DIRECTORIES}")
-
-add_custom_command(
-OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libPolicy.so
- COMMAND ${CMAKE_COMMAND} -E
- copy ${COMPONENTS_DIR}/policy/libPolicy.so ${CMAKE_CURRENT_BINARY_DIR})
- set(CMAKE_EXE_LINKER_FLAGS
- "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath=${CMAKE_CURRENT_BINARY_DIR}")
-
-create_test("remote_control_test" "${SOURCES}" "${LIBRARIES}")
-add_subdirectory(commands)
diff --git a/src/components/remote_control/test/commands/CMakeLists.txt b/src/components/remote_control/test/commands/CMakeLists.txt
deleted file mode 100644
index 09c706fc2f..0000000000
--- a/src/components/remote_control/test/commands/CMakeLists.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright (c) 2017, 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(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
-
-include_directories(
- ${GMOCK_INCLUDE_DIRECTORY}
- ${COMPONENTS_DIR}/remote_control/include/
- ${COMPONENTS_DIR}/remote_control/include/remote_control/
- ${COMPONENTS_DIR}/remote_control/include/remote_control/commands/
- ${COMPONENTS_DIR}/remote_control/test/include
-)
-
-set(RC_COMMANDS_TEST_DIR ${RC_TEST_DIR}/commands)
-
-file(GLOB SOURCES
- ${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
- ${RC_COMMANDS_TEST_DIR}/*
-)
-
-set(LIBRARIES
- gmock
- RemoteControlModule
- Utils
- SmartObjects
- jsoncpp
- HMI_API
- MOBILE_API
- ApplicationManager
- AMHMICommandsLibrary
- AMMobileCommandsLibrary
- connectionHandler
-)
-
-create_test("rc_commands_test" "${SOURCES}" "${LIBRARIES}" )
diff --git a/src/components/remote_control/test/commands/button_press_request_test.cc b/src/components/remote_control/test/commands/button_press_request_test.cc
deleted file mode 100644
index 06a48fc077..0000000000
--- a/src/components/remote_control/test/commands/button_press_request_test.cc
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "remote_control/commands/button_press_request.h"
-#include "gtest/gtest.h"
-#include "mock_remote_control_plugin.h"
-#include "mock_application.h"
-#include "mock_resource_allocation_manager.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/remote_control_event.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_command_factory.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "remote_control/rc_module_constants.h"
-#include "functional_module/function_ids.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using test::components::remote_control_test::MockApplication;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SaveArg;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::protocol_handler::MessagePriority;
-using remote_control::RemotePluginInterface;
-using remote_control::MessageHelper;
-
-namespace {
-const int kModuleId = 153;
-
-const std::string kCorrectMobileRequest =
- "{\"moduleType\":\"CLIMATE\",\"buttonName\":\"AC\",\"buttonPressMode\":"
- "\"SHORT\"}";
-const std::string kWrongMobileRequest =
- "{\"moduleType\":\"RADIO\",\"buttonName\":\"AC\",\"buttonPressMode\":"
- "\"SHORT\"}";
-const std::string kValidHmiResponse =
- "{\"result\":{\"code\":0,\"method\":\"Buttons.ButtonPress\"},\"id\":31,"
- "\"jsonrpc\":\"2.0\"} ";
-const std::string KReadOnlyHmiResponse =
- "{\"jsonrpc\":\"2.0\",\"error\":{\"code\":26,\"data\":{\"method\":"
- "\"Buttons.ButtonPress\"},\"message\":\"Read only parameters "
- "received\"},\"id\":31}";
-const uint32_t kAppId = 11u;
-}
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-namespace button_press_request_test {
-
-class ButtonPressRequestTest : public ::testing::Test {
- public:
- ButtonPressRequestTest()
- : rc_capabilities_(smart_objects::SmartType_Map)
- , mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
- , rc_app_extention_(
- utils::MakeShared<remote_control::RCAppExtension>(kModuleId)) {
- ON_CALL(mock_module_, service()).WillByDefault(Return(mock_service_));
- ON_CALL(mock_module_, resource_allocation_manager())
- .WillByDefault(ReturnRef(mock_allocation_manager_));
- ON_CALL(*mock_service_, GetApplication(kAppId))
- .WillByDefault(Return(mock_app_));
- EXPECT_CALL(mock_module_, event_dispatcher())
- .WillRepeatedly(ReturnRef(event_dispatcher_));
- ServicePtr exp_service(mock_service_);
- mock_module_.set_service(exp_service);
- }
-
- smart_objects::SmartObject ButtonCapability(
- const mobile_apis::ButtonName::eType button_name) {
- smart_objects::SmartObject button(smart_objects::SmartType_Map);
- button["name"] = button_name;
- return button;
- }
-
- void SetUp() OVERRIDE {
- using namespace remote_control;
- using namespace mobile_apis;
-
- std::vector<ButtonName::eType> button_names;
- button_names.push_back(ButtonName::AC_MAX);
- button_names.push_back(ButtonName::AC);
- button_names.push_back(ButtonName::RECIRCULATE);
- button_names.push_back(ButtonName::FAN_UP);
- button_names.push_back(ButtonName::FAN_DOWN);
- button_names.push_back(ButtonName::TEMP_UP);
- button_names.push_back(ButtonName::TEMP_DOWN);
- button_names.push_back(ButtonName::DEFROST_MAX);
- button_names.push_back(ButtonName::DEFROST);
- button_names.push_back(ButtonName::DEFROST_REAR);
- button_names.push_back(ButtonName::UPPER_VENT);
- button_names.push_back(ButtonName::LOWER_VENT);
- button_names.push_back(ButtonName::VOLUME_UP);
- button_names.push_back(ButtonName::VOLUME_DOWN);
- button_names.push_back(ButtonName::EJECT);
- button_names.push_back(ButtonName::SOURCE);
- button_names.push_back(ButtonName::SHUFFLE);
- button_names.push_back(ButtonName::REPEAT);
-
- smart_objects::SmartObject button_caps(smart_objects::SmartType_Array);
- for (size_t i = 0; i < button_names.size(); i++) {
- button_caps[i] = ButtonCapability(button_names[i]);
- }
- rc_capabilities_[strings::kbuttonCapabilities] = button_caps;
- ON_CALL(*mock_service_, GetRCCapabilities())
- .WillByDefault(Return(&rc_capabilities_));
- ON_CALL(*mock_service_, IsInterfaceAvailable(_))
- .WillByDefault(Return(true));
- ON_CALL(*mock_service_, IsRemoteControlApplication(_))
- .WillByDefault(Return(true));
- }
-
- remote_control::request_controller::MobileRequestPtr CreateCommand(
- application_manager::MessagePtr msg) {
- return remote_control::RCCommandFactory::CreateCommand(msg, mock_module_);
- }
-
- application_manager::MessagePtr CreateBasicMessage() {
- application_manager::MessagePtr message = utils::MakeShared<Message>(
- MessagePriority::FromServiceType(protocol_handler::ServiceType::kRpc));
- message->set_function_id(RCFunctionID::BUTTON_PRESS);
- message->set_function_name(
- MessageHelper::GetMobileAPIName(functional_modules::BUTTON_PRESS));
- message->set_connection_key(kAppId);
- return message;
- }
-
- protected:
- smart_objects::SmartObject rc_capabilities_;
- utils::SharedPtr<NiceMock<application_manager::MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_;
- utils::SharedPtr<remote_control::RCAppExtension> rc_app_extention_;
- testing::NiceMock<remote_control_test::MockRemotePluginInterface>
- mock_module_;
- testing::NiceMock<remote_control_test::MockResourceAllocationManager>
- mock_allocation_manager_;
- RemotePluginInterface::RCPluginEventDispatcher event_dispatcher_;
-};
-
-TEST_F(ButtonPressRequestTest,
- Execute_ButtonNameMatchesModuleType_ExpectCorrectMessageSentToHMI) {
- namespace json_keys = remote_control::json_keys;
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kCorrectMobileRequest);
- // Expectations
- ON_CALL(*mock_app_, app_id())
- .WillByDefault(Return(mobile_message->connection_key()));
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(mobile_message))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
- application_manager::AppExtensionPtr app_extension;
- EXPECT_CALL(*mock_app_, AddExtension(_))
- .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true)));
- EXPECT_CALL(*mock_service_, CheckModule(_, _)).WillOnce(Return(true));
- EXPECT_CALL(*mock_service_, GetNextCorrelationID()).WillOnce(Return(1));
-
- const std::string resource = "CLIMATE";
-
- EXPECT_CALL(mock_allocation_manager_, IsResourceFree(resource))
- .WillOnce(Return(true));
- EXPECT_CALL(mock_allocation_manager_, AcquireResource(resource, kAppId))
- .WillOnce(Return(remote_control::AcquireResult::ALLOWED));
- EXPECT_CALL(
- mock_allocation_manager_,
- SetResourceState(resource, kAppId, remote_control::ResourceState::BUSY));
-
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
- // Assertions
- EXPECT_EQ(kModuleId, app_extension->uid());
- EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI,
- result_msg->protocol_version());
- EXPECT_EQ(1, result_msg->correlation_id());
- EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type());
- const Json::Value& hmi_request_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_EQ(functional_modules::hmi_api::button_press,
- hmi_request_params[json_keys::kMethod].asString());
-}
-
-TEST_F(
- ButtonPressRequestTest,
- Execute_ButtonNameDoesNotMatchModuleType_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
- namespace json_keys = remote_control::json_keys;
- namespace result_codes = remote_control::result_codes;
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kWrongMobileRequest);
- // Expectations
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(mobile_message))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
- application_manager::AppExtensionPtr app_extension;
- EXPECT_CALL(*mock_app_, AddExtension(_))
- .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true)));
- EXPECT_CALL(*mock_service_, CheckModule(_, _)).WillOnce(Return(true));
- EXPECT_CALL(mock_allocation_manager_, IsResourceFree(_))
- .WillOnce(Return(true));
- EXPECT_CALL(mock_allocation_manager_, AcquireResource(_, _))
- .WillOnce(Return(::remote_control::AcquireResult::ALLOWED));
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_)).Times(0);
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
- // Assertions
- const Json::Value& response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[result_codes::kSuccess].asBool());
- EXPECT_EQ(result_codes::kInvalidData,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(ButtonPressRequestTest, OnEvent_ExpectSuccessfullResponseSentToMobile) {
- namespace json_keys = remote_control::json_keys;
- namespace result_codes = remote_control::result_codes;
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kCorrectMobileRequest);
-
- application_manager::MessagePtr hmi_message = CreateBasicMessage();
- hmi_message->set_json_message(kValidHmiResponse);
- hmi_message->set_message_type(application_manager::MessageType::kResponse);
- // Expectations
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::RCPluginEvent event(
- hmi_message, functional_modules::hmi_api::button_press);
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->on_event(event);
- // Assertions
- const Json::Value& response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_TRUE(response_params[json_keys::kSuccess].asBool());
- EXPECT_EQ(result_codes::kSuccess,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(ButtonPressRequestTest,
- OnEvent_ReadOnlyParamFromHMI_ExpectFalseSentToMobile) {
- namespace json_keys = remote_control::json_keys;
- namespace result_codes = remote_control::result_codes;
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kCorrectMobileRequest);
-
- application_manager::MessagePtr hmi_message = CreateBasicMessage();
- hmi_message->set_json_message(KReadOnlyHmiResponse);
- hmi_message->set_message_type(application_manager::MessageType::kResponse);
- // Expectations
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::RCPluginEvent event(
- hmi_message, functional_modules::hmi_api::button_press);
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->on_event(event);
- // Assertions
- const Json::Value& response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[json_keys::kSuccess].asBool());
- EXPECT_EQ(result_codes::kGenericError,
- response_params[json_keys::kResultCode].asString());
-}
-
-} // namespace button_press_request_test
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
diff --git a/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc
deleted file mode 100644
index 4ad833aa60..0000000000
--- a/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "remote_control/commands/get_interior_vehicle_data_request.h"
-#include "gtest/gtest.h"
-#include "mock_remote_control_plugin.h"
-#include "mock_application.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/remote_control_event.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_command_factory.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "functional_module/function_ids.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using test::components::remote_control_test::MockApplication;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::StrictMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SaveArg;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::application_manager::ApplicationSharedPtr;
-using ::protocol_handler::MessagePriority;
-using remote_control::RemotePluginInterface;
-using remote_control::MessageHelper;
-using namespace remote_control;
-
-namespace {
-const int32_t kConnectionKey = 5;
-const int kModuleId = 153;
-const std::string kInvalidMobileRequest = "{{\"moduleTip\":\"LUXOFT\"}}";
-const std::string kValidMobileRequest =
- "{\"subscribe\":true,\"moduleDescription\":{\"moduleType\":\"CLIMATE\"}}";
-const std::string kValidHmiResponse =
- "{\"jsonrpc\":\"2.0\",\"id\":51,\"result\":{\"code\":0,\"method\":\"RC."
- "GetInteriorVehicleData\",\"moduleData\":{\"moduleType\":\"CLIMATE\","
- "\"climateControlData\":{\"fanSpeed\":0,\"currentTemperature\":{\"unit\":"
- "\"CELSIUS\",\"value\":20},\"desiredTemperature\":{\"unit\":\"CELSIUS\","
- "\"value\":25},\"acEnable\":true,\"circulateAirEnable\":true,"
- "\"autoModeEnable\":true,\"defrostZone\":\"ALL\",\"dualModeEnable\":true,"
- "\"acMaxEnable\":true,\"ventilationMode\":\"BOTH\"}},\"isSubscribed\":"
- "true}}";
-const std::string kInvalidHmiResponse =
- "{\"jsonrpc\":\"2.0\",\"id\":51,\"result\":{\"code\":21,\"method\":\"RC."
- "GetInteriorVehicleData\",\"moduleData\":{\"moduleType\":\"CLIMATE\","
- "\"ControlData\":{\"Speed\":0,\"outsideTemperature\":{\"unit\":"
- "\"CELSIUS\",\"value\":\"high\"},\"desiredTemperature\":{\"unit\":"
- "\"CELSIUS\","
- "\"value\":25},\"acEnable\":true,\"circulateAirEnable\":true,"
- "\"autoModeEnable\":true,\"defrostZone\":\"ALL\",\"dualModeEnable\":true,"
- "\"acMaxEnable\":true,\"ventilationMode\":\"BOTH\"}},\"isSubscribed\":"
- "false}}";
-}
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-namespace get_interior_vehicle_data_request_test {
-
-class GetInteriorVehicleDataRequestTest : public ::testing::Test {
- public:
- typedef utils::SharedPtr<remote_control::commands::BaseCommandRequest>
- GIVDRequestPtr;
- typedef rc_event_engine::Event<application_manager::MessagePtr, std::string>
- GIVD_HMI_Response;
- GetInteriorVehicleDataRequestTest()
- : mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
- , rc_app_extention_(
- utils::MakeShared<remote_control::RCAppExtension>(kModuleId)) {
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(app_id_));
- ON_CALL(mock_module_, service()).WillByDefault(Return(mock_service_));
- ON_CALL(*mock_service_, GetApplication(app_id_))
- .WillByDefault(Return(mock_app_));
- ON_CALL(*mock_service_, IsInterfaceAvailable(_))
- .WillByDefault(Return(true));
- ON_CALL(*mock_service_, IsRemoteControlApplication(_))
- .WillByDefault(Return(true));
- EXPECT_CALL(mock_module_, event_dispatcher())
- .WillRepeatedly(ReturnRef(event_dispatcher_));
- ServicePtr exp_service(mock_service_);
- mock_module_.set_service(exp_service);
- }
-
- remote_control::request_controller::MobileRequestPtr CreateCommand(
- application_manager::MessagePtr msg) {
- return remote_control::RCCommandFactory::CreateCommand(msg, mock_module_);
- }
-
- application_manager::MessagePtr CreateBasicMessage() {
- application_manager::MessagePtr message = utils::MakeShared<Message>(
- MessagePriority::FromServiceType(protocol_handler::ServiceType::kRpc));
- message->set_connection_key(kConnectionKey);
- message->set_function_id(RCFunctionID::GET_INTERIOR_VEHICLE_DATA);
- message->set_function_name("GetInteriorVehicleData");
- return message;
- }
-
- protected:
- utils::SharedPtr<NiceMock<application_manager::MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_;
- utils::SharedPtr<remote_control::RCAppExtension> rc_app_extention_;
- remote_control_test::MockRemotePluginInterface mock_module_;
- RemotePluginInterface::RCPluginEventDispatcher event_dispatcher_;
- const uint32_t app_id_ = 11u;
-};
-
-TEST_F(GetInteriorVehicleDataRequestTest,
- Execute_MessageValidationOk_ExpectCorrectMessageSentToHMI) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kValidMobileRequest);
- // Expectations
- EXPECT_CALL(mock_module_, service()).Times(2).WillOnce(Return(mock_service_));
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(mobile_message))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
- application_manager::AppExtensionPtr app_extension;
- EXPECT_CALL(*mock_app_, AddExtension(_))
- .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true)));
- EXPECT_CALL(*mock_service_, CheckModule(_, _)).WillOnce(Return(true));
- EXPECT_CALL(*mock_service_, GetNextCorrelationID()).WillOnce(Return(1));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
- // Assertions
- EXPECT_EQ(kModuleId, app_extension->uid());
- EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI,
- result_msg->protocol_version());
- EXPECT_EQ(1, result_msg->correlation_id());
- EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type());
- const Json::Value hmi_request_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_EQ(functional_modules::hmi_api::get_interior_vehicle_data,
- hmi_request_params[json_keys::kMethod].asString());
-}
-
-TEST_F(
- GetInteriorVehicleDataRequestTest,
- Execute_MessageValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kInvalidMobileRequest);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(
- Return(application_manager::MessageValidationResult::INVALID_JSON));
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_)).Times(0);
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
- // Assertions
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[result_codes::kSuccess].asBool());
- EXPECT_EQ(result_codes::kInvalidData,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(GetInteriorVehicleDataRequestTest,
- OnEvent_ValidHmiResponse_ExpectSuccessfullResponseSentToMobile) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kValidMobileRequest);
-
- application_manager::MessagePtr hmi_message = CreateBasicMessage();
- hmi_message->set_json_message(kValidHmiResponse);
- hmi_message->set_message_type(application_manager::MessageType::kResponse);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*hmi_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(rc_app_extention_));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::RCPluginEvent event(
- hmi_message, functional_modules::hmi_api::get_interior_vehicle_data);
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->on_event(event);
- // Assertions
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_TRUE(response_params[json_keys::kSuccess].asBool());
- EXPECT_EQ(result_codes::kSuccess,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(GetInteriorVehicleDataRequestTest,
- OnEvent_InvalidHmiResponse_ExpectGenericErrorResponseSentToMobile) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kValidMobileRequest);
- application_manager::MessagePtr hmi_message = CreateBasicMessage();
- hmi_message->set_json_message(kInvalidHmiResponse);
- hmi_message->set_message_type(application_manager::MessageType::kResponse);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(*mock_service_, GetApplication(mobile_message->connection_key()))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*hmi_message))
- .WillOnce(
- Return(application_manager::MessageValidationResult::INVALID_JSON));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- remote_control::RCPluginEvent event(
- hmi_message, functional_modules::hmi_api::get_interior_vehicle_data);
- command->on_event(event);
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[json_keys::kSuccess].asBool());
- EXPECT_EQ(result_codes::kGenericError,
- response_params[json_keys::kResultCode].asString());
- const Json::Value hmi_response =
- MessageHelper::StringToValue(hmi_message->json_message());
- EXPECT_EQ(hmi_response[json_keys::kInfo].asString(),
- response_params[json_keys::kInfo].asString());
-}
-
-} // namespace get_interior_vehicle_data_request_test
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
diff --git a/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc b/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc
deleted file mode 100644
index 7329890e94..0000000000
--- a/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "remote_control/commands/on_interior_vehicle_data_notification.h"
-#include "gtest/gtest.h"
-#include "mock_remote_control_plugin.h"
-#include "mock_application.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/remote_control_event.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_command_factory.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "functional_module/function_ids.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using test::components::remote_control_test::MockApplication;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::Return;
-using ::testing::SaveArg;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::application_manager::ApplicationSharedPtr;
-using ::protocol_handler::MessagePriority;
-using remote_control::RemotePluginInterface;
-using remote_control::MessageHelper;
-using namespace remote_control;
-
-namespace {
-const int kModuleId = 153;
-const std::string kJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnInteriorVehicleData\",\
- \"params\":{\"moduleData\":{\
- \"moduleType\": \"CLIMATE\",\"climateControlData\": {\"fanSpeed\": 100}}}}";
-const uint32_t kAppId_ = 11u;
-}
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-namespace on_interior_vehicle_data_notification_test {
-
-class OnInteriorVehicleDataNotificationTest : public ::testing::Test {
- public:
- OnInteriorVehicleDataNotificationTest()
- : mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
- , rc_app_extention_(
- utils::MakeShared<remote_control::RCAppExtension>(kModuleId)) {
- ON_CALL(mock_module_, service()).WillByDefault(Return(mock_service_));
- ServicePtr exp_service(mock_service_);
- mock_module_.set_service(exp_service);
- }
-
- remote_control::request_controller::MobileRequestPtr CreateCommand(
- application_manager::MessagePtr msg) {
- return remote_control::RCCommandFactory::CreateCommand(msg, mock_module_);
- }
-
- application_manager::MessagePtr CreateBasicMessage() {
- application_manager::MessagePtr message = utils::MakeShared<Message>(
- MessagePriority::FromServiceType(protocol_handler::ServiceType::kRpc));
- message->set_function_id(RCFunctionID::ON_INTERIOR_VEHICLE_DATA);
- message->set_function_name("OnInteriorVehicleData");
- message->set_json_message(kJson);
- return message;
- }
-
- protected:
- utils::SharedPtr<NiceMock<application_manager::MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_;
- utils::SharedPtr<remote_control::RCAppExtension> rc_app_extention_;
- remote_control_test::MockRemotePluginInterface mock_module_;
- std::vector<ApplicationSharedPtr> apps_;
-};
-
-TEST_F(OnInteriorVehicleDataNotificationTest,
- Execute_SendMessageToMobile_IfAppIsSubscribed) {
- // Arrange
- application_manager::MessagePtr message = CreateBasicMessage();
- Json::Value json_value = MessageHelper::StringToValue(kJson);
- Json::Value module_type =
- json_value[json_keys::kParams][message_params::kModuleData]
- [message_params::kModuleType];
- rc_app_extention_->SubscribeToInteriorVehicleData(module_type);
- apps_.push_back(mock_app_);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(*mock_service_, GetApplications(kModuleId))
- .WillOnce(Return(apps_));
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(rc_app_extention_));
-
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId_));
- EXPECT_CALL(*mock_app_, protocol_version())
- .WillRepeatedly(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3));
- EXPECT_CALL(*mock_service_, GetApplication(kAppId_))
- .WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(_))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckModule(kAppId_, enums_value::kClimate))
- .WillOnce(Return(true));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(*mock_service_, SendMessageToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
- // Assertions
- EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3,
- result_msg->protocol_version());
- EXPECT_EQ(application_manager::MessageType::kNotification,
- result_msg->type());
- EXPECT_EQ(functional_modules::ON_INTERIOR_VEHICLE_DATA,
- result_msg->function_id());
- EXPECT_EQ(MessageHelper::GetMobileAPIName(
- functional_modules::ON_INTERIOR_VEHICLE_DATA),
- result_msg->function_name());
-}
-
-TEST_F(OnInteriorVehicleDataNotificationTest,
- Execute_NotSendMessageToMobile_IfAppUnsubscribed) {
- // Arrange
- application_manager::MessagePtr message = CreateBasicMessage();
- apps_.push_back(mock_app_);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(*mock_service_, GetApplications(kModuleId))
- .WillOnce(Return(apps_));
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(rc_app_extention_));
- EXPECT_CALL(*mock_service_, SendMessageToMobile(_)).Times(0);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
-}
-
-} // namespace on_interior_vehicle_data_notification_test
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
diff --git a/src/components/remote_control/test/commands/on_remote_control_settings_test.cc b/src/components/remote_control/test/commands/on_remote_control_settings_test.cc
deleted file mode 100644
index 5c13ea63d5..0000000000
--- a/src/components/remote_control/test/commands/on_remote_control_settings_test.cc
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "remote_control/commands/on_remote_control_settings_notification.h"
-#include "gtest/gtest.h"
-#include "mock_remote_control_plugin.h"
-#include "mock_application.h"
-#include "mock_resource_allocation_manager.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/remote_control_event.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_command_factory.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "functional_module/function_ids.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using test::components::remote_control_test::MockApplication;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SaveArg;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::application_manager::ApplicationSharedPtr;
-using ::protocol_handler::MessagePriority;
-using remote_control::RemotePluginInterface;
-using remote_control::MessageHelper;
-using namespace remote_control;
-
-namespace {
-const int kModuleId = 153;
-const std::string kAllowedTrueAUTO_ALLOWJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\",\
- \"params\":{\"accessMode\": \"AUTO_ALLOW\", \"allowed\":true}}";
-const std::string kAllowedTrueASK_DRIVERJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\",\
- \"params\":{\"accessMode\": \"ASK_DRIVER\", \"allowed\":true}}";
-const std::string kAllowedTrueAUTO_DENYJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\",\
- \"params\":{\"accessMode\": \"AUTO_DENY\", \"allowed\":true}}";
-const std::string kAllowedFalseAUTO_ALLOWJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\",\
- \"params\":{\"accessMode\": \"AUTO_ALLOW\", \"allowed\":false}}";
-const std::string kAllowedFalseASK_DRIVERJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\",\
- \"params\":{\"accessMode\": \"ASK_DRIVER\", \"allowed\":false}}";
-const std::string kAllowedFalseAUTO_DENYJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\",\
- \"params\":{\"accessMode\": \"AUTO_DENY\", \"allowed\":false}}";
-const std::string kWithoutParamsJson =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnRemoteControlSettings\"}";
-}
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-namespace on_remote_control_settings_notification_test {
-
-class OnRemoteControlSettingsNotificationTest : public ::testing::Test {
- public:
- OnRemoteControlSettingsNotificationTest()
- : mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
- , rc_app_extention_(
- utils::MakeShared<remote_control::RCAppExtension>(kModuleId)) {
- ON_CALL(mock_module_, resource_allocation_manager())
- .WillByDefault(ReturnRef(mock_allocation_manager_));
- ON_CALL(*mock_service_, IsInterfaceAvailable(_))
- .WillByDefault(Return(true));
- ON_CALL(*mock_service_, IsRemoteControlApplication(_))
- .WillByDefault(Return(true));
- apps_.push_back(mock_app_);
- }
-
- remote_control::request_controller::MobileRequestPtr CreateCommand(
- application_manager::MessagePtr msg) {
- return remote_control::RCCommandFactory::CreateCommand(msg, mock_module_);
- }
-
- application_manager::MessagePtr CreateBasicMessage(
- const std::string& json_message) {
- application_manager::MessagePtr message = utils::MakeShared<Message>(
- MessagePriority::FromServiceType(protocol_handler::ServiceType::kRpc));
- message->set_function_id(RCFunctionID::ON_REMOTE_CONTROL_SETTINGS);
- message->set_function_name(
- MessageHelper::GetMobileAPIName(functional_modules::BUTTON_PRESS));
- message->set_json_message(json_message);
- return message;
- }
-
- protected:
- utils::SharedPtr<NiceMock<application_manager::MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_;
- utils::SharedPtr<remote_control::RCAppExtension> rc_app_extention_;
- remote_control_test::MockRemotePluginInterface mock_module_;
- std::vector<ApplicationSharedPtr> apps_;
- testing::NiceMock<remote_control_test::MockResourceAllocationManager>
- mock_allocation_manager_;
-};
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_SetAccessModeAUTO_ALLOW_IfAllowedTrue) {
- // Arrange
- const Json::Value value =
- MessageHelper::StringToValue(kAllowedTrueAUTO_ALLOWJson);
- const std::string access_mode =
- value[json_keys::kParams][message_params::kAccessMode].asString();
- const hmi_apis::Common_RCAccessMode::eType access_mode_ =
- MessageHelper::AccessModeFromString(access_mode);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(access_mode_));
-
- application_manager::MessagePtr message =
- CreateBasicMessage(kAllowedTrueAUTO_ALLOWJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
-}
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_SetAccessModeAUTO_DENY_IfAllowedTrue) {
- // Arrange
- const Json::Value value =
- MessageHelper::StringToValue(kAllowedTrueAUTO_DENYJson);
- const std::string access_mode =
- value[json_keys::kParams][message_params::kAccessMode].asString();
- const hmi_apis::Common_RCAccessMode::eType access_mode_ =
- MessageHelper::AccessModeFromString(access_mode);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(access_mode_));
-
- application_manager::MessagePtr message =
- CreateBasicMessage(kAllowedTrueAUTO_DENYJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
-}
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_SetAccessModeASK_DRIVER_IfAllowedTrue) {
- // Arrange
- const Json::Value value =
- MessageHelper::StringToValue(kAllowedTrueASK_DRIVERJson);
- const std::string access_mode =
- value[json_keys::kParams][message_params::kAccessMode].asString();
- const hmi_apis::Common_RCAccessMode::eType access_mode_ =
- MessageHelper::AccessModeFromString(access_mode);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(access_mode_));
- application_manager::MessagePtr message =
- CreateBasicMessage(kAllowedTrueASK_DRIVERJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
-}
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_DisallowRCFunctionality_IfAllowedFalseAccessModeAUTO_ALLOW) {
- // Arrange
- const Json::Value module_type(enums_value::kClimate);
- rc_app_extention_->SubscribeToInteriorVehicleData(module_type);
- const Json::Value value =
- MessageHelper::StringToValue(kAllowedFalseAUTO_ALLOWJson);
- const std::string access_mode =
- value[json_keys::kParams][message_params::kAccessMode].asString();
- const hmi_apis::Common_RCAccessMode::eType access_mode_ =
- MessageHelper::AccessModeFromString(access_mode);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(access_mode_)).Times(0);
- EXPECT_CALL(*mock_service_, GetApplications(kModuleId))
- .WillOnce(Return(apps_));
- EXPECT_CALL(
- *mock_service_,
- ChangeNotifyHMILevel(apps_[0], mobile_apis::HMILevel::eType::HMI_NONE));
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(rc_app_extention_));
- EXPECT_EQ(rc_app_extention_->IsSubscibedToInteriorVehicleData(module_type),
- true);
- application_manager::MessagePtr message =
- CreateBasicMessage(kAllowedFalseAUTO_ALLOWJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
- // Assertions
- EXPECT_EQ(rc_app_extention_->IsSubscibedToInteriorVehicleData(module_type),
- false);
-}
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_DisallowRCFunctionality_IfAllowedFalseAccessModeASK_DRIVER) {
- // Arrange
- const Json::Value module_type(enums_value::kRadio);
- rc_app_extention_->SubscribeToInteriorVehicleData(module_type);
- const Json::Value value =
- MessageHelper::StringToValue(kAllowedFalseASK_DRIVERJson);
- const std::string access_mode =
- value[json_keys::kParams][message_params::kAccessMode].asString();
- const hmi_apis::Common_RCAccessMode::eType access_mode_ =
- MessageHelper::AccessModeFromString(access_mode);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(access_mode_)).Times(0);
- EXPECT_CALL(*mock_service_, GetApplications(kModuleId))
- .WillOnce(Return(apps_));
- EXPECT_CALL(
- *mock_service_,
- ChangeNotifyHMILevel(apps_[0], mobile_apis::HMILevel::eType::HMI_NONE));
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(rc_app_extention_));
- EXPECT_EQ(rc_app_extention_->IsSubscibedToInteriorVehicleData(module_type),
- true);
- application_manager::MessagePtr message =
- CreateBasicMessage(kAllowedFalseASK_DRIVERJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
- // Assertions
- EXPECT_EQ(rc_app_extention_->IsSubscibedToInteriorVehicleData(module_type),
- false);
-}
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_DisallowRCFunctionality_IfAllowedFalseAccessModeAUTO_DENY) {
- // Arrange
- const Json::Value module_type(enums_value::kClimate);
- rc_app_extention_->SubscribeToInteriorVehicleData(module_type);
- const Json::Value value =
- MessageHelper::StringToValue(kAllowedFalseAUTO_DENYJson);
- const std::string access_mode =
- value[json_keys::kParams][message_params::kAccessMode].asString();
- const hmi_apis::Common_RCAccessMode::eType access_mode_ =
- MessageHelper::AccessModeFromString(access_mode);
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(access_mode_)).Times(0);
- EXPECT_CALL(*mock_service_, GetApplications(kModuleId))
- .WillOnce(Return(apps_));
- EXPECT_CALL(
- *mock_service_,
- ChangeNotifyHMILevel(apps_[0], mobile_apis::HMILevel::eType::HMI_NONE));
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(rc_app_extention_));
- EXPECT_EQ(rc_app_extention_->IsSubscibedToInteriorVehicleData(module_type),
- true);
- application_manager::MessagePtr message =
- CreateBasicMessage(kAllowedFalseAUTO_DENYJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
- // Assertions
- EXPECT_EQ(rc_app_extention_->IsSubscibedToInteriorVehicleData(module_type),
- false);
-}
-
-TEST_F(OnRemoteControlSettingsNotificationTest,
- Execute_NothingHappens_IfParamsOmitted) {
- // Expectations
- EXPECT_CALL(mock_module_, service()).WillOnce(Return(mock_service_));
- EXPECT_CALL(mock_allocation_manager_, SetAccessMode(_)).Times(0);
- EXPECT_CALL(*mock_service_, GetApplications(kModuleId)).Times(0);
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId)).Times(0);
- EXPECT_CALL(*mock_service_,
- ChangeNotifyHMILevel(
- apps_[0], mobile_apis::HMILevel::eType::HMI_NONE)).Times(0);
-
- application_manager::MessagePtr message =
- CreateBasicMessage(kWithoutParamsJson);
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(message);
- command->Run();
-}
-
-} // namespace on_remote_control_settings_notification_test
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
diff --git a/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc
deleted file mode 100644
index a219bc086d..0000000000
--- a/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "remote_control/commands/set_interior_vehicle_data_request.h"
-#include "gtest/gtest.h"
-#include "mock_remote_control_plugin.h"
-#include "mock_application.h"
-#include "mock_resource_allocation_manager.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/remote_control_event.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "remote_control/rc_command_factory.h"
-#include "remote_control/event_engine/event_dispatcher.h"
-#include "functional_module/function_ids.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using test::components::remote_control_test::MockApplication;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::StrictMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SaveArg;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::application_manager::ApplicationSharedPtr;
-using ::protocol_handler::MessagePriority;
-using remote_control::RemotePluginInterface;
-using remote_control::MessageHelper;
-using namespace remote_control;
-
-namespace {
-const uint32_t kAppId = 11u;
-const int32_t kConnectionKey = 5;
-const int kModuleId = 153;
-const uint32_t kCorrelationId = 1u;
-const std::string kValidMobileRequestWithOnlySettableParams =
- "{\"moduleData\":{\"moduleType\":\"CLIMATE\", "
- "\"climateControlData\":{\"defrostZone\":"
- "\"FRONT\", \"fanSpeed\":10}}}";
-const std::string kValidMobileRequestWithSettableAndReadOnlyParams =
- "{\"moduleData\":{\"moduleType\":\"CLIMATE\", "
- "\"climateControlData\":{\"defrostZone\":"
- "\"FRONT\", \"fanSpeed\":10, \"currentTemperature\":{\"unit\":\"CELSIUS\", "
- "\"value\":17.5}}}}";
-const std::string kValidMobileRequestWithoutSettableAndWithReadOnlyParams =
- "{\"moduleData\":{\"moduleType\":\"CLIMATE\", \"climateControlData\":"
- "{\"currentTemperature\":{\"unit\":\"CELSIUS\", \"value\":17.5}}}}";
-const std::string kInvalidMobileRequest = "{{\"moduleTip\":\"LUXOFT\"}}";
-const std::string kValidHmiResponse =
- "{\"jsonrpc\":\"2.0\",\"id\":51,\"result\":{\"code\":0,\"method\":\"RC."
- "SetInteriorVehicleData\",\"moduleData\":{\"moduleType\":\"CLIMATE\","
- "\"climateControlData\":{\"fanSpeed\":0,\"desiredTemperature\":{\"unit\":"
- "\"CELSIUS\","
- "\"value\":25},\"acEnable\":true,\"circulateAirEnable\":true,"
- "\"autoModeEnable\":true,\"defrostZone\":\"ALL\",\"dualModeEnable\":true,"
- "\"acMaxEnable\":true,\"ventilationMode\":\"BOTH\"}}}}";
-const std::string kInvalidHmiResponse =
- "{\"jsonrpc\":\"2.0\",\"id\":51,\"result\":{\"code\":21,\"method\":\"RC."
- "SetInteriorVehicleData\",\"moduleData\":{\"moduleType\":\"CLIMATE\","
- "\"ControlData\":{\"Speed\":0,\"outsideTemperature\":{\"unit\":"
- "\"CELSIUS\",\"value\":\"high\"},\"desiredTemperature\":{\"unit\":"
- "\"CELSIUS\","
- "\"value\":25},\"acEnable\":true,\"circulateAirEnable\":true,"
- "\"autoModeEnable\":true,\"defrostZone\":\"ALL\",\"dualModeEnable\":true,"
- "\"acMaxEnable\":true,\"ventilationMode\":\"BOTH\"}},\"isSubscribed\":"
- "false}}";
-}
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-namespace set_interior_vehicle_data_request_test {
-
-class SetInteriorVehicleDataRequestTest : public ::testing::Test {
- public:
- SetInteriorVehicleDataRequestTest()
- : mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_app_(utils::MakeShared<NiceMock<MockApplication> >())
- , rc_app_extention_(
- utils::MakeShared<remote_control::RCAppExtension>(kModuleId)) {
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
- ON_CALL(mock_module_, resource_allocation_manager())
- .WillByDefault(ReturnRef(mock_allocation_manager_));
- ON_CALL(mock_module_, service()).WillByDefault(Return(mock_service_));
- ON_CALL(*mock_service_, GetApplication(_)).WillByDefault(Return(mock_app_));
- ON_CALL(*mock_service_, IsInterfaceAvailable(_))
- .WillByDefault(Return(true));
- ON_CALL(*mock_service_, IsRemoteControlApplication(_))
- .WillByDefault(Return(true));
- ON_CALL(mock_module_, event_dispatcher())
- .WillByDefault(ReturnRef(event_dispatcher_));
- ServicePtr exp_service(mock_service_);
- }
-
- remote_control::request_controller::MobileRequestPtr CreateCommand(
- application_manager::MessagePtr msg) {
- return remote_control::RCCommandFactory::CreateCommand(msg, mock_module_);
- }
-
- application_manager::MessagePtr CreateBasicMessage() {
- application_manager::MessagePtr message = utils::MakeShared<Message>(
- MessagePriority::FromServiceType(protocol_handler::ServiceType::kRpc));
- message->set_connection_key(kConnectionKey);
- message->set_function_id(RCFunctionID::SET_INTERIOR_VEHICLE_DATA);
- message->set_function_name(MessageHelper::GetMobileAPIName(
- functional_modules::SET_INTERIOR_VEHICLE_DATA));
- return message;
- }
-
- protected:
- utils::SharedPtr<NiceMock<application_manager::MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_;
- utils::SharedPtr<remote_control::RCAppExtension> rc_app_extention_;
- testing::NiceMock<remote_control_test::MockRemotePluginInterface>
- mock_module_;
- testing::NiceMock<remote_control_test::MockResourceAllocationManager>
- mock_allocation_manager_;
- RemotePluginInterface::RCPluginEventDispatcher event_dispatcher_;
-};
-
-TEST_F(SetInteriorVehicleDataRequestTest,
- Execute_ValidWithoutReadOnlyParams_ExpectResendToHMI) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kValidMobileRequestWithOnlySettableParams);
-
- // Expectations
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(mobile_message))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
-
- application_manager::AppExtensionPtr app_extension;
- EXPECT_CALL(*mock_app_, AddExtension(_))
- .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true)));
- EXPECT_CALL(*mock_service_, CheckModule(_, _)).WillOnce(Return(true));
- EXPECT_CALL(*mock_service_, GetNextCorrelationID())
- .WillOnce(Return(kCorrelationId));
-
- const std::string resource = "CLIMATE";
-
- EXPECT_CALL(mock_allocation_manager_, IsResourceFree(resource))
- .WillOnce(Return(true));
- EXPECT_CALL(mock_allocation_manager_, AcquireResource(resource, kAppId))
- .WillOnce(Return(remote_control::AcquireResult::ALLOWED));
- EXPECT_CALL(
- mock_allocation_manager_,
- SetResourceState(resource, kAppId, remote_control::ResourceState::BUSY));
-
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
-
- // Assertions
- EXPECT_EQ(kModuleId, app_extension->uid());
- EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI,
- result_msg->protocol_version());
- EXPECT_EQ(1, result_msg->correlation_id());
- EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type());
- const Json::Value hmi_request_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_EQ(functional_modules::hmi_api::set_interior_vehicle_data,
- hmi_request_params[json_keys::kMethod].asString());
- const Json::Value hmi_request_climate_control_data =
- hmi_request_params[json_keys::kParams][message_params::kModuleData]
- [message_params::kClimateControlData];
- EXPECT_EQ(2u, hmi_request_climate_control_data.size());
- const Json::Value hmi_request_module_data_fan_speed =
- hmi_request_climate_control_data[message_params::kFanSpeed];
- const Json::Value hmi_request_module_data_defrost_zone =
- hmi_request_climate_control_data[message_params::kDefrostZone];
- EXPECT_EQ("FRONT", hmi_request_module_data_defrost_zone.asString());
- EXPECT_EQ(10, hmi_request_module_data_fan_speed.asInt());
-}
-
-TEST_F(
- SetInteriorVehicleDataRequestTest,
- Execute_ValidWithSettableAndReadOnlyParams_ExpectCutReadOnlyAndResendToHMI) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(
- kValidMobileRequestWithSettableAndReadOnlyParams);
-
- // Expectations
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(mobile_message))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
-
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
-
- application_manager::AppExtensionPtr app_extension;
- EXPECT_CALL(*mock_app_, AddExtension(_))
- .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true)));
- EXPECT_CALL(*mock_service_, CheckModule(_, _)).WillOnce(Return(true));
- EXPECT_CALL(*mock_service_, GetNextCorrelationID())
- .WillOnce(Return(kCorrelationId));
-
- const std::string resource = "CLIMATE";
-
- EXPECT_CALL(mock_allocation_manager_, IsResourceFree(resource))
- .WillOnce(Return(true));
- EXPECT_CALL(mock_allocation_manager_, AcquireResource(resource, kAppId))
- .WillOnce(Return(remote_control::AcquireResult::ALLOWED));
- EXPECT_CALL(
- mock_allocation_manager_,
- SetResourceState(resource, kAppId, remote_control::ResourceState::BUSY));
-
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
-
- // Assertions
- EXPECT_EQ(kModuleId, app_extension->uid());
- EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI,
- result_msg->protocol_version());
- EXPECT_EQ(1, result_msg->correlation_id());
- EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type());
- const Json::Value hmi_request_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_EQ(functional_modules::hmi_api::set_interior_vehicle_data,
- hmi_request_params[json_keys::kMethod].asString());
- const Json::Value hmi_request_climate_control_data =
- hmi_request_params[json_keys::kParams][message_params::kModuleData]
- [message_params::kClimateControlData];
- EXPECT_EQ(2u, hmi_request_climate_control_data.size());
- const Json::Value hmi_request_module_data_fan_speed =
- hmi_request_climate_control_data[message_params::kFanSpeed];
- const Json::Value hmi_request_module_data_defrost_zone =
- hmi_request_climate_control_data[message_params::kDefrostZone];
- EXPECT_EQ("FRONT", hmi_request_module_data_defrost_zone.asString());
- EXPECT_EQ(10, hmi_request_module_data_fan_speed.asInt());
-}
-
-TEST_F(SetInteriorVehicleDataRequestTest,
- Execute_ValidWithOnlyParamsReadOnly_ExpectResponseReadOnly) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(
- kValidMobileRequestWithoutSettableAndWithReadOnlyParams);
-
- // Expectations
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(mobile_message))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- EXPECT_CALL(mock_allocation_manager_, IsResourceFree(_))
- .WillOnce(Return(true));
- EXPECT_CALL(mock_allocation_manager_, AcquireResource(_, _))
- .WillOnce(Return(::remote_control::AcquireResult::ALLOWED));
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*mock_app_, QueryInterface(kModuleId))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
-
- application_manager::AppExtensionPtr app_extension;
- EXPECT_CALL(*mock_app_, AddExtension(_))
- .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true)));
- EXPECT_CALL(*mock_service_, CheckModule(_, _)).WillOnce(Return(true));
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_)).Times(0);
-
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
-
- // Assertions
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[result_codes::kSuccess].asBool());
- EXPECT_EQ(result_codes::kReadOnly,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(
- SetInteriorVehicleDataRequestTest,
- Execute_MessageValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kInvalidMobileRequest);
-
- // Expectations
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*mobile_message))
- .WillOnce(
- Return(application_manager::MessageValidationResult::INVALID_JSON));
- EXPECT_CALL(*mock_service_, SendMessageToHMI(_)).Times(0);
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->Run();
-
- // Assertions
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[result_codes::kSuccess].asBool());
- EXPECT_EQ(result_codes::kInvalidData,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(SetInteriorVehicleDataRequestTest,
- OnEvent_ValidHmiResponse_ExpectSuccessfulResponseSentToMobile) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kValidMobileRequestWithOnlySettableParams);
-
- application_manager::MessagePtr hmi_message = CreateBasicMessage();
- hmi_message->set_json_message(kValidHmiResponse);
- hmi_message->set_message_type(application_manager::MessageType::kResponse);
-
- // Expectations
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*hmi_message))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::RCPluginEvent event(
- hmi_message, functional_modules::hmi_api::set_interior_vehicle_data);
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- command->on_event(event);
-
- // Assertions
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_TRUE(response_params[json_keys::kSuccess].asBool());
- EXPECT_EQ(result_codes::kSuccess,
- response_params[json_keys::kResultCode].asString());
-}
-
-TEST_F(SetInteriorVehicleDataRequestTest,
- OnEvent_InvalidHmiResponse_ExpectGenericErrorResponseSentToMobile) {
- // Arrange
- application_manager::MessagePtr mobile_message = CreateBasicMessage();
- mobile_message->set_json_message(kValidMobileRequestWithOnlySettableParams);
- application_manager::MessagePtr hmi_message = CreateBasicMessage();
- hmi_message->set_json_message(kInvalidHmiResponse);
- hmi_message->set_message_type(application_manager::MessageType::kResponse);
-
- // Expectations
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(*hmi_message))
- .WillOnce(
- Return(application_manager::MessageValidationResult::INVALID_JSON));
- application_manager::MessagePtr result_msg;
- EXPECT_CALL(mock_module_, SendResponseToMobile(_))
- .WillOnce(SaveArg<0>(&result_msg));
-
- // Act
- remote_control::request_controller::MobileRequestPtr command =
- CreateCommand(mobile_message);
- remote_control::RCPluginEvent event(
- hmi_message, functional_modules::hmi_api::set_interior_vehicle_data);
- command->on_event(event);
- const Json::Value response_params =
- MessageHelper::StringToValue(result_msg->json_message());
- EXPECT_FALSE(response_params[json_keys::kSuccess].asBool());
- EXPECT_EQ(result_codes::kGenericError,
- response_params[json_keys::kResultCode].asString());
- const Json::Value hmi_response =
- MessageHelper::StringToValue(hmi_message->json_message());
- EXPECT_EQ(hmi_response[json_keys::kInfo].asString(),
- response_params[json_keys::kInfo].asString());
-}
-
-} // namespace set_interior_vehicle_data_request_test
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
diff --git a/src/components/remote_control/test/include/mock_application.h b/src/components/remote_control/test/include/mock_application.h
deleted file mode 100644
index 8fa2c847aa..0000000000
--- a/src/components/remote_control/test/include/mock_application.h
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright (c) 2017, 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_REMOTE_CONTROL_TEST_INCLUDE_MOCK_APPLICATION_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_APPLICATION_H_
-
-#include <string>
-
-#include <string>
-#include "gmock/gmock.h"
-#include "application_manager/application.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/app_extension.h"
-#include "smart_objects/smart_object.h"
-#include "utils/custom_string.h"
-#include "application_manager/usage_statistics.h"
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-
-namespace am = application_manager;
-namespace mobile_api = mobile_apis;
-namespace custom_str = utils::custom_string;
-
-namespace custom_str = utils::custom_string;
-class MockApplication : public ::application_manager::Application {
- public:
- MockApplication() {}
- MOCK_CONST_METHOD0(active_message, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(curHash, const std::string&());
- MOCK_METHOD0(UpdateHash, void());
- DEPRECATED MOCK_CONST_METHOD0(flag_sending_hash_change_after_awake, bool());
- DEPRECATED MOCK_METHOD1(set_flag_sending_hash_change_after_awake,
- void(bool flag));
- MOCK_CONST_METHOD0(IsHashChangedDuringSuspend, bool());
- MOCK_METHOD1(SetHashChangedDuringSuspend, void(const bool state));
- MOCK_CONST_METHOD0(is_application_data_changed, bool());
- MOCK_METHOD1(set_is_application_data_changed,
- void(bool state_application_data));
- MOCK_METHOD0(CloseActiveMessage, void());
- MOCK_CONST_METHOD0(IsFullscreen, bool());
- MOCK_METHOD0(ChangeSupportingAppHMIType, void());
- MOCK_CONST_METHOD0(is_navi, bool());
- MOCK_METHOD1(set_is_navi, void(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());
- MOCK_METHOD1(set_audio_streaming_approved, void(bool state));
- MOCK_CONST_METHOD0(video_streaming_allowed, bool());
- MOCK_METHOD1(set_video_streaming_allowed, void(bool state));
- MOCK_CONST_METHOD0(audio_streaming_allowed, bool());
- MOCK_METHOD1(set_audio_streaming_allowed, void(bool state));
- MOCK_CONST_METHOD0(is_audio, bool());
- MOCK_METHOD2(SetVideoConfig,
- bool(protocol_handler::ServiceType service_type,
- const smart_objects::SmartObject& params));
- MOCK_METHOD1(StartStreaming,
- void(protocol_handler::ServiceType service_type));
- MOCK_METHOD1(StopStreaming, void(protocol_handler::ServiceType service_type));
- MOCK_METHOD1(StopStreamingForce,
- void(protocol_handler::ServiceType service_type));
- MOCK_METHOD1(SuspendStreaming,
- void(protocol_handler::ServiceType service_type));
- 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(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());
- MOCK_CONST_METHOD0(name, const custom_str::CustomString&());
- MOCK_METHOD1(set_folder_name, void(const std::string& folder_name));
- MOCK_CONST_METHOD0(folder_name, const std::string());
- MOCK_CONST_METHOD0(is_media_application, bool());
- MOCK_CONST_METHOD0(hmi_level, const mobile_apis::HMILevel::eType());
- MOCK_CONST_METHOD0(put_file_in_none_count, const uint32_t());
- MOCK_CONST_METHOD0(delete_file_in_none_count, const uint32_t());
- MOCK_CONST_METHOD0(list_files_in_none_count, const uint32_t());
- MOCK_CONST_METHOD0(system_context, const mobile_apis::SystemContext::eType());
- MOCK_CONST_METHOD0(audio_streaming_state,
- const mobile_apis::AudioStreamingState::eType());
- MOCK_CONST_METHOD0(app_icon_path, const std::string&());
- MOCK_CONST_METHOD0(device, connection_handler::DeviceHandle());
- MOCK_CONST_METHOD0(CurrentHmiState, const application_manager::HmiStatePtr());
- MOCK_CONST_METHOD0(RegularHmiState, const application_manager::HmiStatePtr());
- MOCK_CONST_METHOD0(PostponedHmiState,
- const application_manager::HmiStatePtr());
- MOCK_METHOD1(set_tts_properties_in_none, void(bool active));
- MOCK_METHOD0(tts_properties_in_none, bool());
- MOCK_METHOD1(set_tts_properties_in_full, void(bool active));
- MOCK_METHOD0(tts_properties_in_full, bool());
- MOCK_METHOD1(set_version,
- void(const ::application_manager::Version& version));
- MOCK_METHOD1(set_name, void(const custom_str::CustomString& name));
- MOCK_METHOD1(set_is_media_application, void(bool is_media));
- MOCK_METHOD0(increment_put_file_in_none_count, void());
- MOCK_METHOD0(increment_delete_file_in_none_count, void());
- MOCK_METHOD0(increment_list_files_in_none_count, void());
- MOCK_METHOD1(set_app_icon_path, bool(const std::string& file_name));
- MOCK_METHOD1(set_app_allowed, void(const bool allowed));
- MOCK_METHOD1(set_device, void(connection_handler::DeviceHandle device));
- MOCK_CONST_METHOD0(get_grammar_id, uint32_t());
- MOCK_METHOD1(set_grammar_id, void(uint32_t value));
- MOCK_METHOD1(
- set_protocol_version,
- void(const ::protocol_handler::MajorProtocolVersion& protocol_version));
- MOCK_CONST_METHOD0(protocol_version,
- ::protocol_handler::MajorProtocolVersion());
- MOCK_METHOD1(set_is_resuming, void(bool));
- MOCK_CONST_METHOD0(is_resuming, bool());
- MOCK_METHOD1(AddFile, bool(const ::application_manager::AppFile& file));
- MOCK_CONST_METHOD0(getAppFiles, const ::application_manager::AppFilesMap&());
- MOCK_METHOD1(UpdateFile, bool(const ::application_manager::AppFile& file));
- MOCK_METHOD1(DeleteFile, bool(const std::string& file_name));
- MOCK_METHOD1(
- GetFile,
- const ::application_manager::AppFile*(const std::string& file_name));
- MOCK_METHOD1(SubscribeToButton,
- bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(IsSubscribedToButton,
- bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(UnsubscribeFromButton,
- bool(mobile_apis::ButtonName::eType btn_name));
- MOCK_METHOD1(SubscribeToIVI, bool(uint32_t vehicle_info_type));
- MOCK_CONST_METHOD1(IsSubscribedToIVI, bool(uint32_t vehicle_info_type));
- MOCK_METHOD1(UnsubscribeFromIVI, bool(uint32_t vehicle_info_type));
- MOCK_METHOD0(ResetDataInNone, void());
- MOCK_METHOD2(AreCommandLimitsExceeded,
- bool(mobile_apis::FunctionID::eType cmd_id,
- ::application_manager::TLimitSource source));
- MOCK_METHOD0(usage_report, ::application_manager::UsageStatistics&());
- MOCK_METHOD0(help_prompt_manager,
- ::application_manager::HelpPromptManager&());
- MOCK_METHOD1(SetInitialState, void(::application_manager::HmiStatePtr state));
- MOCK_METHOD1(SetRegularState, void(::application_manager::HmiStatePtr state));
- MOCK_METHOD1(SetPostponedState,
- void(::application_manager::HmiStatePtr state));
- MOCK_METHOD0(RemovePostponedState, void());
- MOCK_METHOD1(AddHMIState, void(::application_manager::HmiStatePtr state));
- MOCK_METHOD1(RemoveHMIState,
- void(::application_manager::HmiState::StateID state_id));
- MOCK_METHOD2(SubscribeToSoftButtons,
- void(int32_t cmd_id,
- const ::application_manager::SoftButtonID& softbuttons_id));
- MOCK_METHOD1(IsSubscribedToSoftButton, bool(const uint32_t softbutton_id));
- MOCK_METHOD1(UnsubscribeFromSoftButtons, void(int32_t cmd_id));
- MOCK_CONST_METHOD0(IsAudioApplication, bool());
- MOCK_METHOD0(LoadPersistentFiles, void());
- // InitialApplicationData methods
- MOCK_CONST_METHOD0(app_types, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(vr_synonyms, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(policy_app_id, std::string());
- MOCK_CONST_METHOD0(tts_name, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(ngn_media_screen_name,
- const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(language, const mobile_apis::Language::eType&());
- MOCK_CONST_METHOD0(ui_language, const mobile_apis::Language::eType&());
- MOCK_METHOD1(set_app_types,
- void(const smart_objects::SmartObject& app_types));
- MOCK_METHOD1(set_vr_synonyms,
- void(const smart_objects::SmartObject& vr_synonyms));
- MOCK_METHOD1(set_policy_app_id, void(const std::string& policy_app_id));
- MOCK_METHOD1(set_tts_name, void(const smart_objects::SmartObject& tts_name));
- MOCK_METHOD1(set_ngn_media_screen_name,
- void(const smart_objects::SmartObject& ngn_name));
- MOCK_METHOD1(set_language,
- void(const mobile_apis::Language::eType& language));
- MOCK_METHOD1(set_ui_language,
- void(const mobile_apis::Language::eType& ui_language));
- // DynamicApplicationData methods
- MOCK_CONST_METHOD0(help_prompt, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(timeout_prompt, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(vr_help_title, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(vr_help, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(tbt_state, const mobile_apis::TBTState::eType&());
- MOCK_CONST_METHOD0(show_command, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(tbt_show_command, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(
- SubscribedButtons,
- DataAccessor< ::application_manager::ButtonSubscriptions>());
- MOCK_CONST_METHOD0(
- SubscribedIVI,
- DataAccessor< ::application_manager::VehicleInfoSubscriptions>());
- MOCK_CONST_METHOD0(keyboard_props, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(menu_title, const smart_objects::SmartObject*());
- MOCK_CONST_METHOD0(menu_icon, const smart_objects::SmartObject*());
- MOCK_METHOD1(load_global_properties,
- void(const smart_objects::SmartObject& so));
- MOCK_METHOD1(set_help_prompt,
- void(const smart_objects::SmartObject& help_prompt));
- MOCK_METHOD1(set_timeout_prompt,
- void(const smart_objects::SmartObject& timeout_prompt));
- MOCK_METHOD1(set_vr_help_title,
- void(const smart_objects::SmartObject& vr_help_title));
- MOCK_METHOD0(reset_vr_help_title, void());
- MOCK_METHOD1(set_vr_help, void(const smart_objects::SmartObject& vr_help));
- MOCK_METHOD0(reset_vr_help, void());
- MOCK_METHOD1(set_tbt_state,
- void(const mobile_apis::TBTState::eType& tbt_state));
- MOCK_METHOD1(set_show_command,
- void(const smart_objects::SmartObject& show_command));
- MOCK_METHOD1(set_tbt_show_command,
- void(const smart_objects::SmartObject& tbt_show));
- MOCK_METHOD1(set_keyboard_props,
- void(const smart_objects::SmartObject& keyboard_props));
- MOCK_METHOD1(set_menu_title,
- void(const smart_objects::SmartObject& menu_title));
- MOCK_METHOD1(set_menu_icon,
- void(const smart_objects::SmartObject& menu_icon));
- MOCK_CONST_METHOD0(audio_stream_retry_number, uint32_t());
- MOCK_METHOD1(set_audio_stream_retry_number,
- void(const uint32_t& audio_stream_retry_number));
- MOCK_CONST_METHOD0(video_stream_retry_number, uint32_t());
- MOCK_METHOD1(set_video_stream_retry_number,
- void(const uint32_t& video_stream_retry_number));
- MOCK_METHOD2(AddCommand,
- 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_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_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));
- MOCK_METHOD3(AddPerformInteractionChoiceSet,
- void(uint32_t correlation_id,
- uint32_t choice_set_id,
- const smart_objects::SmartObject& choice_set));
- MOCK_METHOD1(DeletePerformInteractionChoiceSet,
- void(uint32_t correlation_id));
- MOCK_CONST_METHOD0(
- performinteraction_choice_set_map,
- DataAccessor< ::application_manager::PerformChoiceSetMap>());
- MOCK_CONST_METHOD0(commands_map,
- DataAccessor< ::application_manager::CommandsMap>());
- MOCK_CONST_METHOD0(sub_menu_map,
- DataAccessor< ::application_manager::SubMenuMap>());
- MOCK_CONST_METHOD0(choice_set_map,
- DataAccessor< ::application_manager::ChoiceSetMap>());
- MOCK_METHOD1(set_perform_interaction_active, void(uint32_t active));
- MOCK_CONST_METHOD0(is_perform_interaction_active, uint32_t());
- MOCK_METHOD1(set_perform_interaction_mode, void(int32_t mode));
- MOCK_CONST_METHOD0(perform_interaction_mode, int32_t());
- MOCK_METHOD1(set_perform_interaction_layout,
- void(mobile_apis::LayoutMode::eType mode));
- MOCK_CONST_METHOD0(perform_interaction_layout,
- mobile_apis::LayoutMode::eType());
- MOCK_METHOD1(set_reset_global_properties_active, void(bool active));
- MOCK_CONST_METHOD0(is_reset_global_properties_active, bool());
- MOCK_CONST_METHOD0(app_id, uint32_t());
- MOCK_CONST_METHOD0(mac_address, const std::string&());
- MOCK_CONST_METHOD0(bundle_id, const std::string&());
- MOCK_METHOD1(set_bundle_id, void(const std::string& bundle_id));
- MOCK_METHOD0(GetAvailableDiskSpace, uint32_t());
-
- MOCK_METHOD1(set_mobile_projection_enabled, void(bool));
- MOCK_CONST_METHOD0(mobile_projection_enabled, bool());
-
- MOCK_METHOD1(set_mobile_app_id, void(const std::string& policy_app_id));
- MOCK_CONST_METHOD0(is_foreground, bool());
- MOCK_METHOD1(set_foreground, void(bool is_foreground));
- MOCK_CONST_METHOD0(IsRegistered, bool());
- MOCK_CONST_METHOD0(SchemaUrl, std::string());
- MOCK_CONST_METHOD0(PackageName, std::string());
- MOCK_METHOD1(PushMobileMessage, void(smart_objects::SmartObjectSPtr message));
- MOCK_METHOD1(
- SwapMobileMessageQueue,
- void(::application_manager::MobileMessageQueue& mobile_messages));
-
-#ifdef SDL_REMOTE_CONTROL
- MOCK_METHOD1(
- set_system_context,
- void(const application_manager::mobile_api::SystemContext::eType&));
- MOCK_METHOD1(
- set_audio_streaming_state,
- void(const application_manager::mobile_api::AudioStreamingState::eType&
- state));
- MOCK_METHOD1(IsSubscribedToInteriorVehicleData,
- bool(smart_objects::SmartObject module));
- MOCK_METHOD1(SubscribeToInteriorVehicleData,
- bool(smart_objects::SmartObject module));
- MOCK_METHOD1(UnsubscribeFromInteriorVehicleData,
- bool(smart_objects::SmartObject module));
- MOCK_METHOD1(
- set_hmi_level,
- void(const application_manager::mobile_api::HMILevel::eType& hmi_level));
- MOCK_METHOD1(QueryInterface,
- application_manager::AppExtensionPtr(
- application_manager::AppExtensionUID uid));
- MOCK_METHOD1(AddExtension,
- bool(application_manager::AppExtensionPtr extention));
- MOCK_METHOD1(RemoveExtension, bool(application_manager::AppExtensionUID uid));
- MOCK_METHOD0(RemoveExtensions, void());
- MOCK_CONST_METHOD0(SubscribesIVI,
- const application_manager::VehicleInfoSubscriptions&());
-
-#endif // SDL_REMOTE_CONTROL
-};
-
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_APPLICATION_H_
diff --git a/src/components/remote_control/test/include/mock_remote_control_plugin.h b/src/components/remote_control/test/include/mock_remote_control_plugin.h
deleted file mode 100644
index a8143f448c..0000000000
--- a/src/components/remote_control/test/include/mock_remote_control_plugin.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_REMOTE_CONTROL_PLUGIN_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_REMOTE_CONTROL_PLUGIN_H_
-
-#include <stdint.h>
-#include "remote_control/remote_plugin_interface.h"
-#include "remote_control/resource_allocation_manager.h"
-#include "application_manager/message.h"
-#include "mock_application.h"
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-
-class RCAppExtension;
-typedef utils::SharedPtr<RCAppExtension> RCAppExtensionPtr;
-
-class MockRemotePluginInterface : public remote_control::RemotePluginInterface {
- public:
- MOCK_CONST_METHOD0(GetPluginInfo, functional_modules::PluginInfo());
- MOCK_METHOD1(
- ProcessMessage,
- functional_modules::ProcessResult(application_manager::MessagePtr msg));
- MOCK_METHOD1(
- ProcessHMIMessage,
- functional_modules::ProcessResult(application_manager::MessagePtr msg));
- MOCK_METHOD1(SendResponseToMobile, void(application_manager::MessagePtr msg));
- MOCK_METHOD1(SendTimeoutResponseToMobile,
- void(application_manager::MessagePtr msg));
- MOCK_METHOD1(RemoveAppExtension, void(uint32_t app_id));
- MOCK_METHOD1(IsAppForPlugin,
- bool(application_manager::ApplicationSharedPtr app));
- MOCK_METHOD2(OnAppHMILevelChanged,
- void(application_manager::ApplicationSharedPtr app,
- mobile_apis::HMILevel::eType old_level));
- MOCK_METHOD1(OnUnregisterApplication, void(const uint32_t app_id));
- MOCK_METHOD1(SendHmiStatusNotification,
- void(application_manager::ApplicationSharedPtr app));
- MOCK_METHOD0(event_dispatcher, RCPluginEventDispatcher&());
- MOCK_METHOD0(RemoveAppExtensions, void());
- MOCK_METHOD0(service, application_manager::ServicePtr());
- MOCK_CONST_METHOD0(GetModuleID, functional_modules::ModuleID());
- MOCK_METHOD0(resource_allocation_manager,
- remote_control::ResourceAllocationManager&());
- MOCK_METHOD2(OnApplicationEvent,
- void(functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application));
- MOCK_METHOD1(OnPolicyEvent, void(functional_modules::PolicyEvent event));
-};
-
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_REMOTE_CONTROL_PLUGIN_H_
diff --git a/src/components/remote_control/test/include/mock_resource_allocation_manager.h b/src/components/remote_control/test/include/mock_resource_allocation_manager.h
deleted file mode 100644
index 6337d8a32a..0000000000
--- a/src/components/remote_control/test/include/mock_resource_allocation_manager.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_RESOURCE_ALLOCATION_MANAGER_H_
-#define SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_RESOURCE_ALLOCATION_MANAGER_H_
-
-#include "gmock/gmock.h"
-#include "remote_control/resource_allocation_manager.h"
-
-namespace test {
-namespace components {
-namespace remote_control_test {
-
-class MockResourceAllocationManager
- : public remote_control::ResourceAllocationManager {
- public:
- MOCK_METHOD2(AcquireResource,
- remote_control::AcquireResult::eType(
- const std::string& module_type, const uint32_t app_id));
- MOCK_METHOD2(ForceAcquireResource,
- void(const std::string& module_type, const uint32_t app_id));
- MOCK_METHOD2(OnDriverDisallowed,
- void(const std::string& module_type, const uint32_t app_id));
- MOCK_METHOD2(OnApplicationEvent,
- void(functional_modules::ApplicationEvent event,
- application_manager::ApplicationSharedPtr application));
- MOCK_METHOD1(OnPolicyEvent, void(functional_modules::PolicyEvent event));
- MOCK_METHOD1(SetAccessMode,
- void(const hmi_apis::Common_RCAccessMode::eType access_mode));
- MOCK_CONST_METHOD0(GetAccessMode, hmi_apis::Common_RCAccessMode::eType());
- MOCK_METHOD3(SetResourceState,
- void(const std::string& module_type,
- const uint32_t app_id,
- const remote_control::ResourceState::eType state));
- MOCK_CONST_METHOD1(IsResourceFree, bool(const std::string& module_type));
- MOCK_METHOD0(ResetAllAllocations, void());
-};
-
-} // namespace remote_control_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_REMOTE_CONTROL_TEST_INCLUDE_MOCK_RESOURCE_ALLOCATION_MANAGER_H_
diff --git a/src/components/remote_control/test/src/rc_app_extension_test.cc b/src/components/remote_control/test/src/rc_app_extension_test.cc
deleted file mode 100644
index 78388ccbf1..0000000000
--- a/src/components/remote_control/test/src/rc_app_extension_test.cc
+++ /dev/null
@@ -1,43 +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 "gtest/gtest.h"
-#include "remote_control/rc_app_extension.h"
-
-namespace remote_control {
-
-TEST(CanAppExtensionTest, Create) {
- RCAppExtension extension(7);
- ASSERT_TRUE(extension.uid() == 7);
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/test/src/rc_library_test.cc b/src/components/remote_control/test/src/rc_library_test.cc
deleted file mode 100644
index 77a57c4c3f..0000000000
--- a/src/components/remote_control/test/src/rc_library_test.cc
+++ /dev/null
@@ -1,92 +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 <dlfcn.h>
-#include "gtest/gtest.h"
-#include "remote_control/remote_control_plugin.h"
-#include "mock_service.h"
-
-using functional_modules::PluginInfo;
-using application_manager::MockService;
-
-using ::testing::Return;
-
-namespace remote_control {
-
-::testing::AssertionResult IsError(void* error) {
- if (error) {
- return ::testing::AssertionSuccess() << static_cast<const char*>(error);
- } else {
- return ::testing::AssertionFailure() << error;
- }
-}
-
-TEST(CanLibraryTest, Load) {
- const std::string kLibraryPath = "libRemoteControlModule.so";
-
- void* handle = dlopen(kLibraryPath.c_str(), RTLD_LAZY);
- EXPECT_FALSE(IsError(dlerror()));
- ASSERT_TRUE(handle != NULL);
-
- const std::string kSymbol = "Create";
- void* symbol = dlsym(handle, kSymbol.c_str());
- EXPECT_FALSE(IsError(dlerror()));
- ASSERT_TRUE(symbol != NULL);
-
- typedef CANModule* (*Create)();
- Create create_manager = reinterpret_cast<Create>(symbol);
- CANModule* module = create_manager();
- ASSERT_TRUE(module != NULL);
-
- PluginInfo plugin = module->GetPluginInfo();
- EXPECT_EQ(plugin.name, "RemoteControlPlugin");
- EXPECT_EQ(plugin.version, 1);
-
- MockService* service = new MockService();
- module->set_service(service);
- std::vector<application_manager::ApplicationSharedPtr> apps;
- EXPECT_CALL(*service, GetApplications(module->GetModuleID()))
- .Times(1)
- .WillOnce(Return(apps));
-
- // in order for all sub-threads to start before shutting them down
- // The logic conditions must be chosen to insure that the "signal" is
- // executed if the "wait" is ever processed.
- // (see http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html)
- sleep(3);
- // CANModule::destroy();
- int ret = dlclose(handle);
- EXPECT_FALSE(ret);
- EXPECT_FALSE(IsError(dlerror()));
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/test/src/rc_module_test.cc b/src/components/remote_control/test/src/rc_module_test.cc
deleted file mode 100644
index 7bdf9fb9dd..0000000000
--- a/src/components/remote_control/test/src/rc_module_test.cc
+++ /dev/null
@@ -1,263 +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 "gtest/gtest.h"
-#include "remote_control/remote_control_plugin.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "functional_module/module_observer.h"
-#include "application_manager/mock_application.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/mock_application_manager_settings.h"
-
-using functional_modules::PluginInfo;
-using functional_modules::ProcessResult;
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using application_manager::MockMessageHelper;
-using test::components::application_manager_test::MockApplication;
-using test::components::application_manager_test::
- MockApplicationManagerSettings;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::StrictMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::Eq;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::application_manager::ApplicationSharedPtr;
-using ::protocol_handler::MessagePriority;
-
-namespace {
-const bool kDeviceHandle = 1u;
-const std::string kDeviceId = "1";
-const std::string kDeviceName = "1";
-const uint32_t kDefaultTimeout = 10000;
-}
-
-namespace remote_control {
-
-class RCModuleTest : public ::testing::Test {
- public:
- RCModuleTest()
- : mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_settings_(
- utils::MakeShared<NiceMock<MockApplicationManagerSettings> >())
- , mock_message_helper_(*MockMessageHelper::message_helper_mock())
- , app0_(utils::MakeShared<NiceMock<MockApplication> >())
- , app1_(utils::MakeShared<NiceMock<MockApplication> >())
- , message_(utils::MakeShared<Message>(MessagePriority::FromServiceType(
- protocol_handler::ServiceType::kRpc)))
- , rc_app_extention_(
- utils::MakeShared<RCAppExtension>(module_.GetModuleID())) {}
-
- void HandleMessage() {
- module_.ProcessHMIMessage(message_);
- }
-
- protected:
- RemoteControlPlugin module_;
- utils::SharedPtr<NiceMock<MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplicationManagerSettings> > mock_settings_;
- MockMessageHelper& mock_message_helper_;
- std::vector<ApplicationSharedPtr> apps_;
- utils::SharedPtr<NiceMock<MockApplication> > app0_;
- utils::SharedPtr<NiceMock<MockApplication> > app1_;
- application_manager::MessagePtr message_;
- utils::SharedPtr<RCAppExtension> rc_app_extention_;
-
- void SetUp() OVERRIDE {
- Mock::VerifyAndClearExpectations(&mock_message_helper_);
- ON_CALL(*mock_service_, GetSettings())
- .WillByDefault(ReturnRef(*mock_settings_));
- ON_CALL(*mock_settings_, default_timeout())
- .WillByDefault(ReturnRef(kDefaultTimeout));
- ServicePtr exp_service(mock_service_);
- module_.set_service(exp_service);
- ServicePtr out_service = module_.service();
- EXPECT_EQ(exp_service.get(), out_service.get());
- }
-
- void TearDown() OVERRIDE {
- Mock::VerifyAndClearExpectations(&mock_message_helper_);
- EXPECT_CALL(*mock_service_, GetApplications(module_.GetModuleID()))
- .WillOnce(Return(apps_));
- }
-};
-
-TEST_F(RCModuleTest, Create) {
- EXPECT_EQ(153, module_.GetModuleID());
- PluginInfo plugin = module_.GetPluginInfo();
- EXPECT_EQ(plugin.name, "RemoteControlPlugin");
- EXPECT_EQ(plugin.version, 1);
-}
-
-TEST_F(RCModuleTest, ProcessMessageWrongMessage) {
- message_->set_function_id(-1);
- EXPECT_CALL(*mock_service_, SendMessageToMobile(_)).Times(0);
- EXPECT_EQ(ProcessResult::CANNOT_PROCESS, module_.ProcessMessage(message_));
-}
-
-TEST_F(RCModuleTest, ProcessMessageEmptyapps_List) {
- message_->set_function_id(RCFunctionID::ON_INTERIOR_VEHICLE_DATA);
- message_->set_function_name("OnInteriorVehicleData");
-
- std::string json =
- "{\"jsonrpc\": \"2.0\", \"method\": \"RC.OnInteriorVehicleData\",\
- \"params\": {\"moduleData\": {\"moduleType\": \"CLIMATE\",\
- \"climateControlData\": {\"fanSpeed\": 100} }}}";
- message_->set_json_message(json);
-
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(_))
- .WillOnce(Return(
- application_manager::MessageValidationResult::SCHEMA_MISMATCH));
- EXPECT_CALL(*mock_service_, SendMessageToMobile(_)).Times(0);
-
- // EXPECT_EQ(ProcessResult::PROCESSED, module_.ProcessMessage(message_));
- EXPECT_EQ(ProcessResult::CANNOT_PROCESS, module_.ProcessHMIMessage(message_));
-}
-
-TEST_F(RCModuleTest, ProcessMessagePass) {
- message_->set_function_id(RCFunctionID::ON_INTERIOR_VEHICLE_DATA);
-
- std::string json =
- "{ \"jsonrpc\": \"2.0\",\"method\": \"RC.OnInteriorVehicleData\",\
- \"params\":{\"moduleData\":{\
- \"moduleType\": \"CLIMATE\",\"climateControlData\": {\"fanSpeed\": 100}}}}";
-
- message_->set_json_message(json);
-
- application_manager::BinaryData buf;
- application_manager::BinaryData* data = &buf;
- data->push_back(1);
-
- message_->set_binary_data(
- static_cast<const application_manager::BinaryData*>(data));
-
- Json::Value json_value = MessageHelper::StringToValue(json);
- Json::Value module_type =
- json_value[json_keys::kParams][message_params::kModuleData]
- [message_params::kModuleType];
- apps_.push_back(app0_);
- rc_app_extention_->SubscribeToInteriorVehicleData(module_type);
- EXPECT_CALL(*mock_service_, ValidateMessageBySchema(_))
- .WillOnce(Return(application_manager::MessageValidationResult::SUCCESS));
- EXPECT_CALL(*app0_, QueryInterface(module_.GetModuleID()))
- .WillOnce(Return(rc_app_extention_));
- EXPECT_CALL(*app0_, app_id()).WillRepeatedly(Return(1));
- EXPECT_CALL(*app0_, protocol_version())
- .WillRepeatedly(
- Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4));
- EXPECT_CALL(*mock_service_, GetApplications(module_.GetModuleID()))
- .WillOnce(Return(apps_));
- EXPECT_CALL(*mock_service_, GetApplication(1)).WillOnce(Return(app0_));
- EXPECT_CALL(*mock_service_, CheckPolicyPermissions(_))
- .WillOnce(Return(mobile_apis::Result::eType::SUCCESS));
- EXPECT_CALL(*mock_service_, CheckModule(1, "CLIMATE")).WillOnce(Return(true));
- EXPECT_CALL(*mock_service_, SendMessageToMobile(_));
-
- EXPECT_EQ(ProcessResult::PROCESSED, module_.ProcessHMIMessage(message_));
-}
-
-TEST_F(RCModuleTest, RemoveAppExtensionPassWay) {
- EXPECT_CALL(*mock_service_, GetApplication(1)).WillOnce(Return(app0_));
- EXPECT_CALL(*app0_, RemoveExtension(module_.GetModuleID()));
-
- module_.RemoveAppExtension(1);
-}
-
-TEST_F(RCModuleTest, RemoveAppExtensionIfAppNoExist) {
- ApplicationSharedPtr invalid_app;
-
- EXPECT_CALL(*mock_service_, GetApplication(_)).WillOnce(Return(invalid_app));
-
- module_.RemoveAppExtension(1);
-}
-
-TEST_F(RCModuleTest, SendResponseToMobile) {
- EXPECT_CALL(*mock_service_, SendMessageToMobile(message_));
-
- module_.SendResponseToMobile(message_);
-}
-
-TEST_F(RCModuleTest, IsAppForPluginSuccess) {
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*app0_, QueryInterface(module_.GetModuleID()))
- .WillOnce(Return(invalid_ext))
- .WillRepeatedly(Return(rc_app_extention_));
- EXPECT_CALL(*app0_, AddExtension(_)).WillOnce(Return(true));
- mobile_apis::HMILevel::eType hmi = mobile_apis::HMILevel::eType::HMI_FULL;
- EXPECT_CALL(*app0_, hmi_level()).WillRepeatedly(Return(hmi));
- ON_CALL(*app0_, device()).WillByDefault(Return(1));
- EXPECT_CALL(*mock_service_, IsRemoteControlApplication(Eq(app0_)))
- .WillOnce(Return(true));
- ASSERT_TRUE(module_.IsAppForPlugin(app0_));
-}
-
-TEST_F(RCModuleTest, IsAppForPluginNotNew) {
- EXPECT_CALL(*app0_, QueryInterface(module_.GetModuleID()))
- .WillOnce(Return(rc_app_extention_));
- EXPECT_CALL(*mock_service_, NotifyHMIAboutHMILevel(Eq(app0_), _)).Times(0);
- ASSERT_TRUE(module_.IsAppForPlugin(app0_));
-}
-
-TEST_F(RCModuleTest, IsAppForPluginFail) {
- application_manager::AppExtensionPtr invalid_ext;
- EXPECT_CALL(*app0_, QueryInterface(module_.GetModuleID()))
- .WillOnce(Return(invalid_ext));
- EXPECT_CALL(*mock_service_, IsRemoteControlApplication(Eq(app0_)))
- .Times(1)
- .WillOnce(Return(false));
- ASSERT_FALSE(module_.IsAppForPlugin(app0_));
-}
-
-TEST_F(RCModuleTest, OnAppHMILevelChanged) {
- const application_manager::custom_str::CustomString name("name");
- ON_CALL(*app0_, name()).WillByDefault(ReturnRef(name));
- mobile_apis::HMILevel::eType hmi = mobile_apis::HMILevel::eType::HMI_NONE;
- EXPECT_CALL(*app0_, hmi_level()).WillRepeatedly(Return(hmi));
- EXPECT_CALL(*mock_service_,
- NotifyHMIAboutHMILevel(Eq(app0_),
- mobile_apis::HMILevel::eType::HMI_NONE));
- module_.OnAppHMILevelChanged(app0_, mobile_apis::HMILevel::eType::HMI_FULL);
-}
-
-} // namespace remote_control
diff --git a/src/components/remote_control/test/src/resource_allocation_manager_impl_test.cc b/src/components/remote_control/test/src/resource_allocation_manager_impl_test.cc
deleted file mode 100644
index a69702d424..0000000000
--- a/src/components/remote_control/test/src/resource_allocation_manager_impl_test.cc
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Copyright (c) 2017, 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 <algorithm>
-#include "remote_control/resource_allocation_manager_impl.h"
-#include "mock_resource_allocation_manager.h"
-#include "mock_remote_control_plugin.h"
-#include "remote_control/rc_app_extension.h"
-#include "remote_control/rc_module_constants.h"
-#include "remote_control/message_helper.h"
-#include "functional_module/module_observer.h"
-#include "application_manager/mock_application.h"
-#include "include/mock_service.h"
-#include "utils/shared_ptr.h"
-#include "utils/make_shared.h"
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-
-using functional_modules::PluginInfo;
-using functional_modules::ProcessResult;
-using functional_modules::RCFunctionID;
-using application_manager::ServicePtr;
-
-using application_manager::MockService;
-using namespace test::components;
-using application_manager_test::MockApplication;
-
-using ::testing::_;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::StrictMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SaveArg;
-using ::testing::Eq;
-using ::testing::DoAll;
-using ::testing::SetArgPointee;
-using ::application_manager::Message;
-using ::application_manager::MessageType;
-using ::application_manager::ApplicationSharedPtr;
-using ::protocol_handler::MessagePriority;
-
-namespace {
-const bool kDeviceHandle = 1u;
-const std::string kModuleType1 = "CLIMATE";
-const std::string kModuleType2 = "RADIO";
-const int32_t kConnectionKey = 5;
-const int32_t kCorrelationId = 5;
-const uint32_t kAppId1 = 11u;
-const uint32_t kAppId2 = 22u;
-const std::string policy_app_id_1_ = "policy_id_1";
-const functional_modules::ModuleID kDefaultModuleID = 0;
-}
-
-namespace remote_control {
-
-class RAManagerTest : public ::testing::Test {
- public:
- RAManagerTest()
- : mock_service_(utils::MakeShared<NiceMock<MockService> >())
- , mock_app_1_(utils::MakeShared<NiceMock<MockApplication> >())
- , mock_app_2_(utils::MakeShared<NiceMock<MockApplication> >())
- , message_(utils::MakeShared<Message>(MessagePriority::FromServiceType(
- protocol_handler::ServiceType::kRpc))) {
- EXPECT_CALL(mock_module_, service()).WillRepeatedly(Return(mock_service_));
- EXPECT_CALL(mock_module_, GetModuleID())
- .WillRepeatedly(Return(kDefaultModuleID));
- }
-
- void CheckResultWithHMILevelAndAccessMode(
- ResourceAllocationManagerImpl& ra_manager,
- mobile_apis::HMILevel::eType app_level,
- const remote_control::AcquireResult::eType expected_result,
- const hmi_apis::Common_RCAccessMode::eType access_mode) {
- // Arrange
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
- ra_manager.SetAccessMode(access_mode);
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillOnce(Return(mock_app_2_));
- EXPECT_CALL(*mock_app_2_, hmi_level()).WillOnce(Return(app_level));
- // Second app tries to get already acquired resource by 1st app
- EXPECT_EQ(expected_result,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
- }
-
- protected:
- utils::SharedPtr<NiceMock<MockService> > mock_service_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_1_;
- utils::SharedPtr<NiceMock<MockApplication> > mock_app_2_;
- application_manager::MessagePtr message_;
- remote_control_test::MockRemotePluginInterface mock_module_;
- RemotePluginInterface::RCPluginEventDispatcher event_dispatcher_;
-};
-
-TEST_F(RAManagerTest, AcquireResource_NoAppRegistered_Expect_InUse) {
- // Arrange
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(ApplicationSharedPtr()));
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- // Act & Assert
- EXPECT_EQ(remote_control::AcquireResult::IN_USE,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-}
-
-TEST_F(RAManagerTest,
- AcquireResource_AppRegisteredAnyHmiLevelResourceFree_Expect_Allowed) {
- // Arrange
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- // Act & Assert
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-}
-
-TEST_F(
- RAManagerTest,
- AcquireResource_AppInAnyHmiLevelWantsToAcquireSameResourceTwice_Expect_Allowed) {
- // Arrange
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
- // Same app tries to get already acquired resource
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-}
-
-TEST_F(
- RAManagerTest,
- AcquireResource_App2_NotInFULLWantsToGetAcquiredResource_Expect_Rejected) {
- using namespace mobile_apis;
- using namespace hmi_apis;
- using namespace remote_control;
- const HMILevel::eType app_level = HMILevel::eType::HMI_BACKGROUND;
- const AcquireResult::eType expected_result = AcquireResult::REJECTED;
- const Common_RCAccessMode::eType access_mode =
- Common_RCAccessMode::eType::AUTO_ALLOW;
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- CheckResultWithHMILevelAndAccessMode(
- ra_manager, app_level, expected_result, access_mode);
-}
-
-TEST_F(
- RAManagerTest,
- AcquireResource_App2_InFULLWantsToGetAcquiredResource_AUTO_DENY_Expect_InUse) {
- using namespace mobile_apis;
- using namespace hmi_apis;
- using namespace remote_control;
- const HMILevel::eType app_level = HMILevel::eType::HMI_FULL;
- const AcquireResult::eType expected_result = AcquireResult::IN_USE;
- const Common_RCAccessMode::eType access_mode =
- Common_RCAccessMode::eType::AUTO_DENY;
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- CheckResultWithHMILevelAndAccessMode(
- ra_manager, app_level, expected_result, access_mode);
-}
-
-TEST_F(
- RAManagerTest,
- AcquireResource_App2_InFULLWantsToGetAcquiredResource_AUTO_ALLOW_Expect_Allowed) {
- using namespace mobile_apis;
- using namespace hmi_apis;
- using namespace remote_control;
- const HMILevel::eType app_level = HMILevel::eType::HMI_FULL;
- const AcquireResult::eType expected_result = AcquireResult::ALLOWED;
- const Common_RCAccessMode::eType access_mode =
- Common_RCAccessMode::eType::AUTO_ALLOW;
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- CheckResultWithHMILevelAndAccessMode(
- ra_manager, app_level, expected_result, access_mode);
-}
-
-TEST_F(
- RAManagerTest,
- AcquireResource_App2_InFULLWantsToGetAcquiredResource_ASK_DRIVER_Expect_AskDriver) {
- using namespace mobile_apis;
- using namespace hmi_apis;
- using namespace remote_control;
- const HMILevel::eType app_level = HMILevel::eType::HMI_FULL;
- const AcquireResult::eType expected_result = AcquireResult::ASK_DRIVER;
- const Common_RCAccessMode::eType access_mode =
- Common_RCAccessMode::eType::ASK_DRIVER;
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- CheckResultWithHMILevelAndAccessMode(
- ra_manager, app_level, expected_result, access_mode);
-}
-
-TEST_F(RAManagerTest,
- AcquireResource_AcquiredModuleIsRejectedForApp2_ExpectApp2Rejected) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
- EXPECT_EQ(AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-
- // Act
- ra_manager.OnDriverDisallowed(kModuleType1, kAppId2);
-
- // Assert
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillOnce(Return(mock_app_2_));
- EXPECT_EQ(AcquireResult::REJECTED,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
-}
-
-TEST_F(RAManagerTest, AppExit_ReleaseResource) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillRepeatedly(Return(mock_app_1_));
-
- RCAppExtensionPtr rc_extention_ptr = utils::MakeShared<RCAppExtension>(
- application_manager::AppExtensionUID(kDefaultModuleID));
-
- EXPECT_CALL(*mock_app_1_, QueryInterface(_))
- .WillOnce(Return(rc_extention_ptr));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-
- // Act
- application_manager::ApplicationSharedPtr app_ptr(mock_app_1_);
- EXPECT_CALL(*mock_app_1_, app_id()).WillRepeatedly(Return(kAppId1));
-
- ra_manager.OnApplicationEvent(
- functional_modules::ApplicationEvent::kApplicationExit, app_ptr);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillRepeatedly(Return(mock_app_2_));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
-}
-
-TEST_F(RAManagerTest, AnotherAppExit_NoReleaseResource) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillRepeatedly(Return(mock_app_2_));
-
- RCAppExtensionPtr rc_extention_ptr = utils::MakeShared<RCAppExtension>(
- application_manager::AppExtensionUID(kDefaultModuleID));
-
- EXPECT_CALL(*mock_app_2_, QueryInterface(_))
- .WillOnce(Return(rc_extention_ptr));
-
- // Act
- application_manager::ApplicationSharedPtr app_ptr(mock_app_2_);
- EXPECT_CALL(*mock_app_2_, app_id()).WillRepeatedly(Return(kAppId2));
- ra_manager.OnApplicationEvent(
- functional_modules::ApplicationEvent::kApplicationExit, app_ptr);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillOnce(Return(mock_app_2_));
- EXPECT_CALL(*mock_app_2_, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
- EXPECT_EQ(remote_control::AcquireResult::IN_USE,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
-}
-
-TEST_F(RAManagerTest, AppUnregistered_ReleaseResource) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
-
- RCAppExtensionPtr rc_extention_ptr = utils::MakeShared<RCAppExtension>(
- application_manager::AppExtensionUID(kDefaultModuleID));
-
- EXPECT_CALL(*mock_app_1_, QueryInterface(_))
- .WillOnce(Return(rc_extention_ptr));
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillRepeatedly(Return(mock_app_1_));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-
- // Act
- application_manager::ApplicationSharedPtr app_ptr(mock_app_1_);
- EXPECT_CALL(*mock_app_1_, app_id()).WillRepeatedly(Return(kAppId1));
-
- ra_manager.OnApplicationEvent(
- functional_modules::ApplicationEvent::kApplicationUnregistered, app_ptr);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillOnce(Return(mock_app_2_));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
-}
-
-TEST_F(RAManagerTest, AnotherAppUnregistered_NoReleaseResource) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillOnce(Return(mock_app_1_));
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillRepeatedly(Return(mock_app_2_));
-
- RCAppExtensionPtr rc_extention_ptr = utils::MakeShared<RCAppExtension>(
- application_manager::AppExtensionUID(kDefaultModuleID));
-
- EXPECT_CALL(*mock_app_2_, QueryInterface(_))
- .WillOnce(Return(rc_extention_ptr));
-
- // Act
- application_manager::ApplicationSharedPtr app_ptr(mock_app_2_);
- EXPECT_CALL(*mock_app_2_, app_id()).WillRepeatedly(Return(kAppId2));
-
- ra_manager.OnApplicationEvent(
- functional_modules::ApplicationEvent::kApplicationUnregistered, app_ptr);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillOnce(Return(mock_app_2_));
- EXPECT_CALL(*mock_app_2_, hmi_level())
- .WillOnce(Return(mobile_apis::HMILevel::HMI_FULL));
- EXPECT_EQ(remote_control::AcquireResult::IN_USE,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
-}
-
-TEST_F(RAManagerTest, AppsDisallowed_ReleaseAllResources) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillRepeatedly(Return(mock_app_1_));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType2, kAppId1));
-
- std::vector<ApplicationSharedPtr> apps;
- apps.push_back(mock_app_1_);
- EXPECT_CALL(*mock_service_, GetApplications(_)).WillRepeatedly(Return(apps));
-
- RCAppExtensionPtr rc_extention_ptr = utils::MakeShared<RCAppExtension>(
- application_manager::AppExtensionUID(kDefaultModuleID));
-
- EXPECT_CALL(*mock_app_1_, QueryInterface(_))
- .WillOnce(Return(rc_extention_ptr));
-
- // Act
- ra_manager.OnPolicyEvent(
- functional_modules::PolicyEvent::kApplicationsDisabled);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillRepeatedly(Return(mock_app_2_));
- EXPECT_CALL(*mock_app_2_, hmi_level())
- .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType2, kAppId2));
-}
-
-TEST_F(RAManagerTest, AppGotRevokedModulesWithPTU_ReleaseRevokedResource) {
- // Arrange
- ResourceAllocationManagerImpl ra_manager(mock_module_);
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillRepeatedly(Return(mock_app_1_));
-
- RCAppExtensionPtr rc_extention_ptr = utils::MakeShared<RCAppExtension>(
- application_manager::AppExtensionUID(kDefaultModuleID));
-
- EXPECT_CALL(*mock_app_1_, QueryInterface(_))
- .WillOnce(Return(rc_extention_ptr));
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId1))
- .WillRepeatedly(Return(mock_app_1_));
-
- EXPECT_CALL(*mock_app_1_, app_id()).WillRepeatedly(Return(kAppId1));
-
- EXPECT_CALL(*mock_app_1_, policy_app_id())
- .WillRepeatedly(Return(policy_app_id_1_));
-
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType1, kAppId1));
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType2, kAppId1));
-
- std::vector<application_manager::ApplicationSharedPtr> apps;
- apps.push_back(mock_app_1_);
- EXPECT_CALL(*mock_service_, GetApplications(_)).WillOnce(Return(apps));
-
- Resources allowed_modules;
- allowed_modules.push_back(kModuleType1);
-
- EXPECT_CALL(*mock_service_, GetModuleTypes(policy_app_id_1_, _))
- .WillOnce(DoAll(SetArgPointee<1>(allowed_modules), Return(true)));
-
- // Act
- ra_manager.OnPolicyEvent(
- functional_modules::PolicyEvent::kApplicationPolicyUpdated);
-
- EXPECT_CALL(*mock_service_, GetApplication(kAppId2))
- .WillRepeatedly(Return(mock_app_2_));
- EXPECT_CALL(*mock_app_2_, hmi_level())
- .WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
- EXPECT_EQ(remote_control::AcquireResult::IN_USE,
- ra_manager.AcquireResource(kModuleType1, kAppId2));
- EXPECT_EQ(remote_control::AcquireResult::ALLOWED,
- ra_manager.AcquireResource(kModuleType2, kAppId2));
-}
-
-TEST_F(RAManagerTest, GetAccessMode_ExpectedSameAsHadSet) {
- ResourceAllocationManagerImpl ra_manager(mock_module_);
-
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::AUTO_DENY);
- EXPECT_EQ(hmi_apis::Common_RCAccessMode::AUTO_DENY,
- ra_manager.GetAccessMode());
-
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::ASK_DRIVER);
- EXPECT_EQ(hmi_apis::Common_RCAccessMode::ASK_DRIVER,
- ra_manager.GetAccessMode());
-
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::AUTO_ALLOW);
- EXPECT_EQ(hmi_apis::Common_RCAccessMode::AUTO_ALLOW,
- ra_manager.GetAccessMode());
-
- ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::INVALID_ENUM);
- EXPECT_EQ(hmi_apis::Common_RCAccessMode::INVALID_ENUM,
- ra_manager.GetAccessMode());
-}
-
-} // namespace remote_control
diff --git a/src/components/security_manager/include/security_manager/crypto_manager_impl.h b/src/components/security_manager/include/security_manager/crypto_manager_impl.h
index 4e48858e5c..aa3be0f430 100644
--- a/src/components/security_manager/include/security_manager/crypto_manager_impl.h
+++ b/src/components/security_manager/include/security_manager/crypto_manager_impl.h
@@ -71,6 +71,8 @@ class CryptoManagerImpl : public CryptoManager {
size_t* out_data_size) OVERRIDE;
bool IsInitCompleted() const OVERRIDE;
bool IsHandshakePending() const OVERRIDE;
+ bool GetCertificateDueDate(time_t& due_date) const OVERRIDE;
+ bool HasCertificate() const OVERRIDE;
size_t get_max_block_size(size_t mtu) const OVERRIDE;
std::string LastError() const OVERRIDE;
void ResetConnection() OVERRIDE;
@@ -101,6 +103,22 @@ class CryptoManagerImpl : public CryptoManager {
std::string GetTextBy(X509_NAME* name, int object) const;
+ /**
+ * @brief Pulls number stored in buffer of chars
+ * and returns it as integer
+ * @param buf where symbols stored
+ * @param idx index of required char to be converted
+ * @return number in integer representation
+ */
+ int get_number_from_char_buf(char* buf, int* idx) const;
+ /**
+ * @brief Converts time from ASN1 format (used in OpenSSL)
+ * to time_t data type
+ * @param time_to_convert time to be converted
+ * @return time in time_t format
+ */
+ time_t convert_asn1_time_to_time_t(ASN1_TIME* time_to_convert) const;
+
SSL* connection_;
BIO* bioIn_;
BIO* bioOut_;
@@ -128,23 +146,65 @@ class CryptoManagerImpl : public CryptoManager {
SSLContext* CreateSSLContext() OVERRIDE;
void ReleaseSSLContext(SSLContext* context) OVERRIDE;
std::string LastError() const OVERRIDE;
- virtual bool IsCertificateUpdateRequired() const OVERRIDE;
+ bool IsCertificateUpdateRequired(
+ const time_t system_time, const time_t certificates_time) const OVERRIDE;
virtual const CryptoManagerSettings& get_settings() const OVERRIDE;
private:
+ bool AreForceProtectionSettingsCorrect() const;
bool set_certificate(const std::string& cert_data);
- int pull_number_from_buf(char* buf, int* idx);
- void asn1_time_to_tm(ASN1_TIME* time);
+ /**
+ * @brief Saves new certificate data on the file system
+ * @param cert_data certificate data in PEM format
+ * @return true if new certificate data was successfully saved on the file
+ * system, otherwise returns false
+ */
+ bool SaveCertificateData(const std::string& cert_data) const;
+
+ /**
+ * @brief Updates certificate and private key for the current SSL context
+ * @param certificate new certificate to update
+ * @param key new private key to update
+ * @return true if certificate and private key were updated successfully,
+ * otherwise returns false
+ */
+ bool UpdateModuleCertificateData(X509* certificate, EVP_PKEY* key);
+
+ /**
+ * @brief Loads X509 certificate from file specified in CryptoManagerSettings
+ * @return returns pointer to the loaded X509 certificate in case of success
+ * otherwise returns NULL
+ */
+ X509* LoadModuleCertificateFromFile();
+
+ /**
+ * @brief Loads private key from file specified in CryptoManagerSettings
+ * @return returns pointer to the loaded private key in case of success
+ * otherwise returns NULL
+ */
+ EVP_PKEY* LoadModulePrivateKeyFromFile();
+
+ /**
+ * @brief Saves new X509 certificate data to file specified in
+ * CryptoManagerSettings
+ * @param certificate new X509 certificate data
+ * @return true if certificate data was saved to the file system otherwise
+ * returns false
+ */
+ bool SaveModuleCertificateToFile(X509* certificate) const;
/**
- * @brief Sets initial certificate datetime
+ * @brief Saves new private key data to file specified in
+ * CryptoManagerSettings
+ * @param key new private key data
+ * @return true if private key data was saved to the file system otherwise
+ * returns false
*/
- void InitCertExpTime();
+ bool SaveModuleKeyToFile(EVP_PKEY* key) const;
const utils::SharedPtr<const CryptoManagerSettings> settings_;
SSL_CTX* context_;
- mutable struct tm expiration_time_;
static uint32_t instance_count_;
static sync_primitives::Lock instance_lock_;
DISALLOW_COPY_AND_ASSIGN(CryptoManagerImpl);
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 1e4699b77a..f20d3e4034 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
@@ -17,6 +17,7 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings {
return profile_.ssl_mode() == "SERVER" ? security_manager::SERVER
: security_manager::CLIENT;
}
+
Protocol security_manager_protocol_name() const OVERRIDE {
CREATE_LOGGERPTR_LOCAL(logger_, "SecurityManager")
@@ -33,33 +34,59 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings {
if (protocol_str == "SSLv3") {
return security_manager::SSLv3;
}
+ if (protocol_str == "DTLSv1.0") {
+ return security_manager::DTLSv1;
+ }
+
LOG4CXX_ERROR(
logger_,
"Unknown protocol: " << profile_.security_manager_protocol_name());
return static_cast<security_manager::Protocol>(-1);
}
+
bool verify_peer() const OVERRIDE {
return profile_.verify_peer();
}
+
const std::string& certificate_data() const OVERRIDE {
return certificate_data_;
}
+
const std::string& ciphers_list() const OVERRIDE {
return profile_.ciphers_list();
}
+
const std::string& ca_cert_path() const OVERRIDE {
return profile_.ca_cert_path();
}
+
+ const std::string& module_cert_path() const OVERRIDE {
+ return profile_.cert_path();
+ }
+
+ const std::string& module_key_path() const OVERRIDE {
+ return profile_.key_path();
+ }
+
size_t update_before_hours() const OVERRIDE {
return profile_.update_before_hours();
}
+
size_t maximum_payload_size() const OVERRIDE {
return profile_.maximum_payload_size();
}
+ const std::vector<int>& force_protected_service() const {
+ return profile_.force_protected_service();
+ }
+
+ const std::vector<int>& force_unprotected_service() const {
+ return profile_.force_unprotected_service();
+ }
+
private:
const profile::Profile& profile_;
const std::string certificate_data_;
};
-}
+} // namespace security_manager
#endif // SRC_COMPONENTS_SECURITY_MANAGER_INCLUDE_SECURITY_MANAGER_CRYPTO_MANAGER_SETTINGS_IMPL_H_
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 469b97d1e1..70b87de0ef 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
@@ -35,6 +35,8 @@
#include <list>
#include <string>
+#include <set>
+#include <memory>
#include "utils/macro.h"
#include "utils/message_queue.h"
@@ -44,6 +46,7 @@
#include "security_manager/security_query.h"
#include "protocol_handler/protocol_handler.h"
#include "protocol/common.h"
+#include "utils/system_time_handler.h"
namespace security_manager {
/**
@@ -67,12 +70,21 @@ typedef threads::MessageLoopThread<SecurityMessageQueue> SecurityMessageLoop;
* \brief SecurityManagerImpl class implements SecurityManager interface
*/
class SecurityManagerImpl : public SecurityManager,
- public SecurityMessageLoop::Handler {
+ public SecurityMessageLoop::Handler,
+ public utils::SystemTimeListener {
public:
/**
* \brief Constructor
+ * \param system_time_handler allows to work with system time.
*/
- SecurityManagerImpl();
+ explicit SecurityManagerImpl(
+ std::unique_ptr<utils::SystemTimeHandler>&& system_time_handler);
+
+ /**
+ * \brief Destructor
+ */
+ ~SecurityManagerImpl();
+
/**
* \brief Add received from Mobile Application message
* Overriden ProtocolObserver::OnMessageReceived method
@@ -131,9 +143,11 @@ class SecurityManagerImpl : public SecurityManager,
* Do not notify listeners, send security error on occure
* \param connection_key Unique key used by other components as session
* identifier
+ * @param cc_strategy - SSL context creation strategy
* @return new \c SSLContext or \c NULL on any error
*/
- SSLContext* CreateSSLContext(const uint32_t& connection_key) OVERRIDE;
+ SSLContext* CreateSSLContext(const uint32_t& connection_key,
+ ContextCreationStrategy cc_strategy) OVERRIDE;
/**
* \brief Start handshake as SSL client
@@ -141,16 +155,33 @@ class SecurityManagerImpl : public SecurityManager,
void StartHandshake(uint32_t connection_key) OVERRIDE;
/**
+ * @brief PostponeHandshake allows to postpone handshake. It notifies
+ * cryptomanager that certificate should be updated and adds specified
+ * connection key to the list of the certificate awaiting connections.
+ * @param connection_key the identifier for connection to postpone handshake.
+ */
+ void PostponeHandshake(const uint32_t connection_key) OVERRIDE;
+
+ /**
* @brief Checks whether certificate should be updated
+ * @param connection_key the connection identifier to check certificate for.
* @return true if certificate should be updated otherwise false
*/
- bool IsCertificateUpdateRequired() OVERRIDE;
+ bool IsCertificateUpdateRequired(const uint32_t connection_key) OVERRIDE;
+
+ /**
+ * @brief Checks whether system time ready notification
+ * was received from hmi
+ * @return true if received otherwise false
+ */
+ bool IsSystemTimeProviderReady() const OVERRIDE;
/**
* \brief Add/Remove for SecurityManagerListener
*/
void AddListener(SecurityManagerListener* const listener) OVERRIDE;
void RemoveListener(SecurityManagerListener* const listener) OVERRIDE;
+
/**
* \brief Notifiers for listeners
* \param connection_key Unique key used by other components as session
@@ -173,6 +204,11 @@ class SecurityManagerImpl : public SecurityManager,
void NotifyOnCertificateUpdateRequired() OVERRIDE;
/**
+ * @brief Notify all listeners that handshake was failed
+ */
+ void NotifyListenersOnHandshakeFailed() OVERRIDE;
+
+ /**
* @brief Check is policy certificate data is empty
* @return true if policy certificate data is not empty otherwise false
*/
@@ -217,6 +253,39 @@ class SecurityManagerImpl : public SecurityManager,
*/
void SendQuery(const SecurityQuery& query, const uint32_t connection_key);
+ /**
+ * @brief OnCertificateUpdated allows to obtain notification when certificate
+ * has been updated with policy table update. Pass this certificate to crypto
+ * manager for further processing. Also process postopnes handshake for the
+ * certain connection key.
+ *
+ * @param data the certificates content.
+ * @return always true.
+ */
+ bool OnCertificateUpdated(const std::string& data) OVERRIDE;
+
+ /**
+ * @brief ResumeHandshake allows to resume handshake after certificate has
+ * been updated.
+ * @param connection_key the connection identifier to start handshake.
+ */
+ void ResumeHandshake(uint32_t connection_key);
+
+ /**
+ * @brief ProceedHandshake starts the handshake process.
+ * @param ssl_context ssl context for the handshake. COntains certificate,
+ * keys, etc.
+ * @param connection_key the connection identifier to process handshake.
+ */
+ void ProceedHandshake(SSLContext* ssl_context, uint32_t connection_key);
+
+ /**
+ * @brief OnSystemTimeArrived method which notifies
+ * crypto manager with updated time in order to check certificate validity
+ * @param utc_time the current system time.
+ */
+ void OnSystemTimeArrived(const time_t utc_time) OVERRIDE;
+
// Thread that pumps handshake data
SecurityMessageLoop security_messages_;
@@ -235,7 +304,17 @@ class SecurityManagerImpl : public SecurityManager,
/**
*\brief List of listeners for notify handshake done result
*/
+
std::list<SecurityManagerListener*> listeners_;
+
+ std::unique_ptr<utils::SystemTimeHandler> system_time_handler_;
+ sync_primitives::Lock connections_lock_;
+ std::set<uint32_t> awaiting_certificate_connections_;
+ std::set<uint32_t> awaiting_time_connections_;
+
+ mutable sync_primitives::Lock waiters_lock_;
+ volatile bool waiting_for_certificate_;
+ volatile bool waiting_for_time_;
DISALLOW_COPY_AND_ASSIGN(SecurityManagerImpl);
};
} // namespace security_manager
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index 2cc88c5966..84c5db7c0e 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -41,6 +41,7 @@
#include <iostream>
#include <stdio.h>
#include <ctime>
+#include <algorithm>
#include "security_manager/security_manager.h"
#include "utils/logger.h"
@@ -63,7 +64,12 @@ namespace {
int debug_callback(int preverify_ok, X509_STORE_CTX* ctx) {
if (!preverify_ok) {
const int error = X509_STORE_CTX_get_error(ctx);
- UNUSED(error);
+ if (error == X509_V_ERR_CERT_NOT_YET_VALID ||
+ error == X509_V_ERR_CERT_HAS_EXPIRED) {
+ // return success result code instead of error because start
+ // 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)
@@ -93,7 +99,6 @@ CryptoManagerImpl::CryptoManagerImpl(
OpenSSL_add_all_algorithms();
SSL_library_init();
}
- InitCertExpTime();
}
CryptoManagerImpl::~CryptoManagerImpl() {
@@ -113,10 +118,35 @@ CryptoManagerImpl::~CryptoManagerImpl() {
}
}
+bool CryptoManagerImpl::AreForceProtectionSettingsCorrect() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const std::vector<int>& forced_unprotected_services =
+ get_settings().force_unprotected_service();
+ const std::vector<int>& forced_protected_services =
+ get_settings().force_protected_service();
+
+ for (auto& item : forced_protected_services) {
+ if (0 == item) {
+ continue;
+ }
+
+ if (std::find(forced_unprotected_services.begin(),
+ forced_unprotected_services.end(),
+ item) != forced_unprotected_services.end()) {
+ return false;
+ }
+ }
+ return true;
+}
+
bool CryptoManagerImpl::Init() {
LOG4CXX_AUTO_TRACE(logger_);
const Mode mode = get_settings().security_manager_mode();
+ if (!AreForceProtectionSettingsCorrect()) {
+ LOG4CXX_DEBUG(logger_, "Force protection settings of ini file are wrong!");
+ return false;
+ }
const bool is_server = (mode == SERVER);
if (is_server) {
LOG4CXX_DEBUG(logger_, "Server mode");
@@ -133,7 +163,7 @@ bool CryptoManagerImpl::Init() {
#if OPENSSL_VERSION_NUMBER < CONST_SSL_METHOD_MINIMAL_VERSION
SSL_METHOD* method;
#else
- const SSL_METHOD* method;
+ const SSL_METHOD* method = NULL;
#endif
switch (get_settings().security_manager_protocol_name()) {
case SSLv3:
@@ -141,13 +171,16 @@ bool CryptoManagerImpl::Init() {
LOG4CXX_WARN(logger_, "OpenSSL does not support SSL3 protocol");
return false;
#else
+ LOG4CXX_DEBUG(logger_, "SSLv3 is used");
method = is_server ? SSLv3_server_method() : SSLv3_client_method();
break;
#endif
case TLSv1:
+ LOG4CXX_DEBUG(logger_, "TLSv1 is used");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
break;
case TLSv1_1:
+ LOG4CXX_DEBUG(logger_, "TLSv1_1 is used");
#if OPENSSL_VERSION_NUMBER < TLS1_1_MINIMAL_VERSION
LOG4CXX_WARN(
logger_,
@@ -158,6 +191,7 @@ bool CryptoManagerImpl::Init() {
#endif
break;
case TLSv1_2:
+ LOG4CXX_DEBUG(logger_, "TLSv1_2 is used");
#if OPENSSL_VERSION_NUMBER < TLS1_1_MINIMAL_VERSION
LOG4CXX_WARN(
logger_,
@@ -167,6 +201,10 @@ bool CryptoManagerImpl::Init() {
method = is_server ? TLSv1_2_server_method() : TLSv1_2_client_method();
#endif
break;
+ case DTLSv1:
+ LOG4CXX_DEBUG(logger_, "DTLSv1 is used");
+ method = is_server ? DTLSv1_server_method() : DTLSv1_client_method();
+ break;
default:
LOG4CXX_ERROR(logger_,
"Unknown protocol: "
@@ -183,7 +221,7 @@ bool CryptoManagerImpl::Init() {
// Disable SSL2 as deprecated
SSL_CTX_set_options(context_, SSL_OP_NO_SSLv2);
- set_certificate(get_settings().certificate_data());
+ SaveCertificateData(get_settings().certificate_data());
if (get_settings().ciphers_list().empty()) {
LOG4CXX_WARN(logger_, "Empty ciphers list");
@@ -216,6 +254,21 @@ bool CryptoManagerImpl::Init() {
<< '"');
}
+ LOG4CXX_DEBUG(logger_, "Setting up module certificate and private key");
+
+ X509* module_certificate = LoadModuleCertificateFromFile();
+ utils::ScopeGuard certificate_guard =
+ utils::MakeGuard(X509_free, module_certificate);
+ UNUSED(certificate_guard);
+
+ EVP_PKEY* module_key = LoadModulePrivateKeyFromFile();
+ utils::ScopeGuard key_guard = utils::MakeGuard(EVP_PKEY_free, module_key);
+ UNUSED(key_guard);
+
+ if (!UpdateModuleCertificateData(module_certificate, module_key)) {
+ LOG4CXX_WARN(logger_, "Failed to update module key and certificate");
+ }
+
guard.Dismiss();
const int verify_mode =
@@ -235,17 +288,33 @@ bool CryptoManagerImpl::OnCertificateUpdated(const std::string& data) {
return false;
}
- return set_certificate(data);
+ if (!SaveCertificateData(data)) {
+ LOG4CXX_ERROR(logger_, "Failed to save certificate data");
+ return false;
+ }
+
+ X509* module_certificate = LoadModuleCertificateFromFile();
+ EVP_PKEY* module_key = LoadModulePrivateKeyFromFile();
+
+ utils::ScopeGuard certificate_guard =
+ utils::MakeGuard(X509_free, module_certificate);
+ UNUSED(certificate_guard);
+
+ utils::ScopeGuard key_guard = utils::MakeGuard(EVP_PKEY_free, module_key);
+ UNUSED(key_guard);
+
+ return UpdateModuleCertificateData(module_certificate, module_key);
}
SSLContext* CryptoManagerImpl::CreateSSLContext() {
- if (context_ == NULL) {
+ if (NULL == context_) {
return NULL;
}
SSL* conn = SSL_new(context_);
- if (conn == NULL)
+ if (NULL == conn) {
return NULL;
+ }
if (get_settings().security_manager_mode() == SERVER) {
SSL_set_accept_state(conn);
@@ -269,24 +338,17 @@ std::string CryptoManagerImpl::LastError() const {
return std::string(reason ? reason : "");
}
-bool CryptoManagerImpl::IsCertificateUpdateRequired() const {
+bool CryptoManagerImpl::IsCertificateUpdateRequired(
+ const time_t system_time, const time_t certificates_time) const {
LOG4CXX_AUTO_TRACE(logger_);
- const time_t cert_date = mktime(&expiration_time_);
+ const double seconds = difftime(certificates_time, system_time);
- if (cert_date == -1) {
- LOG4CXX_WARN(logger_,
- "The certifiacte expiration time cannot be represented.");
- return false;
- }
- const time_t now = time(NULL);
- const double seconds = difftime(cert_date, now);
+ LOG4CXX_DEBUG(
+ logger_, "Certificate UTC time: " << asctime(gmtime(&certificates_time)));
- LOG4CXX_DEBUG(logger_,
- "Certificate expiration time: " << asctime(&expiration_time_));
- LOG4CXX_DEBUG(logger_,
- "Host time: " << asctime(localtime(&now))
- << ". Seconds before expiration: " << seconds);
+ LOG4CXX_DEBUG(logger_, "Host UTC time: " << asctime(gmtime(&system_time)));
+ LOG4CXX_DEBUG(logger_, "Seconds before expiration: " << seconds);
if (seconds < 0) {
LOG4CXX_WARN(logger_, "Certificate is already expired.");
return true;
@@ -300,7 +362,8 @@ const CryptoManagerSettings& CryptoManagerImpl::get_settings() const {
return *settings_;
}
-bool CryptoManagerImpl::set_certificate(const std::string& cert_data) {
+bool CryptoManagerImpl::SaveCertificateData(
+ const std::string& cert_data) const {
LOG4CXX_AUTO_TRACE(logger_);
if (cert_data.empty()) {
@@ -315,100 +378,162 @@ bool CryptoManagerImpl::set_certificate(const std::string& cert_data) {
UNUSED(bio_guard)
X509* cert = NULL;
- PEM_read_bio_X509(bio_cert, &cert, 0, 0);
+ if (!PEM_read_bio_X509(bio_cert, &cert, 0, 0)) {
+ LOG4CXX_WARN(logger_, "Could not read certificate data: " << LastError());
+ return false;
+ }
- EVP_PKEY* pkey = NULL;
- if (1 == BIO_reset(bio_cert)) {
- PEM_read_bio_PrivateKey(bio_cert, &pkey, 0, 0);
- } else {
+ utils::ScopeGuard cert_guard = utils::MakeGuard(X509_free, cert);
+ UNUSED(cert_guard);
+
+ if (1 != BIO_reset(bio_cert)) {
LOG4CXX_WARN(logger_,
"Unabled to reset BIO in order to read private key, "
<< LastError());
}
- if (NULL == cert || NULL == pkey) {
- LOG4CXX_WARN(logger_, "Either certificate or key not valid.");
+ EVP_PKEY* pkey = NULL;
+ if (!PEM_read_bio_PrivateKey(bio_cert, &pkey, 0, 0)) {
+ LOG4CXX_WARN(logger_, "Could not read private key data: " << LastError());
return false;
}
- if (!SSL_CTX_use_certificate(context_, cert)) {
- LOG4CXX_WARN(logger_, "Could not use certificate: " << LastError());
- return false;
- }
+ utils::ScopeGuard key_guard = utils::MakeGuard(EVP_PKEY_free, pkey);
+ UNUSED(key_guard);
- asn1_time_to_tm(X509_get_notAfter(cert));
+ return SaveModuleCertificateToFile(cert) && SaveModuleKeyToFile(pkey);
+}
- if (!SSL_CTX_use_PrivateKey(context_, pkey)) {
- LOG4CXX_ERROR(logger_, "Could not use key: " << LastError());
- return false;
+bool CryptoManagerImpl::UpdateModuleCertificateData(X509* certificate,
+ EVP_PKEY* key) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (certificate) {
+ if (!SSL_CTX_use_certificate(context_, certificate)) {
+ LOG4CXX_WARN(logger_, "Could not use certificate: " << LastError());
+ return false;
+ }
}
- if (!SSL_CTX_check_private_key(context_)) {
- LOG4CXX_ERROR(logger_, "Could not use certificate: " << LastError());
- return false;
- }
+ if (key) {
+ if (!SSL_CTX_use_PrivateKey(context_, key)) {
+ LOG4CXX_ERROR(logger_, "Could not use key: " << LastError());
+ return false;
+ }
- X509_STORE* store = SSL_CTX_get_cert_store(context_);
- if (store) {
- X509* extra_cert = NULL;
- while ((extra_cert = PEM_read_bio_X509(bio_cert, NULL, 0, 0))) {
- if (extra_cert != cert) {
- LOG4CXX_DEBUG(logger_,
- "Added new certificate to store: " << extra_cert);
- X509_STORE_add_cert(store, extra_cert);
- }
+ if (!SSL_CTX_check_private_key(context_)) {
+ LOG4CXX_ERROR(logger_, "Private key is invalid: " << LastError());
+ return false;
}
}
- LOG4CXX_DEBUG(logger_, "Certificate and key successfully updated");
+ LOG4CXX_DEBUG(logger_, "Certificate and key are successfully updated");
return true;
}
-int CryptoManagerImpl::pull_number_from_buf(char* buf, int* idx) {
- if (!idx) {
- return 0;
+X509* CryptoManagerImpl::LoadModuleCertificateFromFile() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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());
+ return NULL;
+ }
+
+ utils::ScopeGuard bio_guard = utils::MakeGuard(BIO_free, bio_cert);
+ UNUSED(bio_guard);
+
+ 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());
+ return NULL;
}
- const int val = ((buf[*idx] - '0') * 10) + buf[(*idx) + 1] - '0';
- *idx = *idx + 2;
- return val;
+ LOG4CXX_DEBUG(logger_,
+ "Module certificate was loaded: " << module_certificate);
+
+ return module_certificate;
}
-void CryptoManagerImpl::asn1_time_to_tm(ASN1_TIME* time) {
- char* buf = (char*)time->data;
- int index = 0;
- const int year = pull_number_from_buf(buf, &index);
- if (V_ASN1_GENERALIZEDTIME == time->type) {
- expiration_time_.tm_year =
- (year * 100 - 1900) + pull_number_from_buf(buf, &index);
- } else {
- expiration_time_.tm_year = year < 50 ? year + 100 : year;
+EVP_PKEY* CryptoManagerImpl::LoadModulePrivateKeyFromFile() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ 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());
+ return NULL;
+ }
+
+ utils::ScopeGuard bio_guard = utils::MakeGuard(BIO_free, bio_key);
+ UNUSED(bio_guard);
+
+ 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());
+ return NULL;
}
+ LOG4CXX_DEBUG(logger_, "Module private key was loaded: " << module_key);
- const int mon = pull_number_from_buf(buf, &index);
- const int day = pull_number_from_buf(buf, &index);
- const int hour = pull_number_from_buf(buf, &index);
- const int mn = pull_number_from_buf(buf, &index);
+ return module_key;
+}
- expiration_time_.tm_mon = mon - 1;
- expiration_time_.tm_mday = day;
- expiration_time_.tm_hour = hour;
- expiration_time_.tm_min = mn;
+bool CryptoManagerImpl::SaveModuleCertificateToFile(X509* certificate) const {
+ LOG4CXX_AUTO_TRACE(logger_);
- if (buf[index] == 'Z') {
- expiration_time_.tm_sec = 0;
+ if (!certificate) {
+ LOG4CXX_WARN(logger_, "Empty certificate. Saving will be skipped");
+ return false;
}
- if ((buf[index] == '+') || (buf[index] == '-')) {
- const int mn = pull_number_from_buf(buf, &index);
- const int mn1 = pull_number_from_buf(buf, &index);
- expiration_time_.tm_sec = (mn * 3600) + (mn1 * 60);
- } else {
- const int sec = pull_number_from_buf(buf, &index);
- expiration_time_.tm_sec = sec;
+
+ 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());
+ return false;
+ }
+
+ utils::ScopeGuard bio_guard = utils::MakeGuard(BIO_free, bio_cert);
+ UNUSED(bio_guard);
+
+ if (!PEM_write_bio_X509(bio_cert, certificate)) {
+ LOG4CXX_ERROR(logger_,
+ "Failed to write certificate to file: " << LastError());
+ return false;
}
+
+ return true;
}
-void CryptoManagerImpl::InitCertExpTime() {
- strptime("1 Jan 1970 00:00:00", "%d %b %Y %H:%M:%S", &expiration_time_);
+bool CryptoManagerImpl::SaveModuleKeyToFile(EVP_PKEY* key) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!key) {
+ LOG4CXX_WARN(logger_, "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());
+ return false;
+ }
+
+ utils::ScopeGuard bio_guard = utils::MakeGuard(BIO_free, bio_key);
+ 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());
+ return false;
+ }
+
+ return true;
}
} // namespace security_manager
diff --git a/src/components/security_manager/src/security_manager_impl.cc b/src/components/security_manager/src/security_manager_impl.cc
index 1853b218b4..1faaddee1c 100644
--- a/src/components/security_manager/src/security_manager_impl.cc
+++ b/src/components/security_manager/src/security_manager_impl.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Ford Motor Company
+ * Copyright (c) 2018, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,11 +31,13 @@
*/
#include "security_manager/security_manager_impl.h"
+#include <functional>
#include "security_manager/crypto_manager_impl.h"
#include "protocol_handler/protocol_packet.h"
#include "utils/logger.h"
#include "utils/byte_order.h"
#include "json/json.h"
+#include "utils/helpers.h"
namespace security_manager {
@@ -44,11 +46,22 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "SecurityManager")
static const char* kErrId = "id";
static const char* kErrText = "text";
-SecurityManagerImpl::SecurityManagerImpl()
+SecurityManagerImpl::SecurityManagerImpl(
+ std::unique_ptr<utils::SystemTimeHandler>&& system_time_handler)
: security_messages_("SecurityManager", this)
, session_observer_(NULL)
, crypto_manager_(NULL)
- , protocol_handler_(NULL) {}
+ , protocol_handler_(NULL)
+ , system_time_handler_(std::move(system_time_handler))
+ , waiting_for_certificate_(false)
+ , waiting_for_time_(false) {
+ DCHECK(system_time_handler_);
+ system_time_handler_->SubscribeOnSystemTime(this);
+}
+
+SecurityManagerImpl::~SecurityManagerImpl() {
+ system_time_handler_->UnsubscribeFromSystemTime(this);
+}
void SecurityManagerImpl::OnMessageReceived(
const ::protocol_handler::RawMessagePtr message) {
@@ -136,19 +149,23 @@ void SecurityManagerImpl::Handle(const SecurityMessage message) {
}
security_manager::SSLContext* SecurityManagerImpl::CreateSSLContext(
- const uint32_t& connection_key) {
+ const uint32_t& connection_key, ContextCreationStrategy cc_strategy) {
LOG4CXX_INFO(logger_, "ProtectService processing");
DCHECK(session_observer_);
DCHECK(crypto_manager_);
- security_manager::SSLContext* ssl_context = session_observer_->GetSSLContext(
- connection_key, protocol_handler::kControl);
- // return exists SSLCOntext for current connection/session
- if (ssl_context) {
- return ssl_context;
+ if (kUseExisting == cc_strategy) {
+ security_manager::SSLContext* ssl_context =
+ session_observer_->GetSSLContext(connection_key,
+ protocol_handler::kControl);
+ // If SSLContext for current connection/session exists - return it
+ if (ssl_context) {
+ return ssl_context;
+ }
}
- ssl_context = crypto_manager_->CreateSSLContext();
+ security_manager::SSLContext* ssl_context =
+ crypto_manager_->CreateSSLContext();
if (!ssl_context) {
const std::string error_text("CryptoManager could not create SSL context.");
LOG4CXX_ERROR(logger_, error_text);
@@ -172,6 +189,40 @@ security_manager::SSLContext* SecurityManagerImpl::CreateSSLContext(
return ssl_context;
}
+void SecurityManagerImpl::PostponeHandshake(const uint32_t connection_key) {
+ LOG4CXX_TRACE(logger_, "Handshake postponed");
+ sync_primitives::AutoLock lock(connections_lock_);
+ if (waiting_for_certificate_) {
+ awaiting_certificate_connections_.insert(connection_key);
+ }
+ if (waiting_for_time_) {
+ awaiting_time_connections_.insert(connection_key);
+ }
+}
+
+void SecurityManagerImpl::ResumeHandshake(uint32_t connection_key) {
+ LOG4CXX_TRACE(logger_, "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);
+ return;
+ }
+
+ ssl_context->ResetConnection();
+ if (!waiting_for_certificate_ && !ssl_context->HasCertificate()) {
+ NotifyListenersOnHandshakeDone(connection_key,
+ SSLContext::Handshake_Result_Fail);
+ return;
+ }
+
+ ProceedHandshake(ssl_context, connection_key);
+}
+
void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
DCHECK(session_observer_);
LOG4CXX_INFO(logger_, "StartHandshake: connection_key " << connection_key);
@@ -187,6 +238,35 @@ void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
SSLContext::Handshake_Result_Fail);
return;
}
+ if (!ssl_context->HasCertificate()) {
+ LOG4CXX_ERROR(logger_, "Security certificate is absent");
+ sync_primitives::AutoLock lock(waiters_lock_);
+ waiting_for_certificate_ = true;
+ NotifyOnCertificateUpdateRequired();
+ }
+
+ {
+ sync_primitives::AutoLock lock(waiters_lock_);
+ waiting_for_time_ = true;
+ }
+
+ PostponeHandshake(connection_key);
+ system_time_handler_->QuerySystemTime();
+}
+
+bool SecurityManagerImpl::IsSystemTimeProviderReady() const {
+ return system_time_handler_->system_time_can_be_received();
+}
+
+void SecurityManagerImpl::ProceedHandshake(
+ security_manager::SSLContext* ssl_context, uint32_t connection_key) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!ssl_context) {
+ LOG4CXX_WARN(logger_,
+ "Unable to process handshake. No SSL context for key "
+ << connection_key);
+ return;
+ }
if (ssl_context->IsInitCompleted()) {
NotifyListenersOnHandshakeDone(connection_key,
@@ -194,8 +274,33 @@ void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
return;
}
- ssl_context->SetHandshakeContext(
- session_observer_->GetHandshakeContext(connection_key));
+ time_t cert_due_date;
+ if (!ssl_context->GetCertificateDueDate(cert_due_date)) {
+ LOG4CXX_ERROR(logger_, "Failed to get certificate due date!");
+ return;
+ }
+
+ if (crypto_manager_->IsCertificateUpdateRequired(
+ system_time_handler_->GetUTCTime(), cert_due_date)) {
+ LOG4CXX_DEBUG(logger_, "Host certificate update required");
+ if (helpers::in_range(awaiting_certificate_connections_, connection_key)) {
+ NotifyListenersOnHandshakeDone(connection_key,
+ SSLContext::Handshake_Result_CertExpired);
+ return;
+ }
+ {
+ sync_primitives::AutoLock lock(waiters_lock_);
+ waiting_for_certificate_ = true;
+ }
+ PostponeHandshake(connection_key);
+ NotifyOnCertificateUpdateRequired();
+ return;
+ }
+
+ SSLContext::HandshakeContext handshake_context =
+ session_observer_->GetHandshakeContext(connection_key);
+ handshake_context.system_time = system_time_handler_->GetUTCTime();
+ ssl_context->SetHandshakeContext(handshake_context);
size_t data_size = 0;
const uint8_t* data = NULL;
@@ -216,9 +321,21 @@ void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
}
}
-bool SecurityManagerImpl::IsCertificateUpdateRequired() {
+bool SecurityManagerImpl::IsCertificateUpdateRequired(
+ const uint32_t connection_key) {
LOG4CXX_AUTO_TRACE(logger_);
- return crypto_manager_->IsCertificateUpdateRequired();
+ 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);
+ time_t cert_due_date;
+ if (!ssl_context->GetCertificateDueDate(cert_due_date)) {
+ LOG4CXX_ERROR(logger_, "Failed to get certificate due date!");
+ return true;
+ }
+ return crypto_manager_->IsCertificateUpdateRequired(
+ system_time_handler_->GetUTCTime(), cert_due_date);
}
void SecurityManagerImpl::AddListener(SecurityManagerListener* const listener) {
@@ -227,7 +344,6 @@ void SecurityManagerImpl::AddListener(SecurityManagerListener* const listener) {
"Invalid (NULL) pointer to SecurityManagerListener.");
return;
}
- LOG4CXX_DEBUG(logger_, "Adding listener " << listener);
listeners_.push_back(listener);
}
@@ -241,6 +357,37 @@ void SecurityManagerImpl::RemoveListener(
listeners_.remove(listener);
}
+bool SecurityManagerImpl::OnCertificateUpdated(const std::string& data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ {
+ sync_primitives::AutoLock lock(waiters_lock_);
+ waiting_for_certificate_ = false;
+ }
+ crypto_manager_->OnCertificateUpdated(data);
+ std::for_each(
+ awaiting_certificate_connections_.begin(),
+ awaiting_certificate_connections_.end(),
+ std::bind1st(std::mem_fun(&SecurityManagerImpl::ResumeHandshake), this));
+
+ awaiting_certificate_connections_.clear();
+ return true;
+}
+
+void SecurityManagerImpl::OnSystemTimeArrived(const time_t utc_time) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ {
+ sync_primitives::AutoLock lock(waiters_lock_);
+ waiting_for_time_ = false;
+ }
+
+ std::for_each(
+ awaiting_time_connections_.begin(),
+ awaiting_time_connections_.end(),
+ std::bind1st(std::mem_fun(&SecurityManagerImpl::ResumeHandshake), this));
+
+ awaiting_time_connections_.clear();
+}
+
void SecurityManagerImpl::NotifyListenersOnHandshakeDone(
const uint32_t& connection_key, SSLContext::HandshakeResult error) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -269,6 +416,20 @@ void SecurityManagerImpl::NotifyOnCertificateUpdateRequired() {
}
}
+void SecurityManagerImpl::NotifyListenersOnHandshakeFailed() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ std::list<SecurityManagerListener*>::iterator it = listeners_.begin();
+ while (it != listeners_.end()) {
+ if ((*it)->OnHandshakeFailed()) {
+ LOG4CXX_DEBUG(logger_, "Destroying listener: " << *it);
+ delete (*it);
+ it = listeners_.erase(it);
+ } else {
+ ++it;
+ }
+ }
+}
+
bool SecurityManagerImpl::IsPolicyCertificateDataEmpty() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/security_manager/src/ssl_context_impl.cc b/src/components/security_manager/src/ssl_context_impl.cc
index 0b30198f4c..67be17db63 100644
--- a/src/components/security_manager/src/ssl_context_impl.cc
+++ b/src/components/security_manager/src/ssl_context_impl.cc
@@ -36,6 +36,7 @@
#include <map>
#include <algorithm>
#include <vector>
+#include <time.h>
#include <openssl/bio.h>
#include <openssl/ssl.h>
@@ -77,6 +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_);
is_handshake_pending_ = true;
return DoHandshakeStep(NULL, 0, out_data, out_data_size);
}
@@ -112,6 +114,12 @@ size_t des_cbc3_sha_max_block_size(size_t mtu) {
return 0;
return ((mtu - 29) & 0xfffffff8) - 5;
}
+time_t get_time_zone_offset(time_t in_time) {
+ tm gmt_cert_tm = *gmtime(&in_time);
+ tm local_cert_tm = *localtime(&in_time);
+
+ return mktime(&local_cert_tm) - mktime(&gmt_cert_tm);
+}
} // namespace
std::map<std::string, CryptoManagerImpl::SSLContextImpl::BlockSizeGetter>
@@ -174,6 +182,7 @@ const std::string CryptoManagerImpl::SSLContextImpl::RemoveDisallowedInfo(
void CryptoManagerImpl::SSLContextImpl::PrintCertData(
X509* cert, const std::string& cert_owner) {
+ LOG4CXX_AUTO_TRACE(logger_);
if (!cert) {
LOG4CXX_DEBUG(logger_, "Empty certificate data");
return;
@@ -206,6 +215,7 @@ void CryptoManagerImpl::SSLContextImpl::PrintCertData(
}
void CryptoManagerImpl::SSLContextImpl::PrintCertInfo() {
+ LOG4CXX_AUTO_TRACE(logger_);
PrintCertData(SSL_get_certificate(connection_), "HU's");
STACK_OF(X509)* peer_certs = SSL_get_peer_cert_chain(connection_);
@@ -217,26 +227,47 @@ void CryptoManagerImpl::SSLContextImpl::PrintCertInfo() {
SSLContext::HandshakeResult
CryptoManagerImpl::SSLContextImpl::CheckCertContext() {
+ LOG4CXX_AUTO_TRACE(logger_);
X509* cert = SSL_get_peer_certificate(connection_);
if (!cert) {
// According to the openssl documentation the peer certificate
// might be ommitted for the SERVER but required for the cient.
return CLIENT == mode_ ? Handshake_Result_Fail : Handshake_Result_Success;
}
+ ASN1_TIME* notBefore = X509_get_notBefore(cert);
+ ASN1_TIME* notAfter = X509_get_notAfter(cert);
- X509_NAME* subj_name = X509_get_subject_name(cert);
+ time_t start = convert_asn1_time_to_time_t(notBefore);
+ time_t end = convert_asn1_time_to_time_t(notAfter);
- const std::string& cn = GetTextBy(subj_name, NID_commonName);
- const std::string& sn = GetTextBy(subj_name, NID_serialNumber);
+ const double start_seconds = difftime(hsh_context_.system_time, start);
+ 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");
+ return Handshake_Result_NotYetValid;
+ } else {
+ LOG4CXX_DEBUG(logger_,
+ "Time since certificate validity " << start_seconds
+ << "seconds");
+ }
- if (!(hsh_context_.expected_cn.CompareIgnoreCase(cn.c_str()))) {
+ if (end_seconds < 0) {
LOG4CXX_ERROR(logger_,
- "Trying to run handshake with wrong app name: "
- << cn << ". Expected app name: "
- << hsh_context_.expected_cn.AsMBString());
- return Handshake_Result_AppNameMismatch;
+ "Certificate already expired. Time after expiration "
+ << end_seconds << " seconds");
+ return Handshake_Result_CertExpired;
+ } else {
+ LOG4CXX_DEBUG(logger_,
+ "Time until expiration " << end_seconds << "seconds");
}
+ X509_NAME* subj_name = X509_get_subject_name(cert);
+
+ 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: "
@@ -247,6 +278,60 @@ CryptoManagerImpl::SSLContextImpl::CheckCertContext() {
return Handshake_Result_Success;
}
+int CryptoManagerImpl::SSLContextImpl::get_number_from_char_buf(
+ char* buf, int* idx) const {
+ if (!idx) {
+ return 0;
+ }
+ const int val = ((buf[*idx] - '0') * 10) + buf[(*idx) + 1] - '0';
+ *idx = *idx + 2;
+ return val;
+}
+
+time_t CryptoManagerImpl::SSLContextImpl::convert_asn1_time_to_time_t(
+ ASN1_TIME* time_to_convert) const {
+ struct tm cert_time;
+ memset(&cert_time, 0, sizeof(struct tm));
+ // the minimum value for day of month is 1, otherwise exception will be thrown
+ cert_time.tm_mday = 1;
+ char* buf = reinterpret_cast<char*>(time_to_convert->data);
+ int index = 0;
+ const int year = get_number_from_char_buf(buf, &index);
+ if (V_ASN1_GENERALIZEDTIME == time_to_convert->type) {
+ cert_time.tm_year =
+ (year * 100 - 1900) + get_number_from_char_buf(buf, &index);
+ } else {
+ cert_time.tm_year = year < 50 ? year + 100 : year;
+ }
+
+ const int mon = get_number_from_char_buf(buf, &index);
+ const int day = get_number_from_char_buf(buf, &index);
+ const int hour = get_number_from_char_buf(buf, &index);
+ const int mn = get_number_from_char_buf(buf, &index);
+
+ cert_time.tm_mon = mon - 1;
+ cert_time.tm_mday = day;
+ cert_time.tm_hour = hour;
+ cert_time.tm_min = mn;
+
+ if (buf[index] == 'Z') {
+ cert_time.tm_sec = 0;
+ }
+ if ((buf[index] == '+') || (buf[index] == '-')) {
+ const int mn = get_number_from_char_buf(buf, &index);
+ const int mn1 = get_number_from_char_buf(buf, &index);
+ cert_time.tm_sec = (mn * 3600) + (mn1 * 60);
+ } else {
+ const int sec = get_number_from_char_buf(buf, &index);
+ cert_time.tm_sec = sec;
+ }
+
+ const time_t local_cert_time = mktime(&cert_time);
+ const time_t time_offset = get_time_zone_offset(local_cert_time);
+
+ return local_cert_time + time_offset;
+}
+
bool CryptoManagerImpl::SSLContextImpl::ReadHandshakeData(
const uint8_t** const out_data, size_t* out_data_size) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -288,7 +373,9 @@ bool CryptoManagerImpl::SSLContextImpl::WriteHandshakeData(
SSLContext::HandshakeResult
CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
+ LOG4CXX_AUTO_TRACE(logger_);
const int handshake_result = SSL_do_handshake(connection_);
+ LOG4CXX_TRACE(logger_, "Handshake result: " << handshake_result);
if (handshake_result == 1) {
const HandshakeResult result = CheckCertContext();
if (result != Handshake_Result_Success) {
@@ -307,6 +394,7 @@ CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
is_handshake_pending_ = false;
} else if (handshake_result == 0) {
+ LOG4CXX_DEBUG(logger_, "SSL handshake failed");
SSL_clear(connection_);
is_handshake_pending_ = false;
return Handshake_Result_Fail;
@@ -403,25 +491,32 @@ 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_);
sync_primitives::AutoLock locker(bio_locker);
if (!SSL_is_init_finished(connection_)) {
+ LOG4CXX_ERROR(logger_, "SSL initilization is not finished");
return false;
}
- if (!in_data || !in_data_size) {
+ if (!in_data || (0 == in_data_size)) {
+ LOG4CXX_ERROR(logger_, "IN data ptr or IN data size is 0");
return false;
}
+
BIO_write(bioIn_, in_data, in_data_size);
int len = BIO_ctrl_pending(bioFilter_);
+
ptrdiff_t offset = 0;
*out_data_size = 0;
- while (len) {
+ *out_data = NULL;
+ while (len > 0) {
EnsureBufferSizeEnough(len + offset);
len = BIO_read(bioFilter_, buffer_ + offset, len);
// 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);
BIO_ctrl(bioFilter_, BIO_CTRL_RESET, 0, NULL);
return false;
}
@@ -447,6 +542,25 @@ bool CryptoManagerImpl::SSLContextImpl::IsHandshakePending() const {
return is_handshake_pending_;
}
+bool CryptoManagerImpl::SSLContextImpl::GetCertificateDueDate(
+ time_t& due_date) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ X509* cert = SSL_get_certificate(connection_);
+ if (!cert) {
+ LOG4CXX_DEBUG(logger_, "Get certificate failed.");
+ return false;
+ }
+
+ due_date = convert_asn1_time_to_time_t(X509_get_notAfter(cert));
+
+ return true;
+}
+
+bool CryptoManagerImpl::SSLContextImpl::HasCertificate() const {
+ return SSL_get_certificate(connection_) != NULL;
+}
+
CryptoManagerImpl::SSLContextImpl::~SSLContextImpl() {
SSL_shutdown(connection_);
SSL_free(connection_);
diff --git a/src/components/security_manager/test/crypto_manager_impl_test.cc b/src/components/security_manager/test/crypto_manager_impl_test.cc
index b30684e5f6..74b071793d 100644
--- a/src/components/security_manager/test/crypto_manager_impl_test.cc
+++ b/src/components/security_manager/test/crypto_manager_impl_test.cc
@@ -52,6 +52,10 @@ namespace {
const size_t kUpdatesBeforeHour = 24;
const std::string kAllCiphers = "ALL";
const std::string kCaCertPath = "";
+const uint32_t kServiceNumber = 2u;
+const size_t kMaxSizeVector = 1u;
+const std::string kCertPath = "certificate.crt";
+const std::string kPrivateKeyPath = "private.key";
#ifdef __QNXNTO__
const std::string kFordCipher = SSL3_TXT_RSA_DES_192_CBC3_SHA;
@@ -89,6 +93,8 @@ class CryptoManagerTest : public testing::Test {
utils::MakeShared<MockCryptoManagerSettings>();
crypto_manager_ =
utils::MakeShared<CryptoManagerImpl>(mock_security_manager_settings_);
+ forced_protected_services_.reserve(kMaxSizeVector);
+ forced_unprotected_services_.reserve(kMaxSizeVector);
}
void InitSecurityManager() {
@@ -101,6 +107,10 @@ class CryptoManagerTest : public testing::Test {
void SetInitialValues(security_manager::Mode mode,
security_manager::Protocol protocol,
const std::string& cipher) {
+ ON_CALL(*mock_security_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_services_));
+ ON_CALL(*mock_security_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_services_));
ON_CALL(*mock_security_manager_settings_, security_manager_mode())
.WillByDefault(Return(mode));
ON_CALL(*mock_security_manager_settings_, security_manager_protocol_name())
@@ -111,6 +121,10 @@ class CryptoManagerTest : public testing::Test {
.WillByDefault(ReturnRef(cipher));
ON_CALL(*mock_security_manager_settings_, ca_cert_path())
.WillByDefault(ReturnRef(kCaCertPath));
+ ON_CALL(*mock_security_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(kCertPath));
+ ON_CALL(*mock_security_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(kPrivateKeyPath));
ON_CALL(*mock_security_manager_settings_, verify_peer())
.WillByDefault(Return(false));
}
@@ -118,7 +132,10 @@ class CryptoManagerTest : public testing::Test {
utils::SharedPtr<CryptoManagerImpl> crypto_manager_;
utils::SharedPtr<MockCryptoManagerSettings> mock_security_manager_settings_;
static std::string certificate_data_base64_;
+ std::vector<int> forced_protected_services_;
+ std::vector<int> forced_unprotected_services_;
};
+
std::string CryptoManagerTest::certificate_data_base64_;
TEST_F(CryptoManagerTest, UsingBeforeInit) {
@@ -133,16 +150,15 @@ TEST_F(CryptoManagerTest, WrongInit) {
// Unknown protocol version
security_manager::Protocol UNKNOWN =
static_cast<security_manager::Protocol>(-1);
+ // Unexistent cipher value
+ const std::string invalid_cipher = "INVALID_UNKNOWN_CIPHER";
+ const security_manager::Mode mode = security_manager::SERVER;
- EXPECT_CALL(*mock_security_manager_settings_, security_manager_mode())
- .WillRepeatedly(Return(security_manager::SERVER));
- EXPECT_CALL(*mock_security_manager_settings_,
- security_manager_protocol_name()).WillOnce(Return(UNKNOWN));
- EXPECT_FALSE(crypto_manager_->Init());
+ SetInitialValues(mode, UNKNOWN, invalid_cipher);
+ EXPECT_FALSE(crypto_manager_->Init());
EXPECT_NE(std::string(), crypto_manager_->LastError());
- // Unexistent cipher value
- const std::string invalid_cipher = "INVALID_UNKNOWN_CIPHER";
+
EXPECT_CALL(*mock_security_manager_settings_,
security_manager_protocol_name())
.WillOnce(Return(security_manager::TLSv1_2));
@@ -151,7 +167,6 @@ TEST_F(CryptoManagerTest, WrongInit) {
EXPECT_CALL(*mock_security_manager_settings_, ciphers_list())
.WillRepeatedly(ReturnRef(invalid_cipher));
EXPECT_FALSE(crypto_manager_->Init());
-
EXPECT_NE(std::string(), crypto_manager_->LastError());
}
@@ -176,10 +191,18 @@ TEST_F(CryptoManagerTest, CorrectInit) {
security_manager::CLIENT, security_manager::TLSv1_1, kFordCipher);
EXPECT_TRUE(crypto_manager_->Init());
+ SetInitialValues(
+ security_manager::CLIENT, security_manager::DTLSv1, kFordCipher);
+ EXPECT_TRUE(crypto_manager_->Init());
+
// Cipher value
SetInitialValues(
security_manager::SERVER, security_manager::TLSv1_2, kAllCiphers);
EXPECT_TRUE(crypto_manager_->Init());
+
+ SetInitialValues(
+ security_manager::SERVER, security_manager::DTLSv1, kAllCiphers);
+ EXPECT_TRUE(crypto_manager_->Init());
}
// #endif // __QNX__
@@ -198,7 +221,6 @@ TEST_F(CryptoManagerTest, CreateReleaseSSLContext) {
EXPECT_CALL(*mock_security_manager_settings_, maximum_payload_size())
.Times(1)
.WillRepeatedly(Return(max_payload_size));
-
security_manager::SSLContext* context = crypto_manager_->CreateSSLContext();
EXPECT_TRUE(context);
EXPECT_NO_THROW(crypto_manager_->ReleaseSSLContext(context));
@@ -210,7 +232,10 @@ TEST_F(CryptoManagerTest, OnCertificateUpdated) {
}
TEST_F(CryptoManagerTest, OnCertificateUpdated_UpdateNotRequired) {
+ time_t system_time = 0;
+ time_t certificates_time = 1;
size_t updates_before = 0;
+
SetInitialValues(
security_manager::CLIENT, security_manager::TLSv1_2, kAllCiphers);
ASSERT_TRUE(crypto_manager_->Init());
@@ -218,7 +243,8 @@ TEST_F(CryptoManagerTest, OnCertificateUpdated_UpdateNotRequired) {
EXPECT_CALL(*mock_security_manager_settings_, update_before_hours())
.WillOnce(Return(updates_before));
- EXPECT_FALSE(crypto_manager_->IsCertificateUpdateRequired());
+ EXPECT_FALSE(crypto_manager_->IsCertificateUpdateRequired(system_time,
+ certificates_time));
size_t max_updates_ = std::numeric_limits<size_t>::max();
SetInitialValues(
@@ -227,7 +253,8 @@ TEST_F(CryptoManagerTest, OnCertificateUpdated_UpdateNotRequired) {
.WillOnce(Return(max_updates_));
ASSERT_TRUE(crypto_manager_->Init());
- EXPECT_TRUE(crypto_manager_->IsCertificateUpdateRequired());
+ EXPECT_TRUE(crypto_manager_->IsCertificateUpdateRequired(system_time,
+ certificates_time));
}
TEST_F(CryptoManagerTest, OnCertificateUpdated_NotInitialized) {
diff --git a/src/components/security_manager/test/security_manager_test.cc b/src/components/security_manager/test/security_manager_test.cc
index b334e78e19..3523bb7f44 100644
--- a/src/components/security_manager/test/security_manager_test.cc
+++ b/src/components/security_manager/test/security_manager_test.cc
@@ -44,6 +44,7 @@
#include "security_manager/mock_ssl_context.h"
#include "security_manager/mock_crypto_manager.h"
#include "security_manager/mock_security_manager_listener.h"
+#include "utils/mock_system_time_handler.h"
#include "utils/make_shared.h"
#include "utils/test_async_waiter.h"
@@ -76,11 +77,11 @@ using ::testing::_;
namespace {
// Sample data for handshake data emulation
-const int32_t key = 0x1;
-const int32_t seq_number = 0x2;
-const ServiceType secureServiceType = kControl;
-const uint32_t protocolVersion = PROTOCOL_VERSION_2;
-const bool is_final = false;
+const int32_t kKey = 0x1;
+const int32_t kSeqNumber = 0x2;
+const ServiceType kSecureServiceType = kControl;
+const uint32_t kProtocolVersion = PROTOCOL_VERSION_2;
+const bool kIsFinal = false;
const uint8_t handshake_data[] = {0x1, 0x2, 0x3, 0x4, 0x5};
const size_t handshake_data_size =
@@ -95,8 +96,12 @@ const uint32_t kAsyncExpectationsTimeout = 10000u;
class SecurityManagerTest : public ::testing::Test {
protected:
+ SecurityManagerTest()
+ : mock_system_time_handler(
+ std::unique_ptr<MockSystemTimeHandler>(new MockSystemTimeHandler()))
+ , security_manager_(
+ new SecurityManagerImpl(std::move(mock_system_time_handler))) {}
void SetUp() OVERRIDE {
- security_manager_.reset(new SecurityManagerImpl());
security_manager_->set_session_observer(&mock_session_observer);
security_manager_->set_protocol_handler(&mock_protocol_handler);
mock_sm_listener.reset(new testing::StrictMock<
@@ -105,7 +110,7 @@ class SecurityManagerTest : public ::testing::Test {
}
void SetMockCryptoManager() {
- EXPECT_CALL(mock_crypto_manager, IsCertificateUpdateRequired())
+ EXPECT_CALL(mock_crypto_manager, IsCertificateUpdateRequired(_, _))
.WillRepeatedly(Return(false));
security_manager_->set_crypto_manager(&mock_crypto_manager);
}
@@ -116,7 +121,7 @@ class SecurityManagerTest : public ::testing::Test {
uint32_t dataSize,
const ServiceType serviceType) {
const RawMessagePtr rawMessagePtr(utils::MakeShared<RawMessage>(
- key, protocolVersion, data, dataSize, serviceType));
+ kKey, kProtocolVersion, data, dataSize, serviceType));
security_manager_->OnMessageReceived(rawMessagePtr);
}
/*
@@ -147,13 +152,14 @@ class SecurityManagerTest : public ::testing::Test {
const int repeat_count = 1) {
const SecurityQuery::QueryHeader header(SecurityQuery::NOTIFICATION,
SecurityQuery::SEND_HANDSHAKE_DATA,
- seq_number);
+ kSeqNumber);
for (int c = 0; c < repeat_count; ++c) {
EmulateMobileMessage(header, data, data_size);
}
}
- ::utils::SharedPtr<SecurityManagerImpl> security_manager_;
+
// Strict mocks (same as all methods EXPECT_CALL().Times(0))
+
testing::StrictMock<protocol_handler_test::MockSessionObserver>
mock_session_observer;
testing::StrictMock<protocol_handler_test::MockProtocolHandler>
@@ -166,6 +172,8 @@ class SecurityManagerTest : public ::testing::Test {
mock_ssl_context_exists;
std::unique_ptr<testing::StrictMock<
security_manager_test::MockSecurityManagerListener> > mock_sm_listener;
+ std::unique_ptr<MockSystemTimeHandler> mock_system_time_handler;
+ std::shared_ptr<SecurityManagerImpl> security_manager_;
};
// Test Bodies
@@ -174,7 +182,6 @@ class SecurityManagerTest : public ::testing::Test {
* and shall not call any methodes
*/
TEST_F(SecurityManagerTest, SetNULL_Intefaces) {
- security_manager_.reset(new SecurityManagerImpl());
security_manager_->set_session_observer(NULL);
security_manager_->set_protocol_handler(NULL);
security_manager_->set_crypto_manager(NULL);
@@ -209,9 +216,9 @@ TEST_F(SecurityManagerTest, Listeners_NoListeners) {
security_manager_->RemoveListener(&mock_listener2);
security_manager_->NotifyListenersOnHandshakeDone(
- key, SSLContext::Handshake_Result_Success);
+ kKey, SSLContext::Handshake_Result_Success);
security_manager_->NotifyListenersOnHandshakeDone(
- key, SSLContext::Handshake_Result_Fail);
+ kKey, SSLContext::Handshake_Result_Fail);
}
/*
* Notifying two listeners
@@ -228,11 +235,11 @@ TEST_F(SecurityManagerTest, Listeners_Notifying) {
const SSLContext::HandshakeResult first_call_value =
SSLContext::Handshake_Result_Success;
// Expect call both listeners on 1st call
- EXPECT_CALL(*mock_listener1, OnHandshakeDone(key, first_call_value))
+ EXPECT_CALL(*mock_listener1, OnHandshakeDone(kKey, first_call_value))
.
// Emulate false (reject) result
WillOnce(Return(false));
- EXPECT_CALL(*mock_listener2, OnHandshakeDone(key, first_call_value))
+ EXPECT_CALL(*mock_listener2, OnHandshakeDone(kKey, first_call_value))
.
// Emulate true (accept) result
WillOnce(Return(true));
@@ -244,7 +251,7 @@ TEST_F(SecurityManagerTest, Listeners_Notifying) {
const SSLContext::HandshakeResult second_call_value =
SSLContext::Handshake_Result_Fail;
// Expect call last listener on 2d call
- EXPECT_CALL(*mock_listener1, OnHandshakeDone(key, second_call_value))
+ EXPECT_CALL(*mock_listener1, OnHandshakeDone(kKey, second_call_value))
.
// Emulate false (reject) result
WillOnce(Return(true));
@@ -254,14 +261,14 @@ TEST_F(SecurityManagerTest, Listeners_Notifying) {
security_manager_->AddListener(mock_listener1);
security_manager_->AddListener(mock_listener2);
// 1st call
- security_manager_->NotifyListenersOnHandshakeDone(key, first_call_value);
+ security_manager_->NotifyListenersOnHandshakeDone(kKey, first_call_value);
security_manager_->NotifyOnCertificateUpdateRequired();
// 2nd call
- security_manager_->NotifyListenersOnHandshakeDone(key, second_call_value);
+ security_manager_->NotifyListenersOnHandshakeDone(kKey, second_call_value);
security_manager_->NotifyOnCertificateUpdateRequired();
// 3nd call
security_manager_->NotifyListenersOnHandshakeDone(
- key, SSLContext::Handshake_Result_Fail);
+ kKey, SSLContext::Handshake_Result_Fail);
security_manager_->NotifyOnCertificateUpdateRequired();
}
@@ -275,7 +282,7 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
uint8_t session_id = 0;
TestAsyncWaiter waiter;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
@@ -283,7 +290,7 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
EXPECT_CALL(mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_NOT_SUPPORTED),
- is_final)).WillOnce(NotifyTestAsyncWaiter(&waiter));
+ kIsFinal)).WillOnce(NotifyTestAsyncWaiter(&waiter));
const SecurityQuery::QueryHeader header(SecurityQuery::REQUEST,
// It could be any query id
SecurityQuery::INVALID_QUERY_ID);
@@ -298,7 +305,7 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
TEST_F(SecurityManagerTest, OnMobileMessageSent) {
const uint8_t* data_param = NULL;
const RawMessagePtr rawMessagePtr(
- utils::MakeShared<RawMessage>(key, protocolVersion, data_param, 0));
+ utils::MakeShared<RawMessage>(kKey, kProtocolVersion, data_param, 0));
security_manager_->OnMobileMessageSent(rawMessagePtr);
}
/*
@@ -319,7 +326,7 @@ TEST_F(SecurityManagerTest, GetEmptyQuery) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
// uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
@@ -328,9 +335,9 @@ TEST_F(SecurityManagerTest, GetEmptyQuery) {
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_INVALID_QUERY_SIZE),
- is_final));
+ kIsFinal));
// Call with NULL data
- call_OnMessageReceived(NULL, 0, secureServiceType);
+ call_OnMessageReceived(NULL, 0, kSecureServiceType);
}
/*
* Shall send InternallError on null data recieved
@@ -340,7 +347,7 @@ TEST_F(SecurityManagerTest, GetWrongJSONSize) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
// uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
@@ -349,7 +356,7 @@ TEST_F(SecurityManagerTest, GetWrongJSONSize) {
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_INVALID_QUERY_SIZE),
- is_final));
+ kIsFinal));
SecurityQuery::QueryHeader header(SecurityQuery::REQUEST,
SecurityQuery::INVALID_QUERY_ID);
header.json_size = 0x0FFFFFFF;
@@ -365,7 +372,7 @@ TEST_F(SecurityManagerTest, GetInvalidQueryId) {
TestAsyncWaiter waiter;
uint32_t times = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _))
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
.WillOnce(NotifyTestAsyncWaiter(&waiter));
times++;
EXPECT_CALL(mock_session_observer,
@@ -378,7 +385,7 @@ TEST_F(SecurityManagerTest, GetInvalidQueryId) {
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_INVALID_QUERY_ID),
- is_final)).WillOnce(NotifyTestAsyncWaiter(&waiter));
+ kIsFinal)).WillOnce(NotifyTestAsyncWaiter(&waiter));
times++;
const SecurityQuery::QueryHeader header(SecurityQuery::REQUEST,
SecurityQuery::INVALID_QUERY_ID);
@@ -395,10 +402,12 @@ TEST_F(SecurityManagerTest, CreateSSLContext_ServiceAlreadyProtected) {
SetMockCryptoManager();
// Return mock SSLContext
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.WillOnce(Return(&mock_ssl_context_new));
- const SSLContext* result = security_manager_->CreateSSLContext(key);
+ const SSLContext* result = security_manager_->CreateSSLContext(
+ kKey,
+ security_manager::SecurityManager::ContextCreationStrategy::kUseExisting);
EXPECT_EQ(&mock_ssl_context_new, result);
}
/*
@@ -410,21 +419,23 @@ TEST_F(SecurityManagerTest, CreateSSLContext_ErrorCreateSSL) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
// uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
EXPECT_CALL(
mock_protocol_handler,
SendMessageToMobileApp(
- InternalErrorWithErrId(SecurityManager::ERROR_INTERNAL), is_final));
+ InternalErrorWithErrId(SecurityManager::ERROR_INTERNAL), kIsFinal));
// Emulate SessionObserver and CryptoManager result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.WillOnce(ReturnNull());
EXPECT_CALL(mock_crypto_manager, CreateSSLContext()).WillOnce(ReturnNull());
- const SSLContext* result = security_manager_->CreateSSLContext(key);
+ const SSLContext* result = security_manager_->CreateSSLContext(
+ kKey,
+ security_manager::SecurityManager::ContextCreationStrategy::kUseExisting);
EXPECT_EQ(NULL, result);
}
/*
@@ -437,7 +448,7 @@ TEST_F(SecurityManagerTest, CreateSSLContext_SetSSLContextError) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
// uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
@@ -446,18 +457,20 @@ TEST_F(SecurityManagerTest, CreateSSLContext_SetSSLContextError) {
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_UNKNOWN_INTERNAL_ERROR),
- is_final));
+ kIsFinal));
// Emulate SessionObserver and CryptoManager result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.WillOnce(ReturnNull());
EXPECT_CALL(mock_crypto_manager, CreateSSLContext())
.WillOnce(Return(&mock_ssl_context_new));
EXPECT_CALL(mock_crypto_manager, ReleaseSSLContext(&mock_ssl_context_new));
- EXPECT_CALL(mock_session_observer, SetSSLContext(key, &mock_ssl_context_new))
+ EXPECT_CALL(mock_session_observer, SetSSLContext(kKey, &mock_ssl_context_new))
.WillOnce(Return(SecurityManager::ERROR_UNKNOWN_INTERNAL_ERROR));
- const SSLContext* result = security_manager_->CreateSSLContext(key);
+ const SSLContext* result = security_manager_->CreateSSLContext(
+ kKey,
+ security_manager::SecurityManager::ContextCreationStrategy::kUseExisting);
EXPECT_EQ(NULL, result);
}
/*
@@ -469,17 +482,17 @@ TEST_F(SecurityManagerTest, CreateSSLContext_Success) {
// Expect no notifying listeners - it will be done after handshake
// Emulate SessionObserver and CryptoManager result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
- .WillOnce(ReturnNull())
- .
- // additional check for debug code
- WillOnce(Return(&mock_ssl_context_exists));
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
+ .WillOnce(Return(&mock_ssl_context_exists));
EXPECT_CALL(mock_crypto_manager, CreateSSLContext())
.WillOnce(Return(&mock_ssl_context_new));
- EXPECT_CALL(mock_session_observer, SetSSLContext(key, &mock_ssl_context_new))
+ EXPECT_CALL(mock_session_observer, SetSSLContext(kKey, &mock_ssl_context_new))
.WillOnce(Return(SecurityManager::ERROR_SUCCESS));
- const SSLContext* result = security_manager_->CreateSSLContext(key);
+ const SSLContext* result = security_manager_->CreateSSLContext(
+ kKey,
+ security_manager::SecurityManager::ContextCreationStrategy::
+ kForceRecreation);
EXPECT_EQ(&mock_ssl_context_new, result);
}
/*
@@ -490,7 +503,7 @@ TEST_F(SecurityManagerTest, StartHandshake_ServiceStillUnprotected) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
// uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
@@ -498,17 +511,17 @@ TEST_F(SecurityManagerTest, StartHandshake_ServiceStillUnprotected) {
EXPECT_CALL(
mock_protocol_handler,
SendMessageToMobileApp(
- InternalErrorWithErrId(SecurityManager::ERROR_INTERNAL), is_final));
+ InternalErrorWithErrId(SecurityManager::ERROR_INTERNAL), kIsFinal));
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Fail))
+ OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
.WillOnce(Return(true));
// Emulate SessionObserver result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.WillOnce(ReturnNull());
- security_manager_->StartHandshake(key);
+ security_manager_->StartHandshake(kKey);
// Listener was destroyed after OnHandshakeDone call
mock_sm_listener.release();
@@ -521,109 +534,27 @@ TEST_F(SecurityManagerTest, StartHandshake_SSLInternalError) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- // uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
- EXPECT_CALL(mock_session_observer, GetHandshakeContext(key))
- .WillOnce(Return(SSLContext::HandshakeContext()));
+
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
-
+ // Expect notifying listeners (unsuccess)
+ EXPECT_CALL(*mock_sm_listener,
+ OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
+ .WillOnce(ReturnNull());
// Expect InternalError with ERROR_ID
EXPECT_CALL(
mock_protocol_handler,
SendMessageToMobileApp(
- InternalErrorWithErrId(SecurityManager::ERROR_INTERNAL), is_final));
- // Expect notifying listeners (unsuccess)
- EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Fail))
- .WillOnce(Return(true));
+ InternalErrorWithErrId(SecurityManager::ERROR_INTERNAL), kIsFinal));
- // Emulate SessionObserver result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
- .WillOnce(Return(&mock_ssl_context_exists));
- EXPECT_CALL(mock_ssl_context_exists, IsInitCompleted())
- .WillOnce(Return(false));
- EXPECT_CALL(mock_ssl_context_exists, SetHandshakeContext(_));
- EXPECT_CALL(mock_ssl_context_exists, StartHandshake(_, _))
- .WillOnce(DoAll(SetArgPointee<0>(handshake_data_out_pointer),
- SetArgPointee<1>(handshake_data_out_size),
- Return(SSLContext::Handshake_Result_Fail)));
-
- security_manager_->StartHandshake(key);
-
- // Listener was destroyed after OnHandshakeDone call
+ security_manager_->StartHandshake(kKey);
mock_sm_listener.release();
}
-/*
- * Shall send data on call StartHandshake
- */
-TEST_F(SecurityManagerTest, StartHandshake_SSLInitIsNotComplete) {
- SetMockCryptoManager();
- uint32_t connection_id = 0;
- uint8_t session_id = 0;
- // uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
- EXPECT_CALL(mock_session_observer, GetHandshakeContext(key))
- .Times(3)
- .WillRepeatedly(Return(SSLContext::HandshakeContext()));
- EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
- .WillOnce(Return(true));
-
- // Expect send one message (with correct pointer and size data)
- EXPECT_CALL(mock_protocol_handler, SendMessageToMobileApp(_, is_final));
-
- // Return mock SSLContext
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
- .Times(3)
- .WillRepeatedly(Return(&mock_ssl_context_exists));
- // Expect initialization check on each call StartHandshake
- EXPECT_CALL(mock_ssl_context_exists, IsInitCompleted())
- .Times(3)
- .WillRepeatedly(Return(false));
- EXPECT_CALL(mock_ssl_context_exists, SetHandshakeContext(_)).Times(3);
-
- // Emulate SSLContext::StartHandshake with different parameters
- // Only on both correct - data and size shall be send message to mobile app
- EXPECT_CALL(mock_ssl_context_exists, StartHandshake(_, _))
- .WillOnce(DoAll(SetArgPointee<0>(handshake_data_out_pointer),
- SetArgPointee<1>(0),
- Return(SSLContext::Handshake_Result_Success)))
- .WillOnce(DoAll(SetArgPointee<0>((uint8_t*)NULL),
- SetArgPointee<1>(handshake_data_out_size),
- Return(SSLContext::Handshake_Result_Success)))
- .WillOnce(DoAll(SetArgPointee<0>(handshake_data_out_pointer),
- SetArgPointee<1>(handshake_data_out_size),
- Return(SSLContext::Handshake_Result_Success)));
- security_manager_->StartHandshake(key);
- security_manager_->StartHandshake(key);
- security_manager_->StartHandshake(key);
-}
-/*
- * Shall notify listeners on call StartHandshake after SSLContext initialization
- * complete
- */
-TEST_F(SecurityManagerTest, StartHandshake_SSLInitIsComplete) {
- SetMockCryptoManager();
- // Expect no message send
- // Expect notifying listeners (success)
- EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Success))
- .WillOnce(Return(true));
-
- // Emulate SessionObserver result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
- .WillOnce(Return(&mock_ssl_context_exists));
- EXPECT_CALL(mock_ssl_context_exists, IsInitCompleted())
- .WillOnce(Return(true));
-
- security_manager_->StartHandshake(key);
-
- // Listener was destroyed after OnHandshakeDone call
- mock_sm_listener.release();
-}
/*
* Shall send InternallError on
* getting SEND_HANDSHAKE_DATA with NULL data
@@ -634,7 +565,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_WrongDataSize) {
uint8_t session_id = 0;
TestAsyncWaiter waiter;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _));
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.WillOnce(Return(true));
@@ -644,7 +575,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_WrongDataSize) {
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_INVALID_QUERY_SIZE),
- is_final)).WillOnce(NotifyTestAsyncWaiter(&waiter));
+ kIsFinal)).WillOnce(NotifyTestAsyncWaiter(&waiter));
EmulateMobileMessageHandshake(NULL, 0);
@@ -664,7 +595,7 @@ TEST_F(SecurityManagerTest,
TestAsyncWaiter waiter;
uint32_t times = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _))
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
.WillOnce(NotifyTestAsyncWaiter(&waiter));
times++;
EXPECT_CALL(mock_session_observer,
@@ -675,17 +606,17 @@ TEST_F(SecurityManagerTest,
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_SERVICE_NOT_PROTECTED),
- is_final)).WillOnce(NotifyTestAsyncWaiter(&waiter));
+ kIsFinal)).WillOnce(NotifyTestAsyncWaiter(&waiter));
times++;
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Fail))
+ OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times++;
// Emulate SessionObserver result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
times++;
@@ -713,7 +644,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_InvalidData) {
TestAsyncWaiter waiter;
uint32_t times = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _))
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
.Times(handshake_emulates)
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += handshake_emulates;
@@ -728,18 +659,18 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_InvalidData) {
mock_protocol_handler,
SendMessageToMobileApp(
InternalErrorWithErrId(SecurityManager::ERROR_SSL_INVALID_DATA),
- is_final))
+ kIsFinal))
.Times(handshake_emulates)
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += handshake_emulates;
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Fail))
+ OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times++;
// Emulate SessionObserver and CryptoManager result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.Times(handshake_emulates)
.WillRepeatedly(Return(&mock_ssl_context_exists));
@@ -794,7 +725,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_Answer) {
TestAsyncWaiter waiter;
uint32_t times = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _))
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
.Times(handshake_emulates)
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += handshake_emulates;
@@ -808,14 +739,14 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_Answer) {
const size_t raw_message_size = 15;
EXPECT_CALL(
mock_protocol_handler,
- SendMessageToMobileApp(RawMessageEqSize(raw_message_size), is_final))
+ SendMessageToMobileApp(RawMessageEqSize(raw_message_size), kIsFinal))
.Times(handshake_emulates)
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += handshake_emulates;
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Fail))
+ OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times++;
@@ -824,7 +755,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_Answer) {
.Times(handshake_emulates)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(false)));
times += handshake_emulates;
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.Times(handshake_emulates)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter),
Return(&mock_ssl_context_exists)));
@@ -870,12 +801,12 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_HandshakeFinished) {
// Expect no errors
// Expect notifying listeners (success)
EXPECT_CALL(*mock_sm_listener,
- OnHandshakeDone(key, SSLContext::Handshake_Result_Success))
+ OnHandshakeDone(kKey, SSLContext::Handshake_Result_Success))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times++;
// Emulate SessionObserver and CryptoManager result
- EXPECT_CALL(mock_session_observer, GetSSLContext(key, kControl))
+ EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.Times(handshake_emulates)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter),
Return(&mock_ssl_context_exists)));
@@ -928,14 +859,14 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_HandshakeFinished) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
// uint8_t protocol_version = 0;
- EXPECT_CALL(mock_session_observer, PairFromKey(key, _, _)).Times(2);
+ EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _)).Times(2);
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, _))
.Times(2)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times += 2; // matches to the number above
- EXPECT_CALL(mock_protocol_handler, SendMessageToMobileApp(_, is_final))
+ EXPECT_CALL(mock_protocol_handler, SendMessageToMobileApp(_, kIsFinal))
.Times(2)
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += 2; // matches to the number above
diff --git a/src/components/security_manager/test/ssl_certificate_handshake_test.cc b/src/components/security_manager/test/ssl_certificate_handshake_test.cc
index dc335c8da2..83ffa33b44 100644
--- a/src/components/security_manager/test/ssl_certificate_handshake_test.cc
+++ b/src/components/security_manager/test/ssl_certificate_handshake_test.cc
@@ -56,6 +56,10 @@ namespace custom_str = utils::custom_string;
namespace {
const std::string server_ca_cert_filename = "server";
const std::string client_ca_cert_filename = "client";
+const std::string client_cert_filename = "client.crt";
+const std::string server_cert_filename = "server.crt";
+const std::string client_key_filename = "client_private.key";
+const std::string server_key_filename = "server_private.key";
const std::string client_certificate = "client/client_credential.pem";
const std::string server_certificate = "server/spt_credential.pem";
const std::string server_unsigned_cert_file =
@@ -66,36 +70,42 @@ const std::string server_expired_cert_file =
const bool verify_peer = true;
const bool skip_peer_verification = false;
-const size_t updates_before_hour = 24;
-
} // namespace
+struct Protocol {
+ security_manager::Protocol server_protocol;
+ security_manager::Protocol client_protocol;
+
+ Protocol(security_manager::Protocol s_protocol,
+ security_manager::Protocol c_protocol)
+ : server_protocol(s_protocol), client_protocol(c_protocol) {}
+};
-class SSLHandshakeTest : public testing::Test {
+class SSLHandshakeTest : public testing::TestWithParam<Protocol> {
protected:
void SetUp() OVERRIDE {
- mock_server_manager_settings = new testing::NiceMock<
+ mock_server_manager_settings_ = new testing::NiceMock<
security_manager_test::MockCryptoManagerSettings>();
- server_manager = new security_manager::CryptoManagerImpl(
+ server_manager_ = new security_manager::CryptoManagerImpl(
utils::SharedPtr<security_manager::CryptoManagerSettings>(
- mock_server_manager_settings));
- ASSERT_TRUE(server_manager);
- mock_client_manager_settings = new testing::NiceMock<
+ mock_server_manager_settings_));
+ ASSERT_TRUE(server_manager_);
+ mock_client_manager_settings_ = new testing::NiceMock<
security_manager_test::MockCryptoManagerSettings>();
- client_manager = new security_manager::CryptoManagerImpl(
+ client_manager_ = new security_manager::CryptoManagerImpl(
utils::SharedPtr<security_manager::CryptoManagerSettings>(
- mock_client_manager_settings));
- ASSERT_TRUE(client_manager);
- server_ctx = NULL;
- client_ctx = NULL;
+ mock_client_manager_settings_));
+ ASSERT_TRUE(client_manager_);
+ server_ctx_ = NULL;
+ client_ctx_ = NULL;
}
void TearDown() OVERRIDE {
- server_manager->ReleaseSSLContext(server_ctx);
- delete server_manager;
- client_manager->ReleaseSSLContext(client_ctx);
- delete client_manager;
+ server_manager_->ReleaseSSLContext(server_ctx_);
+ delete server_manager_;
+ client_manager_->ReleaseSSLContext(client_ctx_);
+ delete client_manager_;
}
void SetServerInitialValues(const security_manager::Protocol protocol,
@@ -106,18 +116,25 @@ class SSLHandshakeTest : public testing::Test {
server_certificate_ = cert;
server_ciphers_list_ = server_ciphers_list;
server_ca_certificate_path_ = ca_certificate_path;
-
- ON_CALL(*mock_server_manager_settings, security_manager_mode())
+ ON_CALL(*mock_server_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_service_));
+ ON_CALL(*mock_server_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_service_));
+ ON_CALL(*mock_server_manager_settings_, security_manager_mode())
.WillByDefault(Return(security_manager::SERVER));
- ON_CALL(*mock_server_manager_settings, security_manager_protocol_name())
+ ON_CALL(*mock_server_manager_settings_, security_manager_protocol_name())
.WillByDefault(Return(protocol));
- ON_CALL(*mock_server_manager_settings, certificate_data())
+ ON_CALL(*mock_server_manager_settings_, certificate_data())
.WillByDefault(ReturnRef(server_certificate_));
- ON_CALL(*mock_server_manager_settings, ciphers_list())
+ ON_CALL(*mock_server_manager_settings_, ciphers_list())
.WillByDefault(ReturnRef(server_ciphers_list_));
- ON_CALL(*mock_server_manager_settings, ca_cert_path())
+ ON_CALL(*mock_server_manager_settings_, ca_cert_path())
.WillByDefault(ReturnRef(server_ca_certificate_path_));
- ON_CALL(*mock_server_manager_settings, verify_peer())
+ ON_CALL(*mock_server_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(server_cert_filename));
+ ON_CALL(*mock_server_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(server_key_filename));
+ ON_CALL(*mock_server_manager_settings_, verify_peer())
.WillByDefault(Return(verify_peer));
}
void SetClientInitialValues(const security_manager::Protocol protocol,
@@ -129,17 +146,25 @@ class SSLHandshakeTest : public testing::Test {
client_ciphers_list_ = client_ciphers_list;
client_ca_certificate_path_ = ca_certificate_path;
- ON_CALL(*mock_client_manager_settings, security_manager_mode())
+ ON_CALL(*mock_client_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_service_));
+ ON_CALL(*mock_client_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_service_));
+ ON_CALL(*mock_client_manager_settings_, security_manager_mode())
.WillByDefault(Return(security_manager::CLIENT));
- ON_CALL(*mock_client_manager_settings, security_manager_protocol_name())
+ ON_CALL(*mock_client_manager_settings_, security_manager_protocol_name())
.WillByDefault(Return(protocol));
- ON_CALL(*mock_client_manager_settings, certificate_data())
+ ON_CALL(*mock_client_manager_settings_, certificate_data())
.WillByDefault(ReturnRef(client_certificate_));
- ON_CALL(*mock_client_manager_settings, ciphers_list())
+ ON_CALL(*mock_client_manager_settings_, ciphers_list())
.WillByDefault(ReturnRef(client_ciphers_list_));
- ON_CALL(*mock_client_manager_settings, ca_cert_path())
+ ON_CALL(*mock_client_manager_settings_, ca_cert_path())
.WillByDefault(ReturnRef(client_ca_certificate_path_));
- ON_CALL(*mock_client_manager_settings, verify_peer())
+ ON_CALL(*mock_client_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(client_cert_filename));
+ ON_CALL(*mock_client_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(client_key_filename));
+ ON_CALL(*mock_client_manager_settings_, verify_peer())
.WillByDefault(Return(verify_peer));
}
@@ -156,19 +181,19 @@ class SSLHandshakeTest : public testing::Test {
cert.close();
SetServerInitialValues(
protocol, ss.str(), ciphers_list, verify_peer, ca_certificate_path);
- const bool initialized = server_manager->Init();
+ const bool initialized = server_manager_->Init();
if (!initialized) {
return false;
}
- server_ctx = server_manager->CreateSSLContext();
+ server_ctx_ = server_manager_->CreateSSLContext();
- if (!server_ctx) {
+ if (!server_ctx_) {
return false;
}
- server_ctx->SetHandshakeContext(
+ server_ctx_->SetHandshakeContext(
security_manager::SSLContext::HandshakeContext(
custom_str::CustomString("SPT"),
custom_str::CustomString("client")));
@@ -192,17 +217,17 @@ class SSLHandshakeTest : public testing::Test {
ciphers_list,
verify_peer,
ca_certificate_path);
- const bool initialized = client_manager->Init();
+ const bool initialized = client_manager_->Init();
if (!initialized) {
return false;
}
- client_ctx = client_manager->CreateSSLContext();
- if (!client_ctx) {
+ client_ctx_ = client_manager_->CreateSSLContext();
+ if (!client_ctx_) {
return false;
}
- client_ctx->SetHandshakeContext(
+ client_ctx_->SetHandshakeContext(
security_manager::SSLContext::HandshakeContext(
custom_str::CustomString("SPT"),
custom_str::CustomString("server")));
@@ -211,17 +236,17 @@ class SSLHandshakeTest : public testing::Test {
}
void ResetConnections() {
- ASSERT_NO_THROW(server_ctx->ResetConnection());
- ASSERT_NO_THROW(client_ctx->ResetConnection());
+ ASSERT_NO_THROW(server_ctx_->ResetConnection());
+ ASSERT_NO_THROW(client_ctx_->ResetConnection());
}
void StartHandshake() {
using security_manager::SSLContext;
ASSERT_EQ(SSLContext::Handshake_Result_Success,
- client_ctx->StartHandshake(&client_buf, &client_buf_len));
- ASSERT_FALSE(client_buf == NULL);
- ASSERT_GT(client_buf_len, 0u);
+ client_ctx_->StartHandshake(&client_buf_, &client_buf_len_));
+ ASSERT_FALSE(client_buf_ == NULL);
+ ASSERT_GT(client_buf_len_, 0u);
}
void HandshakeProcedure_Success() {
@@ -229,23 +254,25 @@ class SSLHandshakeTest : public testing::Test {
StartHandshake();
while (true) {
- ASSERT_EQ(SSLContext::Handshake_Result_Success,
- server_ctx->DoHandshakeStep(
- client_buf, client_buf_len, &server_buf, &server_buf_len))
+ ASSERT_EQ(
+ SSLContext::Handshake_Result_Success,
+ server_ctx_->DoHandshakeStep(
+ client_buf_, client_buf_len_, &server_buf_, &server_buf_len_))
<< ERR_reason_error_string(ERR_get_error());
- ASSERT_FALSE(server_buf == NULL);
- ASSERT_GT(server_buf_len, 0u);
+ ASSERT_FALSE(server_buf_ == NULL);
+ ASSERT_GT(server_buf_len_, 0u);
- ASSERT_EQ(SSLContext::Handshake_Result_Success,
- client_ctx->DoHandshakeStep(
- server_buf, server_buf_len, &client_buf, &client_buf_len))
+ ASSERT_EQ(
+ SSLContext::Handshake_Result_Success,
+ client_ctx_->DoHandshakeStep(
+ server_buf_, server_buf_len_, &client_buf_, &client_buf_len_))
<< ERR_reason_error_string(ERR_get_error());
- if (server_ctx->IsInitCompleted()) {
+ if (server_ctx_->IsInitCompleted()) {
break;
}
- ASSERT_FALSE(client_buf == NULL);
- ASSERT_GT(client_buf_len, 0u);
+ ASSERT_FALSE(client_buf_ == NULL);
+ ASSERT_GT(client_buf_len_, 0u);
}
}
@@ -255,9 +282,9 @@ class SSLHandshakeTest : public testing::Test {
StartHandshake();
while (true) {
- const SSLContext::HandshakeResult result = server_ctx->DoHandshakeStep(
- client_buf, client_buf_len, &server_buf, &server_buf_len);
- ASSERT_FALSE(server_ctx->IsInitCompleted())
+ const SSLContext::HandshakeResult result = server_ctx_->DoHandshakeStep(
+ client_buf_, client_buf_len_, &server_buf_, &server_buf_len_);
+ ASSERT_FALSE(server_ctx_->IsInitCompleted())
<< "Expected server side handshake fail";
// First few handshake will be successful
@@ -265,18 +292,19 @@ class SSLHandshakeTest : public testing::Test {
// Test successfully passed with handshake fail
return;
}
- ASSERT_FALSE(server_buf == NULL);
- ASSERT_GT(server_buf_len, 0u);
+ ASSERT_FALSE(server_buf_ == NULL);
+ ASSERT_GT(server_buf_len_, 0u);
- ASSERT_EQ(SSLContext::Handshake_Result_Success,
- client_ctx->DoHandshakeStep(
- server_buf, server_buf_len, &client_buf, &client_buf_len))
+ ASSERT_EQ(
+ SSLContext::Handshake_Result_Success,
+ client_ctx_->DoHandshakeStep(
+ server_buf_, server_buf_len_, &client_buf_, &client_buf_len_))
<< ERR_reason_error_string(ERR_get_error());
- ASSERT_FALSE(client_ctx->IsInitCompleted())
+ ASSERT_FALSE(client_ctx_->IsInitCompleted())
<< "Expected server side handshake fail";
- ASSERT_FALSE(client_buf == NULL);
- ASSERT_GT(client_buf_len, 0u);
+ ASSERT_FALSE(client_buf_ == NULL);
+ ASSERT_GT(client_buf_len_, 0u);
}
FAIL() << "Expected server side handshake fail";
}
@@ -288,17 +316,18 @@ class SSLHandshakeTest : public testing::Test {
StartHandshake();
while (true) {
- ASSERT_EQ(SSLContext::Handshake_Result_Success,
- server_ctx->DoHandshakeStep(
- client_buf, client_buf_len, &server_buf, &server_buf_len))
+ ASSERT_EQ(
+ SSLContext::Handshake_Result_Success,
+ server_ctx_->DoHandshakeStep(
+ client_buf_, client_buf_len_, &server_buf_, &server_buf_len_))
<< ERR_reason_error_string(ERR_get_error());
- ASSERT_FALSE(server_buf == NULL);
- ASSERT_GT(server_buf_len, 0u);
+ ASSERT_FALSE(server_buf_ == NULL);
+ ASSERT_GT(server_buf_len_, 0u);
- const SSLContext::HandshakeResult result = client_ctx->DoHandshakeStep(
- server_buf, server_buf_len, &client_buf, &client_buf_len);
- ASSERT_FALSE(client_ctx->IsInitCompleted())
+ const SSLContext::HandshakeResult result = client_ctx_->DoHandshakeStep(
+ server_buf_, server_buf_len_, &client_buf_, &client_buf_len_);
+ ASSERT_FALSE(client_ctx_->IsInitCompleted())
<< "Expected client side handshake fail";
// First few handsahke will be successful
@@ -308,25 +337,25 @@ class SSLHandshakeTest : public testing::Test {
return;
}
- ASSERT_FALSE(client_buf == NULL);
- ASSERT_GT(client_buf_len, 0u);
+ ASSERT_FALSE(client_buf_ == NULL);
+ ASSERT_GT(client_buf_len_, 0u);
}
FAIL() << "Expected client side handshake fail";
}
- security_manager::CryptoManager* server_manager;
- security_manager::CryptoManager* client_manager;
- security_manager::SSLContext* server_ctx;
- security_manager::SSLContext* client_ctx;
+ security_manager::CryptoManager* server_manager_;
+ security_manager::CryptoManager* client_manager_;
+ security_manager::SSLContext* server_ctx_;
+ security_manager::SSLContext* client_ctx_;
testing::NiceMock<security_manager_test::MockCryptoManagerSettings>*
- mock_server_manager_settings;
+ mock_server_manager_settings_;
testing::NiceMock<security_manager_test::MockCryptoManagerSettings>*
- mock_client_manager_settings;
+ mock_client_manager_settings_;
- const uint8_t* server_buf;
- const uint8_t* client_buf;
- size_t server_buf_len;
- size_t client_buf_len;
+ const uint8_t* server_buf_;
+ const uint8_t* client_buf_;
+ size_t server_buf_len_;
+ size_t client_buf_len_;
std::string server_certificate_;
std::string server_ciphers_list_;
@@ -335,188 +364,175 @@ class SSLHandshakeTest : public testing::Test {
std::string client_certificate_;
std::string client_ciphers_list_;
std::string client_ca_certificate_path_;
+
+ const std::vector<int> forced_protected_service_;
+ const std::vector<int> forced_unprotected_service_;
};
-TEST_F(SSLHandshakeTest, NoVerification) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+INSTANTIATE_TEST_CASE_P(
+ CorrectProtocol,
+ SSLHandshakeTest,
+ ::testing::Values(
+ Protocol(security_manager::TLSv1, security_manager::TLSv1),
+ Protocol(security_manager::TLSv1_1, security_manager::TLSv1_1),
+ Protocol(security_manager::TLSv1_2, security_manager::TLSv1_2),
+ Protocol(security_manager::DTLSv1, security_manager::DTLSv1)));
+
+TEST_P(SSLHandshakeTest, NoVerification) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
skip_peer_verification,
""))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
skip_peer_verification,
""))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_Success());
}
-TEST_F(SSLHandshakeTest, CAVerification_ServerSide) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, CAVerification_ServerSide) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
verify_peer,
client_ca_cert_filename))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
skip_peer_verification,
""))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_Success());
}
-TEST_F(SSLHandshakeTest, CAVerification_ServerSide_NoCACertificate) {
+TEST_P(SSLHandshakeTest, CAVerification_ServerSide_NoCACertificate) {
ASSERT_TRUE(InitServerManagers(
- security_manager::TLSv1_2, "", "ALL", verify_peer, "unex"))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ GetParam().server_protocol, "", "ALL", verify_peer, "unex"))
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
skip_peer_verification,
""))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_ServerSideFail());
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
verify_peer,
client_ca_cert_filename))
- << server_manager->LastError();
+ << server_manager_->LastError();
GTEST_TRACE(ResetConnections());
GTEST_TRACE(HandshakeProcedure_Success());
}
-TEST_F(SSLHandshakeTest, CAVerification_ClientSide) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
- server_certificate,
- "ALL",
- verify_peer,
- client_ca_cert_filename))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
- client_certificate,
- "ALL",
- verify_peer,
- server_ca_cert_filename))
- << client_manager->LastError();
-
- GTEST_TRACE(HandshakeProcedure_Success());
-}
-
-TEST_F(SSLHandshakeTest, CAVerification_ClientSide_NoCACertificate) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, CAVerification_ClientSide_NoCACertificate) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
skip_peer_verification,
""))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
"",
"ALL",
verify_peer,
"client_ca_cert_filename"))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_ClientSideFail(
security_manager::SSLContext::Handshake_Result_Fail));
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
verify_peer,
server_ca_cert_filename))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(ResetConnections());
GTEST_TRACE(HandshakeProcedure_Success());
}
-TEST_F(SSLHandshakeTest, CAVerification_BothSides) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, CAVerification_BothSides) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
verify_peer,
client_ca_cert_filename))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
verify_peer,
server_ca_cert_filename))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_Success());
}
-TEST_F(SSLHandshakeTest, UnsignedCert) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, UnsignedCert) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_unsigned_cert_file,
"ALL",
skip_peer_verification,
""))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
verify_peer,
client_ca_cert_filename))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_ClientSideFail(
security_manager::SSLContext::Handshake_Result_CertNotSigned));
}
-TEST_F(SSLHandshakeTest, ExpiredCert) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, ExpiredCert) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_expired_cert_file,
"ALL",
verify_peer,
client_ca_cert_filename))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
verify_peer,
server_ca_cert_filename))
- << client_manager->LastError();
+ << client_manager_->LastError();
GTEST_TRACE(HandshakeProcedure_ClientSideFail(
security_manager::SSLContext::Handshake_Result_CertExpired));
}
-TEST_F(SSLHandshakeTest, AppNameAndAppIDInvalid) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, AppNameAndAppIDInvalid) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
verify_peer,
client_ca_cert_filename))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
verify_peer,
server_ca_cert_filename))
- << client_manager->LastError();
+ << client_manager_->LastError();
- client_ctx->SetHandshakeContext(
- security_manager::SSLContext::HandshakeContext(
- custom_str::CustomString("server"),
- custom_str::CustomString("Wrong")));
-
- GTEST_TRACE(HandshakeProcedure_ClientSideFail(
- security_manager::SSLContext::Handshake_Result_AppNameMismatch));
-
- ResetConnections();
- client_ctx->SetHandshakeContext(
+ client_ctx_->SetHandshakeContext(
security_manager::SSLContext::HandshakeContext(
custom_str::CustomString("Wrong"),
custom_str::CustomString("server")));
@@ -525,19 +541,19 @@ TEST_F(SSLHandshakeTest, AppNameAndAppIDInvalid) {
security_manager::SSLContext::Handshake_Result_AppIDMismatch));
}
-TEST_F(SSLHandshakeTest, NoVerification_ResetConnection) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, NoVerification_ResetConnection) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
skip_peer_verification,
""))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
skip_peer_verification,
""))
- << client_manager->LastError();
+ << client_manager_->LastError();
const int times = 100;
for (int i = 0; i < times; ++i) {
@@ -549,19 +565,19 @@ TEST_F(SSLHandshakeTest, NoVerification_ResetConnection) {
}
}
-TEST_F(SSLHandshakeTest, CAVerification_BothSides_ResetConnection) {
- ASSERT_TRUE(InitServerManagers(security_manager::TLSv1_2,
+TEST_P(SSLHandshakeTest, CAVerification_BothSides_ResetConnection) {
+ ASSERT_TRUE(InitServerManagers(GetParam().server_protocol,
server_certificate,
"ALL",
verify_peer,
client_ca_cert_filename))
- << server_manager->LastError();
- ASSERT_TRUE(InitClientManagers(security_manager::TLSv1_2,
+ << server_manager_->LastError();
+ ASSERT_TRUE(InitClientManagers(GetParam().client_protocol,
client_certificate,
"ALL",
skip_peer_verification,
server_ca_cert_filename))
- << client_manager->LastError();
+ << client_manager_->LastError();
const int times = 100;
for (int i = 0; i < times; ++i) {
@@ -572,7 +588,6 @@ TEST_F(SSLHandshakeTest, CAVerification_BothSides_ResetConnection) {
GTEST_TRACE(ResetConnections());
}
}
-
// TODO(EZamakhov): add fail tests -broken or not full ca certificate chain
} // namespace ssl_handshake_test
diff --git a/src/components/security_manager/test/ssl_context_test.cc b/src/components/security_manager/test/ssl_context_test.cc
index a77cd98b27..20e509ebc6 100644
--- a/src/components/security_manager/test/ssl_context_test.cc
+++ b/src/components/security_manager/test/ssl_context_test.cc
@@ -49,8 +49,11 @@ using ::testing::ReturnRef;
using ::testing::NiceMock;
namespace {
-const size_t kUpdatesBeforeHour = 24;
const std::string kCaPath = "";
+const std::string kClientCertPath = "client_certificate.crt";
+const std::string kClientPrivateKeyPath = "client_private.key";
+const std::string kServerCertPath = "server_certificate.crt";
+const std::string kServerPrivateKeyPath = "server_private.key";
const uint8_t* kServerBuf;
const uint8_t* kClientBuf;
const std::string kAllCiphers = "ALL";
@@ -70,19 +73,19 @@ namespace ssl_context_test {
namespace custom_str = utils::custom_string;
struct ProtocolAndCipher {
- security_manager::Protocol server_protocol;
- security_manager::Protocol client_protocol;
- std::string server_ciphers_list;
- std::string client_ciphers_list;
+ security_manager::Protocol server_protocol_;
+ security_manager::Protocol client_protocol_;
+ std::string server_ciphers_list_;
+ std::string client_ciphers_list_;
ProtocolAndCipher(security_manager::Protocol s_protocol,
security_manager::Protocol c_protocol,
std::string s_ciphers_list,
std::string c_ciphers_list)
- : server_protocol(s_protocol)
- , client_protocol(c_protocol)
- , server_ciphers_list(s_ciphers_list)
- , client_ciphers_list(c_ciphers_list) {}
+ : server_protocol_(s_protocol)
+ , client_protocol_(c_protocol)
+ , server_ciphers_list_(s_ciphers_list)
+ , client_ciphers_list_(c_ciphers_list) {}
};
class SSLTest : public testing::Test {
@@ -127,6 +130,16 @@ class SSLTest : public testing::Test {
.WillRepeatedly(ReturnRef(kCaPath));
EXPECT_CALL(*mock_crypto_manager_settings_, verify_peer())
.WillOnce(Return(false));
+
+ ON_CALL(*mock_crypto_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_service_));
+ ON_CALL(*mock_crypto_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_service_));
+ ON_CALL(*mock_crypto_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(kServerCertPath));
+ ON_CALL(*mock_crypto_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(kServerPrivateKeyPath));
+
const bool crypto_manager_initialization = crypto_manager_->Init();
EXPECT_TRUE(crypto_manager_initialization);
@@ -150,6 +163,16 @@ class SSLTest : public testing::Test {
.WillRepeatedly(ReturnRef(kCaPath));
EXPECT_CALL(*mock_client_manager_settings_, verify_peer())
.WillOnce(Return(false));
+
+ ON_CALL(*mock_client_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_service_));
+ ON_CALL(*mock_client_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_service_));
+ ON_CALL(*mock_client_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(kClientCertPath));
+ ON_CALL(*mock_client_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(kClientPrivateKeyPath));
+
const bool client_manager_initialization = client_manager_->Init();
EXPECT_TRUE(client_manager_initialization);
@@ -159,19 +182,19 @@ class SSLTest : public testing::Test {
.WillByDefault(Return(kMaximumPayloadSize));
EXPECT_CALL(*mock_crypto_manager_settings_, security_manager_mode())
.WillRepeatedly(Return(security_manager::SERVER));
- server_ctx = crypto_manager_->CreateSSLContext();
+ server_ctx_ = crypto_manager_->CreateSSLContext();
EXPECT_CALL(*mock_client_manager_settings_, security_manager_mode())
.Times(2)
.WillRepeatedly(Return(security_manager::CLIENT));
- client_ctx = client_manager_->CreateSSLContext();
+ client_ctx_ = client_manager_->CreateSSLContext();
using custom_str::CustomString;
security_manager::SSLContext::HandshakeContext ctx(CustomString("SPT"),
CustomString("client"));
- server_ctx->SetHandshakeContext(ctx);
+ server_ctx_->SetHandshakeContext(ctx);
ctx.expected_cn = "server";
- client_ctx->SetHandshakeContext(ctx);
+ client_ctx_->SetHandshakeContext(ctx);
kServerBuf = NULL;
kClientBuf = NULL;
@@ -180,8 +203,8 @@ class SSLTest : public testing::Test {
}
void TearDown() OVERRIDE {
- crypto_manager_->ReleaseSSLContext(server_ctx);
- client_manager_->ReleaseSSLContext(client_ctx);
+ crypto_manager_->ReleaseSSLContext(server_ctx_);
+ client_manager_->ReleaseSSLContext(client_ctx_);
delete crypto_manager_;
delete client_manager_;
@@ -194,11 +217,14 @@ class SSLTest : public testing::Test {
mock_crypto_manager_settings_;
utils::SharedPtr<NiceMock<security_manager_test::MockCryptoManagerSettings> >
mock_client_manager_settings_;
- security_manager::SSLContext* server_ctx;
- security_manager::SSLContext* client_ctx;
+ security_manager::SSLContext* server_ctx_;
+ security_manager::SSLContext* client_ctx_;
static std::string client_certificate_data_base64_;
static std::string server_certificate_data_base64_;
+
+ const std::vector<int> forced_unprotected_service_;
+ const std::vector<int> forced_protected_service_;
};
std::string SSLTest::client_certificate_data_base64_;
std::string SSLTest::server_certificate_data_base64_;
@@ -222,37 +248,38 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
NiceMock<security_manager_test::MockCryptoManagerSettings> >();
utils::SharedPtr<security_manager::CryptoManagerSettings> server_crypto(
mock_crypto_manager_settings_);
- crypto_manager = new security_manager::CryptoManagerImpl(server_crypto);
+ crypto_manager_ = new security_manager::CryptoManagerImpl(server_crypto);
- SetServerInitialValues(GetParam().server_protocol,
- GetParam().server_ciphers_list);
+ SetServerInitialValues(GetParam().server_protocol_,
+ GetParam().server_ciphers_list_);
- const bool crypto_manager_initialization = crypto_manager->Init();
- ASSERT_TRUE(crypto_manager_initialization);
+ const bool crypto_manager_initialization = crypto_manager_->Init();
+ EXPECT_TRUE(crypto_manager_initialization);
mock_client_manager_settings_ = utils::MakeShared<
NiceMock<security_manager_test::MockCryptoManagerSettings> >();
utils::SharedPtr<security_manager::CryptoManagerSettings> client_crypto(
mock_client_manager_settings_);
- client_manager = new security_manager::CryptoManagerImpl(client_crypto);
+ client_manager_ = new security_manager::CryptoManagerImpl(client_crypto);
- SetClientInitialValues(GetParam().client_protocol,
- GetParam().client_ciphers_list);
+ SetClientInitialValues(GetParam().client_protocol_,
+ GetParam().client_ciphers_list_);
- const bool client_manager_initialization = client_manager->Init();
- ASSERT_TRUE(client_manager_initialization);
+ const bool client_manager_initialization = client_manager_->Init();
+ EXPECT_TRUE(client_manager_initialization);
- server_ctx = crypto_manager->CreateSSLContext();
- client_ctx = client_manager->CreateSSLContext();
+ server_ctx_ = crypto_manager_->CreateSSLContext();
+ client_ctx_ = client_manager_->CreateSSLContext();
using custom_str::CustomString;
- security_manager::SSLContext::HandshakeContext ctx(CustomString("SPT"),
- CustomString("client"));
- server_ctx->SetHandshakeContext(ctx);
- ctx.expected_cn = "server";
- client_ctx->SetHandshakeContext(ctx);
+ server_ctx_->SetHandshakeContext(
+ security_manager::SSLContext::HandshakeContext(CustomString("SPT"),
+ CustomString("client")));
+ client_ctx_->SetHandshakeContext(
+ security_manager::SSLContext::HandshakeContext(CustomString("SPT"),
+ CustomString("server")));
kServerBuf = NULL;
kClientBuf = NULL;
@@ -261,18 +288,19 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
}
void TearDown() OVERRIDE {
- if (crypto_manager) {
- crypto_manager->ReleaseSSLContext(server_ctx);
- }
- if (client_manager) {
- client_manager->ReleaseSSLContext(client_ctx);
- }
- delete crypto_manager;
- delete client_manager;
+ crypto_manager_->ReleaseSSLContext(server_ctx_);
+ client_manager_->ReleaseSSLContext(client_ctx_);
+
+ delete crypto_manager_;
+ delete client_manager_;
}
void SetServerInitialValues(security_manager::Protocol protocol,
const std::string& server_ciphers_list) {
+ ON_CALL(*mock_crypto_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_service_));
+ ON_CALL(*mock_crypto_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_service_));
ON_CALL(*mock_crypto_manager_settings_, security_manager_mode())
.WillByDefault(Return(security_manager::SERVER));
ON_CALL(*mock_crypto_manager_settings_, security_manager_protocol_name())
@@ -285,9 +313,18 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
.WillByDefault(ReturnRef(kCaPath));
ON_CALL(*mock_crypto_manager_settings_, verify_peer())
.WillByDefault(Return(false));
+ ON_CALL(*mock_crypto_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(kServerCertPath));
+ ON_CALL(*mock_crypto_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(kServerPrivateKeyPath));
}
+
void SetClientInitialValues(security_manager::Protocol protocol,
const std::string& client_ciphers_list) {
+ ON_CALL(*mock_client_manager_settings_, force_unprotected_service())
+ .WillByDefault(ReturnRef(forced_unprotected_service_));
+ ON_CALL(*mock_client_manager_settings_, force_protected_service())
+ .WillByDefault(ReturnRef(forced_protected_service_));
ON_CALL(*mock_client_manager_settings_, security_manager_mode())
.WillByDefault(Return(security_manager::CLIENT));
ON_CALL(*mock_client_manager_settings_, security_manager_protocol_name())
@@ -300,17 +337,23 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
.WillByDefault(ReturnRef(kCaPath));
ON_CALL(*mock_client_manager_settings_, verify_peer())
.WillByDefault(Return(false));
+ ON_CALL(*mock_client_manager_settings_, module_cert_path())
+ .WillByDefault(ReturnRef(kClientCertPath));
+ ON_CALL(*mock_client_manager_settings_, module_key_path())
+ .WillByDefault(ReturnRef(kClientPrivateKeyPath));
}
utils::SharedPtr<NiceMock<security_manager_test::MockCryptoManagerSettings> >
mock_crypto_manager_settings_;
utils::SharedPtr<NiceMock<security_manager_test::MockCryptoManagerSettings> >
mock_client_manager_settings_;
- security_manager::CryptoManager* crypto_manager = NULL;
- security_manager::CryptoManager* client_manager = NULL;
- security_manager::SSLContext* server_ctx = NULL;
- security_manager::SSLContext* client_ctx = NULL;
+ security_manager::CryptoManager* crypto_manager_;
+ security_manager::CryptoManager* client_manager_;
+ security_manager::SSLContext* server_ctx_;
+ security_manager::SSLContext* client_ctx_;
std::string certificate_data_base64_;
+ const std::vector<int> forced_unprotected_service_;
+ const std::vector<int> forced_protected_service_;
};
class SSLTestForTLS1_2 : public SSLTestParam {};
@@ -319,7 +362,7 @@ class SSLTestForTLS1_2 : public SSLTestParam {};
INSTANTIATE_TEST_CASE_P(
CorrectProtocolAndCiphers,
SSLTestParam,
- ::testing::Values(ProtocolAndCipher(security_manager::TLSv1,
+ ::testing::Values(ProtocolAndCipher(security_manager::TLSv1_1,
security_manager::TLSv1,
kFordCipher,
kFordCipher),
@@ -334,7 +377,11 @@ INSTANTIATE_TEST_CASE_P(
kFordCipher,
kFordCipher)
#endif
- ));
+ ,
+ ProtocolAndCipher(security_manager::DTLSv1,
+ security_manager::DTLSv1,
+ kFordCipher,
+ kFordCipher)));
INSTANTIATE_TEST_CASE_P(
IncorrectProtocolAndCiphers,
@@ -365,6 +412,22 @@ INSTANTIATE_TEST_CASE_P(
security_manager::SSLv3,
kFordCipher,
kFordCipher),
+ ProtocolAndCipher(security_manager::TLSv1,
+ security_manager::DTLSv1,
+ kFordCipher,
+ kFordCipher),
+ ProtocolAndCipher(security_manager::DTLSv1,
+ security_manager::TLSv1_1,
+ kFordCipher,
+ kFordCipher),
+ ProtocolAndCipher(security_manager::TLSv1_2,
+ security_manager::DTLSv1,
+ kFordCipher,
+ kFordCipher),
+ ProtocolAndCipher(security_manager::TLSv1_1,
+ security_manager::DTLSv1,
+ kFordCipher,
+ kFordCipher),
ProtocolAndCipher(security_manager::TLSv1_2,
security_manager::SSLv3,
kFordCipher,
@@ -382,7 +445,8 @@ INSTANTIATE_TEST_CASE_P(
TEST_F(SSLTest, OnTSL2Protocol_BrokenHandshake) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- client_ctx->StartHandshake(&kClientBuf, &client_buf_len));
+ client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
+
ASSERT_FALSE(NULL == kClientBuf);
ASSERT_LT(0u, client_buf_len);
// Broke 3 bytes for get abnormal fail of handshake
@@ -390,26 +454,26 @@ TEST_F(SSLTest, OnTSL2Protocol_BrokenHandshake) {
const_cast<uint8_t*>(kClientBuf)[client_buf_len / 2] ^= 0xFF;
const_cast<uint8_t*>(kClientBuf)[client_buf_len - 1] ^= 0xFF;
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_AbnormalFail,
- server_ctx->DoHandshakeStep(
+ server_ctx_->DoHandshakeStep(
kClientBuf, client_buf_len, &kServerBuf, &server_buf_len));
- EXPECT_EQ("Initialization is not completed", server_ctx->LastError());
- EXPECT_EQ("Initialization is not completed", client_ctx->LastError());
+ EXPECT_EQ("Initialization is not completed", server_ctx_->LastError());
+ EXPECT_EQ("Initialization is not completed", client_ctx_->LastError());
}
// TODO {AKozoriz} : Unexpected uncomplited init of SSL component.
// In this and next tests.
// Must be fixed after merge to develop.
TEST_F(SSLTest, OnTSL2Protocol_Positive) {
- ASSERT_EQ(client_ctx->StartHandshake(&kClientBuf, &client_buf_len),
+ ASSERT_EQ(client_ctx_->StartHandshake(&kClientBuf, &client_buf_len),
security_manager::SSLContext::Handshake_Result_Success);
- EXPECT_FALSE(server_ctx->IsInitCompleted());
+ EXPECT_FALSE(server_ctx_->IsInitCompleted());
while (true) {
ASSERT_TRUE(NULL != kClientBuf);
ASSERT_LT(0u, client_buf_len);
const security_manager::SSLContext::HandshakeResult server_result =
- server_ctx->DoHandshakeStep(
+ server_ctx_->DoHandshakeStep(
kClientBuf, client_buf_len, &kServerBuf, &server_buf_len);
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
server_result);
@@ -417,11 +481,11 @@ TEST_F(SSLTest, OnTSL2Protocol_Positive) {
ASSERT_LT(0u, server_buf_len);
const security_manager::SSLContext::HandshakeResult client_result =
- client_ctx->DoHandshakeStep(
+ client_ctx_->DoHandshakeStep(
kServerBuf, server_buf_len, &kClientBuf, &client_buf_len);
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
client_result);
- if (server_ctx->IsInitCompleted()) {
+ if (server_ctx_->IsInitCompleted()) {
break;
}
@@ -432,22 +496,22 @@ TEST_F(SSLTest, OnTSL2Protocol_Positive) {
ASSERT_TRUE(NULL == kClientBuf);
ASSERT_EQ(0u, client_buf_len);
// expect both side initialization complete
- EXPECT_TRUE(client_ctx->IsInitCompleted());
- EXPECT_TRUE(server_ctx->IsInitCompleted());
+ EXPECT_TRUE(client_ctx_->IsInitCompleted());
+ EXPECT_TRUE(server_ctx_->IsInitCompleted());
// Encrypt text on client side
const uint8_t* text = reinterpret_cast<const uint8_t*>("abra");
const uint8_t* encrypted_text = 0;
size_t text_len = 4;
size_t encrypted_text_len;
- EXPECT_TRUE(client_ctx->Encrypt(
+ EXPECT_TRUE(client_ctx_->Encrypt(
text, text_len, &encrypted_text, &encrypted_text_len));
ASSERT_NE(reinterpret_cast<void*>(NULL), encrypted_text);
ASSERT_LT(0u, encrypted_text_len);
// Decrypt text on server side
- EXPECT_TRUE(server_ctx->Decrypt(
+ EXPECT_TRUE(server_ctx_->Decrypt(
encrypted_text, encrypted_text_len, &text, &text_len));
ASSERT_NE(reinterpret_cast<void*>(NULL), text);
ASSERT_LT(0u, text_len);
@@ -457,34 +521,34 @@ TEST_F(SSLTest, OnTSL2Protocol_Positive) {
TEST_F(SSLTest, OnTSL2Protocol_EcncryptionFail) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- client_ctx->StartHandshake(&kClientBuf, &client_buf_len));
+ client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
- while (!server_ctx->IsInitCompleted()) {
+ while (!server_ctx_->IsInitCompleted()) {
ASSERT_FALSE(NULL == kClientBuf);
ASSERT_LT(0u, client_buf_len);
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- server_ctx->DoHandshakeStep(
+ server_ctx_->DoHandshakeStep(
kClientBuf, client_buf_len, &kServerBuf, &server_buf_len));
ASSERT_FALSE(NULL == kServerBuf);
ASSERT_LT(0u, server_buf_len);
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- client_ctx->DoHandshakeStep(
+ client_ctx_->DoHandshakeStep(
kServerBuf, server_buf_len, &kClientBuf, &client_buf_len));
}
// Expect empty buffers after init complete
ASSERT_TRUE(NULL == kClientBuf);
ASSERT_EQ(0u, client_buf_len);
// Expect both side initialization complete
- EXPECT_TRUE(client_ctx->IsInitCompleted());
- EXPECT_TRUE(server_ctx->IsInitCompleted());
+ EXPECT_TRUE(client_ctx_->IsInitCompleted());
+ EXPECT_TRUE(server_ctx_->IsInitCompleted());
// Encrypt text on client side
const uint8_t* text = reinterpret_cast<const uint8_t*>("abra");
const uint8_t* encrypted_text = 0;
size_t text_len = 4;
size_t encrypted_text_len;
- EXPECT_TRUE(client_ctx->Encrypt(
+ EXPECT_TRUE(client_ctx_->Encrypt(
text, text_len, &encrypted_text, &encrypted_text_len));
ASSERT_NE(reinterpret_cast<void*>(NULL), encrypted_text);
ASSERT_LT(0u, encrypted_text_len);
@@ -497,29 +561,30 @@ TEST_F(SSLTest, OnTSL2Protocol_EcncryptionFail) {
const uint8_t* out_text;
size_t out_text_size;
// Decrypt broken text on server side
- EXPECT_FALSE(server_ctx->Decrypt(
+ EXPECT_FALSE(server_ctx_->Decrypt(
&broken[0], broken.size(), &out_text, &out_text_size));
// Check after broken message that server encryption and decryption fail
// Encrypte message on server side
- EXPECT_FALSE(server_ctx->Decrypt(
+ EXPECT_FALSE(server_ctx_->Decrypt(
encrypted_text, encrypted_text_len, &out_text, &out_text_size));
- EXPECT_FALSE(server_ctx->Encrypt(
+ EXPECT_FALSE(server_ctx_->Encrypt(
text, text_len, &encrypted_text, &encrypted_text_len));
}
TEST_P(SSLTestParam, ClientAndServerNotTLSv1_2_HandshakeFailed) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_AbnormalFail,
- client_ctx->StartHandshake(&kClientBuf, &client_buf_len));
+ client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
+
EXPECT_TRUE(NULL == kClientBuf);
EXPECT_EQ(0u, client_buf_len);
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- server_ctx->DoHandshakeStep(
+ server_ctx_->DoHandshakeStep(
kClientBuf, client_buf_len, &kServerBuf, &server_buf_len));
EXPECT_TRUE(NULL == kServerBuf);
EXPECT_EQ(0u, server_buf_len);
- EXPECT_FALSE(server_ctx->IsInitCompleted());
+ EXPECT_FALSE(server_ctx_->IsInitCompleted());
}
INSTANTIATE_TEST_CASE_P(
@@ -544,16 +609,19 @@ INSTANTIATE_TEST_CASE_P(
TEST_P(SSLTestForTLS1_2, HandshakeFailed) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- client_ctx->StartHandshake(&kClientBuf, &client_buf_len));
+ client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
EXPECT_FALSE(NULL == kClientBuf);
ASSERT_LT(0u, client_buf_len);
+
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_AbnormalFail,
- server_ctx->DoHandshakeStep(
- kClientBuf, client_buf_len, &kServerBuf, &server_buf_len));
+ server_ctx_->DoHandshakeStep(
+ kClientBuf, client_buf_len, &kServerBuf, &server_buf_len))
+ << ERR_reason_error_string(ERR_get_error());
+
EXPECT_TRUE(NULL == kServerBuf);
EXPECT_EQ(0u, server_buf_len);
- EXPECT_FALSE(server_ctx->IsInitCompleted());
+ EXPECT_FALSE(server_ctx_->IsInitCompleted());
}
} // namespace ssl_context_test
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 d549b9891a..34c5e3a8a6 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
@@ -39,6 +39,7 @@
#include "smart_objects/default_shema_item.h"
#include "smart_objects/schema_item_parameter.h"
#include "utils/convert_utils.h"
+#include "utils/helpers.h"
namespace NsSmartDeviceLink {
namespace NsSmartObjects {
@@ -123,15 +124,16 @@ bool TNumberSchemaItem<NumberType>::isValidNumberType(SmartType type) {
NumberType value(0);
if ((SmartType_Double == type) && (typeid(double) == typeid(value))) {
return true;
- } else if ((SmartType_Integer == type) &&
- (typeid(int32_t) == typeid(value) ||
- typeid(uint32_t) == typeid(value) ||
- typeid(int64_t) == typeid(value) ||
- typeid(double) == typeid(value))) {
+ } else if (((SmartType_Integer == type) || (SmartType_UInteger == type)) &&
+ helpers::Compare<const std::type_info&, helpers::EQ, helpers::ONE>(
+ typeid(value),
+ typeid(int32_t),
+ typeid(uint32_t),
+ typeid(int64_t),
+ typeid(double))) {
return true;
- } else {
- return false;
}
+ return false;
}
template <typename NumberType>
diff --git a/src/components/smart_objects/src/number_schema_item.cc b/src/components/smart_objects/src/number_schema_item.cc
index 78be9fe85d..9789434523 100644
--- a/src/components/smart_objects/src/number_schema_item.cc
+++ b/src/components/smart_objects/src/number_schema_item.cc
@@ -41,7 +41,7 @@ SmartType TNumberSchemaItem<int32_t>::getSmartType() const {
template <>
SmartType TNumberSchemaItem<uint32_t>::getSmartType() const {
- return SmartType_Integer;
+ return SmartType_UInteger;
}
template <>
diff --git a/src/components/telemetry_monitor/CMakeLists.txt b/src/components/telemetry_monitor/CMakeLists.txt
index bb419a92e9..bb33857ecd 100644
--- a/src/components/telemetry_monitor/CMakeLists.txt
+++ b/src/components/telemetry_monitor/CMakeLists.txt
@@ -39,11 +39,9 @@ include_directories (
${COMPONENTS_DIR}/connection_handler/include/
${COMPONENTS_DIR}/transport_manager/include/
${COMPONENTS_DIR}/application_manager/include/
- ${COMPONENTS_DIR}/remote_control/include/
${POLICY_PATH}/include/
${POLICY_GLOBAL_INCLUDE_PATH}/
${COMPONENTS_DIR}/rpc_base/include/
- ${COMPONENTS_DIR}/functional_module/include/
${COMPONENTS_DIR}/hmi_message_handler/include/
${COMPONENTS_DIR}/formatters/include/
${COMPONENTS_DIR}/media_manager/include/
diff --git a/src/components/test_main.cc b/src/components/test_main.cc
index 72c90acb5c..61606756fe 100644
--- a/src/components/test_main.cc
+++ b/src/components/test_main.cc
@@ -1,12 +1,16 @@
#include "gmock/gmock.h"
#include "utils/logger.h"
#include "utils/custom_string.h"
+#include <iostream>
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "SDLMain")
int main(int argc, char** argv) {
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();
return result;
}
diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt
index 51835c125a..b256a2fadc 100644
--- a/src/components/utils/CMakeLists.txt
+++ b/src/components/utils/CMakeLists.txt
@@ -38,6 +38,7 @@ include_directories (
${COMPONENTS_DIR}/config_profile/include
${COMPONENTS_DIR}/media_manager/include
${COMPONENTS_DIR}/protocol_handler/include
+ ${JSONCPP_INCLUDE_DIRECTORY}
${LOG4CXX_INCLUDE_DIRECTORY}
)
diff --git a/src/components/utils/include/utils/optional.h b/src/components/utils/include/utils/optional.h
new file mode 100644
index 0000000000..0395945de0
--- /dev/null
+++ b/src/components/utils/include/utils/optional.h
@@ -0,0 +1,83 @@
+#ifndef ERROR_OR_H
+#define ERROR_OR_H
+#include <string>
+#include "utils/macro.h"
+
+namespace utils {
+
+/**
+ * @brief The Optional class is able to keep value, manage it it is empty and
+ * specify error code.
+ * Can be used as return value of function that is not guarantee that vaue will
+ * be returned
+ *
+ */
+template <typename ObjectType, typename ErrorType = std::string>
+class Optional {
+ public:
+ /**
+ * @brief The OptionalEmpty enum enum with one value to specify that Optional
+ * is not initialized
+ */
+ enum OptionalEmpty { EMPTY };
+
+ /**
+ * @brief Optional constructor with object initialization
+ * @param object object to initialize Optional
+ */
+ Optional(ObjectType& object)
+ : object_(&object), error_(), is_initialized_(true) {}
+
+ /**
+ * @brief Optional constructor with object and error initialization
+ * @param object object to initialize Optional
+ * @param error error code initialization
+ */
+ Optional(ObjectType& object, ErrorType error)
+ : object_(&object), error_(error), is_initialized_(true) {}
+
+ /**
+ * @brief Optional constructir without object initialization
+ * @param empty manadatory parameter for explicit specifying that Optional is
+ * empty
+ * @param error error code initialization
+ */
+ Optional(OptionalEmpty empty, ErrorType error)
+ : object_(nullptr), error_(error), is_initialized_(false) {}
+
+ /**
+ * @brief Optional empty optional initialization without specifying error code
+ * @param empty manadatory parameter for explicit specifying that Optional is
+ * empty
+ */
+ Optional(OptionalEmpty empty)
+ : object_(nullptr), error_(), is_initialized_(false) {}
+
+ /**
+ * @brief operator bool operator for checking if optional is initialized
+ */
+ operator bool() const {
+ return is_initialized_;
+ }
+
+ /**
+ * @brief operator * access to object
+ * @return
+ */
+ ObjectType& operator*() const {
+ DCHECK(is_initialized_);
+ return *object_;
+ }
+
+ ErrorType error() const {
+ return error_;
+ }
+
+ private:
+ ObjectType* object_;
+ ErrorType error_;
+ bool is_initialized_;
+};
+
+} // utils utils
+#endif // ERROR_OR_H
diff --git a/src/components/utils/include/utils/system_time_handler.h b/src/components/utils/include/utils/system_time_handler.h
new file mode 100644
index 0000000000..15b2dd0cca
--- /dev/null
+++ b/src/components/utils/include/utils/system_time_handler.h
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+
+#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SYSTEM_TIME_HANDLER_H_
+#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SYSTEM_TIME_HANDLER_H_
+
+#include <time.h>
+
+namespace utils {
+
+/**
+ * @brief The SystemTimeListener interface.
+ * This interface allows to get notifications whenever
+ * system time appears or fails to appear.
+ */
+class SystemTimeListener {
+ public:
+ /**
+ * @brief OnSystemTimeArrived Notify about system time
+ * in utc format
+ * @param utc_time current system time.
+ */
+ virtual void OnSystemTimeArrived(const time_t utc_time) = 0;
+};
+
+/**
+ * @brief SystemTimeHandler the interface which provides the necessary
+ * public API to work with system time. The class does not implement
+ * any logic it's public api forwards call to the private virtual
+ * methods which are suppose to be defined within specific implementation.
+ */
+class SystemTimeHandler {
+ public:
+ /**
+ * @brief SystemTimeHandler creates an instance
+ * for this class.
+ */
+ SystemTimeHandler();
+
+ /**
+ * @brief QuerySystemTime provides the public interface
+ * to retrieve the system time. Interface uses private implementation
+ * hence the logic will be defined within descendant class.
+ */
+ void QuerySystemTime();
+
+ /**
+ * @brief SubscribeOnSystemTime allows to subscribe listener
+ * to the certain event. This class does not provide such storage.
+ * It rather uses private pure virtual function. So the final behaviour
+ * should be defined within the descendant class
+ */
+ void SubscribeOnSystemTime(SystemTimeListener* listener);
+
+ /**
+ * @brief UnsubscribeFromSystemTime allows to unsubscribe listener
+ * from the certain event. This class does not manipulate with storage.
+ * It rather uses private pure virtual function. So the final behaviour
+ * should be defined within the descendant class
+ */
+ void UnsubscribeFromSystemTime(SystemTimeListener* listener);
+
+ /**
+ * @brief GetUTCTime allows to obtain cached result for the
+ * GetSystemTime request
+ * @return utc time.
+ */
+ time_t GetUTCTime();
+
+ /**
+ * @brief Checks if system time is ready
+ * and can be requested by GetSystemTime request
+ * @return True if HMI is ready to provide UTC time
+ * otherwise False
+ */
+ bool system_time_can_be_received() const;
+
+ /**
+ * @brief ~SystemTimeHandler destroys the object
+ */
+ virtual ~SystemTimeHandler();
+
+ private:
+ /**
+ * @brief DoSystemTimeQuery responsible for the system time querying.
+ * It is up to implementator how exactly system is going to receive this time.
+ */
+ virtual void DoSystemTimeQuery() = 0;
+
+ /**
+ * @brief DoSubscribe implements the logic which allows to handle
+ * subscription process. The handling logic should be defined within
+ * descendant class.
+ */
+ virtual void DoSubscribe(SystemTimeListener* listener) = 0;
+
+ /**
+ * @brief DoUnsubscribe implements the logic which allows to handle
+ * unsubscription process. The handling logic should be defined within
+ * descendant class.
+ */
+ virtual void DoUnsubscribe(SystemTimeListener* listener) = 0;
+
+ /**
+ * @brief FetchSystemTime allows to obtain the cached result
+ * for the GetSystemTime request.
+ * @return utc time.
+ */
+ virtual time_t FetchSystemTime() = 0;
+
+ /**
+ * @brief Checks if UTC time is ready to provided by HMI
+ * and can be requested by GetSystemTime request
+ * @return True if HMI is ready to provide UTC time
+ * otherwise False
+ */
+ virtual bool utc_time_can_be_received() const = 0;
+};
+
+} // namespace utils
+
+#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SYSTEM_TIME_HANDLER_H_
diff --git a/src/components/utils/src/lock_posix.cc b/src/components/utils/src/lock_posix.cc
index 9b90ad20b9..e5e6d7fad0 100644
--- a/src/components/utils/src/lock_posix.cc
+++ b/src/components/utils/src/lock_posix.cc
@@ -63,14 +63,16 @@ Lock::Lock(bool is_recursive)
Lock::~Lock() {
#ifndef NDEBUG
if (lock_taken_ > 0) {
- LOG4CXX_ERROR(logger_, "Destroying non-released mutex " << &mutex_);
+ LOG4CXX_FATAL(logger_, "Destroying non-released mutex " << &mutex_);
+ NOTREACHED();
}
#endif
int32_t status = pthread_mutex_destroy(&mutex_);
if (status != 0) {
- LOG4CXX_ERROR(logger_,
+ LOG4CXX_FATAL(logger_,
"Failed to destroy mutex " << &mutex_ << ": "
<< strerror(status));
+ NOTREACHED();
}
}
@@ -90,9 +92,10 @@ void Lock::Release() {
AssertTakenAndMarkFree();
const int32_t status = pthread_mutex_unlock(&mutex_);
if (status != 0) {
- LOG4CXX_ERROR(logger_,
+ LOG4CXX_FATAL(logger_,
"Failed to unlock mutex" << &mutex_ << ": "
<< strerror(status));
+ NOTREACHED();
}
}
@@ -110,14 +113,14 @@ bool Lock::Try() {
#ifndef NDEBUG
void Lock::AssertFreeAndMarkTaken() {
if ((lock_taken_ > 0) && !is_mutex_recursive_) {
- LOG4CXX_ERROR(logger_, "Locking already taken not recursive mutex");
+ LOG4CXX_FATAL(logger_, "Locking already taken not recursive mutex");
NOTREACHED();
}
lock_taken_++;
}
void Lock::AssertTakenAndMarkFree() {
if (lock_taken_ == 0) {
- LOG4CXX_ERROR(logger_, "Unlocking a mutex that is not taken");
+ LOG4CXX_FATAL(logger_, "Unlocking a mutex that is not taken");
NOTREACHED();
}
lock_taken_--;
diff --git a/src/components/utils/src/system_time_handler.cc b/src/components/utils/src/system_time_handler.cc
new file mode 100644
index 0000000000..0c3c62cc53
--- /dev/null
+++ b/src/components/utils/src/system_time_handler.cc
@@ -0,0 +1,62 @@
+/*
+ * 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 "utils/system_time_handler.h"
+
+namespace utils {
+
+SystemTimeHandler::SystemTimeHandler() {}
+
+SystemTimeHandler::~SystemTimeHandler() {}
+
+void SystemTimeHandler::QuerySystemTime() {
+ DoSystemTimeQuery();
+}
+
+void SystemTimeHandler::SubscribeOnSystemTime(SystemTimeListener* listener) {
+ DoSubscribe(listener);
+}
+
+void SystemTimeHandler::UnsubscribeFromSystemTime(
+ SystemTimeListener* listener) {
+ DoUnsubscribe(listener);
+}
+
+time_t SystemTimeHandler::GetUTCTime() {
+ return FetchSystemTime();
+}
+
+bool SystemTimeHandler::system_time_can_be_received() const {
+ return utc_time_can_be_received();
+}
+
+} // namespace utils
diff --git a/src/components/utils/test/conditional_variable_test.cc b/src/components/utils/test/conditional_variable_test.cc
index 524d53cafa..48e2e53200 100644
--- a/src/components/utils/test/conditional_variable_test.cc
+++ b/src/components/utils/test/conditional_variable_test.cc
@@ -61,8 +61,8 @@ class ConditionalVariableTest : public ::testing::Test {
protected:
std::string test_value_;
- sync_primitives::ConditionalVariable cond_var_;
sync_primitives::Lock test_mutex_;
+ sync_primitives::ConditionalVariable cond_var_;
unsigned counter_;
};
@@ -116,6 +116,8 @@ TEST_F(ConditionalVariableTest,
ASSERT_FALSE(thread_created) << "thread2 is not created!";
check_counter();
EXPECT_EQ(2u, counter_);
+ pthread_join(thread1, NULL);
+ pthread_join(thread2, NULL);
}
TEST_F(
diff --git a/src/components/utils/test/data_accessor_test.cc b/src/components/utils/test/data_accessor_test.cc
index c7c728b676..24b7bab282 100644
--- a/src/components/utils/test/data_accessor_test.cc
+++ b/src/components/utils/test/data_accessor_test.cc
@@ -41,7 +41,8 @@ namespace utils_test {
TEST(DataAccessorTest, CreateDataAccessor) {
// arrange
int test_value = 10;
- sync_primitives::Lock testSet_lock_;
+ std::shared_ptr<sync_primitives::Lock> testSet_lock_ =
+ std::make_shared<sync_primitives::Lock>();
DataAccessor<int> testdata(test_value, testSet_lock_);
int data_from_testdata = testdata.GetData();
@@ -52,17 +53,19 @@ TEST(DataAccessorTest, CreateDataAccessor) {
TEST(DataAccessorTest, CreateDataAccessor_MutexIsLocked_CannotLockItAgain) {
// arrange
int test_value = 10;
- sync_primitives::Lock testSet_lock_;
+ std::shared_ptr<sync_primitives::Lock> testSet_lock_ =
+ std::make_shared<sync_primitives::Lock>();
DataAccessor<int> testdata(test_value, testSet_lock_);
// assert
- EXPECT_FALSE(testSet_lock_.Try());
+ EXPECT_FALSE(testSet_lock_->Try());
}
TEST(DataAccessorTest, CopyDataAccessor_GetDataFromDataAccessors) {
// arrange
int test_value = 10;
- sync_primitives::Lock testSet_lock_;
+ std::shared_ptr<sync_primitives::Lock> testSet_lock_ =
+ std::make_shared<sync_primitives::Lock>();
DataAccessor<int> testdata(test_value, testSet_lock_);
DataAccessor<int> testdata_copy(testdata);
@@ -72,14 +75,15 @@ TEST(DataAccessorTest, CopyDataAccessor_GetDataFromDataAccessors) {
// assert
EXPECT_EQ(data_from_testdata, data_from_testdata_copy);
- EXPECT_FALSE(testSet_lock_.Try());
+ EXPECT_FALSE(testSet_lock_->Try());
}
TEST(DataAccessorTest,
ChangedDataInDataAccessor_ChangeData_DataInDataAccessorIsChanged) {
// arrange
int test_value = 10;
- sync_primitives::Lock testSet_lock_;
+ std::shared_ptr<sync_primitives::Lock> testSet_lock_ =
+ std::make_shared<sync_primitives::Lock>();
DataAccessor<int> testdata(test_value, testSet_lock_);
test_value = 0;
@@ -93,40 +97,42 @@ TEST(DataAccessorTest,
DeleteDataAccessor_CreatedOneDeleteOneThread_MutexIsUnlocked) {
// arrange
int test_value = 10;
- sync_primitives::Lock testSet_lock_;
+ std::shared_ptr<sync_primitives::Lock> testSet_lock_ =
+ std::make_shared<sync_primitives::Lock>();
{
DataAccessor<int> testdata(test_value, testSet_lock_);
// assert
- EXPECT_FALSE(testSet_lock_.Try());
+ EXPECT_FALSE(testSet_lock_->Try());
}
// assert
- EXPECT_TRUE(testSet_lock_.Try());
+ EXPECT_TRUE(testSet_lock_->Try());
- testSet_lock_.Release();
+ testSet_lock_->Release();
}
TEST(DataAccessorTest,
DeleteDataAccessor_CreatedThreadAndCopyDeleteBothThreads_MutexIsUnlocked) {
// arrange
int test_value = 10;
- sync_primitives::Lock testSet_lock_;
+ std::shared_ptr<sync_primitives::Lock> testSet_lock_ =
+ std::make_shared<sync_primitives::Lock>();
{
DataAccessor<int> testdata(test_value, testSet_lock_);
{
DataAccessor<int> testdata_copy(testdata);
// assert
- EXPECT_FALSE(testSet_lock_.Try());
+ EXPECT_FALSE(testSet_lock_->Try());
}
// assert
- EXPECT_FALSE(testSet_lock_.Try());
+ EXPECT_FALSE(testSet_lock_->Try());
}
// assert
- EXPECT_TRUE(testSet_lock_.Try());
- testSet_lock_.Release();
+ EXPECT_TRUE(testSet_lock_->Try());
+ testSet_lock_->Release();
}
} // namespace utils_test
diff --git a/tools/infrastructure/check_style.sh b/tools/infrastructure/check_style.sh
index 647427e793..08ae1b9860 100755
--- a/tools/infrastructure/check_style.sh
+++ b/tools/infrastructure/check_style.sh
@@ -58,6 +58,19 @@ if [ "$1" = "--fix" ]
then
for FILE_NAME in $FILE_NAMES; do fix_style $FILE_NAME; done
else
- for FILE_NAME in $FILE_NAMES; do check_style $FILE_NAME; done
+ PASSED=0
+ for FILE_NAME in $FILE_NAMES; do
+ check_style $FILE_NAME
+ if [ $? != 0 ]
+ then
+ echo "in " $FILE_NAME
+ PASSED=1
+ fi
+ done
+ if [ $PASSED = 1 ]
+ then
+ exit 1
+ fi
fi
+